diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 212e2652..16db4b9c 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: b490ac2541da61a0ac7ae9eaf933e4ca
+ docVersion: v2.0.3
+ speakeasyVersion: 1.344.1
+ generationVersion: 2.376.2
+ releaseVersion: 2.4.0
+ configChecksum: 13cc360c2e5959e3213e9358041ad16c
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.8.2
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
@@ -332,7 +333,7 @@ generatedFiles:
- src/sdk/models/shared/activityreverttransactionoutput.py
- src/sdk/models/shared/orchestrationtransaction.py
- src/sdk/models/shared/orchestrationlistwalletsresponse.py
- - src/sdk/models/shared/wallet.py
+ - src/sdk/models/shared/orchestrationwallet.py
- src/sdk/models/shared/activitygetwalletoutput.py
- src/sdk/models/shared/walletwithbalances.py
- src/sdk/models/shared/assetholder.py
@@ -361,7 +362,7 @@ generatedFiles:
- src/sdk/models/shared/activitydebitwallet.py
- src/sdk/models/shared/debitwalletrequest.py
- src/sdk/models/shared/activitycreditwallet.py
- - src/sdk/models/shared/creditwalletrequest.py
+ - src/sdk/models/shared/orchestrationcreditwalletrequest.py
- src/sdk/models/shared/activitycreatetransaction.py
- src/sdk/models/shared/orchestrationposttransaction.py
- src/sdk/models/shared/activityconfirmhold.py
@@ -533,7 +534,9 @@ generatedFiles:
- src/sdk/models/shared/balance.py
- src/sdk/models/shared/createbalancerequest.py
- src/sdk/models/shared/createwalletresponse.py
+ - src/sdk/models/shared/wallet.py
- src/sdk/models/shared/createwalletrequest.py
+ - src/sdk/models/shared/creditwalletrequest.py
- src/sdk/models/shared/debitwalletresponse.py
- src/sdk/models/shared/getbalanceresponse.py
- src/sdk/models/shared/balancewithassets.py
@@ -1020,7 +1023,7 @@ generatedFiles:
- docs/models/shared/orchestrationtransaction.md
- docs/models/shared/orchestrationlistwalletsresponsecursor.md
- docs/models/shared/orchestrationlistwalletsresponse.md
- - docs/models/shared/wallet.md
+ - docs/models/shared/orchestrationwallet.md
- docs/models/shared/activitygetwalletoutput.md
- docs/models/shared/walletwithbalancesbalances.md
- docs/models/shared/walletwithbalances.md
@@ -1055,7 +1058,7 @@ generatedFiles:
- docs/models/shared/activitydebitwallet.md
- docs/models/shared/debitwalletrequest.md
- docs/models/shared/activitycreditwallet.md
- - docs/models/shared/creditwalletrequest.md
+ - docs/models/shared/orchestrationcreditwalletrequest.md
- docs/models/shared/activitycreatetransaction.md
- docs/models/shared/orchestrationposttransactionscript.md
- docs/models/shared/orchestrationposttransaction.md
@@ -1282,7 +1285,10 @@ generatedFiles:
- docs/models/shared/balance.md
- docs/models/shared/createbalancerequest.md
- docs/models/shared/createwalletresponse.md
+ - docs/models/shared/walletbalances.md
+ - docs/models/shared/wallet.md
- docs/models/shared/createwalletrequest.md
+ - docs/models/shared/creditwalletrequest.md
- docs/models/shared/debitwalletresponse.md
- docs/models/shared/getbalanceresponse.md
- docs/models/shared/balancewithassets.md
@@ -1335,3 +1341,4 @@ generatedFiles:
- src/sdk/_hooks/sdkhooks.py
- src/sdk/_hooks/types.py
- src/sdk/_hooks/__init__.py
+ - CONTRIBUTING.md
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000..d585717f
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,26 @@
+# Contributing to This Repository
+
+Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements.
+
+## How to Report Issues
+
+If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes:
+
+- A clear and descriptive title
+- Steps to reproduce the issue
+- Expected and actual behavior
+- Any relevant logs, screenshots, or error messages
+- Information about your environment (e.g., operating system, software versions)
+ - For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed
+
+## Issue Triage and Upstream Fixes
+
+We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code.
+
+## Contact
+
+If you have any questions or need further assistance, please feel free to reach out by opening an issue.
+
+Thank you for your understanding and cooperation!
+
+The Maintainers
diff --git a/RELEASES.md b/RELEASES.md
index cef007df..4ceb4423 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-07-22 00:02:14
+### Changes
+Based on:
+- OpenAPI Doc v2.0.3
+- Speakeasy CLI 1.344.1 (2.376.2) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [python v2.4.0] .
+### Releases
+- [PyPI v2.4.0] https://pypi.org/project/formance-sdk-python/2.4.0 - .
\ 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/operations/listwalletsrequest.md b/docs/models/operations/listwalletsrequest.md
index b0edab09..4c0fce91 100644
--- a/docs/models/operations/listwalletsrequest.md
+++ b/docs/models/operations/listwalletsrequest.md
@@ -6,6 +6,7 @@
| Field | Type | Required | Description | Example |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `cursor` | *Optional[str]* | :heavy_minus_sign: | Parameter used in pagination requests.
Set to the value of next for the next page of results.
Set to the value of previous for the previous page of results.
No other parameters can be set when the pagination token is set.
| aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ== |
+| `expand` | *Optional[str]* | :heavy_minus_sign: | N/A | balances |
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below. | {
"admin": "true"
} |
| `name` | *Optional[str]* | :heavy_minus_sign: | Filter on wallet name | wallet1 |
| `page_size` | *Optional[int]* | :heavy_minus_sign: | The maximum number of results to return per page | 100 |
\ No newline at end of file
diff --git a/docs/models/shared/activitycreditwallet.md b/docs/models/shared/activitycreditwallet.md
index ab7e4478..ca918da1 100644
--- a/docs/models/shared/activitycreditwallet.md
+++ b/docs/models/shared/activitycreditwallet.md
@@ -3,7 +3,7 @@
## Fields
-| Field | Type | Required | Description | Example |
-| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
-| `data` | [Optional[shared.CreditWalletRequest]](../../models/shared/creditwalletrequest.md) | :heavy_minus_sign: | N/A | {
"amount": {
"asset": "USD/2",
"amount": 100
},
"metadata": {
"key": ""
},
"sources": []
} |
-| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
+| `data` | [Optional[shared.OrchestrationCreditWalletRequest]](../../models/shared/orchestrationcreditwalletrequest.md) | :heavy_minus_sign: | N/A | {
"amount": {
"asset": "USD/2",
"amount": 100
},
"metadata": {
"key": ""
},
"sources": []
} |
+| `id` | *Optional[str]* | :heavy_minus_sign: | N/A | |
\ 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/creditwalletrequest.md b/docs/models/shared/creditwalletrequest.md
index 564e4f84..92d1675f 100644
--- a/docs/models/shared/creditwalletrequest.md
+++ b/docs/models/shared/creditwalletrequest.md
@@ -6,8 +6,8 @@
| Field | Type | Required | Description |
| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
| `amount` | [shared.Monetary](../../models/shared/monetary.md) | :heavy_check_mark: | N/A |
-| `metadata` | Dict[str, *str*] | :heavy_check_mark: | Metadata associated with the wallet. |
-| `sources` | List[[shared.Subject](../../models/shared/subject.md)] | :heavy_check_mark: | N/A |
| `balance` | *Optional[str]* | :heavy_minus_sign: | The balance to credit |
+| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Metadata associated with the wallet. |
| `reference` | *Optional[str]* | :heavy_minus_sign: | N/A |
+| `sources` | List[[shared.Subject](../../models/shared/subject.md)] | :heavy_minus_sign: | N/A |
| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/docs/models/shared/orchestrationcreditwalletrequest.md b/docs/models/shared/orchestrationcreditwalletrequest.md
new file mode 100644
index 00000000..0a174f16
--- /dev/null
+++ b/docs/models/shared/orchestrationcreditwalletrequest.md
@@ -0,0 +1,13 @@
+# OrchestrationCreditWalletRequest
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
+| `amount` | [shared.Monetary](../../models/shared/monetary.md) | :heavy_check_mark: | N/A |
+| `metadata` | Dict[str, *str*] | :heavy_check_mark: | Metadata associated with the wallet. |
+| `sources` | List[[shared.Subject](../../models/shared/subject.md)] | :heavy_check_mark: | N/A |
+| `balance` | *Optional[str]* | :heavy_minus_sign: | The balance to credit |
+| `reference` | *Optional[str]* | :heavy_minus_sign: | N/A |
+| `timestamp` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/docs/models/shared/orchestrationlistwalletsresponsecursor.md b/docs/models/shared/orchestrationlistwalletsresponsecursor.md
index e4211c5d..ea37e235 100644
--- a/docs/models/shared/orchestrationlistwalletsresponsecursor.md
+++ b/docs/models/shared/orchestrationlistwalletsresponsecursor.md
@@ -3,10 +3,10 @@
## Fields
-| Field | Type | Required | Description | Example |
-| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
-| `data` | List[[shared.Wallet](../../models/shared/wallet.md)] | :heavy_check_mark: | N/A | |
-| `page_size` | *int* | :heavy_check_mark: | N/A | 15 |
-| `has_more` | *Optional[bool]* | :heavy_minus_sign: | N/A | false |
-| `next` | *Optional[str]* | :heavy_minus_sign: | N/A | |
-| `previous` | *Optional[str]* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
+| `data` | List[[shared.OrchestrationWallet](../../models/shared/orchestrationwallet.md)] | :heavy_check_mark: | N/A | |
+| `page_size` | *int* | :heavy_check_mark: | N/A | 15 |
+| `has_more` | *Optional[bool]* | :heavy_minus_sign: | N/A | false |
+| `next` | *Optional[str]* | :heavy_minus_sign: | N/A | |
+| `previous` | *Optional[str]* | :heavy_minus_sign: | N/A | YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol= |
\ No newline at end of file
diff --git a/docs/models/shared/orchestrationwallet.md b/docs/models/shared/orchestrationwallet.md
new file mode 100644
index 00000000..40b254ff
--- /dev/null
+++ b/docs/models/shared/orchestrationwallet.md
@@ -0,0 +1,12 @@
+# OrchestrationWallet
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
+| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A |
+| `id` | *str* | :heavy_check_mark: | The unique ID of the wallet. |
+| `ledger` | *str* | :heavy_check_mark: | N/A |
+| `metadata` | Dict[str, *str*] | :heavy_check_mark: | Metadata associated with the wallet. |
+| `name` | *str* | :heavy_check_mark: | N/A |
\ No newline at end of file
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/docs/models/shared/wallet.md b/docs/models/shared/wallet.md
index 549a85ee..2d1ffec5 100644
--- a/docs/models/shared/wallet.md
+++ b/docs/models/shared/wallet.md
@@ -3,10 +3,11 @@
## Fields
-| Field | Type | Required | Description |
-| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- |
-| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A |
-| `id` | *str* | :heavy_check_mark: | The unique ID of the wallet. |
-| `ledger` | *str* | :heavy_check_mark: | N/A |
-| `metadata` | Dict[str, *str*] | :heavy_check_mark: | Metadata associated with the wallet. |
-| `name` | *str* | :heavy_check_mark: | N/A |
\ No newline at end of file
+| Field | Type | Required | Description |
+| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
+| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | N/A |
+| `id` | *str* | :heavy_check_mark: | The unique ID of the wallet. |
+| `ledger` | *str* | :heavy_check_mark: | N/A |
+| `metadata` | Dict[str, *str*] | :heavy_check_mark: | Metadata associated with the wallet. |
+| `name` | *str* | :heavy_check_mark: | N/A |
+| `balances` | [Optional[shared.WalletBalances]](../../models/shared/walletbalances.md) | :heavy_minus_sign: | N/A |
\ No newline at end of file
diff --git a/docs/models/shared/walletbalances.md b/docs/models/shared/walletbalances.md
new file mode 100644
index 00000000..42d179a5
--- /dev/null
+++ b/docs/models/shared/walletbalances.md
@@ -0,0 +1,8 @@
+# WalletBalances
+
+
+## Fields
+
+| Field | Type | Required | Description |
+| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
+| `main` | [shared.AssetHolder](../../models/shared/assetholder.md) | :heavy_check_mark: | N/A |
\ No newline at end of file
diff --git a/docs/sdks/wallets/README.md b/docs/sdks/wallets/README.md
index d2cf865b..288aeffa 100644
--- a/docs/sdks/wallets/README.md
+++ b/docs/sdks/wallets/README.md
@@ -578,6 +578,7 @@ s = sdk.SDK(
res = s.wallets.list_wallets(request=operations.ListWalletsRequest(
cursor='aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==',
+ expand='balances',
metadata={
'admin': 'true',
},
diff --git a/gen.yaml b/gen.yaml
index c6da8772..a6371191 100755
--- a/gen.yaml
+++ b/gen.yaml
@@ -12,7 +12,7 @@ generation:
comments: {}
telemetryEnabled: false
python:
- version: 2.3.1
+ version: 2.4.0
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..fd5fe557 100644
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@
setuptools.setup(
name='formance-sdk-python',
- version='2.3.1',
+ version='2.4.0',
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/models/operations/listwallets.py b/src/sdk/models/operations/listwallets.py
index e5119330..6fac4e12 100644
--- a/src/sdk/models/operations/listwallets.py
+++ b/src/sdk/models/operations/listwallets.py
@@ -15,6 +15,7 @@ class ListWalletsRequest:
Set to the value of previous for the previous page of results.
No other parameters can be set when the pagination token is set.
"""
+ expand: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'expand', 'style': 'form', 'explode': True }})
metadata: Optional[Dict[str, str]] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'metadata', 'style': 'deepObject', 'explode': True }})
r"""Filter wallets by metadata key value pairs. Nested objects can be used as seen in the example below."""
name: Optional[str] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'name', 'style': 'form', 'explode': True }})
diff --git a/src/sdk/models/shared/__init__.py b/src/sdk/models/shared/__init__.py
index 548d23ea..436d6ea0 100644
--- a/src/sdk/models/shared/__init__.py
+++ b/src/sdk/models/shared/__init__.py
@@ -115,6 +115,7 @@
from .moneycorpconfig import *
from .orchestrationaccount import *
from .orchestrationconnector import *
+from .orchestrationcreditwalletrequest import *
from .orchestrationlistwalletsresponse import *
from .orchestrationpayment import *
from .orchestrationpaymentadjustment import *
@@ -123,6 +124,7 @@
from .orchestrationposttransaction import *
from .orchestrationtransaction import *
from .orchestrationv2transaction import *
+from .orchestrationwallet import *
from .payment import *
from .paymentadjustment import *
from .paymentrequest import *
@@ -343,4 +345,4 @@
from .workflowinstancehistorystageinput import *
from .workflowinstancehistorystageoutput import *
-__all__ = ["Account","AccountBalance","AccountRequest","AccountResponse","AccountType","AccountWithVolumesAndBalances","AccountsCursor","AccountsCursorResponse","AccountsCursorResponseCursor","ActivityAddAccountMetadata","ActivityConfirmHold","ActivityCreateTransaction","ActivityCreateTransactionOutput","ActivityCreditWallet","ActivityDebitWallet","ActivityDebitWalletOutput","ActivityGetAccount","ActivityGetAccountOutput","ActivityGetPayment","ActivityGetPaymentOutput","ActivityGetWallet","ActivityGetWalletOutput","ActivityListWallets","ActivityRevertTransaction","ActivityRevertTransactionOutput","ActivityStripeTransfer","ActivityVoidHold","AddAccountToPoolRequest","AdyenConfig","AggregateBalancesResponse","AssetHolder","AtlarConfig","Attempt","AttemptResponse","Balance","BalanceWithAssets","Balances","BalancesCursor","BalancesCursorCursor","BalancesCursorResponse","BalancesCursorResponseCursor","BankAccount","BankAccountRelatedAccounts","BankAccountRequest","BankAccountResponse","BankAccountsCursor","BankAccountsCursorCursor","BankingCircleConfig","Client","ClientSecret","Config","ConfigChangeSecret","ConfigInfo","ConfigInfoResponse","ConfigResponse","ConfigUser","ConfigsResponse","ConfigsResponseCursor","ConfirmHoldRequest","Connector","ConnectorConfig","ConnectorConfigResponse","ConnectorResponse","ConnectorsConfigsResponse","ConnectorsConfigsResponseConnector","ConnectorsConfigsResponseData","ConnectorsResponse","ConnectorsResponseData","Contract","CreateBalanceRequest","CreateBalanceResponse","CreateClientRequest","CreateClientResponse","CreateSecretRequest","CreateSecretResponse","CreateTriggerResponse","CreateWalletRequest","CreateWalletResponse","CreateWorkflowRequest","CreateWorkflowResponse","CreditWalletRequest","CurrencyCloudConfig","Cursor","Data","DebitWalletRequest","DebitWalletResponse","Descriptor","DummyPayConfig","ErrorsEnum","ExpandedDebitHold","Expr","Filter","ForwardBankAccountRequest","GenericConfig","GetBalanceResponse","GetHoldResponse","GetHoldsResponse","GetHoldsResponseCursor","GetTransactionsResponse","GetTransactionsResponseCursor","GetVersionsResponse","GetWalletResponse","GetWalletSummaryResponse","GetWorkflowInstanceHistoryResponse","GetWorkflowInstanceHistoryStageResponse","GetWorkflowInstanceResponse","GetWorkflowResponse","Hold","Key","LedgerAccountSubject","LedgerInfo","LedgerInfoResponse","LedgerStorage","ListBalancesResponse","ListBalancesResponseCursor","ListClientsResponse","ListRunsResponse","ListTriggersOccurrencesResponse","ListTriggersResponse","ListUsersResponse","ListWalletsResponse","ListWalletsResponseCursor","ListWorkflowsResponse","Log","LogsCursorResponse","LogsCursorResponseCursor","MangoPayConfig","Mapping","MappingResponse","Metadata","MigrationInfo","ModulrConfig","Monetary","MoneycorpConfig","OrchestrationAccount","OrchestrationConnector","OrchestrationListWalletsResponse","OrchestrationListWalletsResponseCursor","OrchestrationPayment","OrchestrationPaymentAdjustment","OrchestrationPaymentAdjustmentRaw","OrchestrationPaymentMetadata","OrchestrationPaymentRaw","OrchestrationPaymentScheme","OrchestrationPaymentStatus","OrchestrationPaymentType","OrchestrationPostTransaction","OrchestrationPostTransactionScript","OrchestrationTransaction","OrchestrationV2Transaction","Payment","PaymentAdjustment","PaymentAdjustmentRaw","PaymentRequest","PaymentResponse","PaymentScheme","PaymentStatus","PaymentType","PaymentsAccount","PaymentsAccountRaw","PaymentsAccountResponse","PaymentsCursor","PaymentsCursorCursor","PaymentsErrorsEnum","PoliciesCursorResponse","PoliciesCursorResponseCursor","Policy","PolicyRequest","PolicyResponse","Pool","PoolBalance","PoolBalances","PoolBalancesResponse","PoolRequest","PoolResponse","PoolsCursor","PoolsCursorCursor","PostTransaction","PostTransactionScript","Posting","Query","QueryRaw","Raw","ReadClientResponse","ReadTriggerResponse","ReadUserResponse","Reconciliation","ReconciliationRequest","ReconciliationResponse","ReconciliationsCursorResponse","ReconciliationsCursorResponseCursor","Response","ResponseCursor","ReverseTransferInitiationRequest","RunWorkflowResponse","Schemas","Scheme","Script","ScriptResponse","Secret","Security","ServerInfo","Stage","StageDelay","StageSend","StageSendDestination","StageSendDestinationAccount","StageSendDestinationPayment","StageSendDestinationWallet","StageSendSource","StageSendSourceAccount","StageSendSourcePayment","StageSendSourceWallet","StageStatus","StageWaitEvent","State","Stats","StatsResponse","Status","Storage","StripeConfig","Subject","TaskBankingCircle","TaskBankingCircleState","TaskCurrencyCloud","TaskCurrencyCloudDescriptor","TaskCurrencyCloudState","TaskDummyPay","TaskDummyPayDescriptor","TaskDummyPayState","TaskMangoPay","TaskMangoPayDescriptor","TaskMangoPayState","TaskModulr","TaskModulrDescriptor","TaskModulrState","TaskMoneycorp","TaskMoneycorpDescriptor","TaskMoneycorpState","TaskResponse","TaskResponseData","TaskStripe","TaskStripeDescriptor","TaskStripeState","TaskWise","TaskWiseDescriptor","TaskWiseState","TasksCursor","TasksCursorCursor","TasksCursorData","Total","Transaction","TransactionData","TransactionResponse","Transactions","TransactionsCursorResponse","TransactionsCursorResponseCursor","TransactionsResponse","TransferInitiation","TransferInitiationAdjusments","TransferInitiationPayments","TransferInitiationRequest","TransferInitiationRequestType","TransferInitiationResponse","TransferInitiationStatus","TransferInitiationType","TransferInitiationsCursor","TransferInitiationsCursorCursor","TransferRequest","TransferResponse","Trigger","TriggerData","TriggerOccurrence","Type","Update","UpdateAccount","UpdateBankAccountMetadataRequest","UpdateClientRequest","UpdateClientResponse","UpdateTransferInitiationStatusRequest","User","V2Account","V2AccountResponse","V2AccountsCursorResponse","V2AccountsCursorResponseCursor","V2ActivityAddAccountMetadata","V2ActivityConfirmHold","V2ActivityCreateTransaction","V2ActivityCreateTransactionOutput","V2ActivityCreditWallet","V2ActivityDebitWallet","V2ActivityDebitWalletOutput","V2ActivityGetAccount","V2ActivityGetAccountOutput","V2ActivityGetPayment","V2ActivityGetPaymentOutput","V2ActivityGetWallet","V2ActivityGetWalletOutput","V2ActivityListWallets","V2ActivityStripeTransfer","V2ActivityStripeTransferMetadata","V2ActivityVoidHold","V2AggregateBalancesResponse","V2AssetHolder","V2BulkElement","V2BulkElementAddMetadata","V2BulkElementAddMetadataData","V2BulkElementCreateTransaction","V2BulkElementDeleteMetadata","V2BulkElementDeleteMetadataData","V2BulkElementResult","V2BulkElementResultCreateTransactionSchemas","V2BulkElementResultDeleteMetadataSchemas","V2BulkElementResultErrorSchemas","V2BulkElementResultRevertTransactionSchemas","V2BulkElementRevertTransaction","V2BulkElementRevertTransactionData","V2BulkResponse","V2ConfigInfoResponse","V2Connector","V2CreateLedgerRequest","V2CreateTransactionResponse","V2CreateTriggerResponse","V2CreateWorkflowRequest","V2CreateWorkflowResponse","V2CreditWalletRequest","V2DebitWalletRequest","V2ErrorsEnum","V2ExpandedTransaction","V2GetLedgerResponse","V2GetTransactionResponse","V2GetWorkflowInstanceHistoryResponse","V2GetWorkflowInstanceHistoryStageResponse","V2GetWorkflowInstanceResponse","V2GetWorkflowResponse","V2Hold","V2Ledger","V2LedgerAccountSubject","V2LedgerInfo","V2LedgerInfoResponse","V2LedgerInfoStorage","V2LedgerListResponse","V2LedgerListResponseCursor","V2ListRunsResponse","V2ListRunsResponseCursor","V2ListTriggersOccurrencesResponse","V2ListTriggersOccurrencesResponseCursor","V2ListTriggersResponse","V2ListTriggersResponseCursor","V2ListWalletsResponse","V2ListWalletsResponseCursor","V2ListWorkflowsResponse","V2ListWorkflowsResponseCursor","V2Log","V2LogType","V2LogsCursorResponse","V2LogsCursorResponseCursor","V2MigrationInfo","V2MigrationInfoState","V2Monetary","V2Payment","V2PaymentAdjustment","V2PaymentAdjustmentRaw","V2PaymentMetadata","V2PaymentRaw","V2PaymentStatus","V2PaymentType","V2PostTransaction","V2PostTransactionScript","V2Posting","V2ReadTriggerResponse","V2RevertTransactionResponse","V2RunWorkflowResponse","V2ServerInfo","V2Stage","V2StageDelay","V2StageSend","V2StageSendDestination","V2StageSendDestinationAccount","V2StageSendDestinationPayment","V2StageSendDestinationWallet","V2StageSendSource","V2StageSendSourceAccount","V2StageSendSourcePayment","V2StageSendSourceWallet","V2StageStatus","V2StageWaitEvent","V2Stats","V2StatsResponse","V2Subject","V2TargetID","V2TargetType","V2TestTriggerResponse","V2Transaction","V2TransactionsCursorResponse","V2TransactionsCursorResponseCursor","V2Trigger","V2TriggerData","V2TriggerOccurrence","V2TriggerTest","V2Update","V2UpdateAccount","V2Volume","V2VolumesWithBalance","V2VolumesWithBalanceCursorResponse","V2VolumesWithBalanceCursorResponseCursor","V2Wallet","V2WalletSubject","V2WalletWithBalances","V2Workflow","V2WorkflowConfig","V2WorkflowInstance","V2WorkflowInstanceHistory","V2WorkflowInstanceHistoryStage","V2WorkflowInstanceHistoryStageInput","V2WorkflowInstanceHistoryStageOutput","Variables","Version","Volume","Wallet","WalletSubject","WalletWithBalances","WalletWithBalancesBalances","WalletsTransaction","WalletsVolume","WebhooksConfig","WebhooksErrorsEnum","WiseConfig","Workflow","WorkflowConfig","WorkflowInstance","WorkflowInstanceHistory","WorkflowInstanceHistoryStage","WorkflowInstanceHistoryStageInput","WorkflowInstanceHistoryStageOutput"]
+__all__ = ["Account","AccountBalance","AccountRequest","AccountResponse","AccountType","AccountWithVolumesAndBalances","AccountsCursor","AccountsCursorResponse","AccountsCursorResponseCursor","ActivityAddAccountMetadata","ActivityConfirmHold","ActivityCreateTransaction","ActivityCreateTransactionOutput","ActivityCreditWallet","ActivityDebitWallet","ActivityDebitWalletOutput","ActivityGetAccount","ActivityGetAccountOutput","ActivityGetPayment","ActivityGetPaymentOutput","ActivityGetWallet","ActivityGetWalletOutput","ActivityListWallets","ActivityRevertTransaction","ActivityRevertTransactionOutput","ActivityStripeTransfer","ActivityVoidHold","AddAccountToPoolRequest","AdyenConfig","AggregateBalancesResponse","AssetHolder","AtlarConfig","Attempt","AttemptResponse","Balance","BalanceWithAssets","Balances","BalancesCursor","BalancesCursorCursor","BalancesCursorResponse","BalancesCursorResponseCursor","BankAccount","BankAccountRelatedAccounts","BankAccountRequest","BankAccountResponse","BankAccountsCursor","BankAccountsCursorCursor","BankingCircleConfig","Client","ClientSecret","Config","ConfigChangeSecret","ConfigInfo","ConfigInfoResponse","ConfigResponse","ConfigUser","ConfigsResponse","ConfigsResponseCursor","ConfirmHoldRequest","Connector","ConnectorConfig","ConnectorConfigResponse","ConnectorResponse","ConnectorsConfigsResponse","ConnectorsConfigsResponseConnector","ConnectorsConfigsResponseData","ConnectorsResponse","ConnectorsResponseData","Contract","CreateBalanceRequest","CreateBalanceResponse","CreateClientRequest","CreateClientResponse","CreateSecretRequest","CreateSecretResponse","CreateTriggerResponse","CreateWalletRequest","CreateWalletResponse","CreateWorkflowRequest","CreateWorkflowResponse","CreditWalletRequest","CurrencyCloudConfig","Cursor","Data","DebitWalletRequest","DebitWalletResponse","Descriptor","DummyPayConfig","ErrorsEnum","ExpandedDebitHold","Expr","Filter","ForwardBankAccountRequest","GenericConfig","GetBalanceResponse","GetHoldResponse","GetHoldsResponse","GetHoldsResponseCursor","GetTransactionsResponse","GetTransactionsResponseCursor","GetVersionsResponse","GetWalletResponse","GetWalletSummaryResponse","GetWorkflowInstanceHistoryResponse","GetWorkflowInstanceHistoryStageResponse","GetWorkflowInstanceResponse","GetWorkflowResponse","Hold","Key","LedgerAccountSubject","LedgerInfo","LedgerInfoResponse","LedgerStorage","ListBalancesResponse","ListBalancesResponseCursor","ListClientsResponse","ListRunsResponse","ListTriggersOccurrencesResponse","ListTriggersResponse","ListUsersResponse","ListWalletsResponse","ListWalletsResponseCursor","ListWorkflowsResponse","Log","LogsCursorResponse","LogsCursorResponseCursor","MangoPayConfig","Mapping","MappingResponse","Metadata","MigrationInfo","ModulrConfig","Monetary","MoneycorpConfig","OrchestrationAccount","OrchestrationConnector","OrchestrationCreditWalletRequest","OrchestrationListWalletsResponse","OrchestrationListWalletsResponseCursor","OrchestrationPayment","OrchestrationPaymentAdjustment","OrchestrationPaymentAdjustmentRaw","OrchestrationPaymentMetadata","OrchestrationPaymentRaw","OrchestrationPaymentScheme","OrchestrationPaymentStatus","OrchestrationPaymentType","OrchestrationPostTransaction","OrchestrationPostTransactionScript","OrchestrationTransaction","OrchestrationV2Transaction","OrchestrationWallet","Payment","PaymentAdjustment","PaymentAdjustmentRaw","PaymentRequest","PaymentResponse","PaymentScheme","PaymentStatus","PaymentType","PaymentsAccount","PaymentsAccountRaw","PaymentsAccountResponse","PaymentsCursor","PaymentsCursorCursor","PaymentsErrorsEnum","PoliciesCursorResponse","PoliciesCursorResponseCursor","Policy","PolicyRequest","PolicyResponse","Pool","PoolBalance","PoolBalances","PoolBalancesResponse","PoolRequest","PoolResponse","PoolsCursor","PoolsCursorCursor","PostTransaction","PostTransactionScript","Posting","Query","QueryRaw","Raw","ReadClientResponse","ReadTriggerResponse","ReadUserResponse","Reconciliation","ReconciliationRequest","ReconciliationResponse","ReconciliationsCursorResponse","ReconciliationsCursorResponseCursor","Response","ResponseCursor","ReverseTransferInitiationRequest","RunWorkflowResponse","Schemas","Scheme","Script","ScriptResponse","Secret","Security","ServerInfo","Stage","StageDelay","StageSend","StageSendDestination","StageSendDestinationAccount","StageSendDestinationPayment","StageSendDestinationWallet","StageSendSource","StageSendSourceAccount","StageSendSourcePayment","StageSendSourceWallet","StageStatus","StageWaitEvent","State","Stats","StatsResponse","Status","Storage","StripeConfig","Subject","TaskBankingCircle","TaskBankingCircleState","TaskCurrencyCloud","TaskCurrencyCloudDescriptor","TaskCurrencyCloudState","TaskDummyPay","TaskDummyPayDescriptor","TaskDummyPayState","TaskMangoPay","TaskMangoPayDescriptor","TaskMangoPayState","TaskModulr","TaskModulrDescriptor","TaskModulrState","TaskMoneycorp","TaskMoneycorpDescriptor","TaskMoneycorpState","TaskResponse","TaskResponseData","TaskStripe","TaskStripeDescriptor","TaskStripeState","TaskWise","TaskWiseDescriptor","TaskWiseState","TasksCursor","TasksCursorCursor","TasksCursorData","Total","Transaction","TransactionData","TransactionResponse","Transactions","TransactionsCursorResponse","TransactionsCursorResponseCursor","TransactionsResponse","TransferInitiation","TransferInitiationAdjusments","TransferInitiationPayments","TransferInitiationRequest","TransferInitiationRequestType","TransferInitiationResponse","TransferInitiationStatus","TransferInitiationType","TransferInitiationsCursor","TransferInitiationsCursorCursor","TransferRequest","TransferResponse","Trigger","TriggerData","TriggerOccurrence","Type","Update","UpdateAccount","UpdateBankAccountMetadataRequest","UpdateClientRequest","UpdateClientResponse","UpdateTransferInitiationStatusRequest","User","V2Account","V2AccountResponse","V2AccountsCursorResponse","V2AccountsCursorResponseCursor","V2ActivityAddAccountMetadata","V2ActivityConfirmHold","V2ActivityCreateTransaction","V2ActivityCreateTransactionOutput","V2ActivityCreditWallet","V2ActivityDebitWallet","V2ActivityDebitWalletOutput","V2ActivityGetAccount","V2ActivityGetAccountOutput","V2ActivityGetPayment","V2ActivityGetPaymentOutput","V2ActivityGetWallet","V2ActivityGetWalletOutput","V2ActivityListWallets","V2ActivityStripeTransfer","V2ActivityStripeTransferMetadata","V2ActivityVoidHold","V2AggregateBalancesResponse","V2AssetHolder","V2BulkElement","V2BulkElementAddMetadata","V2BulkElementAddMetadataData","V2BulkElementCreateTransaction","V2BulkElementDeleteMetadata","V2BulkElementDeleteMetadataData","V2BulkElementResult","V2BulkElementResultCreateTransactionSchemas","V2BulkElementResultDeleteMetadataSchemas","V2BulkElementResultErrorSchemas","V2BulkElementResultRevertTransactionSchemas","V2BulkElementRevertTransaction","V2BulkElementRevertTransactionData","V2BulkResponse","V2ConfigInfoResponse","V2Connector","V2CreateLedgerRequest","V2CreateTransactionResponse","V2CreateTriggerResponse","V2CreateWorkflowRequest","V2CreateWorkflowResponse","V2CreditWalletRequest","V2DebitWalletRequest","V2ErrorsEnum","V2ExpandedTransaction","V2GetLedgerResponse","V2GetTransactionResponse","V2GetWorkflowInstanceHistoryResponse","V2GetWorkflowInstanceHistoryStageResponse","V2GetWorkflowInstanceResponse","V2GetWorkflowResponse","V2Hold","V2Ledger","V2LedgerAccountSubject","V2LedgerInfo","V2LedgerInfoResponse","V2LedgerInfoStorage","V2LedgerListResponse","V2LedgerListResponseCursor","V2ListRunsResponse","V2ListRunsResponseCursor","V2ListTriggersOccurrencesResponse","V2ListTriggersOccurrencesResponseCursor","V2ListTriggersResponse","V2ListTriggersResponseCursor","V2ListWalletsResponse","V2ListWalletsResponseCursor","V2ListWorkflowsResponse","V2ListWorkflowsResponseCursor","V2Log","V2LogType","V2LogsCursorResponse","V2LogsCursorResponseCursor","V2MigrationInfo","V2MigrationInfoState","V2Monetary","V2Payment","V2PaymentAdjustment","V2PaymentAdjustmentRaw","V2PaymentMetadata","V2PaymentRaw","V2PaymentStatus","V2PaymentType","V2PostTransaction","V2PostTransactionScript","V2Posting","V2ReadTriggerResponse","V2RevertTransactionResponse","V2RunWorkflowResponse","V2ServerInfo","V2Stage","V2StageDelay","V2StageSend","V2StageSendDestination","V2StageSendDestinationAccount","V2StageSendDestinationPayment","V2StageSendDestinationWallet","V2StageSendSource","V2StageSendSourceAccount","V2StageSendSourcePayment","V2StageSendSourceWallet","V2StageStatus","V2StageWaitEvent","V2Stats","V2StatsResponse","V2Subject","V2TargetID","V2TargetType","V2TestTriggerResponse","V2Transaction","V2TransactionsCursorResponse","V2TransactionsCursorResponseCursor","V2Trigger","V2TriggerData","V2TriggerOccurrence","V2TriggerTest","V2Update","V2UpdateAccount","V2Volume","V2VolumesWithBalance","V2VolumesWithBalanceCursorResponse","V2VolumesWithBalanceCursorResponseCursor","V2Wallet","V2WalletSubject","V2WalletWithBalances","V2Workflow","V2WorkflowConfig","V2WorkflowInstance","V2WorkflowInstanceHistory","V2WorkflowInstanceHistoryStage","V2WorkflowInstanceHistoryStageInput","V2WorkflowInstanceHistoryStageOutput","Variables","Version","Volume","Wallet","WalletBalances","WalletSubject","WalletWithBalances","WalletWithBalancesBalances","WalletsTransaction","WalletsVolume","WebhooksConfig","WebhooksErrorsEnum","WiseConfig","Workflow","WorkflowConfig","WorkflowInstance","WorkflowInstanceHistory","WorkflowInstanceHistoryStage","WorkflowInstanceHistoryStageInput","WorkflowInstanceHistoryStageOutput"]
diff --git a/src/sdk/models/shared/activitycreditwallet.py b/src/sdk/models/shared/activitycreditwallet.py
index d0f4a3bc..a3b022ff 100644
--- a/src/sdk/models/shared/activitycreditwallet.py
+++ b/src/sdk/models/shared/activitycreditwallet.py
@@ -2,7 +2,7 @@
from __future__ import annotations
import dataclasses
-from .creditwalletrequest import CreditWalletRequest
+from .orchestrationcreditwalletrequest import OrchestrationCreditWalletRequest
from dataclasses_json import Undefined, dataclass_json
from sdk import utils
from typing import Optional
@@ -11,7 +11,7 @@
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class ActivityCreditWallet:
- data: Optional[CreditWalletRequest] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }})
+ data: Optional[OrchestrationCreditWalletRequest] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data'), 'exclude': lambda f: f is None }})
id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id'), 'exclude': lambda f: f is None }})
diff --git a/src/sdk/models/shared/creditwalletrequest.py b/src/sdk/models/shared/creditwalletrequest.py
index edbb63b3..7d2b5335 100644
--- a/src/sdk/models/shared/creditwalletrequest.py
+++ b/src/sdk/models/shared/creditwalletrequest.py
@@ -14,13 +14,14 @@
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class CreditWalletRequest:
+ UNSET='__SPEAKEASY_UNSET__'
amount: Monetary = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount') }})
- metadata: Dict[str, str] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('metadata') }})
- r"""Metadata associated with the wallet."""
- sources: List[Subject] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sources') }})
balance: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('balance'), 'exclude': lambda f: f is None }})
r"""The balance to credit"""
+ metadata: Optional[Dict[str, str]] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('metadata'), 'exclude': lambda f: f is CreditWalletRequest.UNSET }})
+ r"""Metadata associated with the wallet."""
reference: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reference'), 'exclude': lambda f: f is None }})
+ sources: Optional[List[Subject]] = dataclasses.field(default=UNSET, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sources'), 'exclude': lambda f: f is CreditWalletRequest.UNSET }})
timestamp: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timestamp'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'exclude': lambda f: f is None }})
diff --git a/src/sdk/models/shared/orchestrationcreditwalletrequest.py b/src/sdk/models/shared/orchestrationcreditwalletrequest.py
new file mode 100644
index 00000000..1a6b0a55
--- /dev/null
+++ b/src/sdk/models/shared/orchestrationcreditwalletrequest.py
@@ -0,0 +1,26 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import dateutil.parser
+from .monetary import Monetary
+from .subject import Subject
+from dataclasses_json import Undefined, dataclass_json
+from datetime import datetime
+from sdk import utils
+from typing import Dict, List, Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+@dataclasses.dataclass
+class OrchestrationCreditWalletRequest:
+ amount: Monetary = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount') }})
+ metadata: Dict[str, str] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('metadata') }})
+ r"""Metadata associated with the wallet."""
+ sources: List[Subject] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sources') }})
+ balance: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('balance'), 'exclude': lambda f: f is None }})
+ r"""The balance to credit"""
+ reference: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reference'), 'exclude': lambda f: f is None }})
+ timestamp: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timestamp'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'exclude': lambda f: f is None }})
+
+
diff --git a/src/sdk/models/shared/orchestrationlistwalletsresponse.py b/src/sdk/models/shared/orchestrationlistwalletsresponse.py
index 64a3327e..37e6ceb7 100644
--- a/src/sdk/models/shared/orchestrationlistwalletsresponse.py
+++ b/src/sdk/models/shared/orchestrationlistwalletsresponse.py
@@ -2,7 +2,7 @@
from __future__ import annotations
import dataclasses
-from .wallet import Wallet
+from .orchestrationwallet import OrchestrationWallet
from dataclasses_json import Undefined, dataclass_json
from sdk import utils
from typing import List, Optional
@@ -11,7 +11,7 @@
@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class OrchestrationListWalletsResponseCursor:
- data: List[Wallet] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data') }})
+ data: List[OrchestrationWallet] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('data') }})
page_size: int = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('pageSize') }})
has_more: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('hasMore'), 'exclude': lambda f: f is None }})
next: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('next'), 'exclude': lambda f: f is None }})
diff --git a/src/sdk/models/shared/orchestrationwallet.py b/src/sdk/models/shared/orchestrationwallet.py
new file mode 100644
index 00000000..a884c0b8
--- /dev/null
+++ b/src/sdk/models/shared/orchestrationwallet.py
@@ -0,0 +1,23 @@
+"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
+
+from __future__ import annotations
+import dataclasses
+import dateutil.parser
+from dataclasses_json import Undefined, dataclass_json
+from datetime import datetime
+from sdk import utils
+from typing import Dict
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+@dataclasses.dataclass
+class OrchestrationWallet:
+ created_at: datetime = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('createdAt'), 'encoder': utils.datetimeisoformat(False), 'decoder': dateutil.parser.isoparse }})
+ id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('id') }})
+ r"""The unique ID of the wallet."""
+ ledger: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('ledger') }})
+ metadata: Dict[str, str] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('metadata') }})
+ r"""Metadata associated with the wallet."""
+ name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
+
+
diff --git a/src/sdk/models/shared/wallet.py b/src/sdk/models/shared/wallet.py
index 1ec4ba0d..d3a56f07 100644
--- a/src/sdk/models/shared/wallet.py
+++ b/src/sdk/models/shared/wallet.py
@@ -3,10 +3,19 @@
from __future__ import annotations
import dataclasses
import dateutil.parser
+from .assetholder import AssetHolder
from dataclasses_json import Undefined, dataclass_json
from datetime import datetime
from sdk import utils
-from typing import Dict
+from typing import Dict, Optional
+
+
+@dataclass_json(undefined=Undefined.EXCLUDE)
+@dataclasses.dataclass
+class WalletBalances:
+ main: AssetHolder = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('main') }})
+
+
@dataclass_json(undefined=Undefined.EXCLUDE)
@@ -19,5 +28,6 @@ class Wallet:
metadata: Dict[str, str] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('metadata') }})
r"""Metadata associated with the wallet."""
name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
+ balances: Optional[WalletBalances] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('balances'), 'exclude': lambda f: f is None }})
diff --git a/src/sdk/sdkconfiguration.py b/src/sdk/sdkconfiguration.py
index 174e9ba9..8cf4daa0 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.3'
+ sdk_version: str = '2.4.0'
+ gen_version: str = '2.376.2'
+ user_agent: str = 'speakeasy-sdk/python 2.4.0 2.376.2 v2.0.3 formance-sdk-python'
retry_config: Optional[RetryConfig] = None
def __post_init__(self):
diff --git a/src/sdk/utils/utils.py b/src/sdk/utils/utils.py
index b6a55429..bbd7ef17 100644
--- a/src/sdk/utils/utils.py
+++ b/src/sdk/utils/utils.py
@@ -410,61 +410,78 @@ def _populate_deep_object_query_params(
return
if is_dataclass(obj):
- obj_fields: Tuple[Field, ...] = fields(obj)
- for obj_field in obj_fields:
- obj_param_metadata = obj_field.metadata.get("query_param")
- if not obj_param_metadata:
- continue
+ _populate_deep_object_query_params_dataclass(metadata.get("field_name", field_name), obj, params)
+ elif isinstance(obj, Dict):
+ _populate_deep_object_query_params_dict(metadata.get("field_name", field_name), obj, params)
- obj_val = getattr(obj, obj_field.name)
- if obj_val is None:
- continue
- if isinstance(obj_val, List):
- for val in obj_val:
- if val is None:
- continue
+def _populate_deep_object_query_params_dataclass(
+ prior_params_key: str, obj: Any, params: Dict[str, List[str]]
+):
+ if obj is None:
+ return
- if (
- params.get(
- f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'
- )
- is None
- ):
- params[
- f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'
- ] = []
-
- params[
- f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'
- ].append(_val_to_string(val))
- else:
- params[
- f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'
- ] = [_val_to_string(obj_val)]
- elif isinstance(obj, Dict):
- for key, value in obj.items():
- if value is None:
- continue
+ if not is_dataclass(obj):
+ return
- if isinstance(value, List):
- for val in value:
- if val is None:
- continue
+ obj_fields: Tuple[Field, ...] = fields(obj)
+ for obj_field in obj_fields:
+ obj_param_metadata = obj_field.metadata.get("query_param")
+ if not obj_param_metadata:
+ continue
- if (
- params.get(f'{metadata.get("field_name", field_name)}[{key}]')
- is None
- ):
- params[f'{metadata.get("field_name", field_name)}[{key}]'] = []
+ obj_val = getattr(obj, obj_field.name)
+ if obj_val is None:
+ continue
- params[f'{metadata.get("field_name", field_name)}[{key}]'].append(
- _val_to_string(val)
- )
- else:
- params[f'{metadata.get("field_name", field_name)}[{key}]'] = [
- _val_to_string(value)
- ]
+ params_key = f'{prior_params_key}[{obj_param_metadata.get("field_name", obj_field.name)}]'
+
+ if is_dataclass(obj_val):
+ _populate_deep_object_query_params_dataclass(params_key, obj_val, params)
+ elif isinstance(obj_val, Dict):
+ _populate_deep_object_query_params_dict(params_key, obj_val, params)
+ elif isinstance(obj_val, List):
+ _populate_deep_object_query_params_list(params_key, obj_val, params)
+ else:
+ params[params_key] = [_val_to_string(obj_val)]
+
+
+def _populate_deep_object_query_params_dict(
+ prior_params_key: str, value: Dict, params: Dict[str, List[str]]
+):
+ if value is None:
+ return
+
+ for key, val in value.items():
+ if val is None:
+ continue
+
+ params_key = f'{prior_params_key}[{key}]'
+
+ if is_dataclass(val):
+ _populate_deep_object_query_params_dataclass(params_key, val, params)
+ elif isinstance(val, Dict):
+ _populate_deep_object_query_params_dict(params_key, val, params)
+ elif isinstance(val, List):
+ _populate_deep_object_query_params_list(params_key, val, params)
+ else:
+ params[params_key] = [_val_to_string(val)]
+
+
+def _populate_deep_object_query_params_list(
+ params_key: str, value: List, params: Dict[str, List[str]]
+):
+ if value is None:
+ return
+
+ for val in value:
+ if val is None:
+ continue
+
+ if params.get(params_key) is None:
+ params[params_key] = []
+
+ params[params_key].append(_val_to_string(val))
def _get_query_param_field_name(obj_field: Field) -> str:
@@ -904,6 +921,9 @@ def bigintencode(val: int):
def bigintdecoder(val):
+ if val is None:
+ return None
+
if isinstance(val, float):
raise ValueError(f"{val} is a float")
return int(val)
@@ -918,6 +938,9 @@ def integerstrencode(val: int):
def integerstrdecoder(val):
+ if val is None:
+ return None
+
if isinstance(val, float):
raise ValueError(f"{val} is a float")
return int(val)
@@ -933,6 +956,9 @@ def numberstrencode(val: float):
def numberstrdecoder(val):
+ if val is None:
+ return None
+
return float(val)
@@ -950,6 +976,9 @@ def decimalencode(val: Decimal):
def decimaldecoder(val):
+ if val is None:
+ return None
+
return Decimal(str(val))