From ebfcf57887fb19b68c05227ff0d08f2d46daec40 Mon Sep 17 00:00:00 2001 From: Shanshan Li Date: Wed, 11 Mar 2026 10:09:43 +0800 Subject: [PATCH] release v1.32.0 --- .openapi-generator/FILES | 6 + README.md | 8 +- cobo_waas2/__init__.py | 4 +- cobo_waas2/api/auto_sweep_api.py | 24 +- cobo_waas2/api/fee_station_api.py | 24 +- cobo_waas2/api/payment_api.py | 215 ++++++++++-- cobo_waas2/api/transactions_api.py | 24 +- cobo_waas2/api/wallets_api.py | 324 +++++++++++++++++- cobo_waas2/api_client.py | 2 +- cobo_waas2/models/__init__.py | 2 + .../models/create_destination_bank_account.py | 8 +- cobo_waas2/models/destination_bank_account.py | 8 +- .../models/destination_bank_account_detail.py | 6 +- cobo_waas2/models/intermediary_bank_info.py | 4 +- cobo_waas2/models/merchant_balance.py | 2 +- cobo_waas2/models/report_type.py | 3 +- ..._deposit_to_address_destination_tx_info.py | 10 +- cobo_waas2/models/transaction_raw_tx_info.py | 15 +- .../models/transaction_selected_utxo.py | 10 +- cobo_waas2/models/transaction_utxo_change.py | 6 +- ...ger_test_payment_webhook_event_response.py | 86 +++++ ...ger_test_payments_webhook_event_request.py | 89 +++++ .../models/update_destination_bank_account.py | 8 +- cobo_waas2/models/utxo.py | 12 +- cobo_waas2/models/webhook_event_type.py | 2 + docs/AutoSweepApi.md | 4 +- docs/CreateDestinationBankAccount.md | 2 + docs/DestinationBankAccount.md | 2 + docs/DestinationBankAccountDetail.md | 2 + docs/FeeStationApi.md | 4 +- docs/IntermediaryBankInfo.md | 2 +- docs/MerchantBalance.md | 2 +- docs/PaymentApi.md | 85 ++++- docs/ReportType.md | 2 +- ...actionDepositToAddressDestinationTxInfo.md | 2 + docs/TransactionRawTxInfo.md | 3 +- docs/TransactionSelectedUtxo.md | 3 + docs/TransactionUtxoChange.md | 1 + docs/TransactionsApi.md | 4 +- .../TriggerTestPaymentWebhookEventResponse.md | 29 ++ .../TriggerTestPaymentsWebhookEventRequest.md | 30 ++ docs/UTXO.md | 4 + docs/UpdateDestinationBankAccount.md | 2 + docs/WalletsApi.md | 91 +++++ pyproject.toml | 2 +- setup.py | 2 +- test/test_batch_check_utxo201_response.py | 6 +- test/test_callback_message.py | 30 +- test/test_create_destination_bank_account.py | 4 +- ...st_create_destination_entry201_response.py | 4 +- test/test_create_destination_entry_request.py | 4 +- test/test_create_destination_request.py | 4 +- test/test_destination_bank_account.py | 4 +- test/test_destination_bank_account_detail.py | 2 + test/test_destination_detail.py | 4 +- .../test_get_destination_entry200_response.py | 2 + test/test_intermediary_bank_info.py | 1 - ...test_list_callback_messages200_response.py | 30 +- ...st_list_destination_entries200_response.py | 2 + test/test_list_transactions200_response.py | 15 +- test/test_list_utxos200_response.py | 6 +- test/test_merchant_balance.py | 1 - test/test_payment_api.py | 16 +- test/test_payment_transaction_event_data.py | 15 +- test/test_transaction.py | 15 +- ...nsaction_deposit_to_address_destination.py | 4 +- ..._deposit_to_address_destination_tx_info.py | 4 +- test/test_transaction_destination.py | 4 +- test/test_transaction_detail.py | 15 +- test/test_transaction_details.py | 15 +- test/test_transaction_raw_tx_info.py | 14 +- test/test_transaction_selected_utxo.py | 5 +- test/test_transaction_utxo_change.py | 3 +- test/test_transaction_webhook_event_data.py | 15 +- ...ger_test_payment_webhook_event_response.py | 51 +++ ...ger_test_payments_webhook_event_request.py | 53 +++ test/test_tss_key_sign_extra.py | 15 +- test/test_update_destination_bank_account.py | 4 +- ...st_update_destination_entry200_response.py | 4 +- test/test_update_destination_entry_request.py | 4 +- test/test_utxo.py | 6 +- test/test_wallets_api.py | 21 ++ test/test_webhook_event_data.py | 15 +- 83 files changed, 1422 insertions(+), 175 deletions(-) create mode 100644 cobo_waas2/models/trigger_test_payment_webhook_event_response.py create mode 100644 cobo_waas2/models/trigger_test_payments_webhook_event_request.py create mode 100644 docs/TriggerTestPaymentWebhookEventResponse.md create mode 100644 docs/TriggerTestPaymentsWebhookEventRequest.md create mode 100644 test/test_trigger_test_payment_webhook_event_response.py create mode 100644 test/test_trigger_test_payments_webhook_event_request.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 8899b99a..33e31a18 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -763,6 +763,8 @@ cobo_waas2/models/travel_rule_withdraw_legal_entity.py cobo_waas2/models/travel_rule_withdraw_natural_entity.py cobo_waas2/models/travel_rule_withdraw_request.py cobo_waas2/models/travel_rule_withdraw_request_travel_rule_info.py +cobo_waas2/models/trigger_test_payment_webhook_event_response.py +cobo_waas2/models/trigger_test_payments_webhook_event_request.py cobo_waas2/models/trigger_test_webhook_event201_response.py cobo_waas2/models/trigger_test_webhook_event_request.py cobo_waas2/models/tron_contract_call_destination.py @@ -1632,6 +1634,8 @@ docs/TravelRuleWithdrawLegalEntity.md docs/TravelRuleWithdrawNaturalEntity.md docs/TravelRuleWithdrawRequest.md docs/TravelRuleWithdrawRequestTravelRuleInfo.md +docs/TriggerTestPaymentWebhookEventResponse.md +docs/TriggerTestPaymentsWebhookEventRequest.md docs/TriggerTestWebhookEvent201Response.md docs/TriggerTestWebhookEventRequest.md docs/TronContractCallDestination.md @@ -2429,6 +2433,8 @@ test/test_travel_rule_withdraw_legal_entity.py test/test_travel_rule_withdraw_natural_entity.py test/test_travel_rule_withdraw_request.py test/test_travel_rule_withdraw_request_travel_rule_info.py +test/test_trigger_test_payment_webhook_event_response.py +test/test_trigger_test_payments_webhook_event_request.py test/test_trigger_test_webhook_event201_response.py test/test_trigger_test_webhook_event_request.py test/test_tron_contract_call_destination.py diff --git a/README.md b/README.md index 07b42f9f..d13ca76b 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ For more information about the WaaS 2.0 API, see [Introduction to WaaS 2.0](http This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: v2 -- Package version: 1.31.0 +- Package version: 1.32.0 - Generator version: 7.6.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.cobo.com/waas](https://www.cobo.com/waas) @@ -27,7 +27,7 @@ Python 3.7+ ### pip install ```sh -pip install cobo-waas2==1.31.0 +pip install cobo-waas2==1.32.0 ``` Then import the package: @@ -189,6 +189,7 @@ Class | Method | HTTP request | Description *PaymentApi* | [**list_top_up_payer_accounts**](docs/PaymentApi.md#list_top_up_payer_accounts) | **GET** /payments/topup/payer_accounts | List top-up payer accounts *PaymentApi* | [**list_top_up_payers**](docs/PaymentApi.md#list_top_up_payers) | **GET** /payments/topup/payers | List payers *PaymentApi* | [**payment_estimate_fee**](docs/PaymentApi.md#payment_estimate_fee) | **POST** /payments/estimate_fee | Estimate fees +*PaymentApi* | [**trigger_test_payments_webhook_event**](docs/PaymentApi.md#trigger_test_payments_webhook_event) | **POST** /payments/webhooks/trigger | Trigger test webhook event *PaymentApi* | [**update_bank_account_by_id**](docs/PaymentApi.md#update_bank_account_by_id) | **PUT** /payments/bank_accounts/{bank_account_id} | Update bank account *PaymentApi* | [**update_counterparty**](docs/PaymentApi.md#update_counterparty) | **PUT** /payments/counterparty/{counterparty_id} | Update counterparty *PaymentApi* | [**update_destination**](docs/PaymentApi.md#update_destination) | **PUT** /payments/destination/{destination_id} | Update destination @@ -295,6 +296,7 @@ Class | Method | HTTP request | Description *WalletsApi* | [**list_token_balances_for_address**](docs/WalletsApi.md#list_token_balances_for_address) | **GET** /wallets/{wallet_id}/addresses/{address}/tokens | List token balances by address *WalletsApi* | [**list_token_balances_for_wallet**](docs/WalletsApi.md#list_token_balances_for_wallet) | **GET** /wallets/{wallet_id}/tokens | List token balances by wallet *WalletsApi* | [**list_token_listing_requests**](docs/WalletsApi.md#list_token_listing_requests) | **GET** /wallets/tokens/listing_requests | List token listing requests +*WalletsApi* | [**list_transaction_utxos**](docs/WalletsApi.md#list_transaction_utxos) | **GET** /wallets/{wallet_id}/transaction_utxos | List transaction UTXOs *WalletsApi* | [**list_utxos**](docs/WalletsApi.md#list_utxos) | **GET** /wallets/{wallet_id}/utxos | List UTXOs *WalletsApi* | [**list_wallets**](docs/WalletsApi.md#list_wallets) | **GET** /wallets | List all wallets *WalletsApi* | [**lock_utxos**](docs/WalletsApi.md#lock_utxos) | **POST** /wallets/{wallet_id}/utxos/lock | Lock UTXOs @@ -1096,6 +1098,8 @@ Class | Method | HTTP request | Description - [TravelRuleWithdrawNaturalEntity](docs/TravelRuleWithdrawNaturalEntity.md) - [TravelRuleWithdrawRequest](docs/TravelRuleWithdrawRequest.md) - [TravelRuleWithdrawRequestTravelRuleInfo](docs/TravelRuleWithdrawRequestTravelRuleInfo.md) + - [TriggerTestPaymentWebhookEventResponse](docs/TriggerTestPaymentWebhookEventResponse.md) + - [TriggerTestPaymentsWebhookEventRequest](docs/TriggerTestPaymentsWebhookEventRequest.md) - [TriggerTestWebhookEvent201Response](docs/TriggerTestWebhookEvent201Response.md) - [TriggerTestWebhookEventRequest](docs/TriggerTestWebhookEventRequest.md) - [TronContractCallDestination](docs/TronContractCallDestination.md) diff --git a/cobo_waas2/__init__.py b/cobo_waas2/__init__.py index 426b4109..f3f8f3f6 100644 --- a/cobo_waas2/__init__.py +++ b/cobo_waas2/__init__.py @@ -12,7 +12,7 @@ """ # noqa: E501 -__version__ = "1.31.0" +__version__ = "1.32.0" # import apis into sdk package from cobo_waas2.api.address_books_api import AddressBooksApi @@ -815,6 +815,8 @@ from cobo_waas2.models.travel_rule_withdraw_natural_entity import TravelRuleWithdrawNaturalEntity from cobo_waas2.models.travel_rule_withdraw_request import TravelRuleWithdrawRequest from cobo_waas2.models.travel_rule_withdraw_request_travel_rule_info import TravelRuleWithdrawRequestTravelRuleInfo +from cobo_waas2.models.trigger_test_payment_webhook_event_response import TriggerTestPaymentWebhookEventResponse +from cobo_waas2.models.trigger_test_payments_webhook_event_request import TriggerTestPaymentsWebhookEventRequest from cobo_waas2.models.trigger_test_webhook_event201_response import TriggerTestWebhookEvent201Response from cobo_waas2.models.trigger_test_webhook_event_request import TriggerTestWebhookEventRequest from cobo_waas2.models.tron_contract_call_destination import TronContractCallDestination diff --git a/cobo_waas2/api/auto_sweep_api.py b/cobo_waas2/api/auto_sweep_api.py index 28637b7e..a6999369 100644 --- a/cobo_waas2/api/auto_sweep_api.py +++ b/cobo_waas2/api/auto_sweep_api.py @@ -553,8 +553,8 @@ def list_auto_sweep_task( wallet_id: Annotated[StrictStr, Field(description="The wallet ID.")], token_id: Annotated[Optional[StrictStr], Field(description="The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).")] = None, task_ids: Annotated[Optional[StrictStr], Field(description="A list of auto-sweep task IDs, separated by comma.")] = None, - min_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. ")] = None, - max_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. ")] = None, + min_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. ")] = None, + max_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. ")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of objects to return. For most operations, the value range is [1, 50].")] = None, before: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. ")] = None, after: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. ")] = None, @@ -578,9 +578,9 @@ def list_auto_sweep_task( :type token_id: str :param task_ids: A list of auto-sweep task IDs, separated by comma. :type task_ids: str - :param min_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. + :param min_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. :type min_created_timestamp: int - :param max_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. + :param max_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. :type max_created_timestamp: int :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -631,8 +631,8 @@ def list_auto_sweep_task_with_http_info( wallet_id: Annotated[StrictStr, Field(description="The wallet ID.")], token_id: Annotated[Optional[StrictStr], Field(description="The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).")] = None, task_ids: Annotated[Optional[StrictStr], Field(description="A list of auto-sweep task IDs, separated by comma.")] = None, - min_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. ")] = None, - max_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. ")] = None, + min_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. ")] = None, + max_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. ")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of objects to return. For most operations, the value range is [1, 50].")] = None, before: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. ")] = None, after: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. ")] = None, @@ -656,9 +656,9 @@ def list_auto_sweep_task_with_http_info( :type token_id: str :param task_ids: A list of auto-sweep task IDs, separated by comma. :type task_ids: str - :param min_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. + :param min_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. :type min_created_timestamp: int - :param max_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. + :param max_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. :type max_created_timestamp: int :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -709,8 +709,8 @@ def list_auto_sweep_task_without_preload_content( wallet_id: Annotated[StrictStr, Field(description="The wallet ID.")], token_id: Annotated[Optional[StrictStr], Field(description="The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).")] = None, task_ids: Annotated[Optional[StrictStr], Field(description="A list of auto-sweep task IDs, separated by comma.")] = None, - min_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. ")] = None, - max_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. ")] = None, + min_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. ")] = None, + max_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. ")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of objects to return. For most operations, the value range is [1, 50].")] = None, before: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. ")] = None, after: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. ")] = None, @@ -734,9 +734,9 @@ def list_auto_sweep_task_without_preload_content( :type token_id: str :param task_ids: A list of auto-sweep task IDs, separated by comma. :type task_ids: str - :param min_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. + :param min_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. :type min_created_timestamp: int - :param max_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. + :param max_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. :type max_created_timestamp: int :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int diff --git a/cobo_waas2/api/fee_station_api.py b/cobo_waas2/api/fee_station_api.py index 0c8a2565..55cfdbc1 100644 --- a/cobo_waas2/api/fee_station_api.py +++ b/cobo_waas2/api/fee_station_api.py @@ -800,8 +800,8 @@ def list_fee_station_transactions( chain_ids: Annotated[Optional[StrictStr], Field(description="A list of chain IDs, separated by comma. The chain ID is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).")] = None, token_ids: Annotated[Optional[StrictStr], Field(description="A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).")] = None, asset_ids: Annotated[Optional[StrictStr], Field(description="(This concept applies to Exchange Wallets only) A list of asset IDs, separated by comma. An asset ID is the unique identifier of the asset held within your linked exchange account.")] = None, - min_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. ")] = None, - max_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. ")] = None, + min_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. ")] = None, + max_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. ")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of objects to return. For most operations, the value range is [1, 50].")] = None, before: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. ")] = None, after: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. ")] = None, @@ -837,9 +837,9 @@ def list_fee_station_transactions( :type token_ids: str :param asset_ids: (This concept applies to Exchange Wallets only) A list of asset IDs, separated by comma. An asset ID is the unique identifier of the asset held within your linked exchange account. :type asset_ids: str - :param min_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. + :param min_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. :type min_created_timestamp: int - :param max_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. + :param max_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. :type max_created_timestamp: int :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -902,8 +902,8 @@ def list_fee_station_transactions_with_http_info( chain_ids: Annotated[Optional[StrictStr], Field(description="A list of chain IDs, separated by comma. The chain ID is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).")] = None, token_ids: Annotated[Optional[StrictStr], Field(description="A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).")] = None, asset_ids: Annotated[Optional[StrictStr], Field(description="(This concept applies to Exchange Wallets only) A list of asset IDs, separated by comma. An asset ID is the unique identifier of the asset held within your linked exchange account.")] = None, - min_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. ")] = None, - max_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. ")] = None, + min_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. ")] = None, + max_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. ")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of objects to return. For most operations, the value range is [1, 50].")] = None, before: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. ")] = None, after: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. ")] = None, @@ -939,9 +939,9 @@ def list_fee_station_transactions_with_http_info( :type token_ids: str :param asset_ids: (This concept applies to Exchange Wallets only) A list of asset IDs, separated by comma. An asset ID is the unique identifier of the asset held within your linked exchange account. :type asset_ids: str - :param min_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. + :param min_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. :type min_created_timestamp: int - :param max_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. + :param max_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. :type max_created_timestamp: int :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -1004,8 +1004,8 @@ def list_fee_station_transactions_without_preload_content( chain_ids: Annotated[Optional[StrictStr], Field(description="A list of chain IDs, separated by comma. The chain ID is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).")] = None, token_ids: Annotated[Optional[StrictStr], Field(description="A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).")] = None, asset_ids: Annotated[Optional[StrictStr], Field(description="(This concept applies to Exchange Wallets only) A list of asset IDs, separated by comma. An asset ID is the unique identifier of the asset held within your linked exchange account.")] = None, - min_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. ")] = None, - max_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. ")] = None, + min_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. ")] = None, + max_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. ")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of objects to return. For most operations, the value range is [1, 50].")] = None, before: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. ")] = None, after: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. ")] = None, @@ -1041,9 +1041,9 @@ def list_fee_station_transactions_without_preload_content( :type token_ids: str :param asset_ids: (This concept applies to Exchange Wallets only) A list of asset IDs, separated by comma. An asset ID is the unique identifier of the asset held within your linked exchange account. :type asset_ids: str - :param min_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. + :param min_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. :type min_created_timestamp: int - :param max_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. + :param max_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. :type max_created_timestamp: int :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int diff --git a/cobo_waas2/api/payment_api.py b/cobo_waas2/api/payment_api.py index 2b8e6548..3b72237c 100644 --- a/cobo_waas2/api/payment_api.py +++ b/cobo_waas2/api/payment_api.py @@ -96,6 +96,8 @@ from cobo_waas2.models.settlement import Settlement from cobo_waas2.models.supported_token import SupportedToken from cobo_waas2.models.top_up_address import TopUpAddress +from cobo_waas2.models.trigger_test_payment_webhook_event_response import TriggerTestPaymentWebhookEventResponse +from cobo_waas2.models.trigger_test_payments_webhook_event_request import TriggerTestPaymentsWebhookEventRequest from cobo_waas2.models.update_bank_account_by_id_request import UpdateBankAccountByIdRequest from cobo_waas2.models.update_counterparty_request import UpdateCounterpartyRequest from cobo_waas2.models.update_destination_entry200_response import UpdateDestinationEntry200Response @@ -9851,8 +9853,8 @@ def _list_forced_sweep_requests_serialize( @validate_call def list_merchant_balances( self, - token_id: Annotated[StrictStr, Field(description="The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` ")], - merchant_ids: Annotated[Optional[StrictStr], Field(description="A list of merchant IDs to query.")] = None, + merchant_ids: Annotated[Optional[StrictStr], Field(description="The comma-separated list of merchant IDs to filter by. At least one of `merchant_ids` or `token_id` must be provided. For more information about merchants, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). ")] = None, + token_id: Annotated[Optional[StrictStr], Field(description="The token ID that identifies the cryptocurrency. At least one of `merchant_ids` or `token_id` must be provided. For a complete list of supported tokens, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). ")] = None, acquiring_type: Annotated[Optional[AcquiringType], Field(description="This parameter has been deprecated")] = None, _request_timeout: Union[ None, @@ -9865,12 +9867,12 @@ def list_merchant_balances( ) -> ListMerchantBalances200Response: """List merchant balances - This operation retrieves the balance information for specified merchants. The balance information is grouped by token and acquiring type. If you do not specify the `merchant_ids` parameter, the balance information for all merchants will be returned. For more information, please refer to [Accounts and fund allocation](https://www.cobo.com/payments/en/guides/amounts-and-balances). + This operation retrieves merchant balance information. You need to specify at least one of `merchant_ids` or `token_id` to filter the results. Do not pass `acquiring_type` for this operation. For more information, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). - :param token_id: The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` (required) - :type token_id: str - :param merchant_ids: A list of merchant IDs to query. + :param merchant_ids: The comma-separated list of merchant IDs to filter by. At least one of `merchant_ids` or `token_id` must be provided. For more information about merchants, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). :type merchant_ids: str + :param token_id: The token ID that identifies the cryptocurrency. At least one of `merchant_ids` or `token_id` must be provided. For a complete list of supported tokens, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). + :type token_id: str :param acquiring_type: This parameter has been deprecated :type acquiring_type: AcquiringType :param _request_timeout: timeout setting for this request. If one @@ -9882,8 +9884,8 @@ def list_merchant_balances( """ # noqa: E501 _param = self._list_merchant_balances_serialize( - token_id=token_id, merchant_ids=merchant_ids, + token_id=token_id, acquiring_type=acquiring_type, ) @@ -9905,8 +9907,8 @@ def list_merchant_balances( @validate_call def list_merchant_balances_with_http_info( self, - token_id: Annotated[StrictStr, Field(description="The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` ")], - merchant_ids: Annotated[Optional[StrictStr], Field(description="A list of merchant IDs to query.")] = None, + merchant_ids: Annotated[Optional[StrictStr], Field(description="The comma-separated list of merchant IDs to filter by. At least one of `merchant_ids` or `token_id` must be provided. For more information about merchants, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). ")] = None, + token_id: Annotated[Optional[StrictStr], Field(description="The token ID that identifies the cryptocurrency. At least one of `merchant_ids` or `token_id` must be provided. For a complete list of supported tokens, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). ")] = None, acquiring_type: Annotated[Optional[AcquiringType], Field(description="This parameter has been deprecated")] = None, _request_timeout: Union[ None, @@ -9919,12 +9921,12 @@ def list_merchant_balances_with_http_info( ) -> ApiResponse[ListMerchantBalances200Response]: """List merchant balances - This operation retrieves the balance information for specified merchants. The balance information is grouped by token and acquiring type. If you do not specify the `merchant_ids` parameter, the balance information for all merchants will be returned. For more information, please refer to [Accounts and fund allocation](https://www.cobo.com/payments/en/guides/amounts-and-balances). + This operation retrieves merchant balance information. You need to specify at least one of `merchant_ids` or `token_id` to filter the results. Do not pass `acquiring_type` for this operation. For more information, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). - :param token_id: The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` (required) - :type token_id: str - :param merchant_ids: A list of merchant IDs to query. + :param merchant_ids: The comma-separated list of merchant IDs to filter by. At least one of `merchant_ids` or `token_id` must be provided. For more information about merchants, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). :type merchant_ids: str + :param token_id: The token ID that identifies the cryptocurrency. At least one of `merchant_ids` or `token_id` must be provided. For a complete list of supported tokens, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). + :type token_id: str :param acquiring_type: This parameter has been deprecated :type acquiring_type: AcquiringType :param _request_timeout: timeout setting for this request. If one @@ -9936,8 +9938,8 @@ def list_merchant_balances_with_http_info( """ # noqa: E501 _param = self._list_merchant_balances_serialize( - token_id=token_id, merchant_ids=merchant_ids, + token_id=token_id, acquiring_type=acquiring_type, ) @@ -9959,8 +9961,8 @@ def list_merchant_balances_with_http_info( @validate_call def list_merchant_balances_without_preload_content( self, - token_id: Annotated[StrictStr, Field(description="The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` ")], - merchant_ids: Annotated[Optional[StrictStr], Field(description="A list of merchant IDs to query.")] = None, + merchant_ids: Annotated[Optional[StrictStr], Field(description="The comma-separated list of merchant IDs to filter by. At least one of `merchant_ids` or `token_id` must be provided. For more information about merchants, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). ")] = None, + token_id: Annotated[Optional[StrictStr], Field(description="The token ID that identifies the cryptocurrency. At least one of `merchant_ids` or `token_id` must be provided. For a complete list of supported tokens, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). ")] = None, acquiring_type: Annotated[Optional[AcquiringType], Field(description="This parameter has been deprecated")] = None, _request_timeout: Union[ None, @@ -9973,12 +9975,12 @@ def list_merchant_balances_without_preload_content( ) -> RESTResponseType: """List merchant balances - This operation retrieves the balance information for specified merchants. The balance information is grouped by token and acquiring type. If you do not specify the `merchant_ids` parameter, the balance information for all merchants will be returned. For more information, please refer to [Accounts and fund allocation](https://www.cobo.com/payments/en/guides/amounts-and-balances). + This operation retrieves merchant balance information. You need to specify at least one of `merchant_ids` or `token_id` to filter the results. Do not pass `acquiring_type` for this operation. For more information, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). - :param token_id: The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` (required) - :type token_id: str - :param merchant_ids: A list of merchant IDs to query. + :param merchant_ids: The comma-separated list of merchant IDs to filter by. At least one of `merchant_ids` or `token_id` must be provided. For more information about merchants, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). :type merchant_ids: str + :param token_id: The token ID that identifies the cryptocurrency. At least one of `merchant_ids` or `token_id` must be provided. For a complete list of supported tokens, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). + :type token_id: str :param acquiring_type: This parameter has been deprecated :type acquiring_type: AcquiringType :param _request_timeout: timeout setting for this request. If one @@ -9990,8 +9992,8 @@ def list_merchant_balances_without_preload_content( """ # noqa: E501 _param = self._list_merchant_balances_serialize( - token_id=token_id, merchant_ids=merchant_ids, + token_id=token_id, acquiring_type=acquiring_type, ) @@ -10008,8 +10010,8 @@ def list_merchant_balances_without_preload_content( def _list_merchant_balances_serialize( self, - token_id, merchant_ids, + token_id, acquiring_type, ) -> RequestSerialized: _path_params: Dict[str, str] = {} @@ -12237,6 +12239,175 @@ def _payment_estimate_fee_serialize( files=_files, ) + @validate_call + def trigger_test_payments_webhook_event( + self, + trigger_test_payments_webhook_event_request: Annotated[Optional[TriggerTestPaymentsWebhookEventRequest], Field(description="The request body used to trigger a test Payments webhook event. You need to specify the event type. You can optionally include the `override_data` property to customize the payload. The provided fields must match the webhook event data structure for the specified event type. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + ) -> TriggerTestPaymentWebhookEventResponse: + """Trigger test webhook event + + This operation tests the functionality of your Payments webhook endpoint by triggering a test webhook event. The test event is sent to all endpoints you have registered on Cobo Portal. You need to specify the event type. By default, the payload contains dummy data with no impact on your real business transactions or activities. You can optionally provide the `override_data` property to customize the payload. For more information about Payments webhooks, see [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). For webhook event types and payload structure, refer to [List all webhook events](https://www.cobo.com/developers/v2/api-references/developers--webhooks/list-all-webhook-events). + + :param trigger_test_payments_webhook_event_request: The request body used to trigger a test Payments webhook event. You need to specify the event type. You can optionally include the `override_data` property to customize the payload. The provided fields must match the webhook event data structure for the specified event type. + :type trigger_test_payments_webhook_event_request: TriggerTestPaymentsWebhookEventRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._trigger_test_payments_webhook_event_serialize( + trigger_test_payments_webhook_event_request=trigger_test_payments_webhook_event_request, + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "TriggerTestPaymentWebhookEventResponse", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def trigger_test_payments_webhook_event_with_http_info( + self, + trigger_test_payments_webhook_event_request: Annotated[Optional[TriggerTestPaymentsWebhookEventRequest], Field(description="The request body used to trigger a test Payments webhook event. You need to specify the event type. You can optionally include the `override_data` property to customize the payload. The provided fields must match the webhook event data structure for the specified event type. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + ) -> ApiResponse[TriggerTestPaymentWebhookEventResponse]: + """Trigger test webhook event + + This operation tests the functionality of your Payments webhook endpoint by triggering a test webhook event. The test event is sent to all endpoints you have registered on Cobo Portal. You need to specify the event type. By default, the payload contains dummy data with no impact on your real business transactions or activities. You can optionally provide the `override_data` property to customize the payload. For more information about Payments webhooks, see [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). For webhook event types and payload structure, refer to [List all webhook events](https://www.cobo.com/developers/v2/api-references/developers--webhooks/list-all-webhook-events). + + :param trigger_test_payments_webhook_event_request: The request body used to trigger a test Payments webhook event. You need to specify the event type. You can optionally include the `override_data` property to customize the payload. The provided fields must match the webhook event data structure for the specified event type. + :type trigger_test_payments_webhook_event_request: TriggerTestPaymentsWebhookEventRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._trigger_test_payments_webhook_event_serialize( + trigger_test_payments_webhook_event_request=trigger_test_payments_webhook_event_request, + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "TriggerTestPaymentWebhookEventResponse", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def trigger_test_payments_webhook_event_without_preload_content( + self, + trigger_test_payments_webhook_event_request: Annotated[Optional[TriggerTestPaymentsWebhookEventRequest], Field(description="The request body used to trigger a test Payments webhook event. You need to specify the event type. You can optionally include the `override_data` property to customize the payload. The provided fields must match the webhook event data structure for the specified event type. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + ) -> RESTResponseType: + """Trigger test webhook event + + This operation tests the functionality of your Payments webhook endpoint by triggering a test webhook event. The test event is sent to all endpoints you have registered on Cobo Portal. You need to specify the event type. By default, the payload contains dummy data with no impact on your real business transactions or activities. You can optionally provide the `override_data` property to customize the payload. For more information about Payments webhooks, see [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). For webhook event types and payload structure, refer to [List all webhook events](https://www.cobo.com/developers/v2/api-references/developers--webhooks/list-all-webhook-events). + + :param trigger_test_payments_webhook_event_request: The request body used to trigger a test Payments webhook event. You need to specify the event type. You can optionally include the `override_data` property to customize the payload. The provided fields must match the webhook event data structure for the specified event type. + :type trigger_test_payments_webhook_event_request: TriggerTestPaymentsWebhookEventRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._trigger_test_payments_webhook_event_serialize( + trigger_test_payments_webhook_event_request=trigger_test_payments_webhook_event_request, + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "TriggerTestPaymentWebhookEventResponse", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + def _trigger_test_payments_webhook_event_serialize( + self, + trigger_test_payments_webhook_event_request, + ) -> RequestSerialized: + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if trigger_test_payments_webhook_event_request is not None: + _body_params = trigger_test_payments_webhook_event_request + + # set the HTTP header `Accept` + _header_params = { + "Accept": "application/json", + "Content-Type": "application/json" + } + + return self.api_client.param_serialize( + method='POST', + resource_path='/payments/webhooks/trigger', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + ) + @validate_call def update_bank_account_by_id( self, diff --git a/cobo_waas2/api/transactions_api.py b/cobo_waas2/api/transactions_api.py index 558e2192..8051e57b 100644 --- a/cobo_waas2/api/transactions_api.py +++ b/cobo_waas2/api/transactions_api.py @@ -2392,8 +2392,8 @@ def list_transactions( wallet_type: Annotated[Optional[WalletType], Field(description="The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction) ")] = None, wallet_subtype: Annotated[Optional[WalletSubtype], Field(description="The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet}) ")] = None, project_id: Annotated[Optional[StrictStr], Field(description="(This parameter is only applicable to User-Controlled Wallets.) The project ID, which you can retrieve by calling [List all projects](https://www.cobo.com/developers/v2/api-references/wallets--mpc-wallets/list-all-projects). ")] = None, - min_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. ")] = None, - max_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. ")] = None, + min_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. ")] = None, + max_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. ")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of objects to return. For most operations, the value range is [1, 50].")] = None, before: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. ")] = None, after: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. ")] = None, @@ -2439,9 +2439,9 @@ def list_transactions( :type wallet_subtype: WalletSubtype :param project_id: (This parameter is only applicable to User-Controlled Wallets.) The project ID, which you can retrieve by calling [List all projects](https://www.cobo.com/developers/v2/api-references/wallets--mpc-wallets/list-all-projects). :type project_id: str - :param min_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. + :param min_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. :type min_created_timestamp: int - :param max_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. + :param max_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. :type max_created_timestamp: int :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -2514,8 +2514,8 @@ def list_transactions_with_http_info( wallet_type: Annotated[Optional[WalletType], Field(description="The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction) ")] = None, wallet_subtype: Annotated[Optional[WalletSubtype], Field(description="The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet}) ")] = None, project_id: Annotated[Optional[StrictStr], Field(description="(This parameter is only applicable to User-Controlled Wallets.) The project ID, which you can retrieve by calling [List all projects](https://www.cobo.com/developers/v2/api-references/wallets--mpc-wallets/list-all-projects). ")] = None, - min_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. ")] = None, - max_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. ")] = None, + min_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. ")] = None, + max_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. ")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of objects to return. For most operations, the value range is [1, 50].")] = None, before: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. ")] = None, after: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. ")] = None, @@ -2561,9 +2561,9 @@ def list_transactions_with_http_info( :type wallet_subtype: WalletSubtype :param project_id: (This parameter is only applicable to User-Controlled Wallets.) The project ID, which you can retrieve by calling [List all projects](https://www.cobo.com/developers/v2/api-references/wallets--mpc-wallets/list-all-projects). :type project_id: str - :param min_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. + :param min_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. :type min_created_timestamp: int - :param max_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. + :param max_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. :type max_created_timestamp: int :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -2636,8 +2636,8 @@ def list_transactions_without_preload_content( wallet_type: Annotated[Optional[WalletType], Field(description="The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction) ")] = None, wallet_subtype: Annotated[Optional[WalletSubtype], Field(description="The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet}) ")] = None, project_id: Annotated[Optional[StrictStr], Field(description="(This parameter is only applicable to User-Controlled Wallets.) The project ID, which you can retrieve by calling [List all projects](https://www.cobo.com/developers/v2/api-references/wallets--mpc-wallets/list-all-projects). ")] = None, - min_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. ")] = None, - max_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. ")] = None, + min_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. ")] = None, + max_created_timestamp: Annotated[Optional[StrictInt], Field(description="The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. ")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of objects to return. For most operations, the value range is [1, 50].")] = None, before: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. ")] = None, after: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. ")] = None, @@ -2683,9 +2683,9 @@ def list_transactions_without_preload_content( :type wallet_subtype: WalletSubtype :param project_id: (This parameter is only applicable to User-Controlled Wallets.) The project ID, which you can retrieve by calling [List all projects](https://www.cobo.com/developers/v2/api-references/wallets--mpc-wallets/list-all-projects). :type project_id: str - :param min_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. + :param min_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. :type min_created_timestamp: int - :param max_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. + :param max_created_timestamp: The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. :type max_created_timestamp: int :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int diff --git a/cobo_waas2/api/wallets_api.py b/cobo_waas2/api/wallets_api.py index c527f48c..8d3988f3 100644 --- a/cobo_waas2/api/wallets_api.py +++ b/cobo_waas2/api/wallets_api.py @@ -13,7 +13,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictInt, StrictStr +from pydantic import Field, StrictBool, StrictInt, StrictStr from typing import List, Optional from typing_extensions import Annotated from cobo_waas2.models.address_info import AddressInfo @@ -4862,6 +4862,328 @@ def _list_token_listing_requests_serialize( files=_files, ) + @validate_call + def list_transaction_utxos( + self, + wallet_id: Annotated[StrictStr, Field(description="The wallet ID.")], + chain_id: Annotated[StrictStr, Field(description="The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).")], + tx_hash: Annotated[StrictStr, Field(description="The transaction hash to filter UTXOs by.")], + is_change: Annotated[Optional[StrictBool], Field(description="Filter UTXOs by whether they are change outputs.")] = None, + vout_n: Annotated[Optional[StrictInt], Field(description="The output index of the UTXO to filter by.")] = None, + token_id: Annotated[Optional[StrictStr], Field(description="The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).")] = None, + address: Optional[StrictStr] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of objects to return. For most operations, the value range is [1, 50].")] = None, + before: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. ")] = None, + after: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + ) -> ListUtxos200Response: + """List transaction UTXOs + + The operation retrieves a list of UTXOs for a specified transaction of a wallet. You must specify the wallet, chain, and transaction hash. This operation is applicable to MPC and Custodial Web3 Wallets. + + :param wallet_id: The wallet ID. (required) + :type wallet_id: str + :param chain_id: The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains). (required) + :type chain_id: str + :param tx_hash: The transaction hash to filter UTXOs by. (required) + :type tx_hash: str + :param is_change: Filter UTXOs by whether they are change outputs. + :type is_change: bool + :param vout_n: The output index of the UTXO to filter by. + :type vout_n: int + :param token_id: The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). + :type token_id: str + :param address: + :type address: str + :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. + :type limit: int + :param before: A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. + :type before: str + :param after: A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. + :type after: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_transaction_utxos_serialize( + wallet_id=wallet_id, + chain_id=chain_id, + tx_hash=tx_hash, + is_change=is_change, + vout_n=vout_n, + token_id=token_id, + address=address, + limit=limit, + before=before, + after=after, + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListUtxos200Response", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_transaction_utxos_with_http_info( + self, + wallet_id: Annotated[StrictStr, Field(description="The wallet ID.")], + chain_id: Annotated[StrictStr, Field(description="The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).")], + tx_hash: Annotated[StrictStr, Field(description="The transaction hash to filter UTXOs by.")], + is_change: Annotated[Optional[StrictBool], Field(description="Filter UTXOs by whether they are change outputs.")] = None, + vout_n: Annotated[Optional[StrictInt], Field(description="The output index of the UTXO to filter by.")] = None, + token_id: Annotated[Optional[StrictStr], Field(description="The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).")] = None, + address: Optional[StrictStr] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of objects to return. For most operations, the value range is [1, 50].")] = None, + before: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. ")] = None, + after: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + ) -> ApiResponse[ListUtxos200Response]: + """List transaction UTXOs + + The operation retrieves a list of UTXOs for a specified transaction of a wallet. You must specify the wallet, chain, and transaction hash. This operation is applicable to MPC and Custodial Web3 Wallets. + + :param wallet_id: The wallet ID. (required) + :type wallet_id: str + :param chain_id: The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains). (required) + :type chain_id: str + :param tx_hash: The transaction hash to filter UTXOs by. (required) + :type tx_hash: str + :param is_change: Filter UTXOs by whether they are change outputs. + :type is_change: bool + :param vout_n: The output index of the UTXO to filter by. + :type vout_n: int + :param token_id: The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). + :type token_id: str + :param address: + :type address: str + :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. + :type limit: int + :param before: A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. + :type before: str + :param after: A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. + :type after: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_transaction_utxos_serialize( + wallet_id=wallet_id, + chain_id=chain_id, + tx_hash=tx_hash, + is_change=is_change, + vout_n=vout_n, + token_id=token_id, + address=address, + limit=limit, + before=before, + after=after, + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListUtxos200Response", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_transaction_utxos_without_preload_content( + self, + wallet_id: Annotated[StrictStr, Field(description="The wallet ID.")], + chain_id: Annotated[StrictStr, Field(description="The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains).")], + tx_hash: Annotated[StrictStr, Field(description="The transaction hash to filter UTXOs by.")], + is_change: Annotated[Optional[StrictBool], Field(description="Filter UTXOs by whether they are change outputs.")] = None, + vout_n: Annotated[Optional[StrictInt], Field(description="The output index of the UTXO to filter by.")] = None, + token_id: Annotated[Optional[StrictStr], Field(description="The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).")] = None, + address: Optional[StrictStr] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of objects to return. For most operations, the value range is [1, 50].")] = None, + before: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. ")] = None, + after: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + ) -> RESTResponseType: + """List transaction UTXOs + + The operation retrieves a list of UTXOs for a specified transaction of a wallet. You must specify the wallet, chain, and transaction hash. This operation is applicable to MPC and Custodial Web3 Wallets. + + :param wallet_id: The wallet ID. (required) + :type wallet_id: str + :param chain_id: The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains). (required) + :type chain_id: str + :param tx_hash: The transaction hash to filter UTXOs by. (required) + :type tx_hash: str + :param is_change: Filter UTXOs by whether they are change outputs. + :type is_change: bool + :param vout_n: The output index of the UTXO to filter by. + :type vout_n: int + :param token_id: The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). + :type token_id: str + :param address: + :type address: str + :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. + :type limit: int + :param before: A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. + :type before: str + :param after: A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. + :type after: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_transaction_utxos_serialize( + wallet_id=wallet_id, + chain_id=chain_id, + tx_hash=tx_hash, + is_change=is_change, + vout_n=vout_n, + token_id=token_id, + address=address, + limit=limit, + before=before, + after=after, + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListUtxos200Response", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + def _list_transaction_utxos_serialize( + self, + wallet_id, + chain_id, + tx_hash, + is_change, + vout_n, + token_id, + address, + limit, + before, + after, + ) -> RequestSerialized: + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if wallet_id is not None: + _path_params['wallet_id'] = wallet_id + # process the query parameters + if chain_id is not None: + + _query_params.append(('chain_id', chain_id)) + + if tx_hash is not None: + + _query_params.append(('tx_hash', tx_hash)) + + if is_change is not None: + + _query_params.append(('is_change', is_change)) + + if vout_n is not None: + + _query_params.append(('vout_n', vout_n)) + + if token_id is not None: + + _query_params.append(('token_id', token_id)) + + if address is not None: + + _query_params.append(('address', address)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if before is not None: + + _query_params.append(('before', before)) + + if after is not None: + + _query_params.append(('after', after)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + _header_params = { + "Accept": "application/json", + "Content-Type": "application/json" + } + + return self.api_client.param_serialize( + method='GET', + resource_path='/wallets/{wallet_id}/transaction_utxos', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + ) + @validate_call def list_utxos( self, diff --git a/cobo_waas2/api_client.py b/cobo_waas2/api_client.py index 9291ce75..51723858 100644 --- a/cobo_waas2/api_client.py +++ b/cobo_waas2/api_client.py @@ -68,7 +68,7 @@ def __init__( self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} # Set default User-Agent. - self.user_agent = 'cobo-waas2-python-sdk/1.31.0' + self.user_agent = 'cobo-waas2-python-sdk/1.32.0' def __enter__(self): return self diff --git a/cobo_waas2/models/__init__.py b/cobo_waas2/models/__init__.py index ff46b4d4..b1c300fa 100644 --- a/cobo_waas2/models/__init__.py +++ b/cobo_waas2/models/__init__.py @@ -778,6 +778,8 @@ from cobo_waas2.models.travel_rule_withdraw_natural_entity import TravelRuleWithdrawNaturalEntity from cobo_waas2.models.travel_rule_withdraw_request import TravelRuleWithdrawRequest from cobo_waas2.models.travel_rule_withdraw_request_travel_rule_info import TravelRuleWithdrawRequestTravelRuleInfo +from cobo_waas2.models.trigger_test_payment_webhook_event_response import TriggerTestPaymentWebhookEventResponse +from cobo_waas2.models.trigger_test_payments_webhook_event_request import TriggerTestPaymentsWebhookEventRequest from cobo_waas2.models.trigger_test_webhook_event201_response import TriggerTestWebhookEvent201Response from cobo_waas2.models.trigger_test_webhook_event_request import TriggerTestWebhookEventRequest from cobo_waas2.models.tron_contract_call_destination import TronContractCallDestination diff --git a/cobo_waas2/models/create_destination_bank_account.py b/cobo_waas2/models/create_destination_bank_account.py index b5cfab98..e7bd407f 100644 --- a/cobo_waas2/models/create_destination_bank_account.py +++ b/cobo_waas2/models/create_destination_bank_account.py @@ -37,7 +37,9 @@ class CreateDestinationBankAccount(BaseModel): iban_code: Optional[StrictStr] = Field(default=None, description="The IBAN code of the bank account.") further_credit: Optional[StrictStr] = Field(default=None, description="The further credit of the bank account.") intermediary_bank_info: Optional[IntermediaryBankInfo] = None - __properties: ClassVar[List[str]] = ["account_alias", "account_number", "swift_code", "currency", "beneficiary_name", "beneficiary_address", "bank_name", "bank_address", "iban_code", "further_credit", "intermediary_bank_info"] + country: Optional[StrictStr] = Field(default=None, description="Beneficiary's country, in ISO 3166-1 alpha-3 format.") + city: Optional[StrictStr] = Field(default=None, description="Beneficiary's city.") + __properties: ClassVar[List[str]] = ["account_alias", "account_number", "swift_code", "currency", "beneficiary_name", "beneficiary_address", "bank_name", "bank_address", "iban_code", "further_credit", "intermediary_bank_info", "country", "city"] model_config = ConfigDict( populate_by_name=True, @@ -103,7 +105,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "bank_address": obj.get("bank_address"), "iban_code": obj.get("iban_code"), "further_credit": obj.get("further_credit"), - "intermediary_bank_info": IntermediaryBankInfo.from_dict(obj["intermediary_bank_info"]) if obj.get("intermediary_bank_info") is not None else None + "intermediary_bank_info": IntermediaryBankInfo.from_dict(obj["intermediary_bank_info"]) if obj.get("intermediary_bank_info") is not None else None, + "country": obj.get("country"), + "city": obj.get("city") }) return _obj diff --git a/cobo_waas2/models/destination_bank_account.py b/cobo_waas2/models/destination_bank_account.py index fd59eeb3..6836316b 100644 --- a/cobo_waas2/models/destination_bank_account.py +++ b/cobo_waas2/models/destination_bank_account.py @@ -42,7 +42,9 @@ class DestinationBankAccount(BaseModel): bank_account_status: BankAccountStatus created_timestamp: Optional[StrictInt] = Field(default=None, description="The created time of the bank account, represented as a UNIX timestamp in seconds.") updated_timestamp: Optional[StrictInt] = Field(default=None, description="The updated time of the bank account, represented as a UNIX timestamp in seconds.") - __properties: ClassVar[List[str]] = ["bank_account_id", "account_alias", "account_number", "swift_code", "currency", "beneficiary_name", "beneficiary_address", "bank_name", "bank_address", "iban_code", "further_credit", "intermediary_bank_info", "bank_account_status", "created_timestamp", "updated_timestamp"] + country: Optional[StrictStr] = Field(default=None, description="Beneficiary's country, in ISO 3166-1 alpha-3 format.") + city: Optional[StrictStr] = Field(default=None, description="Beneficiary's city.") + __properties: ClassVar[List[str]] = ["bank_account_id", "account_alias", "account_number", "swift_code", "currency", "beneficiary_name", "beneficiary_address", "bank_name", "bank_address", "iban_code", "further_credit", "intermediary_bank_info", "bank_account_status", "created_timestamp", "updated_timestamp", "country", "city"] model_config = ConfigDict( populate_by_name=True, @@ -112,7 +114,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "intermediary_bank_info": IntermediaryBankInfo.from_dict(obj["intermediary_bank_info"]) if obj.get("intermediary_bank_info") is not None else None, "bank_account_status": obj.get("bank_account_status"), "created_timestamp": obj.get("created_timestamp"), - "updated_timestamp": obj.get("updated_timestamp") + "updated_timestamp": obj.get("updated_timestamp"), + "country": obj.get("country"), + "city": obj.get("city") }) return _obj diff --git a/cobo_waas2/models/destination_bank_account_detail.py b/cobo_waas2/models/destination_bank_account_detail.py index fcfbfabe..3971aee7 100644 --- a/cobo_waas2/models/destination_bank_account_detail.py +++ b/cobo_waas2/models/destination_bank_account_detail.py @@ -48,9 +48,11 @@ class DestinationBankAccountDetail(BaseModel): further_credit: Optional[StrictStr] = Field(default=None, description="The further credit of the bank account.") intermediary_bank_info: Optional[IntermediaryBankInfo] = None bank_account_status: BankAccountStatus + country: Optional[StrictStr] = Field(default=None, description="Beneficiary's country, in ISO 3166-1 alpha-3 format.") + city: Optional[StrictStr] = Field(default=None, description="Beneficiary's city.") created_timestamp: Optional[StrictInt] = Field(default=None, description="The created time of the bank account, represented as a UNIX timestamp in seconds.") updated_timestamp: Optional[StrictInt] = Field(default=None, description="The updated time of the bank account, represented as a UNIX timestamp in seconds.") - __properties: ClassVar[List[str]] = ["destination_id", "destination_name", "destination_type", "destination_email", "destination_country", "destination_contact_address", "destination_merchant_id", "bank_account_id", "account_alias", "account_number", "swift_code", "currency", "beneficiary_name", "beneficiary_address", "bank_name", "bank_address", "iban_code", "further_credit", "intermediary_bank_info", "bank_account_status", "created_timestamp", "updated_timestamp"] + __properties: ClassVar[List[str]] = ["destination_id", "destination_name", "destination_type", "destination_email", "destination_country", "destination_contact_address", "destination_merchant_id", "bank_account_id", "account_alias", "account_number", "swift_code", "currency", "beneficiary_name", "beneficiary_address", "bank_name", "bank_address", "iban_code", "further_credit", "intermediary_bank_info", "bank_account_status", "country", "city", "created_timestamp", "updated_timestamp"] model_config = ConfigDict( populate_by_name=True, @@ -126,6 +128,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "further_credit": obj.get("further_credit"), "intermediary_bank_info": IntermediaryBankInfo.from_dict(obj["intermediary_bank_info"]) if obj.get("intermediary_bank_info") is not None else None, "bank_account_status": obj.get("bank_account_status"), + "country": obj.get("country"), + "city": obj.get("city"), "created_timestamp": obj.get("created_timestamp"), "updated_timestamp": obj.get("updated_timestamp") }) diff --git a/cobo_waas2/models/intermediary_bank_info.py b/cobo_waas2/models/intermediary_bank_info.py index 18b765e7..bcb20730 100644 --- a/cobo_waas2/models/intermediary_bank_info.py +++ b/cobo_waas2/models/intermediary_bank_info.py @@ -16,7 +16,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,7 +26,7 @@ class IntermediaryBankInfo(BaseModel): IntermediaryBankInfo """ # noqa: E501 bank_name: StrictStr = Field(description="The name of the intermediary bank.") - bank_address: StrictStr = Field(description="The address of the intermediary bank.") + bank_address: Optional[StrictStr] = Field(default=None, description="The address of the intermediary bank.") bank_swift_code: StrictStr = Field(description="The SWIFT or BIC code of the intermediary bank.") __properties: ClassVar[List[str]] = ["bank_name", "bank_address", "bank_swift_code"] diff --git a/cobo_waas2/models/merchant_balance.py b/cobo_waas2/models/merchant_balance.py index aadfa20c..05d75518 100644 --- a/cobo_waas2/models/merchant_balance.py +++ b/cobo_waas2/models/merchant_balance.py @@ -28,7 +28,7 @@ class MerchantBalance(BaseModel): """ # noqa: E501 merchant_id: StrictStr = Field(description="The merchant ID.") token_id: StrictStr = Field(description="The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`.") - acquiring_type: AcquiringType + acquiring_type: Optional[AcquiringType] = None total_received_amount: Optional[StrictStr] = Field(default=None, description="The total amount of the token that has been received by the merchant.") settled_amount: Optional[StrictStr] = Field(default=None, description="The total amount of the token that has been paid out from the merchant's balance.") payout_amount: Optional[StrictStr] = Field(default=None, description="This field is reserved for future use.") diff --git a/cobo_waas2/models/report_type.py b/cobo_waas2/models/report_type.py index 63ca7c45..55bcc308 100644 --- a/cobo_waas2/models/report_type.py +++ b/cobo_waas2/models/report_type.py @@ -18,7 +18,7 @@ class ReportType(str, Enum): """ - The type of the report. - `Order`: Summary of all pay-in orders. - `OrderTransaction`: Summary of all pay-in order transactions. - `TopUpTransaction`: Summary of all top-up transactions. - `PayinWeeklyStatement`: Weekly report of all pay-ins (including order mode and top-up mode). - `PayinDailyStatement`: Daily report of all pay-ins (including order mode and top-up mode). - `CryptoPayout`: Summary of all crypto payout transactions. - `OffRamp`: Summary of all fiat off-ramp transactions. - `Refund`: Summary of all refund transactions. - `PayoutWeeklyStatement`: Weekly report of all payouts (including crypto payouts, fiat off-ramps, and refunds). - `PayoutDailyStatement`: Daily report of all payouts (including crypto payouts, fiat off-ramps, and refunds). - `PayinCommissionFee`: Summary of all commission fees for pay-ins. - `PayoutCommissionFee`: Summary of all commission fees for payouts. - `BalanceChange`: Summary of balance changes for all accounts. - `Summary`: Summary of all pay-ins, payouts, and commission fees. + The type of the report. - `Order`: Summary of all pay-in orders. - `OrderTransaction`: Summary of all pay-in order transactions. - `TopUpTransaction`: Summary of all top-up transactions. - `PayinWeeklyStatement`: Weekly report of all pay-ins (including order mode and top-up mode). - `PayinDailyStatement`: Daily report of all pay-ins (including order mode and top-up mode). - `CryptoPayout`: Summary of all crypto payout transactions. - `OffRamp`: Summary of all fiat off-ramp transactions. - `Refund`: Summary of all refund transactions. - `PayoutWeeklyStatement`: Weekly report of all payouts (including crypto payouts, fiat off-ramps, and refunds). - `PayoutDailyStatement`: Daily report of all payouts (including crypto payouts, fiat off-ramps, and refunds). - `PayinCommissionFee`: Summary of all commission fees for pay-ins. - `PayoutCommissionFee`: Summary of all commission fees for payouts. - `BalanceChange`: Summary of balance changes for all accounts. - `Summary`: Summary of all pay-ins, payouts, and commission fees. - `BulkSend`: Transaction summary of bulk send. """ """ @@ -38,6 +38,7 @@ class ReportType(str, Enum): PAYOUTCOMMISSIONFEE = 'PayoutCommissionFee' BALANCECHANGE = 'BalanceChange' SUMMARY = 'Summary' + BULKSEND = 'BulkSend' UNKNOWN = None diff --git a/cobo_waas2/models/transaction_deposit_to_address_destination_tx_info.py b/cobo_waas2/models/transaction_deposit_to_address_destination_tx_info.py index 226dd45b..0db7cc3d 100644 --- a/cobo_waas2/models/transaction_deposit_to_address_destination_tx_info.py +++ b/cobo_waas2/models/transaction_deposit_to_address_destination_tx_info.py @@ -15,7 +15,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,7 +26,9 @@ class TransactionDepositToAddressDestinationTxInfo(BaseModel): TransactionDepositToAddressDestinationTxInfo """ # noqa: E501 vout_n: Optional[StrictInt] = Field(default=None, description="The output index of the UTXO.") - __properties: ClassVar[List[str]] = ["vout_n"] + object_id: Optional[StrictStr] = Field(default=None, description="The ID of the blockchain object to spend (e.g., SUI Coin object).") + version: Optional[StrictStr] = Field(default=None, description="Object version number.") + __properties: ClassVar[List[str]] = ["vout_n", "object_id", "version"] model_config = ConfigDict( populate_by_name=True, @@ -79,7 +81,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "vout_n": obj.get("vout_n") + "vout_n": obj.get("vout_n"), + "object_id": obj.get("object_id"), + "version": obj.get("version") }) return _obj diff --git a/cobo_waas2/models/transaction_raw_tx_info.py b/cobo_waas2/models/transaction_raw_tx_info.py index 9a394fd9..55f87cd2 100644 --- a/cobo_waas2/models/transaction_raw_tx_info.py +++ b/cobo_waas2/models/transaction_raw_tx_info.py @@ -31,8 +31,9 @@ class TransactionRawTxInfo(BaseModel): selected_utxos: Optional[List[TransactionSelectedUtxo]] = Field(default=None, description="The selected UTXOs to be consumed in the transaction.") raw_tx: Optional[StrictStr] = Field(default=None, description="The raw transaction data.") unsigned_raw_tx: Optional[StrictStr] = Field(default=None, description="The unsigned raw transaction data.") - utxo_change: Optional[TransactionUtxoChange] = None - __properties: ClassVar[List[str]] = ["used_nonce", "selected_utxos", "raw_tx", "unsigned_raw_tx", "utxo_change"] + utxo_change: Optional[TransactionUtxoChange] = Field(default=None, description="Deprecated. Use `utxo_changes` instead.") + utxo_changes: Optional[List[TransactionUtxoChange]] = Field(default=None, description="The UTXO change outputs in the transaction.") + __properties: ClassVar[List[str]] = ["used_nonce", "selected_utxos", "raw_tx", "unsigned_raw_tx", "utxo_change", "utxo_changes"] model_config = ConfigDict( populate_by_name=True, @@ -83,6 +84,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of utxo_change if self.utxo_change: _dict['utxo_change'] = self.utxo_change.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in utxo_changes (list) + _items = [] + if self.utxo_changes: + for _item in self.utxo_changes: + if _item: + _items.append(_item.to_dict()) + _dict['utxo_changes'] = _items return _dict @classmethod @@ -99,7 +107,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "selected_utxos": [TransactionSelectedUtxo.from_dict(_item) for _item in obj["selected_utxos"]] if obj.get("selected_utxos") is not None else None, "raw_tx": obj.get("raw_tx"), "unsigned_raw_tx": obj.get("unsigned_raw_tx"), - "utxo_change": TransactionUtxoChange.from_dict(obj["utxo_change"]) if obj.get("utxo_change") is not None else None + "utxo_change": TransactionUtxoChange.from_dict(obj["utxo_change"]) if obj.get("utxo_change") is not None else None, + "utxo_changes": [TransactionUtxoChange.from_dict(_item) for _item in obj["utxo_changes"]] if obj.get("utxo_changes") is not None else None }) return _obj diff --git a/cobo_waas2/models/transaction_selected_utxo.py b/cobo_waas2/models/transaction_selected_utxo.py index d3a0dc87..4b36190b 100644 --- a/cobo_waas2/models/transaction_selected_utxo.py +++ b/cobo_waas2/models/transaction_selected_utxo.py @@ -27,11 +27,14 @@ class TransactionSelectedUtxo(BaseModel): """ # noqa: E501 tx_hash: Optional[StrictStr] = Field(default=None, description="The transaction hash of the UTXO.") vout_n: Optional[StrictInt] = Field(default=None, description="The output index of the UTXO.") + token_id: Optional[StrictStr] = Field(default=None, description="The token ID of the UTXO.") address: Optional[StrictStr] = Field(default=None, description="The address of the UTXO.") value: Optional[StrictStr] = Field(default=None, description="The value of the UTXO.") redeem_script: Optional[StrictStr] = Field(default=None, description="The redeem script used in P2SH and P2WSH transactions.") revealed_script: Optional[StrictStr] = Field(default=None, description="The revealed script used for Taproot script-path spend transaction.") - __properties: ClassVar[List[str]] = ["tx_hash", "vout_n", "address", "value", "redeem_script", "revealed_script"] + object_id: Optional[StrictStr] = Field(default=None, description="The ID of the blockchain object to spend (e.g., SUI Coin object).") + version: Optional[StrictStr] = Field(default=None, description="Object version number.") + __properties: ClassVar[List[str]] = ["tx_hash", "vout_n", "token_id", "address", "value", "redeem_script", "revealed_script", "object_id", "version"] model_config = ConfigDict( populate_by_name=True, @@ -86,10 +89,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "tx_hash": obj.get("tx_hash"), "vout_n": obj.get("vout_n"), + "token_id": obj.get("token_id"), "address": obj.get("address"), "value": obj.get("value"), "redeem_script": obj.get("redeem_script"), - "revealed_script": obj.get("revealed_script") + "revealed_script": obj.get("revealed_script"), + "object_id": obj.get("object_id"), + "version": obj.get("version") }) return _obj diff --git a/cobo_waas2/models/transaction_utxo_change.py b/cobo_waas2/models/transaction_utxo_change.py index a37b300d..33f47104 100644 --- a/cobo_waas2/models/transaction_utxo_change.py +++ b/cobo_waas2/models/transaction_utxo_change.py @@ -27,7 +27,8 @@ class TransactionUtxoChange(BaseModel): """ # noqa: E501 address: Optional[StrictStr] = Field(default=None, description="The receiving address of the UTXO change output.") value: Optional[StrictStr] = Field(default=None, description="The amount of the UTXO change output.") - __properties: ClassVar[List[str]] = ["address", "value"] + token_id: Optional[StrictStr] = Field(default=None, description="The token ID of the UTXO change output.") + __properties: ClassVar[List[str]] = ["address", "value", "token_id"] model_config = ConfigDict( populate_by_name=True, @@ -81,7 +82,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "address": obj.get("address"), - "value": obj.get("value") + "value": obj.get("value"), + "token_id": obj.get("token_id") }) return _obj diff --git a/cobo_waas2/models/trigger_test_payment_webhook_event_response.py b/cobo_waas2/models/trigger_test_payment_webhook_event_response.py new file mode 100644 index 00000000..0ba8c5ab --- /dev/null +++ b/cobo_waas2/models/trigger_test_payment_webhook_event_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + + +class TriggerTestPaymentWebhookEventResponse(BaseModel): + """ + TriggerTestPaymentWebhookEventResponse + """ # noqa: E501 + triggered: Optional[StrictBool] = Field(default=None, description="Whether a test webhook event was successfully triggered. - `true`: The test webhook event was successfully triggered. - `false`: The test webhook event could not be triggered. ") + __properties: ClassVar[List[str]] = ["triggered"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TriggerTestPaymentWebhookEventResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TriggerTestPaymentWebhookEventResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "triggered": obj.get("triggered") + }) + return _obj + + diff --git a/cobo_waas2/models/trigger_test_payments_webhook_event_request.py b/cobo_waas2/models/trigger_test_payments_webhook_event_request.py new file mode 100644 index 00000000..08243acb --- /dev/null +++ b/cobo_waas2/models/trigger_test_payments_webhook_event_request.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from cobo_waas2.models.webhook_event_type import WebhookEventType +from typing import Optional, Set +from typing_extensions import Self + + +class TriggerTestPaymentsWebhookEventRequest(BaseModel): + """ + TriggerTestPaymentsWebhookEventRequest + """ # noqa: E501 + event_type: WebhookEventType + override_data: Optional[Dict[str, Any]] = Field(default=None, description="An optional object to customize the webhook event payload. Include only the fields you want to override. The provided fields must match the webhook event data structure for the specified event type. For the full event data structure, refer to the `data.data` property in the response of [List all webhook events](https://www.cobo.com/developers/v2/api-references/developers--webhooks/list-all-webhook-events). If this property is omitted, a default payload is returned. ") + __properties: ClassVar[List[str]] = ["event_type", "override_data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TriggerTestPaymentsWebhookEventRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TriggerTestPaymentsWebhookEventRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "event_type": obj.get("event_type"), + "override_data": obj.get("override_data") + }) + return _obj + + diff --git a/cobo_waas2/models/update_destination_bank_account.py b/cobo_waas2/models/update_destination_bank_account.py index b4a6b630..61290b85 100644 --- a/cobo_waas2/models/update_destination_bank_account.py +++ b/cobo_waas2/models/update_destination_bank_account.py @@ -37,7 +37,9 @@ class UpdateDestinationBankAccount(BaseModel): iban_code: Optional[StrictStr] = Field(default=None, description="The IBAN code of the bank account.") further_credit: Optional[StrictStr] = Field(default=None, description="The further credit of the bank account.") intermediary_bank_info: Optional[IntermediaryBankInfo] = None - __properties: ClassVar[List[str]] = ["account_alias", "account_number", "swift_code", "currency", "beneficiary_name", "beneficiary_address", "bank_name", "bank_address", "iban_code", "further_credit", "intermediary_bank_info"] + country: Optional[StrictStr] = Field(default=None, description="Beneficiary's country, in ISO 3166-1 alpha-3 format.") + city: Optional[StrictStr] = Field(default=None, description="Beneficiary's city.") + __properties: ClassVar[List[str]] = ["account_alias", "account_number", "swift_code", "currency", "beneficiary_name", "beneficiary_address", "bank_name", "bank_address", "iban_code", "further_credit", "intermediary_bank_info", "country", "city"] model_config = ConfigDict( populate_by_name=True, @@ -103,7 +105,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "bank_address": obj.get("bank_address"), "iban_code": obj.get("iban_code"), "further_credit": obj.get("further_credit"), - "intermediary_bank_info": IntermediaryBankInfo.from_dict(obj["intermediary_bank_info"]) if obj.get("intermediary_bank_info") is not None else None + "intermediary_bank_info": IntermediaryBankInfo.from_dict(obj["intermediary_bank_info"]) if obj.get("intermediary_bank_info") is not None else None, + "country": obj.get("country"), + "city": obj.get("city") }) return _obj diff --git a/cobo_waas2/models/utxo.py b/cobo_waas2/models/utxo.py index 2e579acb..eb519baa 100644 --- a/cobo_waas2/models/utxo.py +++ b/cobo_waas2/models/utxo.py @@ -34,7 +34,11 @@ class UTXO(BaseModel): is_locked: Optional[StrictBool] = Field(default=None, description="Whether the UTXO is locked.") confirmed_number: Optional[StrictInt] = Field(default=None, description="The number of confirmations for the UTXO.") is_frozen: Optional[StrictBool] = Field(default=None, description="Whether the UTXO is frozen.") - __properties: ClassVar[List[str]] = ["tx_hash", "vout_n", "address", "token_id", "value", "is_coinbase", "is_locked", "confirmed_number", "is_frozen"] + is_change: Optional[StrictBool] = Field(default=None, description="Whether the UTXO is a change output of a transaction.") + chain_id: Optional[StrictStr] = Field(default=None, description="The chain ID, which is the unique identifier of a blockchain.") + object_id: Optional[StrictStr] = Field(default=None, description="The ID of the blockchain object to spend (e.g., SUI Coin object).") + version: Optional[StrictStr] = Field(default=None, description="Object version number.") + __properties: ClassVar[List[str]] = ["tx_hash", "vout_n", "address", "token_id", "value", "is_coinbase", "is_locked", "confirmed_number", "is_frozen", "is_change", "chain_id", "object_id", "version"] model_config = ConfigDict( populate_by_name=True, @@ -95,7 +99,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "is_coinbase": obj.get("is_coinbase"), "is_locked": obj.get("is_locked"), "confirmed_number": obj.get("confirmed_number"), - "is_frozen": obj.get("is_frozen") + "is_frozen": obj.get("is_frozen"), + "is_change": obj.get("is_change"), + "chain_id": obj.get("chain_id"), + "object_id": obj.get("object_id"), + "version": obj.get("version") }) return _obj diff --git a/cobo_waas2/models/webhook_event_type.py b/cobo_waas2/models/webhook_event_type.py index 50f2db61..a5cb0e1a 100644 --- a/cobo_waas2/models/webhook_event_type.py +++ b/cobo_waas2/models/webhook_event_type.py @@ -65,6 +65,8 @@ class WebhookEventType(str, Enum): PAYMENT_DOT_BULK_SEND_DOT_STATUS_DOT_UPDATED = 'payment.bulk_send.status.updated' PAYMENT_DOT_TRANSACTION_DOT_EXTERNAL_DOT_CREATED = 'payment.transaction.external.created' PAYMENT_DOT_TRANSACTION_DOT_EXTERNAL_DOT_COMPLETED = 'payment.transaction.external.completed' + PAYMENT_DOT_TRANSACTION_DOT_SETTLEMENT_NETWORK_DOT_CREATED = 'payment.transaction.settlement_network.created' + PAYMENT_DOT_TRANSACTION_DOT_SETTLEMENT_NETWORK_DOT_COMPLETED = 'payment.transaction.settlement_network.completed' COMPLIANCE_DOT_DISPOSITION_DOT_STATUS_DOT_UPDATED = 'compliance.disposition.status.updated' COMPLIANCE_DOT_KYT_DOT_SCREENINGS_DOT_STATUS_DOT_UPDATED = 'compliance.kyt.screenings.status.updated' COMPLIANCE_DOT_KYA_DOT_SCREENINGS_DOT_STATUS_DOT_UPDATED = 'compliance.kya.screenings.status.updated' diff --git a/docs/AutoSweepApi.md b/docs/AutoSweepApi.md index 9708c9e7..3725aa0e 100644 --- a/docs/AutoSweepApi.md +++ b/docs/AutoSweepApi.md @@ -287,8 +287,8 @@ Name | Type | Description | Notes **wallet_id** | **str**| The wallet ID. | **token_id** | **str**| The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). | [optional] **task_ids** | **str**| A list of auto-sweep task IDs, separated by comma. | [optional] - **min_created_timestamp** | **int**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. | [optional] - **max_created_timestamp** | **int**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. | [optional] + **min_created_timestamp** | **int**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. | [optional] + **max_created_timestamp** | **int**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. | [optional] **limit** | **int**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10] **before** | **str**| A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. | [optional] **after** | **str**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional] diff --git a/docs/CreateDestinationBankAccount.md b/docs/CreateDestinationBankAccount.md index 7954e8a6..1f6b90fa 100644 --- a/docs/CreateDestinationBankAccount.md +++ b/docs/CreateDestinationBankAccount.md @@ -16,6 +16,8 @@ Name | Type | Description | Notes **iban_code** | **str** | The IBAN code of the bank account. | [optional] **further_credit** | **str** | The further credit of the bank account. | [optional] **intermediary_bank_info** | [**IntermediaryBankInfo**](IntermediaryBankInfo.md) | | [optional] +**country** | **str** | Beneficiary's country, in ISO 3166-1 alpha-3 format. | [optional] +**city** | **str** | Beneficiary's city. | [optional] ## Example diff --git a/docs/DestinationBankAccount.md b/docs/DestinationBankAccount.md index cafc4b42..2a56b06d 100644 --- a/docs/DestinationBankAccount.md +++ b/docs/DestinationBankAccount.md @@ -20,6 +20,8 @@ Name | Type | Description | Notes **bank_account_status** | [**BankAccountStatus**](BankAccountStatus.md) | | **created_timestamp** | **int** | The created time of the bank account, represented as a UNIX timestamp in seconds. | [optional] **updated_timestamp** | **int** | The updated time of the bank account, represented as a UNIX timestamp in seconds. | [optional] +**country** | **str** | Beneficiary's country, in ISO 3166-1 alpha-3 format. | [optional] +**city** | **str** | Beneficiary's city. | [optional] ## Example diff --git a/docs/DestinationBankAccountDetail.md b/docs/DestinationBankAccountDetail.md index 415157c0..cc838142 100644 --- a/docs/DestinationBankAccountDetail.md +++ b/docs/DestinationBankAccountDetail.md @@ -25,6 +25,8 @@ Name | Type | Description | Notes **further_credit** | **str** | The further credit of the bank account. | [optional] **intermediary_bank_info** | [**IntermediaryBankInfo**](IntermediaryBankInfo.md) | | [optional] **bank_account_status** | [**BankAccountStatus**](BankAccountStatus.md) | | +**country** | **str** | Beneficiary's country, in ISO 3166-1 alpha-3 format. | [optional] +**city** | **str** | Beneficiary's city. | [optional] **created_timestamp** | **int** | The created time of the bank account, represented as a UNIX timestamp in seconds. | [optional] **updated_timestamp** | **int** | The updated time of the bank account, represented as a UNIX timestamp in seconds. | [optional] diff --git a/docs/FeeStationApi.md b/docs/FeeStationApi.md index 68db9c8d..ba898427 100644 --- a/docs/FeeStationApi.md +++ b/docs/FeeStationApi.md @@ -380,8 +380,8 @@ Name | Type | Description | Notes **chain_ids** | **str**| A list of chain IDs, separated by comma. The chain ID is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains). | [optional] **token_ids** | **str**| A list of token IDs, separated by comma. The token ID is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). | [optional] **asset_ids** | **str**| (This concept applies to Exchange Wallets only) A list of asset IDs, separated by comma. An asset ID is the unique identifier of the asset held within your linked exchange account. | [optional] - **min_created_timestamp** | **int**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. | [optional] - **max_created_timestamp** | **int**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. | [optional] + **min_created_timestamp** | **int**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. | [optional] + **max_created_timestamp** | **int**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. | [optional] **limit** | **int**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10] **before** | **str**| A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. | [optional] **after** | **str**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional] diff --git a/docs/IntermediaryBankInfo.md b/docs/IntermediaryBankInfo.md index 259fd6b9..1ac13127 100644 --- a/docs/IntermediaryBankInfo.md +++ b/docs/IntermediaryBankInfo.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **bank_name** | **str** | The name of the intermediary bank. | -**bank_address** | **str** | The address of the intermediary bank. | +**bank_address** | **str** | The address of the intermediary bank. | [optional] **bank_swift_code** | **str** | The SWIFT or BIC code of the intermediary bank. | ## Example diff --git a/docs/MerchantBalance.md b/docs/MerchantBalance.md index 11871c4c..345e69b5 100644 --- a/docs/MerchantBalance.md +++ b/docs/MerchantBalance.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **merchant_id** | **str** | The merchant ID. | **token_id** | **str** | The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. | -**acquiring_type** | [**AcquiringType**](AcquiringType.md) | | +**acquiring_type** | [**AcquiringType**](AcquiringType.md) | | [optional] **total_received_amount** | **str** | The total amount of the token that has been received by the merchant. | [optional] **settled_amount** | **str** | The total amount of the token that has been paid out from the merchant's balance. | [optional] **payout_amount** | **str** | This field is reserved for future use. | [optional] diff --git a/docs/PaymentApi.md b/docs/PaymentApi.md index d09bd599..4bcb602f 100644 --- a/docs/PaymentApi.md +++ b/docs/PaymentApi.md @@ -66,6 +66,7 @@ Method | HTTP request | Description [**list_top_up_payer_accounts**](PaymentApi.md#list_top_up_payer_accounts) | **GET** /payments/topup/payer_accounts | List top-up payer accounts [**list_top_up_payers**](PaymentApi.md#list_top_up_payers) | **GET** /payments/topup/payers | List payers [**payment_estimate_fee**](PaymentApi.md#payment_estimate_fee) | **POST** /payments/estimate_fee | Estimate fees +[**trigger_test_payments_webhook_event**](PaymentApi.md#trigger_test_payments_webhook_event) | **POST** /payments/webhooks/trigger | Trigger test webhook event [**update_bank_account_by_id**](PaymentApi.md#update_bank_account_by_id) | **PUT** /payments/bank_accounts/{bank_account_id} | Update bank account [**update_counterparty**](PaymentApi.md#update_counterparty) | **PUT** /payments/counterparty/{counterparty_id} | Update counterparty [**update_destination**](PaymentApi.md#update_destination) | **PUT** /payments/destination/{destination_id} | Update destination @@ -3903,11 +3904,11 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_merchant_balances** -> ListMerchantBalances200Response list_merchant_balances(token_id, merchant_ids=merchant_ids, acquiring_type=acquiring_type) +> ListMerchantBalances200Response list_merchant_balances(merchant_ids=merchant_ids, token_id=token_id, acquiring_type=acquiring_type) List merchant balances - This operation retrieves the balance information for specified merchants. The balance information is grouped by token and acquiring type. If you do not specify the `merchant_ids` parameter, the balance information for all merchants will be returned. For more information, please refer to [Accounts and fund allocation](https://www.cobo.com/payments/en/guides/amounts-and-balances). +This operation retrieves merchant balance information. You need to specify at least one of `merchant_ids` or `token_id` to filter the results. Do not pass `acquiring_type` for this operation. For more information, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). ### Example @@ -3932,13 +3933,13 @@ configuration = cobo_waas2.Configuration( with cobo_waas2.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cobo_waas2.PaymentApi(api_client) - token_id = 'ETH_USDT' merchant_ids = 'M1001,M1002,M1003' + token_id = 'ETH_USDT' acquiring_type = cobo_waas2.AcquiringType() try: # List merchant balances - api_response = api_instance.list_merchant_balances(token_id, merchant_ids=merchant_ids, acquiring_type=acquiring_type) + api_response = api_instance.list_merchant_balances(merchant_ids=merchant_ids, token_id=token_id, acquiring_type=acquiring_type) print("The response of PaymentApi->list_merchant_balances:\n") pprint(api_response) except Exception as e: @@ -3952,8 +3953,8 @@ with cobo_waas2.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **token_id** | **str**| The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` | - **merchant_ids** | **str**| A list of merchant IDs to query. | [optional] + **merchant_ids** | **str**| The comma-separated list of merchant IDs to filter by. At least one of `merchant_ids` or `token_id` must be provided. For more information about merchants, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). | [optional] + **token_id** | **str**| The token ID that identifies the cryptocurrency. At least one of `merchant_ids` or `token_id` must be provided. For a complete list of supported tokens, refer to [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). | [optional] **acquiring_type** | [**AcquiringType**](.md)| This parameter has been deprecated | [optional] ### Return type @@ -4755,6 +4756,78 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **trigger_test_payments_webhook_event** +> TriggerTestPaymentWebhookEventResponse trigger_test_payments_webhook_event(trigger_test_payments_webhook_event_request=trigger_test_payments_webhook_event_request) + +Trigger test webhook event + +This operation tests the functionality of your Payments webhook endpoint by triggering a test webhook event. The test event is sent to all endpoints you have registered on Cobo Portal. You need to specify the event type. By default, the payload contains dummy data with no impact on your real business transactions or activities. You can optionally provide the `override_data` property to customize the payload. For more information about Payments webhooks, see [Cobo Payments Guide](https://www.cobo.com/payments/en/guides/overview). For webhook event types and payload structure, refer to [List all webhook events](https://www.cobo.com/developers/v2/api-references/developers--webhooks/list-all-webhook-events). + +### Example + +* Api Key Authentication (CoboAuth): + +```python +import cobo_waas2 +from cobo_waas2.models.trigger_test_payment_webhook_event_response import TriggerTestPaymentWebhookEventResponse +from cobo_waas2.models.trigger_test_payments_webhook_event_request import TriggerTestPaymentsWebhookEventRequest +from cobo_waas2.rest import ApiException +from pprint import pprint + +# See configuration.py for a list of all supported configurations. +configuration = cobo_waas2.Configuration( + # Replace `` with your private key + api_private_key="", + # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2. + host="https://api.dev.cobo.com/v2" +) +# Enter a context with an instance of the API client +with cobo_waas2.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cobo_waas2.PaymentApi(api_client) + trigger_test_payments_webhook_event_request = cobo_waas2.TriggerTestPaymentsWebhookEventRequest() + + try: + # Trigger test webhook event + api_response = api_instance.trigger_test_payments_webhook_event(trigger_test_payments_webhook_event_request=trigger_test_payments_webhook_event_request) + print("The response of PaymentApi->trigger_test_payments_webhook_event:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PaymentApi->trigger_test_payments_webhook_event: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **trigger_test_payments_webhook_event_request** | [**TriggerTestPaymentsWebhookEventRequest**](TriggerTestPaymentsWebhookEventRequest.md)| The request body used to trigger a test Payments webhook event. You need to specify the event type. You can optionally include the `override_data` property to customize the payload. The provided fields must match the webhook event data structure for the specified event type. | [optional] + +### Return type + +[**TriggerTestPaymentWebhookEventResponse**](TriggerTestPaymentWebhookEventResponse.md) + +### Authorization + +[CoboAuth](../README.md#CoboAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | The request was successful. | - | +**4XX** | Bad request. Your request contains malformed syntax or invalid parameters. | - | +**5XX** | Internal server error. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **update_bank_account_by_id** > BankAccount update_bank_account_by_id(bank_account_id, update_bank_account_by_id_request=update_bank_account_by_id_request) diff --git a/docs/ReportType.md b/docs/ReportType.md index d6b663e7..f49d1716 100644 --- a/docs/ReportType.md +++ b/docs/ReportType.md @@ -1,6 +1,6 @@ # ReportType -The type of the report. - `Order`: Summary of all pay-in orders. - `OrderTransaction`: Summary of all pay-in order transactions. - `TopUpTransaction`: Summary of all top-up transactions. - `PayinWeeklyStatement`: Weekly report of all pay-ins (including order mode and top-up mode). - `PayinDailyStatement`: Daily report of all pay-ins (including order mode and top-up mode). - `CryptoPayout`: Summary of all crypto payout transactions. - `OffRamp`: Summary of all fiat off-ramp transactions. - `Refund`: Summary of all refund transactions. - `PayoutWeeklyStatement`: Weekly report of all payouts (including crypto payouts, fiat off-ramps, and refunds). - `PayoutDailyStatement`: Daily report of all payouts (including crypto payouts, fiat off-ramps, and refunds). - `PayinCommissionFee`: Summary of all commission fees for pay-ins. - `PayoutCommissionFee`: Summary of all commission fees for payouts. - `BalanceChange`: Summary of balance changes for all accounts. - `Summary`: Summary of all pay-ins, payouts, and commission fees. +The type of the report. - `Order`: Summary of all pay-in orders. - `OrderTransaction`: Summary of all pay-in order transactions. - `TopUpTransaction`: Summary of all top-up transactions. - `PayinWeeklyStatement`: Weekly report of all pay-ins (including order mode and top-up mode). - `PayinDailyStatement`: Daily report of all pay-ins (including order mode and top-up mode). - `CryptoPayout`: Summary of all crypto payout transactions. - `OffRamp`: Summary of all fiat off-ramp transactions. - `Refund`: Summary of all refund transactions. - `PayoutWeeklyStatement`: Weekly report of all payouts (including crypto payouts, fiat off-ramps, and refunds). - `PayoutDailyStatement`: Daily report of all payouts (including crypto payouts, fiat off-ramps, and refunds). - `PayinCommissionFee`: Summary of all commission fees for pay-ins. - `PayoutCommissionFee`: Summary of all commission fees for payouts. - `BalanceChange`: Summary of balance changes for all accounts. - `Summary`: Summary of all pay-ins, payouts, and commission fees. - `BulkSend`: Transaction summary of bulk send. ## Properties diff --git a/docs/TransactionDepositToAddressDestinationTxInfo.md b/docs/TransactionDepositToAddressDestinationTxInfo.md index 774fbf78..254a5e49 100644 --- a/docs/TransactionDepositToAddressDestinationTxInfo.md +++ b/docs/TransactionDepositToAddressDestinationTxInfo.md @@ -6,6 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **vout_n** | **int** | The output index of the UTXO. | [optional] +**object_id** | **str** | The ID of the blockchain object to spend (e.g., SUI Coin object). | [optional] +**version** | **str** | Object version number. | [optional] ## Example diff --git a/docs/TransactionRawTxInfo.md b/docs/TransactionRawTxInfo.md index 34117016..f261e62e 100644 --- a/docs/TransactionRawTxInfo.md +++ b/docs/TransactionRawTxInfo.md @@ -10,7 +10,8 @@ Name | Type | Description | Notes **selected_utxos** | [**List[TransactionSelectedUtxo]**](TransactionSelectedUtxo.md) | The selected UTXOs to be consumed in the transaction. | [optional] **raw_tx** | **str** | The raw transaction data. | [optional] **unsigned_raw_tx** | **str** | The unsigned raw transaction data. | [optional] -**utxo_change** | [**TransactionUtxoChange**](TransactionUtxoChange.md) | | [optional] +**utxo_change** | [**TransactionUtxoChange**](TransactionUtxoChange.md) | Deprecated. Use `utxo_changes` instead. | [optional] +**utxo_changes** | [**List[TransactionUtxoChange]**](TransactionUtxoChange.md) | The UTXO change outputs in the transaction. | [optional] ## Example diff --git a/docs/TransactionSelectedUtxo.md b/docs/TransactionSelectedUtxo.md index 0ed96fd8..3533847b 100644 --- a/docs/TransactionSelectedUtxo.md +++ b/docs/TransactionSelectedUtxo.md @@ -8,10 +8,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **tx_hash** | **str** | The transaction hash of the UTXO. | [optional] **vout_n** | **int** | The output index of the UTXO. | [optional] +**token_id** | **str** | The token ID of the UTXO. | [optional] **address** | **str** | The address of the UTXO. | [optional] **value** | **str** | The value of the UTXO. | [optional] **redeem_script** | **str** | The redeem script used in P2SH and P2WSH transactions. | [optional] **revealed_script** | **str** | The revealed script used for Taproot script-path spend transaction. | [optional] +**object_id** | **str** | The ID of the blockchain object to spend (e.g., SUI Coin object). | [optional] +**version** | **str** | Object version number. | [optional] ## Example diff --git a/docs/TransactionUtxoChange.md b/docs/TransactionUtxoChange.md index 9ac30a6a..81cd303e 100644 --- a/docs/TransactionUtxoChange.md +++ b/docs/TransactionUtxoChange.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **address** | **str** | The receiving address of the UTXO change output. | [optional] **value** | **str** | The amount of the UTXO change output. | [optional] +**token_id** | **str** | The token ID of the UTXO change output. | [optional] ## Example diff --git a/docs/TransactionsApi.md b/docs/TransactionsApi.md index 52d85d25..3b24e9b5 100644 --- a/docs/TransactionsApi.md +++ b/docs/TransactionsApi.md @@ -1061,8 +1061,8 @@ Name | Type | Description | Notes **wallet_type** | [**WalletType**](.md)| The wallet type. - `Custodial`: [Custodial Wallets](https://manuals.cobo.com/en/portal/custodial-wallets/introduction) - `MPC`: [MPC Wallets](https://manuals.cobo.com/en/portal/mpc-wallets/introduction) - `SmartContract`: [Smart Contract Wallets](https://manuals.cobo.com/en/portal/smart-contract-wallets/introduction) - `Exchange`: [Exchange Wallets](https://manuals.cobo.com/en/portal/exchange-wallets/introduction) | [optional] **wallet_subtype** | [**WalletSubtype**](.md)| The wallet subtype. - `Asset`: Custodial Wallets (Asset Wallets) - `Web3`: Custodial Wallets (Web3 Wallets) - `Main`: Exchange Wallets (Main Account) - `Sub`: Exchange Wallets (Sub Account) - `Org-Controlled`: MPC Wallets (Organization-Controlled Wallets) - `User-Controlled`: MPC Wallets (User-Controlled Wallets) - `Safe{Wallet}`: Smart Contract Wallets (Safe{Wallet}) | [optional] **project_id** | **str**| (This parameter is only applicable to User-Controlled Wallets.) The project ID, which you can retrieve by calling [List all projects](https://www.cobo.com/developers/v2/api-references/wallets--mpc-wallets/list-all-projects). | [optional] - **min_created_timestamp** | **int**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If not provided, the default value is 90 days before the current time. This default value is subject to change. | [optional] - **max_created_timestamp** | **int**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If not provided, the default value is the current time. This default value is subject to change. | [optional] + **min_created_timestamp** | **int**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or after the specified time. If you specify `min_created_timestamp` without specifying `max_created_timestamp`, `max_created_timestamp` is automatically set to `min_created_timestamp` + 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is 90 days before the current time. This default value is subject to change. | [optional] + **max_created_timestamp** | **int**| The time when the transaction was created, in Unix timestamp format, measured in milliseconds. You can use this parameter to filter transactions created on or before the specified time. If you specify `max_created_timestamp` without specifying `min_created_timestamp`, `min_created_timestamp` is automatically set to `max_created_timestamp` - 90 days. If you specify both, the time range cannot exceed 90 days. If not provided, the default value is the current time. This default value is subject to change. | [optional] **limit** | **int**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10] **before** | **str**| A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. | [optional] **after** | **str**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional] diff --git a/docs/TriggerTestPaymentWebhookEventResponse.md b/docs/TriggerTestPaymentWebhookEventResponse.md new file mode 100644 index 00000000..2c579664 --- /dev/null +++ b/docs/TriggerTestPaymentWebhookEventResponse.md @@ -0,0 +1,29 @@ +# TriggerTestPaymentWebhookEventResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**triggered** | **bool** | Whether a test webhook event was successfully triggered. - `true`: The test webhook event was successfully triggered. - `false`: The test webhook event could not be triggered. | [optional] + +## Example + +```python +from cobo_waas2.models.trigger_test_payment_webhook_event_response import TriggerTestPaymentWebhookEventResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TriggerTestPaymentWebhookEventResponse from a JSON string +trigger_test_payment_webhook_event_response_instance = TriggerTestPaymentWebhookEventResponse.from_json(json) +# print the JSON string representation of the object +print(TriggerTestPaymentWebhookEventResponse.to_json()) + +# convert the object into a dict +trigger_test_payment_webhook_event_response_dict = trigger_test_payment_webhook_event_response_instance.to_dict() +# create an instance of TriggerTestPaymentWebhookEventResponse from a dict +trigger_test_payment_webhook_event_response_from_dict = TriggerTestPaymentWebhookEventResponse.from_dict(trigger_test_payment_webhook_event_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TriggerTestPaymentsWebhookEventRequest.md b/docs/TriggerTestPaymentsWebhookEventRequest.md new file mode 100644 index 00000000..ab198b32 --- /dev/null +++ b/docs/TriggerTestPaymentsWebhookEventRequest.md @@ -0,0 +1,30 @@ +# TriggerTestPaymentsWebhookEventRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | [**WebhookEventType**](WebhookEventType.md) | | +**override_data** | **object** | An optional object to customize the webhook event payload. Include only the fields you want to override. The provided fields must match the webhook event data structure for the specified event type. For the full event data structure, refer to the `data.data` property in the response of [List all webhook events](https://www.cobo.com/developers/v2/api-references/developers--webhooks/list-all-webhook-events). If this property is omitted, a default payload is returned. | [optional] + +## Example + +```python +from cobo_waas2.models.trigger_test_payments_webhook_event_request import TriggerTestPaymentsWebhookEventRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of TriggerTestPaymentsWebhookEventRequest from a JSON string +trigger_test_payments_webhook_event_request_instance = TriggerTestPaymentsWebhookEventRequest.from_json(json) +# print the JSON string representation of the object +print(TriggerTestPaymentsWebhookEventRequest.to_json()) + +# convert the object into a dict +trigger_test_payments_webhook_event_request_dict = trigger_test_payments_webhook_event_request_instance.to_dict() +# create an instance of TriggerTestPaymentsWebhookEventRequest from a dict +trigger_test_payments_webhook_event_request_from_dict = TriggerTestPaymentsWebhookEventRequest.from_dict(trigger_test_payments_webhook_event_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UTXO.md b/docs/UTXO.md index f5089e77..31fb428c 100644 --- a/docs/UTXO.md +++ b/docs/UTXO.md @@ -15,6 +15,10 @@ Name | Type | Description | Notes **is_locked** | **bool** | Whether the UTXO is locked. | [optional] **confirmed_number** | **int** | The number of confirmations for the UTXO. | [optional] **is_frozen** | **bool** | Whether the UTXO is frozen. | [optional] +**is_change** | **bool** | Whether the UTXO is a change output of a transaction. | [optional] +**chain_id** | **str** | The chain ID, which is the unique identifier of a blockchain. | [optional] +**object_id** | **str** | The ID of the blockchain object to spend (e.g., SUI Coin object). | [optional] +**version** | **str** | Object version number. | [optional] ## Example diff --git a/docs/UpdateDestinationBankAccount.md b/docs/UpdateDestinationBankAccount.md index 12f0b926..0e7c0ced 100644 --- a/docs/UpdateDestinationBankAccount.md +++ b/docs/UpdateDestinationBankAccount.md @@ -16,6 +16,8 @@ Name | Type | Description | Notes **iban_code** | **str** | The IBAN code of the bank account. | [optional] **further_credit** | **str** | The further credit of the bank account. | [optional] **intermediary_bank_info** | [**IntermediaryBankInfo**](IntermediaryBankInfo.md) | | [optional] +**country** | **str** | Beneficiary's country, in ISO 3166-1 alpha-3 format. | [optional] +**city** | **str** | Beneficiary's city. | [optional] ## Example diff --git a/docs/WalletsApi.md b/docs/WalletsApi.md index 84a462e6..865872ac 100644 --- a/docs/WalletsApi.md +++ b/docs/WalletsApi.md @@ -27,6 +27,7 @@ Method | HTTP request | Description [**list_token_balances_for_address**](WalletsApi.md#list_token_balances_for_address) | **GET** /wallets/{wallet_id}/addresses/{address}/tokens | List token balances by address [**list_token_balances_for_wallet**](WalletsApi.md#list_token_balances_for_wallet) | **GET** /wallets/{wallet_id}/tokens | List token balances by wallet [**list_token_listing_requests**](WalletsApi.md#list_token_listing_requests) | **GET** /wallets/tokens/listing_requests | List token listing requests +[**list_transaction_utxos**](WalletsApi.md#list_transaction_utxos) | **GET** /wallets/{wallet_id}/transaction_utxos | List transaction UTXOs [**list_utxos**](WalletsApi.md#list_utxos) | **GET** /wallets/{wallet_id}/utxos | List UTXOs [**list_wallets**](WalletsApi.md#list_wallets) | **GET** /wallets | List all wallets [**lock_utxos**](WalletsApi.md#lock_utxos) | **POST** /wallets/{wallet_id}/utxos/lock | Lock UTXOs @@ -1802,6 +1803,96 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **list_transaction_utxos** +> ListUtxos200Response list_transaction_utxos(wallet_id, chain_id, tx_hash, is_change=is_change, vout_n=vout_n, token_id=token_id, address=address, limit=limit, before=before, after=after) + +List transaction UTXOs + +The operation retrieves a list of UTXOs for a specified transaction of a wallet. You must specify the wallet, chain, and transaction hash. This operation is applicable to MPC and Custodial Web3 Wallets. + +### Example + +* OAuth Authentication (OAuth2): +* Api Key Authentication (CoboAuth): + +```python +import cobo_waas2 +from cobo_waas2.models.list_utxos200_response import ListUtxos200Response +from cobo_waas2.rest import ApiException +from pprint import pprint + +# See configuration.py for a list of all supported configurations. +configuration = cobo_waas2.Configuration( + # Replace `` with your private key + api_private_key="", + # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2. + host="https://api.dev.cobo.com/v2" +) +# Enter a context with an instance of the API client +with cobo_waas2.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cobo_waas2.WalletsApi(api_client) + wallet_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479' + chain_id = 'ETH' + tx_hash = 'dd7e1cecf6bbde1844ee1815b780711a1e306a718bcd23cd64401b48ef88eb83' + is_change = false + vout_n = 0 + token_id = 'ETH_USDT' + address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045' + limit = 10 + before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1' + after = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk' + + try: + # List transaction UTXOs + api_response = api_instance.list_transaction_utxos(wallet_id, chain_id, tx_hash, is_change=is_change, vout_n=vout_n, token_id=token_id, address=address, limit=limit, before=before, after=after) + print("The response of WalletsApi->list_transaction_utxos:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling WalletsApi->list_transaction_utxos: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **wallet_id** | **str**| The wallet ID. | + **chain_id** | **str**| The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling [List enabled chains](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-chains). | + **tx_hash** | **str**| The transaction hash to filter UTXOs by. | + **is_change** | **bool**| Filter UTXOs by whether they are change outputs. | [optional] + **vout_n** | **int**| The output index of the UTXO to filter by. | [optional] + **token_id** | **str**| The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). | [optional] + **address** | **str**| | [optional] + **limit** | **int**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10] + **before** | **str**| A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. | [optional] + **after** | **str**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional] + +### Return type + +[**ListUtxos200Response**](ListUtxos200Response.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The request was successful. | - | +**4XX** | Bad request. Your request contains malformed syntax or invalid parameters. | - | +**5XX** | Internal server error. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **list_utxos** > ListUtxos200Response list_utxos(wallet_id, token_id, address=address, tx_hash=tx_hash, limit=limit, before=before, after=after) diff --git a/pyproject.toml b/pyproject.toml index 1d249d46..511d93a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cobo_waas2" -version = "1.31.0" +version = "1.32.0" description = "Cobo Wallet as a Service 2.0" authors = ["Cobo WaaS "] license = "Apache 2.0" diff --git a/setup.py b/setup.py index 153f4b6d..c74c7b1b 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "cobo-waas2" -VERSION = "1.31.0" +VERSION = "1.32.0" PYTHON_REQUIRES = ">=3.9" REQUIRES = [ "urllib3 >= 2.6.0", diff --git a/test/test_batch_check_utxo201_response.py b/test/test_batch_check_utxo201_response.py index f36a65e4..b0030971 100644 --- a/test/test_batch_check_utxo201_response.py +++ b/test/test_batch_check_utxo201_response.py @@ -44,7 +44,11 @@ def make_instance(self, include_optional) -> BatchCheckUtxo201Response: is_coinbase = False, is_locked = False, confirmed_number = 66716, - is_frozen = False, ) + is_frozen = False, + is_change = False, + chain_id = 'BTC', + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1', ) ] ) else: diff --git a/test/test_callback_message.py b/test/test_callback_message.py index 54ae6928..10468d79 100644 --- a/test/test_callback_message.py +++ b/test/test_callback_message.py @@ -72,16 +72,23 @@ def make_instance(self, include_optional) -> CallbackMessage: cobo_waas2.models.transaction_selected_utxo.TransactionSelectedUtxo( tx_hash = '7014d7d9b91862d7131f7543d84da3bec60e20be93c23ad01167c48b778fdemo', vout_n = 0, + token_id = 'BTC', address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', value = '0.5', redeem_script = '0x1cc56cbbac4622082221a8768d1d0901', - revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', ) + revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1', ) ], raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', unsigned_raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', - utxo_change = cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( - address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', - value = '0.5', ), ), + utxo_change = null, + utxo_changes = [ + cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( + address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', + value = '0.5', + token_id = 'BTC', ) + ], ), replacement = cobo_waas2.models.transaction_replacement.Transaction_replacement( replaced_by_type = 'Resend', replaced_by_transaction_id = 'aff0e1cb-15b2-4e1f-9b9d-a9133715986f', @@ -149,16 +156,23 @@ def make_instance(self, include_optional) -> CallbackMessage: cobo_waas2.models.transaction_selected_utxo.TransactionSelectedUtxo( tx_hash = '7014d7d9b91862d7131f7543d84da3bec60e20be93c23ad01167c48b778fdemo', vout_n = 0, + token_id = 'BTC', address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', value = '0.5', redeem_script = '0x1cc56cbbac4622082221a8768d1d0901', - revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', ) + revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1', ) ], raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', unsigned_raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', - utxo_change = cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( - address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', - value = '0.5', ), ), + utxo_change = null, + utxo_changes = [ + cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( + address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', + value = '0.5', + token_id = 'BTC', ) + ], ), replacement = cobo_waas2.models.transaction_replacement.Transaction_replacement( replaced_by_type = 'Resend', replaced_by_transaction_id = 'aff0e1cb-15b2-4e1f-9b9d-a9133715986f', diff --git a/test/test_create_destination_bank_account.py b/test/test_create_destination_bank_account.py index 796cff6d..278a0e3f 100644 --- a/test/test_create_destination_bank_account.py +++ b/test/test_create_destination_bank_account.py @@ -47,7 +47,9 @@ def make_instance(self, include_optional) -> CreateDestinationBankAccount: intermediary_bank_info = cobo_waas2.models.intermediary_bank_info.IntermediaryBankInfo( bank_name = 'Intermediary Bank', bank_address = '456 Bank Ave, Cityville, USA', - bank_swift_code = 'BOFAUS33', ) + bank_swift_code = 'BOFAUS33', ), + country = 'USA', + city = 'New York' ) else: return CreateDestinationBankAccount( diff --git a/test/test_create_destination_entry201_response.py b/test/test_create_destination_entry201_response.py index 0c490e89..bab71465 100644 --- a/test/test_create_destination_entry201_response.py +++ b/test/test_create_destination_entry201_response.py @@ -63,7 +63,9 @@ def make_instance(self, include_optional) -> CreateDestinationEntry201Response: bank_swift_code = 'BOFAUS33', ), bank_account_status = 'Pending', created_timestamp = 1744689600, - updated_timestamp = 1744689600, ) + updated_timestamp = 1744689600, + country = 'USA', + city = 'New York', ) ] ) else: diff --git a/test/test_create_destination_entry_request.py b/test/test_create_destination_entry_request.py index 0a29ae15..6674eeab 100644 --- a/test/test_create_destination_entry_request.py +++ b/test/test_create_destination_entry_request.py @@ -55,7 +55,9 @@ def make_instance(self, include_optional) -> CreateDestinationEntryRequest: intermediary_bank_info = cobo_waas2.models.intermediary_bank_info.IntermediaryBankInfo( bank_name = 'Intermediary Bank', bank_address = '456 Bank Ave, Cityville, USA', - bank_swift_code = 'BOFAUS33', ), ) + bank_swift_code = 'BOFAUS33', ), + country = 'USA', + city = 'New York', ) ] ) else: diff --git a/test/test_create_destination_request.py b/test/test_create_destination_request.py index edb9ea8b..7887910e 100644 --- a/test/test_create_destination_request.py +++ b/test/test_create_destination_request.py @@ -56,7 +56,9 @@ def make_instance(self, include_optional) -> CreateDestinationRequest: intermediary_bank_info = cobo_waas2.models.intermediary_bank_info.IntermediaryBankInfo( bank_name = 'Intermediary Bank', bank_address = '456 Bank Ave, Cityville, USA', - bank_swift_code = 'BOFAUS33', ), ) + bank_swift_code = 'BOFAUS33', ), + country = 'USA', + city = 'New York', ) ], merchant_id = 'M1001', country = 'USA', diff --git a/test/test_destination_bank_account.py b/test/test_destination_bank_account.py index b906d90c..7467f6b5 100644 --- a/test/test_destination_bank_account.py +++ b/test/test_destination_bank_account.py @@ -51,7 +51,9 @@ def make_instance(self, include_optional) -> DestinationBankAccount: bank_swift_code = 'BOFAUS33', ), bank_account_status = 'Pending', created_timestamp = 1744689600, - updated_timestamp = 1744689600 + updated_timestamp = 1744689600, + country = 'USA', + city = 'New York' ) else: return DestinationBankAccount( diff --git a/test/test_destination_bank_account_detail.py b/test/test_destination_bank_account_detail.py index f4bb80b0..fd122545 100644 --- a/test/test_destination_bank_account_detail.py +++ b/test/test_destination_bank_account_detail.py @@ -57,6 +57,8 @@ def make_instance(self, include_optional) -> DestinationBankAccountDetail: bank_address = '456 Bank Ave, Cityville, USA', bank_swift_code = 'BOFAUS33', ), bank_account_status = 'Pending', + country = 'USA', + city = 'New York', created_timestamp = 1744689600, updated_timestamp = 1744689600 ) diff --git a/test/test_destination_detail.py b/test/test_destination_detail.py index 7a2ce73f..9e996f34 100644 --- a/test/test_destination_detail.py +++ b/test/test_destination_detail.py @@ -68,7 +68,9 @@ def make_instance(self, include_optional) -> DestinationDetail: bank_swift_code = 'BOFAUS33', ), bank_account_status = 'Pending', created_timestamp = 1744689600, - updated_timestamp = 1744689600, ) + updated_timestamp = 1744689600, + country = 'USA', + city = 'New York', ) ], merchant_id = 'M1001', created_timestamp = 1744689600, diff --git a/test/test_get_destination_entry200_response.py b/test/test_get_destination_entry200_response.py index d50f2ad6..59d339e5 100644 --- a/test/test_get_destination_entry200_response.py +++ b/test/test_get_destination_entry200_response.py @@ -65,6 +65,8 @@ def make_instance(self, include_optional) -> GetDestinationEntry200Response: bank_address = '456 Bank Ave, Cityville, USA', bank_swift_code = 'BOFAUS33', ), bank_account_status = 'Pending', + country = 'USA', + city = 'New York', created_timestamp = 1744689600, updated_timestamp = 1744689600, ) ) diff --git a/test/test_intermediary_bank_info.py b/test/test_intermediary_bank_info.py index 68388388..abd4a6a3 100644 --- a/test/test_intermediary_bank_info.py +++ b/test/test_intermediary_bank_info.py @@ -41,7 +41,6 @@ def make_instance(self, include_optional) -> IntermediaryBankInfo: else: return IntermediaryBankInfo( bank_name = 'Intermediary Bank', - bank_address = '456 Bank Ave, Cityville, USA', bank_swift_code = 'BOFAUS33', ) """ diff --git a/test/test_list_callback_messages200_response.py b/test/test_list_callback_messages200_response.py index 1e55b7b1..464997e7 100644 --- a/test/test_list_callback_messages200_response.py +++ b/test/test_list_callback_messages200_response.py @@ -74,16 +74,23 @@ def make_instance(self, include_optional) -> ListCallbackMessages200Response: cobo_waas2.models.transaction_selected_utxo.TransactionSelectedUtxo( tx_hash = '7014d7d9b91862d7131f7543d84da3bec60e20be93c23ad01167c48b778fdemo', vout_n = 0, + token_id = 'BTC', address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', value = '0.5', redeem_script = '0x1cc56cbbac4622082221a8768d1d0901', - revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', ) + revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1', ) ], raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', unsigned_raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', - utxo_change = cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( - address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', - value = '0.5', ), ), + utxo_change = null, + utxo_changes = [ + cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( + address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', + value = '0.5', + token_id = 'BTC', ) + ], ), replacement = cobo_waas2.models.transaction_replacement.Transaction_replacement( replaced_by_type = 'Resend', replaced_by_transaction_id = 'aff0e1cb-15b2-4e1f-9b9d-a9133715986f', @@ -159,16 +166,23 @@ def make_instance(self, include_optional) -> ListCallbackMessages200Response: cobo_waas2.models.transaction_selected_utxo.TransactionSelectedUtxo( tx_hash = '7014d7d9b91862d7131f7543d84da3bec60e20be93c23ad01167c48b778fdemo', vout_n = 0, + token_id = 'BTC', address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', value = '0.5', redeem_script = '0x1cc56cbbac4622082221a8768d1d0901', - revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', ) + revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1', ) ], raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', unsigned_raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', - utxo_change = cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( - address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', - value = '0.5', ), ), + utxo_change = null, + utxo_changes = [ + cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( + address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', + value = '0.5', + token_id = 'BTC', ) + ], ), replacement = cobo_waas2.models.transaction_replacement.Transaction_replacement( replaced_by_type = 'Resend', replaced_by_transaction_id = 'aff0e1cb-15b2-4e1f-9b9d-a9133715986f', diff --git a/test/test_list_destination_entries200_response.py b/test/test_list_destination_entries200_response.py index 3df30d29..891b7b18 100644 --- a/test/test_list_destination_entries200_response.py +++ b/test/test_list_destination_entries200_response.py @@ -70,6 +70,8 @@ def make_instance(self, include_optional) -> ListDestinationEntries200Response: bank_address = '456 Bank Ave, Cityville, USA', bank_swift_code = 'BOFAUS33', ), bank_account_status = 'Pending', + country = 'USA', + city = 'New York', created_timestamp = 1744689600, updated_timestamp = 1744689600, ) ], diff --git a/test/test_list_transactions200_response.py b/test/test_list_transactions200_response.py index 1ce4af2d..8d7c8661 100644 --- a/test/test_list_transactions200_response.py +++ b/test/test_list_transactions200_response.py @@ -66,16 +66,23 @@ def make_instance(self, include_optional) -> ListTransactions200Response: cobo_waas2.models.transaction_selected_utxo.TransactionSelectedUtxo( tx_hash = '7014d7d9b91862d7131f7543d84da3bec60e20be93c23ad01167c48b778fdemo', vout_n = 0, + token_id = 'BTC', address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', value = '0.5', redeem_script = '0x1cc56cbbac4622082221a8768d1d0901', - revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', ) + revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1', ) ], raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', unsigned_raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', - utxo_change = cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( - address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', - value = '0.5', ), ), + utxo_change = null, + utxo_changes = [ + cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( + address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', + value = '0.5', + token_id = 'BTC', ) + ], ), replacement = cobo_waas2.models.transaction_replacement.Transaction_replacement( replaced_by_type = 'Resend', replaced_by_transaction_id = 'aff0e1cb-15b2-4e1f-9b9d-a9133715986f', diff --git a/test/test_list_utxos200_response.py b/test/test_list_utxos200_response.py index be9bdf67..74cbc95a 100644 --- a/test/test_list_utxos200_response.py +++ b/test/test_list_utxos200_response.py @@ -44,7 +44,11 @@ def make_instance(self, include_optional) -> ListUtxos200Response: is_coinbase = False, is_locked = False, confirmed_number = 66716, - is_frozen = False, ) + is_frozen = False, + is_change = False, + chain_id = 'BTC', + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1', ) ], pagination = cobo_waas2.models.pagination.Pagination( before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1', diff --git a/test/test_merchant_balance.py b/test/test_merchant_balance.py index cc6cf532..1542d382 100644 --- a/test/test_merchant_balance.py +++ b/test/test_merchant_balance.py @@ -49,7 +49,6 @@ def make_instance(self, include_optional) -> MerchantBalance: return MerchantBalance( merchant_id = '1', token_id = 'ETH_USDT', - acquiring_type = 'Order', ) """ diff --git a/test/test_payment_api.py b/test/test_payment_api.py index 153bbb5c..a973f2d0 100644 --- a/test/test_payment_api.py +++ b/test/test_payment_api.py @@ -710,11 +710,11 @@ def test_list_merchant_balances(self) -> None: List merchant balances """ """ - token_id = 'ETH_USDT' merchant_ids = 'M1001,M1002,M1003' + token_id = 'ETH_USDT' acquiring_type = cobo_waas2.AcquiringType() - api_response = self.api.list_merchant_balances(token_id, merchant_ids=merchant_ids, acquiring_type=acquiring_type) + api_response = self.api.list_merchant_balances(merchant_ids=merchant_ids, token_id=token_id, acquiring_type=acquiring_type) """ def test_list_merchants(self) -> None: @@ -865,6 +865,18 @@ def test_payment_estimate_fee(self) -> None: api_response = self.api.payment_estimate_fee(payment_estimate_fee_request=payment_estimate_fee_request) """ + def test_trigger_test_payments_webhook_event(self) -> None: + """ + Test case for trigger_test_payments_webhook_event + + Trigger test webhook event + """ + """ + trigger_test_payments_webhook_event_request = cobo_waas2.TriggerTestPaymentsWebhookEventRequest() + + api_response = self.api.trigger_test_payments_webhook_event(trigger_test_payments_webhook_event_request=trigger_test_payments_webhook_event_request) + """ + def test_update_bank_account_by_id(self) -> None: """ Test case for update_bank_account_by_id diff --git a/test/test_payment_transaction_event_data.py b/test/test_payment_transaction_event_data.py index c543591e..037661d7 100644 --- a/test/test_payment_transaction_event_data.py +++ b/test/test_payment_transaction_event_data.py @@ -65,16 +65,23 @@ def make_instance(self, include_optional) -> PaymentTransactionEventData: cobo_waas2.models.transaction_selected_utxo.TransactionSelectedUtxo( tx_hash = '7014d7d9b91862d7131f7543d84da3bec60e20be93c23ad01167c48b778fdemo', vout_n = 0, + token_id = 'BTC', address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', value = '0.5', redeem_script = '0x1cc56cbbac4622082221a8768d1d0901', - revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', ) + revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1', ) ], raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', unsigned_raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', - utxo_change = cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( - address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', - value = '0.5', ), ), + utxo_change = null, + utxo_changes = [ + cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( + address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', + value = '0.5', + token_id = 'BTC', ) + ], ), replacement = cobo_waas2.models.transaction_replacement.Transaction_replacement( replaced_by_type = 'Resend', replaced_by_transaction_id = 'aff0e1cb-15b2-4e1f-9b9d-a9133715986f', diff --git a/test/test_transaction.py b/test/test_transaction.py index ce295b9b..1be368d3 100644 --- a/test/test_transaction.py +++ b/test/test_transaction.py @@ -64,16 +64,23 @@ def make_instance(self, include_optional) -> Transaction: cobo_waas2.models.transaction_selected_utxo.TransactionSelectedUtxo( tx_hash = '7014d7d9b91862d7131f7543d84da3bec60e20be93c23ad01167c48b778fdemo', vout_n = 0, + token_id = 'BTC', address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', value = '0.5', redeem_script = '0x1cc56cbbac4622082221a8768d1d0901', - revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', ) + revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1', ) ], raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', unsigned_raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', - utxo_change = cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( - address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', - value = '0.5', ), ), + utxo_change = null, + utxo_changes = [ + cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( + address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', + value = '0.5', + token_id = 'BTC', ) + ], ), replacement = cobo_waas2.models.transaction_replacement.Transaction_replacement( replaced_by_type = 'Resend', replaced_by_transaction_id = 'aff0e1cb-15b2-4e1f-9b9d-a9133715986f', diff --git a/test/test_transaction_deposit_to_address_destination.py b/test/test_transaction_deposit_to_address_destination.py index 65a0c284..f7cf47d8 100644 --- a/test/test_transaction_deposit_to_address_destination.py +++ b/test/test_transaction_deposit_to_address_destination.py @@ -42,7 +42,9 @@ def make_instance(self, include_optional) -> TransactionDepositToAddressDestinat memo = '82840924', amount = '1.5', tx_info = cobo_waas2.models.transaction_deposit_to_address_destination_tx_info.TransactionDepositToAddressDestination_tx_info( - vout_n = 0, ) + vout_n = 0, + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1', ) ) else: return TransactionDepositToAddressDestination( diff --git a/test/test_transaction_deposit_to_address_destination_tx_info.py b/test/test_transaction_deposit_to_address_destination_tx_info.py index 6ed55214..36f7a93a 100644 --- a/test/test_transaction_deposit_to_address_destination_tx_info.py +++ b/test/test_transaction_deposit_to_address_destination_tx_info.py @@ -34,7 +34,9 @@ def make_instance(self, include_optional) -> TransactionDepositToAddressDestinat model = TransactionDepositToAddressDestinationTxInfo() if include_optional: return TransactionDepositToAddressDestinationTxInfo( - vout_n = 0 + vout_n = 0, + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1' ) else: return TransactionDepositToAddressDestinationTxInfo( diff --git a/test/test_transaction_destination.py b/test/test_transaction_destination.py index 1567f25b..281fd260 100644 --- a/test/test_transaction_destination.py +++ b/test/test_transaction_destination.py @@ -137,7 +137,9 @@ def make_instance(self, include_optional) -> TransactionDestination: wallet_subtype = 'Asset', memo = '82840924', tx_info = cobo_waas2.models.transaction_deposit_to_address_destination_tx_info.TransactionDepositToAddressDestination_tx_info( - vout_n = 0, ), + vout_n = 0, + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1', ), message_bip137 = '', message_bip322 = '', message_cosmos_adr36 = '', diff --git a/test/test_transaction_detail.py b/test/test_transaction_detail.py index b1408759..b0ffc191 100644 --- a/test/test_transaction_detail.py +++ b/test/test_transaction_detail.py @@ -64,16 +64,23 @@ def make_instance(self, include_optional) -> TransactionDetail: cobo_waas2.models.transaction_selected_utxo.TransactionSelectedUtxo( tx_hash = '7014d7d9b91862d7131f7543d84da3bec60e20be93c23ad01167c48b778fdemo', vout_n = 0, + token_id = 'BTC', address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', value = '0.5', redeem_script = '0x1cc56cbbac4622082221a8768d1d0901', - revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', ) + revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1', ) ], raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', unsigned_raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', - utxo_change = cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( - address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', - value = '0.5', ), ), + utxo_change = null, + utxo_changes = [ + cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( + address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', + value = '0.5', + token_id = 'BTC', ) + ], ), replacement = cobo_waas2.models.transaction_replacement.Transaction_replacement( replaced_by_type = 'Resend', replaced_by_transaction_id = 'aff0e1cb-15b2-4e1f-9b9d-a9133715986f', diff --git a/test/test_transaction_details.py b/test/test_transaction_details.py index 40773b12..a05bb8e4 100644 --- a/test/test_transaction_details.py +++ b/test/test_transaction_details.py @@ -64,16 +64,23 @@ def make_instance(self, include_optional) -> TransactionDetails: cobo_waas2.models.transaction_selected_utxo.TransactionSelectedUtxo( tx_hash = '7014d7d9b91862d7131f7543d84da3bec60e20be93c23ad01167c48b778fdemo', vout_n = 0, + token_id = 'BTC', address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', value = '0.5', redeem_script = '0x1cc56cbbac4622082221a8768d1d0901', - revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', ) + revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1', ) ], raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', unsigned_raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', - utxo_change = cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( - address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', - value = '0.5', ), ), + utxo_change = null, + utxo_changes = [ + cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( + address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', + value = '0.5', + token_id = 'BTC', ) + ], ), replacement = cobo_waas2.models.transaction_replacement.Transaction_replacement( replaced_by_type = 'Resend', replaced_by_transaction_id = 'aff0e1cb-15b2-4e1f-9b9d-a9133715986f', diff --git a/test/test_transaction_raw_tx_info.py b/test/test_transaction_raw_tx_info.py index 0dddbe97..471c7ed2 100644 --- a/test/test_transaction_raw_tx_info.py +++ b/test/test_transaction_raw_tx_info.py @@ -39,16 +39,26 @@ def make_instance(self, include_optional) -> TransactionRawTxInfo: cobo_waas2.models.transaction_selected_utxo.TransactionSelectedUtxo( tx_hash = '7014d7d9b91862d7131f7543d84da3bec60e20be93c23ad01167c48b778fdemo', vout_n = 0, + token_id = 'BTC', address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', value = '0.5', redeem_script = '0x1cc56cbbac4622082221a8768d1d0901', - revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', ) + revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1', ) ], raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', unsigned_raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', utxo_change = cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', - value = '0.5', ) + value = '0.5', + token_id = 'BTC', ), + utxo_changes = [ + cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( + address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', + value = '0.5', + token_id = 'BTC', ) + ] ) else: return TransactionRawTxInfo( diff --git a/test/test_transaction_selected_utxo.py b/test/test_transaction_selected_utxo.py index ab46d40b..bd7e9953 100644 --- a/test/test_transaction_selected_utxo.py +++ b/test/test_transaction_selected_utxo.py @@ -36,10 +36,13 @@ def make_instance(self, include_optional) -> TransactionSelectedUtxo: return TransactionSelectedUtxo( tx_hash = '7014d7d9b91862d7131f7543d84da3bec60e20be93c23ad01167c48b778fdemo', vout_n = 0, + token_id = 'BTC', address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', value = '0.5', redeem_script = '0x1cc56cbbac4622082221a8768d1d0901', - revealed_script = '0x1cc56cbbac4622082221a8768d1d0901' + revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1' ) else: return TransactionSelectedUtxo( diff --git a/test/test_transaction_utxo_change.py b/test/test_transaction_utxo_change.py index 6c9d807b..c00b0f12 100644 --- a/test/test_transaction_utxo_change.py +++ b/test/test_transaction_utxo_change.py @@ -35,7 +35,8 @@ def make_instance(self, include_optional) -> TransactionUtxoChange: if include_optional: return TransactionUtxoChange( address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', - value = '0.5' + value = '0.5', + token_id = 'BTC' ) else: return TransactionUtxoChange( diff --git a/test/test_transaction_webhook_event_data.py b/test/test_transaction_webhook_event_data.py index 6c369d0f..3c71ab68 100644 --- a/test/test_transaction_webhook_event_data.py +++ b/test/test_transaction_webhook_event_data.py @@ -65,16 +65,23 @@ def make_instance(self, include_optional) -> TransactionWebhookEventData: cobo_waas2.models.transaction_selected_utxo.TransactionSelectedUtxo( tx_hash = '7014d7d9b91862d7131f7543d84da3bec60e20be93c23ad01167c48b778fdemo', vout_n = 0, + token_id = 'BTC', address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', value = '0.5', redeem_script = '0x1cc56cbbac4622082221a8768d1d0901', - revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', ) + revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1', ) ], raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', unsigned_raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', - utxo_change = cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( - address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', - value = '0.5', ), ), + utxo_change = null, + utxo_changes = [ + cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( + address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', + value = '0.5', + token_id = 'BTC', ) + ], ), replacement = cobo_waas2.models.transaction_replacement.Transaction_replacement( replaced_by_type = 'Resend', replaced_by_transaction_id = 'aff0e1cb-15b2-4e1f-9b9d-a9133715986f', diff --git a/test/test_trigger_test_payment_webhook_event_response.py b/test/test_trigger_test_payment_webhook_event_response.py new file mode 100644 index 00000000..ab88e7a2 --- /dev/null +++ b/test/test_trigger_test_payment_webhook_event_response.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cobo_waas2.models.trigger_test_payment_webhook_event_response import TriggerTestPaymentWebhookEventResponse + + +class TestTriggerTestPaymentWebhookEventResponse(unittest.TestCase): + """TriggerTestPaymentWebhookEventResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TriggerTestPaymentWebhookEventResponse: + """Test TriggerTestPaymentWebhookEventResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TriggerTestPaymentWebhookEventResponse` + """ + model = TriggerTestPaymentWebhookEventResponse() + if include_optional: + return TriggerTestPaymentWebhookEventResponse( + triggered = True + ) + else: + return TriggerTestPaymentWebhookEventResponse( + ) + """ + + def testTriggerTestPaymentWebhookEventResponse(self): + """Test TriggerTestPaymentWebhookEventResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_trigger_test_payments_webhook_event_request.py b/test/test_trigger_test_payments_webhook_event_request.py new file mode 100644 index 00000000..e3824f9a --- /dev/null +++ b/test/test_trigger_test_payments_webhook_event_request.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cobo_waas2.models.trigger_test_payments_webhook_event_request import TriggerTestPaymentsWebhookEventRequest + + +class TestTriggerTestPaymentsWebhookEventRequest(unittest.TestCase): + """TriggerTestPaymentsWebhookEventRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TriggerTestPaymentsWebhookEventRequest: + """Test TriggerTestPaymentsWebhookEventRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TriggerTestPaymentsWebhookEventRequest` + """ + model = TriggerTestPaymentsWebhookEventRequest() + if include_optional: + return TriggerTestPaymentsWebhookEventRequest( + event_type = 'wallets.transaction.created', + override_data = {"chain_id":"ETH","transaction_id":"Test-transaction-id"} + ) + else: + return TriggerTestPaymentsWebhookEventRequest( + event_type = 'wallets.transaction.created', + ) + """ + + def testTriggerTestPaymentsWebhookEventRequest(self): + """Test TriggerTestPaymentsWebhookEventRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tss_key_sign_extra.py b/test/test_tss_key_sign_extra.py index ad2e476f..f58b7923 100644 --- a/test/test_tss_key_sign_extra.py +++ b/test/test_tss_key_sign_extra.py @@ -127,16 +127,23 @@ def make_instance(self, include_optional) -> TSSKeySignExtra: cobo_waas2.models.transaction_selected_utxo.TransactionSelectedUtxo( tx_hash = '7014d7d9b91862d7131f7543d84da3bec60e20be93c23ad01167c48b778fdemo', vout_n = 0, + token_id = 'BTC', address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', value = '0.5', redeem_script = '0x1cc56cbbac4622082221a8768d1d0901', - revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', ) + revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1', ) ], raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', unsigned_raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', - utxo_change = cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( - address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', - value = '0.5', ), ), + utxo_change = null, + utxo_changes = [ + cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( + address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', + value = '0.5', + token_id = 'BTC', ) + ], ), replacement = cobo_waas2.models.transaction_replacement.Transaction_replacement( replaced_by_type = 'Resend', replaced_by_transaction_id = 'aff0e1cb-15b2-4e1f-9b9d-a9133715986f', diff --git a/test/test_update_destination_bank_account.py b/test/test_update_destination_bank_account.py index ca979221..d6a15ffc 100644 --- a/test/test_update_destination_bank_account.py +++ b/test/test_update_destination_bank_account.py @@ -47,7 +47,9 @@ def make_instance(self, include_optional) -> UpdateDestinationBankAccount: intermediary_bank_info = cobo_waas2.models.intermediary_bank_info.IntermediaryBankInfo( bank_name = 'Intermediary Bank', bank_address = '456 Bank Ave, Cityville, USA', - bank_swift_code = 'BOFAUS33', ) + bank_swift_code = 'BOFAUS33', ), + country = 'USA', + city = 'New York' ) else: return UpdateDestinationBankAccount( diff --git a/test/test_update_destination_entry200_response.py b/test/test_update_destination_entry200_response.py index 4b772cc1..be9f65e4 100644 --- a/test/test_update_destination_entry200_response.py +++ b/test/test_update_destination_entry200_response.py @@ -52,7 +52,9 @@ def make_instance(self, include_optional) -> UpdateDestinationEntry200Response: bank_swift_code = 'BOFAUS33', ), bank_account_status = 'Pending', created_timestamp = 1744689600, - updated_timestamp = 1744689600, ) + updated_timestamp = 1744689600, + country = 'USA', + city = 'New York', ) ) else: return UpdateDestinationEntry200Response( diff --git a/test/test_update_destination_entry_request.py b/test/test_update_destination_entry_request.py index 72b3b2b1..1adb167b 100644 --- a/test/test_update_destination_entry_request.py +++ b/test/test_update_destination_entry_request.py @@ -50,7 +50,9 @@ def make_instance(self, include_optional) -> UpdateDestinationEntryRequest: intermediary_bank_info = cobo_waas2.models.intermediary_bank_info.IntermediaryBankInfo( bank_name = 'Intermediary Bank', bank_address = '456 Bank Ave, Cityville, USA', - bank_swift_code = 'BOFAUS33', ), ) + bank_swift_code = 'BOFAUS33', ), + country = 'USA', + city = 'New York', ) ) else: return UpdateDestinationEntryRequest( diff --git a/test/test_utxo.py b/test/test_utxo.py index 809470ee..d5a00621 100644 --- a/test/test_utxo.py +++ b/test/test_utxo.py @@ -42,7 +42,11 @@ def make_instance(self, include_optional) -> UTXO: is_coinbase = False, is_locked = False, confirmed_number = 66716, - is_frozen = False + is_frozen = False, + is_change = False, + chain_id = 'BTC', + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1' ) else: return UTXO( diff --git a/test/test_wallets_api.py b/test/test_wallets_api.py index b52fd8e2..3f596c24 100644 --- a/test/test_wallets_api.py +++ b/test/test_wallets_api.py @@ -358,6 +358,27 @@ def test_list_token_listing_requests(self) -> None: api_response = self.api.list_token_listing_requests(limit=limit, before=before, after=after, status=status) """ + def test_list_transaction_utxos(self) -> None: + """ + Test case for list_transaction_utxos + + List transaction UTXOs + """ + """ + wallet_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479' + chain_id = 'ETH' + tx_hash = 'dd7e1cecf6bbde1844ee1815b780711a1e306a718bcd23cd64401b48ef88eb83' + is_change = false + vout_n = 0 + token_id = 'ETH_USDT' + address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045' + limit = 10 + before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1' + after = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk' + + api_response = self.api.list_transaction_utxos(wallet_id, chain_id, tx_hash, is_change=is_change, vout_n=vout_n, token_id=token_id, address=address, limit=limit, before=before, after=after) + """ + def test_list_utxos(self) -> None: """ Test case for list_utxos diff --git a/test/test_webhook_event_data.py b/test/test_webhook_event_data.py index a45ec78e..7bc2c7f0 100644 --- a/test/test_webhook_event_data.py +++ b/test/test_webhook_event_data.py @@ -65,16 +65,23 @@ def make_instance(self, include_optional) -> WebhookEventData: cobo_waas2.models.transaction_selected_utxo.TransactionSelectedUtxo( tx_hash = '7014d7d9b91862d7131f7543d84da3bec60e20be93c23ad01167c48b778fdemo', vout_n = 0, + token_id = 'BTC', address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', value = '0.5', redeem_script = '0x1cc56cbbac4622082221a8768d1d0901', - revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', ) + revealed_script = '0x1cc56cbbac4622082221a8768d1d0901', + object_id = '0x11af4b844ff94b3fbef6e36b518da3ad4c5856fa686464524a876b463d129760', + version = '1', ) ], raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', unsigned_raw_tx = '0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO', - utxo_change = cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( - address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', - value = '0.5', ), ), + utxo_change = null, + utxo_changes = [ + cobo_waas2.models.transaction_utxo_change.TransactionUtxoChange( + address = '2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE', + value = '0.5', + token_id = 'BTC', ) + ], ), replacement = cobo_waas2.models.transaction_replacement.Transaction_replacement( replaced_by_type = 'Resend', replaced_by_transaction_id = 'aff0e1cb-15b2-4e1f-9b9d-a9133715986f',