From b055ddadf8d733791fc6a6c941a258aef3bd3644 Mon Sep 17 00:00:00 2001 From: Shanshan Li Date: Wed, 4 Feb 2026 11:14:47 +0800 Subject: [PATCH] release v1.31.0 --- .openapi-generator/FILES | 54 +- README.md | 43 +- cobo_waas2/__init__.py | 20 +- cobo_waas2/api/payment_api.py | 9904 ++++++----------- cobo_waas2/api_client.py | 2 +- cobo_waas2/models/__init__.py | 18 +- cobo_waas2/models/balance.py | 6 +- cobo_waas2/models/bridging_fee.py | 7 +- cobo_waas2/models/contract_call_params.py | 10 +- ...ate_counterparty_wallet_address_request.py | 90 - ...create_destination_bank_account_request.py | 112 - ...eate_destination_wallet_address_request.py | 90 - .../models/create_payment_order_request.py | 6 +- cobo_waas2/models/create_top_up_addresses.py | 2 +- cobo_waas2/models/create_wallet_address.py | 2 +- .../models/delete_counterparty200_response.py | 86 - ...counterparty_wallet_address200_response.py | 86 - ...te_destination_bank_account200_response.py | 86 - ..._destination_wallet_address200_response.py | 86 - .../enable_destination_whitelist_request.py | 86 - ...counterparty_wallet_address200_response.py | 100 - ...t_destination_bank_accounts200_response.py | 100 - ...estination_wallet_addresses200_response.py | 100 - cobo_waas2/models/payment_bridge_status.py | 41 + cobo_waas2/models/payment_bulk_send_item.py | 10 +- cobo_waas2/models/payment_payout.py | 16 +- cobo_waas2/models/payment_payout_detail.py | 16 +- cobo_waas2/models/payment_payout_event.py | 16 +- ...estination200_response.py => pre_check.py} | 19 +- ...stination_whitelist_enabled200_response.py | 86 - cobo_waas2/models/skip_check_type.py | 40 + cobo_waas2/models/supported_token.py | 20 +- cobo_waas2/models/transfer_params.py | 10 +- .../update_counterparty_by_id_request.py | 95 - .../update_destination_by_id_request.py | 97 - cobo_waas2/models/webhook_event_type.py | 3 + docs/Balance.md | 1 + docs/BridgingFee.md | 1 + docs/ContractCallParams.md | 1 + .../CreateCounterpartyWalletAddressRequest.md | 31 - docs/CreateDestinationBankAccountRequest.md | 40 - docs/CreateDestinationWalletAddressRequest.md | 31 - docs/CreatePaymentOrderRequest.md | 4 +- docs/CreateTopUpAddresses.md | 2 +- docs/CreateWalletAddress.md | 2 +- docs/DeleteCounterparty200Response.md | 29 - ...eteCounterpartyWalletAddress200Response.md | 29 - docs/DeleteDestination200Response.md | 29 - ...DeleteDestinationBankAccount200Response.md | 29 - ...leteDestinationWalletAddress200Response.md | 29 - docs/EnableDestinationWhitelistRequest.md | 29 - ...istCounterpartyWalletAddress200Response.md | 30 - .../ListDestinationBankAccounts200Response.md | 30 - ...stDestinationWalletAddresses200Response.md | 30 - docs/PaymentApi.md | 1654 +-- docs/PaymentBridgeStatus.md | 12 + docs/PaymentBulkSendItem.md | 10 +- docs/PaymentPayout.md | 3 +- docs/PaymentPayoutDetail.md | 3 +- docs/PaymentPayoutEvent.md | 3 +- docs/PreCheck.md | 30 + ...yDestinationWhitelistEnabled200Response.md | 29 - docs/SkipCheckType.md | 12 + docs/SupportedToken.md | 20 +- docs/TransferParams.md | 1 + docs/UpdateCounterpartyByIdRequest.md | 33 - docs/UpdateDestinationByIdRequest.md | 34 - docs/WebhookEventData.md | 1 + pyproject.toml | 2 +- requirements.txt | 2 +- setup.py | 4 +- test/test_address_balance.py | 6 +- test/test_asset_balance.py | 6 +- test/test_balance.py | 3 +- test/test_balance_update_info.py | 6 +- test/test_balance_update_info_event_data.py | 6 +- test/test_bridging_fee.py | 3 +- test/test_contract_call_params.py | 6 +- ...ate_counterparty_wallet_address_request.py | 56 - ...create_destination_bank_account_request.py | 74 - ...eate_destination_wallet_address_request.py | 56 - test/test_delete_counterparty200_response.py | 52 - ...counterparty_wallet_address200_response.py | 52 - test/test_delete_destination200_response.py | 52 - ...te_destination_bank_account200_response.py | 52 - ..._destination_wallet_address200_response.py | 52 - ...st_enable_destination_whitelist_request.py | 52 - test/test_graph_ql_request.py | 24 +- ...t_address_balances_by_token200_response.py | 3 +- ...alances_for_exchange_wallet200_response.py | 3 +- ...counterparty_wallet_address200_response.py | 64 - ...t_destination_bank_accounts200_response.py | 82 - ...estination_wallet_addresses200_response.py | 65 - test/test_list_payouts200_response.py | 9 +- ...est_list_settlement_details200_response.py | 3 +- ...st_list_settlement_requests200_response.py | 3 +- ..._token_balances_for_address200_response.py | 3 +- ...en_balances_for_fee_station200_response.py | 3 +- ..._for_fee_station200_response_data_inner.py | 6 +- test/test_payment_api.py | 247 +- test/test_payment_bridge_status.py | 33 + test/test_payment_estimate_fee201_response.py | 3 +- test/test_payment_estimated_fee.py | 3 +- test/test_payment_payout.py | 9 +- test/test_payment_payout_detail.py | 9 +- test/test_payment_payout_event.py | 9 +- test/test_payment_payout_item.py | 3 +- test/test_payment_settlement_event.py | 6 +- test/test_pre_check.py | 53 + ...stination_whitelist_enabled200_response.py | 52 - test/test_settlement.py | 6 +- test/test_settlement_detail.py | 3 +- test/test_skip_check_type.py | 33 + test/test_sub_wallet_asset_balance.py | 6 +- test/test_supported_token.py | 4 +- test/test_token_balance.py | 6 +- test/test_transfer_params.py | 6 +- .../test_update_counterparty_by_id_request.py | 57 - test/test_update_destination_by_id_request.py | 58 - test/test_webhook_event_data.py | 19 +- 120 files changed, 3820 insertions(+), 11402 deletions(-) delete mode 100644 cobo_waas2/models/create_counterparty_wallet_address_request.py delete mode 100644 cobo_waas2/models/create_destination_bank_account_request.py delete mode 100644 cobo_waas2/models/create_destination_wallet_address_request.py delete mode 100644 cobo_waas2/models/delete_counterparty200_response.py delete mode 100644 cobo_waas2/models/delete_counterparty_wallet_address200_response.py delete mode 100644 cobo_waas2/models/delete_destination_bank_account200_response.py delete mode 100644 cobo_waas2/models/delete_destination_wallet_address200_response.py delete mode 100644 cobo_waas2/models/enable_destination_whitelist_request.py delete mode 100644 cobo_waas2/models/list_counterparty_wallet_address200_response.py delete mode 100644 cobo_waas2/models/list_destination_bank_accounts200_response.py delete mode 100644 cobo_waas2/models/list_destination_wallet_addresses200_response.py create mode 100644 cobo_waas2/models/payment_bridge_status.py rename cobo_waas2/models/{delete_destination200_response.py => pre_check.py} (76%) delete mode 100644 cobo_waas2/models/query_destination_whitelist_enabled200_response.py create mode 100644 cobo_waas2/models/skip_check_type.py delete mode 100644 cobo_waas2/models/update_counterparty_by_id_request.py delete mode 100644 cobo_waas2/models/update_destination_by_id_request.py delete mode 100644 docs/CreateCounterpartyWalletAddressRequest.md delete mode 100644 docs/CreateDestinationBankAccountRequest.md delete mode 100644 docs/CreateDestinationWalletAddressRequest.md delete mode 100644 docs/DeleteCounterparty200Response.md delete mode 100644 docs/DeleteCounterpartyWalletAddress200Response.md delete mode 100644 docs/DeleteDestination200Response.md delete mode 100644 docs/DeleteDestinationBankAccount200Response.md delete mode 100644 docs/DeleteDestinationWalletAddress200Response.md delete mode 100644 docs/EnableDestinationWhitelistRequest.md delete mode 100644 docs/ListCounterpartyWalletAddress200Response.md delete mode 100644 docs/ListDestinationBankAccounts200Response.md delete mode 100644 docs/ListDestinationWalletAddresses200Response.md create mode 100644 docs/PaymentBridgeStatus.md create mode 100644 docs/PreCheck.md delete mode 100644 docs/QueryDestinationWhitelistEnabled200Response.md create mode 100644 docs/SkipCheckType.md delete mode 100644 docs/UpdateCounterpartyByIdRequest.md delete mode 100644 docs/UpdateDestinationByIdRequest.md delete mode 100644 test/test_create_counterparty_wallet_address_request.py delete mode 100644 test/test_create_destination_bank_account_request.py delete mode 100644 test/test_create_destination_wallet_address_request.py delete mode 100644 test/test_delete_counterparty200_response.py delete mode 100644 test/test_delete_counterparty_wallet_address200_response.py delete mode 100644 test/test_delete_destination200_response.py delete mode 100644 test/test_delete_destination_bank_account200_response.py delete mode 100644 test/test_delete_destination_wallet_address200_response.py delete mode 100644 test/test_enable_destination_whitelist_request.py delete mode 100644 test/test_list_counterparty_wallet_address200_response.py delete mode 100644 test/test_list_destination_bank_accounts200_response.py delete mode 100644 test/test_list_destination_wallet_addresses200_response.py create mode 100644 test/test_payment_bridge_status.py create mode 100644 test/test_pre_check.py delete mode 100644 test/test_query_destination_whitelist_enabled200_response.py create mode 100644 test/test_skip_check_type.py delete mode 100644 test/test_update_counterparty_by_id_request.py delete mode 100644 test/test_update_destination_by_id_request.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index f55b5753..8899b99a 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -159,15 +159,12 @@ cobo_waas2/models/create_claim_activity_request.py cobo_waas2/models/create_counterparty_entry201_response.py cobo_waas2/models/create_counterparty_entry_request.py cobo_waas2/models/create_counterparty_request.py -cobo_waas2/models/create_counterparty_wallet_address_request.py cobo_waas2/models/create_crypto_address_request.py cobo_waas2/models/create_custodial_wallet_params.py cobo_waas2/models/create_destination_bank_account.py -cobo_waas2/models/create_destination_bank_account_request.py cobo_waas2/models/create_destination_entry201_response.py cobo_waas2/models/create_destination_entry_request.py cobo_waas2/models/create_destination_request.py -cobo_waas2/models/create_destination_wallet_address_request.py cobo_waas2/models/create_exchange_wallet_params.py cobo_waas2/models/create_key_share_holder.py cobo_waas2/models/create_key_share_holder_group_request.py @@ -218,16 +215,11 @@ cobo_waas2/models/custodial_web3_contract_call_source.py cobo_waas2/models/custodial_web3_message_sign_source.py cobo_waas2/models/custodial_web3_transfer_source.py cobo_waas2/models/delete_address_book_by_id201_response.py -cobo_waas2/models/delete_counterparty200_response.py cobo_waas2/models/delete_counterparty_by_id200_response.py cobo_waas2/models/delete_counterparty_entry200_response.py -cobo_waas2/models/delete_counterparty_wallet_address200_response.py cobo_waas2/models/delete_crypto_address201_response.py -cobo_waas2/models/delete_destination200_response.py -cobo_waas2/models/delete_destination_bank_account200_response.py cobo_waas2/models/delete_destination_by_id200_response.py cobo_waas2/models/delete_destination_entry200_response.py -cobo_waas2/models/delete_destination_wallet_address200_response.py cobo_waas2/models/delete_guard_pubkey201_response.py cobo_waas2/models/delete_key_share_holder_group_by_id201_response.py cobo_waas2/models/delete_wallet_by_id201_response.py @@ -246,7 +238,6 @@ cobo_waas2/models/disposition_type.py cobo_waas2/models/eigen_layer_lst_stake_extra.py cobo_waas2/models/eigen_layer_native_stake_extra.py cobo_waas2/models/eigenlayer_validator.py -cobo_waas2/models/enable_destination_whitelist_request.py cobo_waas2/models/entry_type.py cobo_waas2/models/error_response.py cobo_waas2/models/estimate_claim_fee.py @@ -368,10 +359,7 @@ cobo_waas2/models/list_bulk_send_items200_response.py cobo_waas2/models/list_callback_messages200_response.py cobo_waas2/models/list_counterparties200_response.py cobo_waas2/models/list_counterparty_entries200_response.py -cobo_waas2/models/list_counterparty_wallet_address200_response.py -cobo_waas2/models/list_destination_bank_accounts200_response.py cobo_waas2/models/list_destination_entries200_response.py -cobo_waas2/models/list_destination_wallet_addresses200_response.py cobo_waas2/models/list_destinations200_response.py cobo_waas2/models/list_exchanges200_response_inner.py cobo_waas2/models/list_forced_sweep_requests200_response.py @@ -448,6 +436,7 @@ cobo_waas2/models/pagination.py cobo_waas2/models/payer_account.py cobo_waas2/models/payment_address_update_event_data.py cobo_waas2/models/payment_allocation_amount.py +cobo_waas2/models/payment_bridge_status.py cobo_waas2/models/payment_bulk_send.py cobo_waas2/models/payment_bulk_send_event.py cobo_waas2/models/payment_bulk_send_execution_mode.py @@ -484,9 +473,9 @@ cobo_waas2/models/policy_field_value_type.py cobo_waas2/models/pool_details.py cobo_waas2/models/pool_details_all_of_validators_info.py cobo_waas2/models/pool_summary.py +cobo_waas2/models/pre_check.py cobo_waas2/models/psp_balance.py cobo_waas2/models/query_approval_statement200_response.py -cobo_waas2/models/query_destination_whitelist_enabled200_response.py cobo_waas2/models/query_guard_pubkey200_response.py cobo_waas2/models/query_guard_pubkey200_response_addresses_inner.py cobo_waas2/models/refresh_address_balances_by_token200_response.py @@ -532,6 +521,7 @@ cobo_waas2/models/settlement.py cobo_waas2/models/settlement_detail.py cobo_waas2/models/settlement_info.py cobo_waas2/models/settlement_type.py +cobo_waas2/models/skip_check_type.py cobo_waas2/models/smart_contract_initiator.py cobo_waas2/models/smart_contract_wallet_info.py cobo_waas2/models/smart_contract_wallet_operation_type.py @@ -819,11 +809,9 @@ cobo_waas2/models/tss_status.py cobo_waas2/models/unfreeze_disposition.py cobo_waas2/models/update_address_book_param.py cobo_waas2/models/update_bank_account_by_id_request.py -cobo_waas2/models/update_counterparty_by_id_request.py cobo_waas2/models/update_counterparty_request.py cobo_waas2/models/update_custodial_wallet_params.py cobo_waas2/models/update_destination_bank_account.py -cobo_waas2/models/update_destination_by_id_request.py cobo_waas2/models/update_destination_entry200_response.py cobo_waas2/models/update_destination_entry_request.py cobo_waas2/models/update_destination_request.py @@ -987,15 +975,12 @@ docs/CreateClaimActivityRequest.md docs/CreateCounterpartyEntry201Response.md docs/CreateCounterpartyEntryRequest.md docs/CreateCounterpartyRequest.md -docs/CreateCounterpartyWalletAddressRequest.md docs/CreateCryptoAddressRequest.md docs/CreateCustodialWalletParams.md docs/CreateDestinationBankAccount.md -docs/CreateDestinationBankAccountRequest.md docs/CreateDestinationEntry201Response.md docs/CreateDestinationEntryRequest.md docs/CreateDestinationRequest.md -docs/CreateDestinationWalletAddressRequest.md docs/CreateExchangeWalletParams.md docs/CreateKeyShareHolder.md docs/CreateKeyShareHolderGroupRequest.md @@ -1046,16 +1031,11 @@ docs/CustodialWeb3ContractCallSource.md docs/CustodialWeb3MessageSignSource.md docs/CustodialWeb3TransferSource.md docs/DeleteAddressBookById201Response.md -docs/DeleteCounterparty200Response.md docs/DeleteCounterpartyById200Response.md docs/DeleteCounterpartyEntry200Response.md -docs/DeleteCounterpartyWalletAddress200Response.md docs/DeleteCryptoAddress201Response.md -docs/DeleteDestination200Response.md -docs/DeleteDestinationBankAccount200Response.md docs/DeleteDestinationById200Response.md docs/DeleteDestinationEntry200Response.md -docs/DeleteDestinationWalletAddress200Response.md docs/DeleteGuardPubkey201Response.md docs/DeleteKeyShareHolderGroupById201Response.md docs/DeleteWalletById201Response.md @@ -1076,7 +1056,6 @@ docs/DispositionType.md docs/EigenLayerLstStakeExtra.md docs/EigenLayerNativeStakeExtra.md docs/EigenlayerValidator.md -docs/EnableDestinationWhitelistRequest.md docs/EntryType.md docs/ErrorResponse.md docs/EstimateClaimFee.md @@ -1200,10 +1179,7 @@ docs/ListBulkSendItems200Response.md docs/ListCallbackMessages200Response.md docs/ListCounterparties200Response.md docs/ListCounterpartyEntries200Response.md -docs/ListCounterpartyWalletAddress200Response.md -docs/ListDestinationBankAccounts200Response.md docs/ListDestinationEntries200Response.md -docs/ListDestinationWalletAddresses200Response.md docs/ListDestinations200Response.md docs/ListExchanges200ResponseInner.md docs/ListForcedSweepRequests200Response.md @@ -1283,6 +1259,7 @@ docs/PayerAccount.md docs/PaymentAddressUpdateEventData.md docs/PaymentAllocationAmount.md docs/PaymentApi.md +docs/PaymentBridgeStatus.md docs/PaymentBulkSend.md docs/PaymentBulkSendEvent.md docs/PaymentBulkSendExecutionMode.md @@ -1319,10 +1296,10 @@ docs/PolicyFieldValueType.md docs/PoolDetails.md docs/PoolDetailsAllOfValidatorsInfo.md docs/PoolSummary.md +docs/PreCheck.md docs/PrimeBrokerApi.md docs/PspBalance.md docs/QueryApprovalStatement200Response.md -docs/QueryDestinationWhitelistEnabled200Response.md docs/QueryGuardPubkey200Response.md docs/QueryGuardPubkey200ResponseAddressesInner.md docs/RefreshAddressBalancesByToken200Response.md @@ -1370,6 +1347,7 @@ docs/Settlement.md docs/SettlementDetail.md docs/SettlementInfo.md docs/SettlementType.md +docs/SkipCheckType.md docs/SmartContractInitiator.md docs/SmartContractWalletInfo.md docs/SmartContractWalletOperationType.md @@ -1661,11 +1639,9 @@ docs/UTXO.md docs/UnfreezeDisposition.md docs/UpdateAddressBookParam.md docs/UpdateBankAccountByIdRequest.md -docs/UpdateCounterpartyByIdRequest.md docs/UpdateCounterpartyRequest.md docs/UpdateCustodialWalletParams.md docs/UpdateDestinationBankAccount.md -docs/UpdateDestinationByIdRequest.md docs/UpdateDestinationEntry200Response.md docs/UpdateDestinationEntryRequest.md docs/UpdateDestinationRequest.md @@ -1836,15 +1812,12 @@ test/test_create_claim_activity_request.py test/test_create_counterparty_entry201_response.py test/test_create_counterparty_entry_request.py test/test_create_counterparty_request.py -test/test_create_counterparty_wallet_address_request.py test/test_create_crypto_address_request.py test/test_create_custodial_wallet_params.py test/test_create_destination_bank_account.py -test/test_create_destination_bank_account_request.py test/test_create_destination_entry201_response.py test/test_create_destination_entry_request.py test/test_create_destination_request.py -test/test_create_destination_wallet_address_request.py test/test_create_exchange_wallet_params.py test/test_create_key_share_holder.py test/test_create_key_share_holder_group_request.py @@ -1895,16 +1868,11 @@ test/test_custodial_web3_contract_call_source.py test/test_custodial_web3_message_sign_source.py test/test_custodial_web3_transfer_source.py test/test_delete_address_book_by_id201_response.py -test/test_delete_counterparty200_response.py test/test_delete_counterparty_by_id200_response.py test/test_delete_counterparty_entry200_response.py -test/test_delete_counterparty_wallet_address200_response.py test/test_delete_crypto_address201_response.py -test/test_delete_destination200_response.py -test/test_delete_destination_bank_account200_response.py test/test_delete_destination_by_id200_response.py test/test_delete_destination_entry200_response.py -test/test_delete_destination_wallet_address200_response.py test/test_delete_guard_pubkey201_response.py test/test_delete_key_share_holder_group_by_id201_response.py test/test_delete_wallet_by_id201_response.py @@ -1925,7 +1893,6 @@ test/test_disposition_type.py test/test_eigen_layer_lst_stake_extra.py test/test_eigen_layer_native_stake_extra.py test/test_eigenlayer_validator.py -test/test_enable_destination_whitelist_request.py test/test_entry_type.py test/test_error_response.py test/test_estimate_claim_fee.py @@ -2049,10 +2016,7 @@ test/test_list_bulk_send_items200_response.py test/test_list_callback_messages200_response.py test/test_list_counterparties200_response.py test/test_list_counterparty_entries200_response.py -test/test_list_counterparty_wallet_address200_response.py -test/test_list_destination_bank_accounts200_response.py test/test_list_destination_entries200_response.py -test/test_list_destination_wallet_addresses200_response.py test/test_list_destinations200_response.py test/test_list_exchanges200_response_inner.py test/test_list_forced_sweep_requests200_response.py @@ -2132,6 +2096,7 @@ test/test_payer_account.py test/test_payment_address_update_event_data.py test/test_payment_allocation_amount.py test/test_payment_api.py +test/test_payment_bridge_status.py test/test_payment_bulk_send.py test/test_payment_bulk_send_event.py test/test_payment_bulk_send_execution_mode.py @@ -2168,10 +2133,10 @@ test/test_policy_field_value_type.py test/test_pool_details.py test/test_pool_details_all_of_validators_info.py test/test_pool_summary.py +test/test_pre_check.py test/test_prime_broker_api.py test/test_psp_balance.py test/test_query_approval_statement200_response.py -test/test_query_destination_whitelist_enabled200_response.py test/test_query_guard_pubkey200_response.py test/test_query_guard_pubkey200_response_addresses_inner.py test/test_refresh_address_balances_by_token200_response.py @@ -2217,6 +2182,7 @@ test/test_settlement.py test/test_settlement_detail.py test/test_settlement_info.py test/test_settlement_type.py +test/test_skip_check_type.py test/test_smart_contract_initiator.py test/test_smart_contract_wallet_info.py test/test_smart_contract_wallet_operation_type.py @@ -2509,11 +2475,9 @@ test/test_tss_status.py test/test_unfreeze_disposition.py test/test_update_address_book_param.py test/test_update_bank_account_by_id_request.py -test/test_update_counterparty_by_id_request.py test/test_update_counterparty_request.py test/test_update_custodial_wallet_params.py test/test_update_destination_bank_account.py -test/test_update_destination_by_id_request.py test/test_update_destination_entry200_response.py test/test_update_destination_entry_request.py test/test_update_destination_request.py diff --git a/README.md b/README.md index 4ca56c94..07b42f9f 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.30.0 +- Package version: 1.31.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.30.0 +pip install cobo-waas2==1.31.0 ``` Then import the package: @@ -133,12 +133,9 @@ Class | Method | HTTP request | Description *PaymentApi* | [**create_bulk_send**](docs/PaymentApi.md#create_bulk_send) | **POST** /payments/bulk_sends | Create bulk send *PaymentApi* | [**create_counterparty**](docs/PaymentApi.md#create_counterparty) | **POST** /payments/counterparty | Create counterparty *PaymentApi* | [**create_counterparty_entry**](docs/PaymentApi.md#create_counterparty_entry) | **POST** /payments/counterparty_entry | Create counterparty entry -*PaymentApi* | [**create_counterparty_wallet_address**](docs/PaymentApi.md#create_counterparty_wallet_address) | **POST** /payments/counterparty/wallet_address | Create counterparty wallet address *PaymentApi* | [**create_crypto_address**](docs/PaymentApi.md#create_crypto_address) | **POST** /payments/crypto_addresses | Create crypto address *PaymentApi* | [**create_destination**](docs/PaymentApi.md#create_destination) | **POST** /payments/destination | Create destination -*PaymentApi* | [**create_destination_bank_account**](docs/PaymentApi.md#create_destination_bank_account) | **POST** /payments/destination/bank_account | Create destination bank account *PaymentApi* | [**create_destination_entry**](docs/PaymentApi.md#create_destination_entry) | **POST** /payments/destination_entry | Create destination entry -*PaymentApi* | [**create_destination_wallet_address**](docs/PaymentApi.md#create_destination_wallet_address) | **POST** /payments/destination/wallet_address | Create destination wallet address *PaymentApi* | [**create_forced_sweep_request**](docs/PaymentApi.md#create_forced_sweep_request) | **POST** /payments/force_sweep_requests | Create forced sweep *PaymentApi* | [**create_merchant**](docs/PaymentApi.md#create_merchant) | **POST** /payments/merchants | Create merchant *PaymentApi* | [**create_order_link**](docs/PaymentApi.md#create_order_link) | **POST** /payments/links/orders | Create order link @@ -149,26 +146,17 @@ Class | Method | HTTP request | Description *PaymentApi* | [**create_report**](docs/PaymentApi.md#create_report) | **POST** /payments/reports | Generate reports *PaymentApi* | [**create_settlement_request**](docs/PaymentApi.md#create_settlement_request) | **POST** /payments/settlement_requests | Create settlement request *PaymentApi* | [**create_top_up_addresses**](docs/PaymentApi.md#create_top_up_addresses) | **POST** /payments/topup/address | Batch create top-up addresses -*PaymentApi* | [**delete_counterparty**](docs/PaymentApi.md#delete_counterparty) | **PUT** /payments/counterparty/{counterparty_id}/delete | Delete counterparty (Deprecated) *PaymentApi* | [**delete_counterparty_by_id**](docs/PaymentApi.md#delete_counterparty_by_id) | **DELETE** /payments/counterparty/{counterparty_id} | Delete counterparty *PaymentApi* | [**delete_counterparty_entry**](docs/PaymentApi.md#delete_counterparty_entry) | **DELETE** /payments/counterparty_entry/{counterparty_entry_id} | Delete counterparty entry -*PaymentApi* | [**delete_counterparty_wallet_address**](docs/PaymentApi.md#delete_counterparty_wallet_address) | **PUT** /payments/counterparty/wallet_address/{wallet_address_id}/delete | Delete counterparty wallet address *PaymentApi* | [**delete_crypto_address**](docs/PaymentApi.md#delete_crypto_address) | **POST** /payments/crypto_addresses/{crypto_address_id}/delete | Delete crypto address -*PaymentApi* | [**delete_destination**](docs/PaymentApi.md#delete_destination) | **PUT** /payments/destination/{destination_id}/delete | Delete destination (Deprecated) -*PaymentApi* | [**delete_destination_bank_account**](docs/PaymentApi.md#delete_destination_bank_account) | **PUT** /payments/destination/bank_account/{bank_account_id}/delete | Delete destination bank account *PaymentApi* | [**delete_destination_by_id**](docs/PaymentApi.md#delete_destination_by_id) | **DELETE** /payments/destination/{destination_id} | Delete destination *PaymentApi* | [**delete_destination_entry**](docs/PaymentApi.md#delete_destination_entry) | **DELETE** /payments/destination_entry/{destination_entry_id} | Delete destination entry -*PaymentApi* | [**delete_destination_wallet_address**](docs/PaymentApi.md#delete_destination_wallet_address) | **PUT** /payments/destination/wallet_address/{wallet_address_id}/delete | Delete destination wallet address -*PaymentApi* | [**enable_destination_whitelist**](docs/PaymentApi.md#enable_destination_whitelist) | **POST** /payments/destination/enable_whitelist | Enable or disable destination whitelist *PaymentApi* | [**get_available_allocation_amount**](docs/PaymentApi.md#get_available_allocation_amount) | **GET** /payments/allocation_amount | Get available allocation amount *PaymentApi* | [**get_batch_allocation_by_id**](docs/PaymentApi.md#get_batch_allocation_by_id) | **GET** /payments/batch_allocations/{batch_allocation_id} | Get batch allocation information *PaymentApi* | [**get_bulk_send_by_id**](docs/PaymentApi.md#get_bulk_send_by_id) | **GET** /payments/bulk_sends/{bulk_send_id} | Get bulk send information *PaymentApi* | [**get_counterparty**](docs/PaymentApi.md#get_counterparty) | **GET** /payments/counterparty/{counterparty_id} | Get counterparty information -*PaymentApi* | [**get_counterparty_detail_by_id**](docs/PaymentApi.md#get_counterparty_detail_by_id) | **GET** /payments/counterparty/{counterparty_id}/detail | Get counterparty information (Deprecated) *PaymentApi* | [**get_counterparty_entry**](docs/PaymentApi.md#get_counterparty_entry) | **GET** /payments/counterparty_entry/{counterparty_entry_id} | Get counterparty entry information *PaymentApi* | [**get_destination**](docs/PaymentApi.md#get_destination) | **GET** /payments/destination/{destination_id} | Get destination information -*PaymentApi* | [**get_destination_bank_account_detail_by_id**](docs/PaymentApi.md#get_destination_bank_account_detail_by_id) | **GET** /payments/destination/bank_account/{bank_account_id}/detail | Get destination bank account information -*PaymentApi* | [**get_destination_detail_by_id**](docs/PaymentApi.md#get_destination_detail_by_id) | **GET** /payments/destination/{destination_id}/detail | Get destination information (Deprecated) *PaymentApi* | [**get_destination_entry**](docs/PaymentApi.md#get_destination_entry) | **GET** /payments/destination_entry/{destination_entry_id} | Get destination entry information *PaymentApi* | [**get_exchange_rate**](docs/PaymentApi.md#get_exchange_rate) | **GET** /payments/exchange_rates/{token_id}/{currency} | Get exchange rate *PaymentApi* | [**get_payment_order_detail_by_id**](docs/PaymentApi.md#get_payment_order_detail_by_id) | **GET** /payments/orders/{order_id} | Get pay-in order information @@ -186,17 +174,14 @@ Class | Method | HTTP request | Description *PaymentApi* | [**list_bulk_send_items**](docs/PaymentApi.md#list_bulk_send_items) | **GET** /payments/bulk_sends/{bulk_send_id}/items | List bulk send items *PaymentApi* | [**list_counterparties**](docs/PaymentApi.md#list_counterparties) | **GET** /payments/counterparty | List all counterparties *PaymentApi* | [**list_counterparty_entries**](docs/PaymentApi.md#list_counterparty_entries) | **GET** /payments/counterparty_entry | List counterparty entries -*PaymentApi* | [**list_counterparty_wallet_address**](docs/PaymentApi.md#list_counterparty_wallet_address) | **GET** /payments/counterparty/wallet_address | List counterparty wallet addresses *PaymentApi* | [**list_crypto_addresses**](docs/PaymentApi.md#list_crypto_addresses) | **GET** /payments/crypto_addresses | List crypto addresses -*PaymentApi* | [**list_destination_bank_accounts**](docs/PaymentApi.md#list_destination_bank_accounts) | **GET** /payments/destination/bank_account | List destination bank accounts *PaymentApi* | [**list_destination_entries**](docs/PaymentApi.md#list_destination_entries) | **GET** /payments/destination_entry | List destination entries -*PaymentApi* | [**list_destination_wallet_addresses**](docs/PaymentApi.md#list_destination_wallet_addresses) | **GET** /payments/destination/wallet_address | List destination wallet addresses *PaymentApi* | [**list_destinations**](docs/PaymentApi.md#list_destinations) | **GET** /payments/destination | List all destinations *PaymentApi* | [**list_forced_sweep_requests**](docs/PaymentApi.md#list_forced_sweep_requests) | **GET** /payments/force_sweep_requests | List forced sweeps *PaymentApi* | [**list_merchant_balances**](docs/PaymentApi.md#list_merchant_balances) | **GET** /payments/balance/merchants | List merchant balances *PaymentApi* | [**list_merchants**](docs/PaymentApi.md#list_merchants) | **GET** /payments/merchants | List all merchants *PaymentApi* | [**list_payment_orders**](docs/PaymentApi.md#list_payment_orders) | **GET** /payments/orders | List all pay-in orders -*PaymentApi* | [**list_payment_supported_tokens**](docs/PaymentApi.md#list_payment_supported_tokens) | **GET** /payments/supported_tokens | List all supported tokens +*PaymentApi* | [**list_payment_supported_tokens**](docs/PaymentApi.md#list_payment_supported_tokens) | **GET** /payments/supported_tokens | List supported tokens *PaymentApi* | [**list_payment_wallet_balances**](docs/PaymentApi.md#list_payment_wallet_balances) | **GET** /payments/balance/payment_wallets | List payment wallet balances *PaymentApi* | [**list_payouts**](docs/PaymentApi.md#list_payouts) | **GET** /payments/payouts | List all payouts *PaymentApi* | [**list_settlement_details**](docs/PaymentApi.md#list_settlement_details) | **GET** /payments/settlement_details | List all settlement details @@ -204,13 +189,9 @@ 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* | [**query_destination_whitelist_enabled**](docs/PaymentApi.md#query_destination_whitelist_enabled) | **GET** /payments/destination/enable_whitelist | Query destination whitelist enabled status *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_counterparty_by_id**](docs/PaymentApi.md#update_counterparty_by_id) | **PUT** /payments/counterparty/{counterparty_id}/update | Update counterparty (Deprecated) *PaymentApi* | [**update_destination**](docs/PaymentApi.md#update_destination) | **PUT** /payments/destination/{destination_id} | Update destination -*PaymentApi* | [**update_destination_bank_account_by_id**](docs/PaymentApi.md#update_destination_bank_account_by_id) | **PUT** /payments/destination/bank_account/{bank_account_id}/update | Update destination bank account -*PaymentApi* | [**update_destination_by_id**](docs/PaymentApi.md#update_destination_by_id) | **PUT** /payments/destination/{destination_id}/update | Update destination (Deprecated) *PaymentApi* | [**update_destination_entry**](docs/PaymentApi.md#update_destination_entry) | **PUT** /payments/destination_entry/{destination_entry_id} | Update destination entry *PaymentApi* | [**update_merchant_by_id**](docs/PaymentApi.md#update_merchant_by_id) | **PUT** /payments/merchants/{merchant_id} | Update merchant *PaymentApi* | [**update_payment_order**](docs/PaymentApi.md#update_payment_order) | **PUT** /payments/orders/{order_id} | Update pay-in order @@ -471,15 +452,12 @@ Class | Method | HTTP request | Description - [CreateCounterpartyEntry201Response](docs/CreateCounterpartyEntry201Response.md) - [CreateCounterpartyEntryRequest](docs/CreateCounterpartyEntryRequest.md) - [CreateCounterpartyRequest](docs/CreateCounterpartyRequest.md) - - [CreateCounterpartyWalletAddressRequest](docs/CreateCounterpartyWalletAddressRequest.md) - [CreateCryptoAddressRequest](docs/CreateCryptoAddressRequest.md) - [CreateCustodialWalletParams](docs/CreateCustodialWalletParams.md) - [CreateDestinationBankAccount](docs/CreateDestinationBankAccount.md) - - [CreateDestinationBankAccountRequest](docs/CreateDestinationBankAccountRequest.md) - [CreateDestinationEntry201Response](docs/CreateDestinationEntry201Response.md) - [CreateDestinationEntryRequest](docs/CreateDestinationEntryRequest.md) - [CreateDestinationRequest](docs/CreateDestinationRequest.md) - - [CreateDestinationWalletAddressRequest](docs/CreateDestinationWalletAddressRequest.md) - [CreateExchangeWalletParams](docs/CreateExchangeWalletParams.md) - [CreateKeyShareHolder](docs/CreateKeyShareHolder.md) - [CreateKeyShareHolderGroupRequest](docs/CreateKeyShareHolderGroupRequest.md) @@ -530,16 +508,11 @@ Class | Method | HTTP request | Description - [CustodialWeb3MessageSignSource](docs/CustodialWeb3MessageSignSource.md) - [CustodialWeb3TransferSource](docs/CustodialWeb3TransferSource.md) - [DeleteAddressBookById201Response](docs/DeleteAddressBookById201Response.md) - - [DeleteCounterparty200Response](docs/DeleteCounterparty200Response.md) - [DeleteCounterpartyById200Response](docs/DeleteCounterpartyById200Response.md) - [DeleteCounterpartyEntry200Response](docs/DeleteCounterpartyEntry200Response.md) - - [DeleteCounterpartyWalletAddress200Response](docs/DeleteCounterpartyWalletAddress200Response.md) - [DeleteCryptoAddress201Response](docs/DeleteCryptoAddress201Response.md) - - [DeleteDestination200Response](docs/DeleteDestination200Response.md) - - [DeleteDestinationBankAccount200Response](docs/DeleteDestinationBankAccount200Response.md) - [DeleteDestinationById200Response](docs/DeleteDestinationById200Response.md) - [DeleteDestinationEntry200Response](docs/DeleteDestinationEntry200Response.md) - - [DeleteDestinationWalletAddress200Response](docs/DeleteDestinationWalletAddress200Response.md) - [DeleteGuardPubkey201Response](docs/DeleteGuardPubkey201Response.md) - [DeleteKeyShareHolderGroupById201Response](docs/DeleteKeyShareHolderGroupById201Response.md) - [DeleteWalletById201Response](docs/DeleteWalletById201Response.md) @@ -558,7 +531,6 @@ Class | Method | HTTP request | Description - [EigenLayerLstStakeExtra](docs/EigenLayerLstStakeExtra.md) - [EigenLayerNativeStakeExtra](docs/EigenLayerNativeStakeExtra.md) - [EigenlayerValidator](docs/EigenlayerValidator.md) - - [EnableDestinationWhitelistRequest](docs/EnableDestinationWhitelistRequest.md) - [EntryType](docs/EntryType.md) - [ErrorResponse](docs/ErrorResponse.md) - [EstimateClaimFee](docs/EstimateClaimFee.md) @@ -680,10 +652,7 @@ Class | Method | HTTP request | Description - [ListCallbackMessages200Response](docs/ListCallbackMessages200Response.md) - [ListCounterparties200Response](docs/ListCounterparties200Response.md) - [ListCounterpartyEntries200Response](docs/ListCounterpartyEntries200Response.md) - - [ListCounterpartyWalletAddress200Response](docs/ListCounterpartyWalletAddress200Response.md) - - [ListDestinationBankAccounts200Response](docs/ListDestinationBankAccounts200Response.md) - [ListDestinationEntries200Response](docs/ListDestinationEntries200Response.md) - - [ListDestinationWalletAddresses200Response](docs/ListDestinationWalletAddresses200Response.md) - [ListDestinations200Response](docs/ListDestinations200Response.md) - [ListExchanges200ResponseInner](docs/ListExchanges200ResponseInner.md) - [ListForcedSweepRequests200Response](docs/ListForcedSweepRequests200Response.md) @@ -760,6 +729,7 @@ Class | Method | HTTP request | Description - [PayerAccount](docs/PayerAccount.md) - [PaymentAddressUpdateEventData](docs/PaymentAddressUpdateEventData.md) - [PaymentAllocationAmount](docs/PaymentAllocationAmount.md) + - [PaymentBridgeStatus](docs/PaymentBridgeStatus.md) - [PaymentBulkSend](docs/PaymentBulkSend.md) - [PaymentBulkSendEvent](docs/PaymentBulkSendEvent.md) - [PaymentBulkSendExecutionMode](docs/PaymentBulkSendExecutionMode.md) @@ -796,9 +766,9 @@ Class | Method | HTTP request | Description - [PoolDetails](docs/PoolDetails.md) - [PoolDetailsAllOfValidatorsInfo](docs/PoolDetailsAllOfValidatorsInfo.md) - [PoolSummary](docs/PoolSummary.md) + - [PreCheck](docs/PreCheck.md) - [PspBalance](docs/PspBalance.md) - [QueryApprovalStatement200Response](docs/QueryApprovalStatement200Response.md) - - [QueryDestinationWhitelistEnabled200Response](docs/QueryDestinationWhitelistEnabled200Response.md) - [QueryGuardPubkey200Response](docs/QueryGuardPubkey200Response.md) - [QueryGuardPubkey200ResponseAddressesInner](docs/QueryGuardPubkey200ResponseAddressesInner.md) - [RefreshAddressBalancesByToken200Response](docs/RefreshAddressBalancesByToken200Response.md) @@ -846,6 +816,7 @@ Class | Method | HTTP request | Description - [SettlementDetail](docs/SettlementDetail.md) - [SettlementInfo](docs/SettlementInfo.md) - [SettlementType](docs/SettlementType.md) + - [SkipCheckType](docs/SkipCheckType.md) - [SmartContractInitiator](docs/SmartContractInitiator.md) - [SmartContractWalletInfo](docs/SmartContractWalletInfo.md) - [SmartContractWalletOperationType](docs/SmartContractWalletOperationType.md) @@ -1132,11 +1103,9 @@ Class | Method | HTTP request | Description - [UnfreezeDisposition](docs/UnfreezeDisposition.md) - [UpdateAddressBookParam](docs/UpdateAddressBookParam.md) - [UpdateBankAccountByIdRequest](docs/UpdateBankAccountByIdRequest.md) - - [UpdateCounterpartyByIdRequest](docs/UpdateCounterpartyByIdRequest.md) - [UpdateCounterpartyRequest](docs/UpdateCounterpartyRequest.md) - [UpdateCustodialWalletParams](docs/UpdateCustodialWalletParams.md) - [UpdateDestinationBankAccount](docs/UpdateDestinationBankAccount.md) - - [UpdateDestinationByIdRequest](docs/UpdateDestinationByIdRequest.md) - [UpdateDestinationEntry200Response](docs/UpdateDestinationEntry200Response.md) - [UpdateDestinationEntryRequest](docs/UpdateDestinationEntryRequest.md) - [UpdateDestinationRequest](docs/UpdateDestinationRequest.md) diff --git a/cobo_waas2/__init__.py b/cobo_waas2/__init__.py index b2b7c29f..426b4109 100644 --- a/cobo_waas2/__init__.py +++ b/cobo_waas2/__init__.py @@ -12,7 +12,7 @@ """ # noqa: E501 -__version__ = "1.30.0" +__version__ = "1.31.0" # import apis into sdk package from cobo_waas2.api.address_books_api import AddressBooksApi @@ -171,15 +171,12 @@ from cobo_waas2.models.create_counterparty_entry201_response import CreateCounterpartyEntry201Response from cobo_waas2.models.create_counterparty_entry_request import CreateCounterpartyEntryRequest from cobo_waas2.models.create_counterparty_request import CreateCounterpartyRequest -from cobo_waas2.models.create_counterparty_wallet_address_request import CreateCounterpartyWalletAddressRequest from cobo_waas2.models.create_crypto_address_request import CreateCryptoAddressRequest from cobo_waas2.models.create_custodial_wallet_params import CreateCustodialWalletParams from cobo_waas2.models.create_destination_bank_account import CreateDestinationBankAccount -from cobo_waas2.models.create_destination_bank_account_request import CreateDestinationBankAccountRequest from cobo_waas2.models.create_destination_entry201_response import CreateDestinationEntry201Response from cobo_waas2.models.create_destination_entry_request import CreateDestinationEntryRequest from cobo_waas2.models.create_destination_request import CreateDestinationRequest -from cobo_waas2.models.create_destination_wallet_address_request import CreateDestinationWalletAddressRequest from cobo_waas2.models.create_exchange_wallet_params import CreateExchangeWalletParams from cobo_waas2.models.create_key_share_holder import CreateKeyShareHolder from cobo_waas2.models.create_key_share_holder_group_request import CreateKeyShareHolderGroupRequest @@ -230,16 +227,11 @@ from cobo_waas2.models.custodial_web3_message_sign_source import CustodialWeb3MessageSignSource from cobo_waas2.models.custodial_web3_transfer_source import CustodialWeb3TransferSource from cobo_waas2.models.delete_address_book_by_id201_response import DeleteAddressBookById201Response -from cobo_waas2.models.delete_counterparty200_response import DeleteCounterparty200Response from cobo_waas2.models.delete_counterparty_by_id200_response import DeleteCounterpartyById200Response from cobo_waas2.models.delete_counterparty_entry200_response import DeleteCounterpartyEntry200Response -from cobo_waas2.models.delete_counterparty_wallet_address200_response import DeleteCounterpartyWalletAddress200Response from cobo_waas2.models.delete_crypto_address201_response import DeleteCryptoAddress201Response -from cobo_waas2.models.delete_destination200_response import DeleteDestination200Response -from cobo_waas2.models.delete_destination_bank_account200_response import DeleteDestinationBankAccount200Response from cobo_waas2.models.delete_destination_by_id200_response import DeleteDestinationById200Response from cobo_waas2.models.delete_destination_entry200_response import DeleteDestinationEntry200Response -from cobo_waas2.models.delete_destination_wallet_address200_response import DeleteDestinationWalletAddress200Response from cobo_waas2.models.delete_guard_pubkey201_response import DeleteGuardPubkey201Response from cobo_waas2.models.delete_key_share_holder_group_by_id201_response import DeleteKeyShareHolderGroupById201Response from cobo_waas2.models.delete_wallet_by_id201_response import DeleteWalletById201Response @@ -258,7 +250,6 @@ from cobo_waas2.models.eigen_layer_lst_stake_extra import EigenLayerLstStakeExtra from cobo_waas2.models.eigen_layer_native_stake_extra import EigenLayerNativeStakeExtra from cobo_waas2.models.eigenlayer_validator import EigenlayerValidator -from cobo_waas2.models.enable_destination_whitelist_request import EnableDestinationWhitelistRequest from cobo_waas2.models.entry_type import EntryType from cobo_waas2.models.error_response import ErrorResponse from cobo_waas2.models.estimate_claim_fee import EstimateClaimFee @@ -380,10 +371,7 @@ from cobo_waas2.models.list_callback_messages200_response import ListCallbackMessages200Response from cobo_waas2.models.list_counterparties200_response import ListCounterparties200Response from cobo_waas2.models.list_counterparty_entries200_response import ListCounterpartyEntries200Response -from cobo_waas2.models.list_counterparty_wallet_address200_response import ListCounterpartyWalletAddress200Response -from cobo_waas2.models.list_destination_bank_accounts200_response import ListDestinationBankAccounts200Response from cobo_waas2.models.list_destination_entries200_response import ListDestinationEntries200Response -from cobo_waas2.models.list_destination_wallet_addresses200_response import ListDestinationWalletAddresses200Response from cobo_waas2.models.list_destinations200_response import ListDestinations200Response from cobo_waas2.models.list_exchanges200_response_inner import ListExchanges200ResponseInner from cobo_waas2.models.list_forced_sweep_requests200_response import ListForcedSweepRequests200Response @@ -460,6 +448,7 @@ from cobo_waas2.models.payer_account import PayerAccount from cobo_waas2.models.payment_address_update_event_data import PaymentAddressUpdateEventData from cobo_waas2.models.payment_allocation_amount import PaymentAllocationAmount +from cobo_waas2.models.payment_bridge_status import PaymentBridgeStatus from cobo_waas2.models.payment_bulk_send import PaymentBulkSend from cobo_waas2.models.payment_bulk_send_event import PaymentBulkSendEvent from cobo_waas2.models.payment_bulk_send_execution_mode import PaymentBulkSendExecutionMode @@ -496,9 +485,9 @@ from cobo_waas2.models.pool_details import PoolDetails from cobo_waas2.models.pool_details_all_of_validators_info import PoolDetailsAllOfValidatorsInfo from cobo_waas2.models.pool_summary import PoolSummary +from cobo_waas2.models.pre_check import PreCheck from cobo_waas2.models.psp_balance import PspBalance from cobo_waas2.models.query_approval_statement200_response import QueryApprovalStatement200Response -from cobo_waas2.models.query_destination_whitelist_enabled200_response import QueryDestinationWhitelistEnabled200Response from cobo_waas2.models.query_guard_pubkey200_response import QueryGuardPubkey200Response from cobo_waas2.models.query_guard_pubkey200_response_addresses_inner import QueryGuardPubkey200ResponseAddressesInner from cobo_waas2.models.refresh_address_balances_by_token200_response import RefreshAddressBalancesByToken200Response @@ -546,6 +535,7 @@ from cobo_waas2.models.settlement_detail import SettlementDetail from cobo_waas2.models.settlement_info import SettlementInfo from cobo_waas2.models.settlement_type import SettlementType +from cobo_waas2.models.skip_check_type import SkipCheckType from cobo_waas2.models.smart_contract_initiator import SmartContractInitiator from cobo_waas2.models.smart_contract_wallet_info import SmartContractWalletInfo from cobo_waas2.models.smart_contract_wallet_operation_type import SmartContractWalletOperationType @@ -832,11 +822,9 @@ from cobo_waas2.models.unfreeze_disposition import UnfreezeDisposition from cobo_waas2.models.update_address_book_param import UpdateAddressBookParam from cobo_waas2.models.update_bank_account_by_id_request import UpdateBankAccountByIdRequest -from cobo_waas2.models.update_counterparty_by_id_request import UpdateCounterpartyByIdRequest from cobo_waas2.models.update_counterparty_request import UpdateCounterpartyRequest from cobo_waas2.models.update_custodial_wallet_params import UpdateCustodialWalletParams from cobo_waas2.models.update_destination_bank_account import UpdateDestinationBankAccount -from cobo_waas2.models.update_destination_by_id_request import UpdateDestinationByIdRequest from cobo_waas2.models.update_destination_entry200_response import UpdateDestinationEntry200Response from cobo_waas2.models.update_destination_entry_request import UpdateDestinationEntryRequest from cobo_waas2.models.update_destination_request import UpdateDestinationRequest diff --git a/cobo_waas2/api/payment_api.py b/cobo_waas2/api/payment_api.py index 0e6fe45e..2b8e6548 100644 --- a/cobo_waas2/api/payment_api.py +++ b/cobo_waas2/api/payment_api.py @@ -29,13 +29,10 @@ from cobo_waas2.models.create_counterparty_entry201_response import CreateCounterpartyEntry201Response from cobo_waas2.models.create_counterparty_entry_request import CreateCounterpartyEntryRequest from cobo_waas2.models.create_counterparty_request import CreateCounterpartyRequest -from cobo_waas2.models.create_counterparty_wallet_address_request import CreateCounterpartyWalletAddressRequest from cobo_waas2.models.create_crypto_address_request import CreateCryptoAddressRequest -from cobo_waas2.models.create_destination_bank_account_request import CreateDestinationBankAccountRequest from cobo_waas2.models.create_destination_entry201_response import CreateDestinationEntry201Response from cobo_waas2.models.create_destination_entry_request import CreateDestinationEntryRequest from cobo_waas2.models.create_destination_request import CreateDestinationRequest -from cobo_waas2.models.create_destination_wallet_address_request import CreateDestinationWalletAddressRequest from cobo_waas2.models.create_merchant_request import CreateMerchantRequest from cobo_waas2.models.create_order_link_request import CreateOrderLinkRequest from cobo_waas2.models.create_payment_order_request import CreatePaymentOrderRequest @@ -47,22 +44,14 @@ from cobo_waas2.models.create_top_up_addresses import CreateTopUpAddresses from cobo_waas2.models.create_top_up_addresses201_response import CreateTopUpAddresses201Response from cobo_waas2.models.crypto_address import CryptoAddress -from cobo_waas2.models.delete_counterparty200_response import DeleteCounterparty200Response from cobo_waas2.models.delete_counterparty_by_id200_response import DeleteCounterpartyById200Response from cobo_waas2.models.delete_counterparty_entry200_response import DeleteCounterpartyEntry200Response -from cobo_waas2.models.delete_counterparty_wallet_address200_response import DeleteCounterpartyWalletAddress200Response from cobo_waas2.models.delete_crypto_address201_response import DeleteCryptoAddress201Response -from cobo_waas2.models.delete_destination200_response import DeleteDestination200Response -from cobo_waas2.models.delete_destination_bank_account200_response import DeleteDestinationBankAccount200Response from cobo_waas2.models.delete_destination_by_id200_response import DeleteDestinationById200Response from cobo_waas2.models.delete_destination_entry200_response import DeleteDestinationEntry200Response -from cobo_waas2.models.delete_destination_wallet_address200_response import DeleteDestinationWalletAddress200Response from cobo_waas2.models.destination import Destination -from cobo_waas2.models.destination_bank_account import DestinationBankAccount -from cobo_waas2.models.destination_bank_account_detail import DestinationBankAccountDetail from cobo_waas2.models.destination_detail import DestinationDetail from cobo_waas2.models.destination_type import DestinationType -from cobo_waas2.models.enable_destination_whitelist_request import EnableDestinationWhitelistRequest from cobo_waas2.models.entry_type import EntryType from cobo_waas2.models.exchange_rate import ExchangeRate from cobo_waas2.models.forced_sweep import ForcedSweep @@ -79,10 +68,7 @@ from cobo_waas2.models.list_bulk_send_items200_response import ListBulkSendItems200Response from cobo_waas2.models.list_counterparties200_response import ListCounterparties200Response from cobo_waas2.models.list_counterparty_entries200_response import ListCounterpartyEntries200Response -from cobo_waas2.models.list_counterparty_wallet_address200_response import ListCounterpartyWalletAddress200Response -from cobo_waas2.models.list_destination_bank_accounts200_response import ListDestinationBankAccounts200Response from cobo_waas2.models.list_destination_entries200_response import ListDestinationEntries200Response -from cobo_waas2.models.list_destination_wallet_addresses200_response import ListDestinationWalletAddresses200Response from cobo_waas2.models.list_destinations200_response import ListDestinations200Response from cobo_waas2.models.list_forced_sweep_requests200_response import ListForcedSweepRequests200Response from cobo_waas2.models.list_merchant_balances200_response import ListMerchantBalances200Response @@ -103,7 +89,6 @@ from cobo_waas2.models.payment_payout import PaymentPayout from cobo_waas2.models.payment_payout_detail import PaymentPayoutDetail from cobo_waas2.models.psp_balance import PspBalance -from cobo_waas2.models.query_destination_whitelist_enabled200_response import QueryDestinationWhitelistEnabled200Response from cobo_waas2.models.refund import Refund from cobo_waas2.models.report import Report from cobo_waas2.models.report_status import ReportStatus @@ -112,10 +97,7 @@ from cobo_waas2.models.supported_token import SupportedToken from cobo_waas2.models.top_up_address import TopUpAddress from cobo_waas2.models.update_bank_account_by_id_request import UpdateBankAccountByIdRequest -from cobo_waas2.models.update_counterparty_by_id_request import UpdateCounterpartyByIdRequest from cobo_waas2.models.update_counterparty_request import UpdateCounterpartyRequest -from cobo_waas2.models.update_destination_bank_account import UpdateDestinationBankAccount -from cobo_waas2.models.update_destination_by_id_request import UpdateDestinationByIdRequest from cobo_waas2.models.update_destination_entry200_response import UpdateDestinationEntry200Response from cobo_waas2.models.update_destination_entry_request import UpdateDestinationEntryRequest from cobo_waas2.models.update_destination_request import UpdateDestinationRequest @@ -123,7 +105,6 @@ from cobo_waas2.models.update_payment_order_request import UpdatePaymentOrderRequest from cobo_waas2.models.update_refund_by_id_request import UpdateRefundByIdRequest from cobo_waas2.models.update_top_up_address import UpdateTopUpAddress -from cobo_waas2.models.wallet_address import WalletAddress from cobo_waas2.models.wallet_setup import WalletSetup from cobo_waas2.api_client import ApiClient, RequestSerialized @@ -1176,175 +1157,6 @@ def _create_counterparty_entry_serialize( files=_files, ) - @validate_call - def create_counterparty_wallet_address( - self, - create_counterparty_wallet_address_request: Annotated[Optional[CreateCounterpartyWalletAddressRequest], Field(description="The request body to create a counterparty wallet address.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> WalletAddress: - """Create counterparty wallet address - - This operation creates a counterparty wallet address. - - :param create_counterparty_wallet_address_request: The request body to create a counterparty wallet address. - :type create_counterparty_wallet_address_request: CreateCounterpartyWalletAddressRequest - :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._create_counterparty_wallet_address_serialize( - create_counterparty_wallet_address_request=create_counterparty_wallet_address_request, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "WalletAddress", - '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 create_counterparty_wallet_address_with_http_info( - self, - create_counterparty_wallet_address_request: Annotated[Optional[CreateCounterpartyWalletAddressRequest], Field(description="The request body to create a counterparty wallet address.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ApiResponse[WalletAddress]: - """Create counterparty wallet address - - This operation creates a counterparty wallet address. - - :param create_counterparty_wallet_address_request: The request body to create a counterparty wallet address. - :type create_counterparty_wallet_address_request: CreateCounterpartyWalletAddressRequest - :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._create_counterparty_wallet_address_serialize( - create_counterparty_wallet_address_request=create_counterparty_wallet_address_request, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "WalletAddress", - '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 create_counterparty_wallet_address_without_preload_content( - self, - create_counterparty_wallet_address_request: Annotated[Optional[CreateCounterpartyWalletAddressRequest], Field(description="The request body to create a counterparty wallet address.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> RESTResponseType: - """Create counterparty wallet address - - This operation creates a counterparty wallet address. - - :param create_counterparty_wallet_address_request: The request body to create a counterparty wallet address. - :type create_counterparty_wallet_address_request: CreateCounterpartyWalletAddressRequest - :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._create_counterparty_wallet_address_serialize( - create_counterparty_wallet_address_request=create_counterparty_wallet_address_request, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "WalletAddress", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - def _create_counterparty_wallet_address_serialize( - self, - create_counterparty_wallet_address_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 create_counterparty_wallet_address_request is not None: - _body_params = create_counterparty_wallet_address_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/counterparty/wallet_address', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - ) - @validate_call def create_crypto_address( self, @@ -1360,7 +1172,7 @@ def create_crypto_address( ) -> CryptoAddress: """Create crypto address - This operation registers a crypto address for crypto payouts. The registered address can later be referenced by its ID when creating settlement requests. + This operation has been deprecated. This operation registers a crypto address for crypto payouts. The registered address can later be referenced by its ID when creating settlement requests. :param create_crypto_address_request: The request body to register a crypto address. :type create_crypto_address_request: CreateCryptoAddressRequest @@ -1406,7 +1218,7 @@ def create_crypto_address_with_http_info( ) -> ApiResponse[CryptoAddress]: """Create crypto address - This operation registers a crypto address for crypto payouts. The registered address can later be referenced by its ID when creating settlement requests. + This operation has been deprecated. This operation registers a crypto address for crypto payouts. The registered address can later be referenced by its ID when creating settlement requests. :param create_crypto_address_request: The request body to register a crypto address. :type create_crypto_address_request: CreateCryptoAddressRequest @@ -1452,7 +1264,7 @@ def create_crypto_address_without_preload_content( ) -> RESTResponseType: """Create crypto address - This operation registers a crypto address for crypto payouts. The registered address can later be referenced by its ID when creating settlement requests. + This operation has been deprecated. This operation registers a crypto address for crypto payouts. The registered address can later be referenced by its ID when creating settlement requests. :param create_crypto_address_request: The request body to register a crypto address. :type create_crypto_address_request: CreateCryptoAddressRequest @@ -1684,9 +1496,9 @@ def _create_destination_serialize( ) @validate_call - def create_destination_bank_account( + def create_destination_entry( self, - create_destination_bank_account_request: Annotated[Optional[CreateDestinationBankAccountRequest], Field(description="The request body to create a destination bank account.")] = None, + create_destination_entry_request: Annotated[Optional[CreateDestinationEntryRequest], Field(description="The request body to create destination entries.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1695,13 +1507,13 @@ def create_destination_bank_account( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> DestinationBankAccount: - """Create destination bank account + ) -> CreateDestinationEntry201Response: + """Create destination entry - This operation creates a destination bank account. + This operation creates one or more entries for a destination. A destination entry is a record of a destination's wallet addresses or bank accounts. - :param create_destination_bank_account_request: The request body to create a destination bank account. - :type create_destination_bank_account_request: CreateDestinationBankAccountRequest + :param create_destination_entry_request: The request body to create destination entries. + :type create_destination_entry_request: CreateDestinationEntryRequest :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 @@ -1710,12 +1522,12 @@ def create_destination_bank_account( :return: Returns the result object. """ # noqa: E501 - _param = self._create_destination_bank_account_serialize( - create_destination_bank_account_request=create_destination_bank_account_request, + _param = self._create_destination_entry_serialize( + create_destination_entry_request=create_destination_entry_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "DestinationBankAccount", + '201': "CreateDestinationEntry201Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -1730,9 +1542,9 @@ def create_destination_bank_account( ).data @validate_call - def create_destination_bank_account_with_http_info( + def create_destination_entry_with_http_info( self, - create_destination_bank_account_request: Annotated[Optional[CreateDestinationBankAccountRequest], Field(description="The request body to create a destination bank account.")] = None, + create_destination_entry_request: Annotated[Optional[CreateDestinationEntryRequest], Field(description="The request body to create destination entries.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1741,13 +1553,13 @@ def create_destination_bank_account_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[DestinationBankAccount]: - """Create destination bank account + ) -> ApiResponse[CreateDestinationEntry201Response]: + """Create destination entry - This operation creates a destination bank account. + This operation creates one or more entries for a destination. A destination entry is a record of a destination's wallet addresses or bank accounts. - :param create_destination_bank_account_request: The request body to create a destination bank account. - :type create_destination_bank_account_request: CreateDestinationBankAccountRequest + :param create_destination_entry_request: The request body to create destination entries. + :type create_destination_entry_request: CreateDestinationEntryRequest :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 @@ -1756,12 +1568,12 @@ def create_destination_bank_account_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_destination_bank_account_serialize( - create_destination_bank_account_request=create_destination_bank_account_request, + _param = self._create_destination_entry_serialize( + create_destination_entry_request=create_destination_entry_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "DestinationBankAccount", + '201': "CreateDestinationEntry201Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -1776,9 +1588,9 @@ def create_destination_bank_account_with_http_info( ) @validate_call - def create_destination_bank_account_without_preload_content( + def create_destination_entry_without_preload_content( self, - create_destination_bank_account_request: Annotated[Optional[CreateDestinationBankAccountRequest], Field(description="The request body to create a destination bank account.")] = None, + create_destination_entry_request: Annotated[Optional[CreateDestinationEntryRequest], Field(description="The request body to create destination entries.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1788,12 +1600,12 @@ def create_destination_bank_account_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Create destination bank account + """Create destination entry - This operation creates a destination bank account. + This operation creates one or more entries for a destination. A destination entry is a record of a destination's wallet addresses or bank accounts. - :param create_destination_bank_account_request: The request body to create a destination bank account. - :type create_destination_bank_account_request: CreateDestinationBankAccountRequest + :param create_destination_entry_request: The request body to create destination entries. + :type create_destination_entry_request: CreateDestinationEntryRequest :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 @@ -1802,12 +1614,12 @@ def create_destination_bank_account_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_destination_bank_account_serialize( - create_destination_bank_account_request=create_destination_bank_account_request, + _param = self._create_destination_entry_serialize( + create_destination_entry_request=create_destination_entry_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "DestinationBankAccount", + '201': "CreateDestinationEntry201Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -1817,9 +1629,9 @@ def create_destination_bank_account_without_preload_content( ) return response_data.response - def _create_destination_bank_account_serialize( + def _create_destination_entry_serialize( self, - create_destination_bank_account_request, + create_destination_entry_request, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1832,8 +1644,8 @@ def _create_destination_bank_account_serialize( # process the header parameters # process the form parameters # process the body parameter - if create_destination_bank_account_request is not None: - _body_params = create_destination_bank_account_request + if create_destination_entry_request is not None: + _body_params = create_destination_entry_request # set the HTTP header `Accept` _header_params = { @@ -1843,7 +1655,7 @@ def _create_destination_bank_account_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/payments/destination/bank_account', + resource_path='/payments/destination_entry', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1853,9 +1665,9 @@ def _create_destination_bank_account_serialize( ) @validate_call - def create_destination_entry( + def create_forced_sweep_request( self, - create_destination_entry_request: Annotated[Optional[CreateDestinationEntryRequest], Field(description="The request body to create destination entries.")] = None, + forced_sweep_request: Annotated[Optional[ForcedSweepRequest], Field(description="The request body for forced sweep.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1864,13 +1676,13 @@ def create_destination_entry( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> CreateDestinationEntry201Response: - """Create destination entry + ) -> ForcedSweep: + """Create forced sweep - This operation creates one or more entries for a destination. A destination entry is a record of a destination's wallet addresses or bank accounts. + This operation has been deprecated. This operation creates a forced sweep to transfer funds from addresses within a specified wallet to its designated sweep-to address. - :param create_destination_entry_request: The request body to create destination entries. - :type create_destination_entry_request: CreateDestinationEntryRequest + :param forced_sweep_request: The request body for forced sweep. + :type forced_sweep_request: ForcedSweepRequest :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 @@ -1879,12 +1691,12 @@ def create_destination_entry( :return: Returns the result object. """ # noqa: E501 - _param = self._create_destination_entry_serialize( - create_destination_entry_request=create_destination_entry_request, + _param = self._create_forced_sweep_request_serialize( + forced_sweep_request=forced_sweep_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateDestinationEntry201Response", + '201': "ForcedSweep", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -1899,9 +1711,9 @@ def create_destination_entry( ).data @validate_call - def create_destination_entry_with_http_info( + def create_forced_sweep_request_with_http_info( self, - create_destination_entry_request: Annotated[Optional[CreateDestinationEntryRequest], Field(description="The request body to create destination entries.")] = None, + forced_sweep_request: Annotated[Optional[ForcedSweepRequest], Field(description="The request body for forced sweep.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1910,13 +1722,13 @@ def create_destination_entry_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[CreateDestinationEntry201Response]: - """Create destination entry + ) -> ApiResponse[ForcedSweep]: + """Create forced sweep - This operation creates one or more entries for a destination. A destination entry is a record of a destination's wallet addresses or bank accounts. + This operation has been deprecated. This operation creates a forced sweep to transfer funds from addresses within a specified wallet to its designated sweep-to address. - :param create_destination_entry_request: The request body to create destination entries. - :type create_destination_entry_request: CreateDestinationEntryRequest + :param forced_sweep_request: The request body for forced sweep. + :type forced_sweep_request: ForcedSweepRequest :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 @@ -1925,12 +1737,12 @@ def create_destination_entry_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_destination_entry_serialize( - create_destination_entry_request=create_destination_entry_request, + _param = self._create_forced_sweep_request_serialize( + forced_sweep_request=forced_sweep_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateDestinationEntry201Response", + '201': "ForcedSweep", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -1945,9 +1757,9 @@ def create_destination_entry_with_http_info( ) @validate_call - def create_destination_entry_without_preload_content( + def create_forced_sweep_request_without_preload_content( self, - create_destination_entry_request: Annotated[Optional[CreateDestinationEntryRequest], Field(description="The request body to create destination entries.")] = None, + forced_sweep_request: Annotated[Optional[ForcedSweepRequest], Field(description="The request body for forced sweep.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1957,12 +1769,12 @@ def create_destination_entry_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Create destination entry + """Create forced sweep - This operation creates one or more entries for a destination. A destination entry is a record of a destination's wallet addresses or bank accounts. + This operation has been deprecated. This operation creates a forced sweep to transfer funds from addresses within a specified wallet to its designated sweep-to address. - :param create_destination_entry_request: The request body to create destination entries. - :type create_destination_entry_request: CreateDestinationEntryRequest + :param forced_sweep_request: The request body for forced sweep. + :type forced_sweep_request: ForcedSweepRequest :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 @@ -1971,12 +1783,12 @@ def create_destination_entry_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_destination_entry_serialize( - create_destination_entry_request=create_destination_entry_request, + _param = self._create_forced_sweep_request_serialize( + forced_sweep_request=forced_sweep_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateDestinationEntry201Response", + '201': "ForcedSweep", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -1986,9 +1798,9 @@ def create_destination_entry_without_preload_content( ) return response_data.response - def _create_destination_entry_serialize( + def _create_forced_sweep_request_serialize( self, - create_destination_entry_request, + forced_sweep_request, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2001,8 +1813,8 @@ def _create_destination_entry_serialize( # process the header parameters # process the form parameters # process the body parameter - if create_destination_entry_request is not None: - _body_params = create_destination_entry_request + if forced_sweep_request is not None: + _body_params = forced_sweep_request # set the HTTP header `Accept` _header_params = { @@ -2012,7 +1824,7 @@ def _create_destination_entry_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/payments/destination_entry', + resource_path='/payments/force_sweep_requests', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2022,9 +1834,9 @@ def _create_destination_entry_serialize( ) @validate_call - def create_destination_wallet_address( + def create_merchant( self, - create_destination_wallet_address_request: Annotated[Optional[CreateDestinationWalletAddressRequest], Field(description="The request body to create a destination wallet address.")] = None, + create_merchant_request: Annotated[Optional[CreateMerchantRequest], Field(description="The request body to create a merchant.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2033,13 +1845,13 @@ def create_destination_wallet_address( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> WalletAddress: - """Create destination wallet address + ) -> Merchant: + """Create merchant - This operation creates a destination wallet address. + This operation creates a merchant. Upon successful creation, a merchant ID is generated and returned along with the merchant's information. For more information on merchant creation, please refer to [Preparation](https://www.cobo.com/payments/en/guides/preparation#create-merchant). - :param create_destination_wallet_address_request: The request body to create a destination wallet address. - :type create_destination_wallet_address_request: CreateDestinationWalletAddressRequest + :param create_merchant_request: The request body to create a merchant. + :type create_merchant_request: CreateMerchantRequest :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 @@ -2048,12 +1860,12 @@ def create_destination_wallet_address( :return: Returns the result object. """ # noqa: E501 - _param = self._create_destination_wallet_address_serialize( - create_destination_wallet_address_request=create_destination_wallet_address_request, + _param = self._create_merchant_serialize( + create_merchant_request=create_merchant_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "WalletAddress", + '201': "Merchant", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -2068,9 +1880,9 @@ def create_destination_wallet_address( ).data @validate_call - def create_destination_wallet_address_with_http_info( + def create_merchant_with_http_info( self, - create_destination_wallet_address_request: Annotated[Optional[CreateDestinationWalletAddressRequest], Field(description="The request body to create a destination wallet address.")] = None, + create_merchant_request: Annotated[Optional[CreateMerchantRequest], Field(description="The request body to create a merchant.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2079,13 +1891,13 @@ def create_destination_wallet_address_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[WalletAddress]: - """Create destination wallet address + ) -> ApiResponse[Merchant]: + """Create merchant - This operation creates a destination wallet address. + This operation creates a merchant. Upon successful creation, a merchant ID is generated and returned along with the merchant's information. For more information on merchant creation, please refer to [Preparation](https://www.cobo.com/payments/en/guides/preparation#create-merchant). - :param create_destination_wallet_address_request: The request body to create a destination wallet address. - :type create_destination_wallet_address_request: CreateDestinationWalletAddressRequest + :param create_merchant_request: The request body to create a merchant. + :type create_merchant_request: CreateMerchantRequest :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 @@ -2094,12 +1906,12 @@ def create_destination_wallet_address_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_destination_wallet_address_serialize( - create_destination_wallet_address_request=create_destination_wallet_address_request, + _param = self._create_merchant_serialize( + create_merchant_request=create_merchant_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "WalletAddress", + '201': "Merchant", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -2114,9 +1926,9 @@ def create_destination_wallet_address_with_http_info( ) @validate_call - def create_destination_wallet_address_without_preload_content( + def create_merchant_without_preload_content( self, - create_destination_wallet_address_request: Annotated[Optional[CreateDestinationWalletAddressRequest], Field(description="The request body to create a destination wallet address.")] = None, + create_merchant_request: Annotated[Optional[CreateMerchantRequest], Field(description="The request body to create a merchant.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2126,12 +1938,12 @@ def create_destination_wallet_address_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Create destination wallet address + """Create merchant - This operation creates a destination wallet address. + This operation creates a merchant. Upon successful creation, a merchant ID is generated and returned along with the merchant's information. For more information on merchant creation, please refer to [Preparation](https://www.cobo.com/payments/en/guides/preparation#create-merchant). - :param create_destination_wallet_address_request: The request body to create a destination wallet address. - :type create_destination_wallet_address_request: CreateDestinationWalletAddressRequest + :param create_merchant_request: The request body to create a merchant. + :type create_merchant_request: CreateMerchantRequest :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 @@ -2140,12 +1952,12 @@ def create_destination_wallet_address_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_destination_wallet_address_serialize( - create_destination_wallet_address_request=create_destination_wallet_address_request, + _param = self._create_merchant_serialize( + create_merchant_request=create_merchant_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "WalletAddress", + '201': "Merchant", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -2155,9 +1967,9 @@ def create_destination_wallet_address_without_preload_content( ) return response_data.response - def _create_destination_wallet_address_serialize( + def _create_merchant_serialize( self, - create_destination_wallet_address_request, + create_merchant_request, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2170,8 +1982,8 @@ def _create_destination_wallet_address_serialize( # process the header parameters # process the form parameters # process the body parameter - if create_destination_wallet_address_request is not None: - _body_params = create_destination_wallet_address_request + if create_merchant_request is not None: + _body_params = create_merchant_request # set the HTTP header `Accept` _header_params = { @@ -2181,7 +1993,7 @@ def _create_destination_wallet_address_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/payments/destination/wallet_address', + resource_path='/payments/merchants', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2191,9 +2003,9 @@ def _create_destination_wallet_address_serialize( ) @validate_call - def create_forced_sweep_request( + def create_order_link( self, - forced_sweep_request: Annotated[Optional[ForcedSweepRequest], Field(description="The request body for forced sweep.")] = None, + create_order_link_request: Annotated[Optional[CreateOrderLinkRequest], Field(description="The request body to create a payment link for a pay-in order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2202,13 +2014,13 @@ def create_forced_sweep_request( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ForcedSweep: - """Create forced sweep + ) -> Link: + """Create order link - This operation has been deprecated. This operation creates a forced sweep to transfer funds from addresses within a specified wallet to its designated sweep-to address. + This operation generates a payment link for a pay-in order. The link directs users to a hosted payment page where they can complete their payment for the order. You can share the link directly with users or embed the payment page in your website or application using an iframe. For more details, see [Payment Link](https://www.cobo.com/payments/en/guides/payment-link). - :param forced_sweep_request: The request body for forced sweep. - :type forced_sweep_request: ForcedSweepRequest + :param create_order_link_request: The request body to create a payment link for a pay-in order. + :type create_order_link_request: CreateOrderLinkRequest :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 @@ -2217,12 +2029,12 @@ def create_forced_sweep_request( :return: Returns the result object. """ # noqa: E501 - _param = self._create_forced_sweep_request_serialize( - forced_sweep_request=forced_sweep_request, + _param = self._create_order_link_serialize( + create_order_link_request=create_order_link_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ForcedSweep", + '201': "Link", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -2237,9 +2049,9 @@ def create_forced_sweep_request( ).data @validate_call - def create_forced_sweep_request_with_http_info( + def create_order_link_with_http_info( self, - forced_sweep_request: Annotated[Optional[ForcedSweepRequest], Field(description="The request body for forced sweep.")] = None, + create_order_link_request: Annotated[Optional[CreateOrderLinkRequest], Field(description="The request body to create a payment link for a pay-in order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2248,13 +2060,13 @@ def create_forced_sweep_request_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[ForcedSweep]: - """Create forced sweep + ) -> ApiResponse[Link]: + """Create order link - This operation has been deprecated. This operation creates a forced sweep to transfer funds from addresses within a specified wallet to its designated sweep-to address. + This operation generates a payment link for a pay-in order. The link directs users to a hosted payment page where they can complete their payment for the order. You can share the link directly with users or embed the payment page in your website or application using an iframe. For more details, see [Payment Link](https://www.cobo.com/payments/en/guides/payment-link). - :param forced_sweep_request: The request body for forced sweep. - :type forced_sweep_request: ForcedSweepRequest + :param create_order_link_request: The request body to create a payment link for a pay-in order. + :type create_order_link_request: CreateOrderLinkRequest :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 @@ -2263,12 +2075,12 @@ def create_forced_sweep_request_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_forced_sweep_request_serialize( - forced_sweep_request=forced_sweep_request, + _param = self._create_order_link_serialize( + create_order_link_request=create_order_link_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ForcedSweep", + '201': "Link", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -2283,9 +2095,9 @@ def create_forced_sweep_request_with_http_info( ) @validate_call - def create_forced_sweep_request_without_preload_content( + def create_order_link_without_preload_content( self, - forced_sweep_request: Annotated[Optional[ForcedSweepRequest], Field(description="The request body for forced sweep.")] = None, + create_order_link_request: Annotated[Optional[CreateOrderLinkRequest], Field(description="The request body to create a payment link for a pay-in order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2295,12 +2107,12 @@ def create_forced_sweep_request_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Create forced sweep + """Create order link - This operation has been deprecated. This operation creates a forced sweep to transfer funds from addresses within a specified wallet to its designated sweep-to address. + This operation generates a payment link for a pay-in order. The link directs users to a hosted payment page where they can complete their payment for the order. You can share the link directly with users or embed the payment page in your website or application using an iframe. For more details, see [Payment Link](https://www.cobo.com/payments/en/guides/payment-link). - :param forced_sweep_request: The request body for forced sweep. - :type forced_sweep_request: ForcedSweepRequest + :param create_order_link_request: The request body to create a payment link for a pay-in order. + :type create_order_link_request: CreateOrderLinkRequest :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 @@ -2309,12 +2121,12 @@ def create_forced_sweep_request_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_forced_sweep_request_serialize( - forced_sweep_request=forced_sweep_request, + _param = self._create_order_link_serialize( + create_order_link_request=create_order_link_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ForcedSweep", + '201': "Link", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -2324,9 +2136,9 @@ def create_forced_sweep_request_without_preload_content( ) return response_data.response - def _create_forced_sweep_request_serialize( + def _create_order_link_serialize( self, - forced_sweep_request, + create_order_link_request, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2339,8 +2151,8 @@ def _create_forced_sweep_request_serialize( # process the header parameters # process the form parameters # process the body parameter - if forced_sweep_request is not None: - _body_params = forced_sweep_request + if create_order_link_request is not None: + _body_params = create_order_link_request # set the HTTP header `Accept` _header_params = { @@ -2350,7 +2162,7 @@ def _create_forced_sweep_request_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/payments/force_sweep_requests', + resource_path='/payments/links/orders', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2360,9 +2172,9 @@ def _create_forced_sweep_request_serialize( ) @validate_call - def create_merchant( + def create_payment_order( self, - create_merchant_request: Annotated[Optional[CreateMerchantRequest], Field(description="The request body to create a merchant.")] = None, + create_payment_order_request: Annotated[Optional[CreatePaymentOrderRequest], Field(description="The request body to create a pay-in order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2371,13 +2183,13 @@ def create_merchant( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> Merchant: - """Create merchant + ) -> Order: + """Create pay-in order - This operation creates a merchant. Upon successful creation, a merchant ID is generated and returned along with the merchant's information. For more information on merchant creation, please refer to [Preparation](https://www.cobo.com/payments/en/guides/preparation#create-merchant). + This operation creates a pay-in order. - :param create_merchant_request: The request body to create a merchant. - :type create_merchant_request: CreateMerchantRequest + :param create_payment_order_request: The request body to create a pay-in order. + :type create_payment_order_request: CreatePaymentOrderRequest :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 @@ -2386,12 +2198,12 @@ def create_merchant( :return: Returns the result object. """ # noqa: E501 - _param = self._create_merchant_serialize( - create_merchant_request=create_merchant_request, + _param = self._create_payment_order_serialize( + create_payment_order_request=create_payment_order_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Merchant", + '201': "Order", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -2406,9 +2218,9 @@ def create_merchant( ).data @validate_call - def create_merchant_with_http_info( + def create_payment_order_with_http_info( self, - create_merchant_request: Annotated[Optional[CreateMerchantRequest], Field(description="The request body to create a merchant.")] = None, + create_payment_order_request: Annotated[Optional[CreatePaymentOrderRequest], Field(description="The request body to create a pay-in order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2417,13 +2229,13 @@ def create_merchant_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[Merchant]: - """Create merchant + ) -> ApiResponse[Order]: + """Create pay-in order - This operation creates a merchant. Upon successful creation, a merchant ID is generated and returned along with the merchant's information. For more information on merchant creation, please refer to [Preparation](https://www.cobo.com/payments/en/guides/preparation#create-merchant). + This operation creates a pay-in order. - :param create_merchant_request: The request body to create a merchant. - :type create_merchant_request: CreateMerchantRequest + :param create_payment_order_request: The request body to create a pay-in order. + :type create_payment_order_request: CreatePaymentOrderRequest :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 @@ -2432,12 +2244,12 @@ def create_merchant_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_merchant_serialize( - create_merchant_request=create_merchant_request, + _param = self._create_payment_order_serialize( + create_payment_order_request=create_payment_order_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Merchant", + '201': "Order", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -2452,9 +2264,9 @@ def create_merchant_with_http_info( ) @validate_call - def create_merchant_without_preload_content( + def create_payment_order_without_preload_content( self, - create_merchant_request: Annotated[Optional[CreateMerchantRequest], Field(description="The request body to create a merchant.")] = None, + create_payment_order_request: Annotated[Optional[CreatePaymentOrderRequest], Field(description="The request body to create a pay-in order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2464,12 +2276,12 @@ def create_merchant_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Create merchant + """Create pay-in order - This operation creates a merchant. Upon successful creation, a merchant ID is generated and returned along with the merchant's information. For more information on merchant creation, please refer to [Preparation](https://www.cobo.com/payments/en/guides/preparation#create-merchant). + This operation creates a pay-in order. - :param create_merchant_request: The request body to create a merchant. - :type create_merchant_request: CreateMerchantRequest + :param create_payment_order_request: The request body to create a pay-in order. + :type create_payment_order_request: CreatePaymentOrderRequest :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 @@ -2478,12 +2290,12 @@ def create_merchant_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_merchant_serialize( - create_merchant_request=create_merchant_request, + _param = self._create_payment_order_serialize( + create_payment_order_request=create_payment_order_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Merchant", + '201': "Order", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -2493,9 +2305,9 @@ def create_merchant_without_preload_content( ) return response_data.response - def _create_merchant_serialize( + def _create_payment_order_serialize( self, - create_merchant_request, + create_payment_order_request, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2508,8 +2320,8 @@ def _create_merchant_serialize( # process the header parameters # process the form parameters # process the body parameter - if create_merchant_request is not None: - _body_params = create_merchant_request + if create_payment_order_request is not None: + _body_params = create_payment_order_request # set the HTTP header `Accept` _header_params = { @@ -2519,7 +2331,7 @@ def _create_merchant_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/payments/merchants', + resource_path='/payments/orders', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2529,9 +2341,9 @@ def _create_merchant_serialize( ) @validate_call - def create_order_link( + def create_payout( self, - create_order_link_request: Annotated[Optional[CreateOrderLinkRequest], Field(description="The request body to create a payment link for a pay-in order.")] = None, + create_payout_request: Annotated[Optional[CreatePayoutRequest], Field(description="The request body to create a payout.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2540,13 +2352,13 @@ def create_order_link( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> Link: - """Create order link + ) -> PaymentPayout: + """Create payout - This operation generates a payment link for a pay-in order. The link directs users to a hosted payment page where they can complete their payment for the order. You can share the link directly with users or embed the payment page in your website or application using an iframe. For more details, see [Payment Link](https://www.cobo.com/payments/en/guides/payment-link). + This operation creates a payout to withdraw available balances. - :param create_order_link_request: The request body to create a payment link for a pay-in order. - :type create_order_link_request: CreateOrderLinkRequest + :param create_payout_request: The request body to create a payout. + :type create_payout_request: CreatePayoutRequest :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 @@ -2555,12 +2367,12 @@ def create_order_link( :return: Returns the result object. """ # noqa: E501 - _param = self._create_order_link_serialize( - create_order_link_request=create_order_link_request, + _param = self._create_payout_serialize( + create_payout_request=create_payout_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Link", + '201': "PaymentPayout", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -2575,9 +2387,9 @@ def create_order_link( ).data @validate_call - def create_order_link_with_http_info( + def create_payout_with_http_info( self, - create_order_link_request: Annotated[Optional[CreateOrderLinkRequest], Field(description="The request body to create a payment link for a pay-in order.")] = None, + create_payout_request: Annotated[Optional[CreatePayoutRequest], Field(description="The request body to create a payout.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2586,13 +2398,13 @@ def create_order_link_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[Link]: - """Create order link + ) -> ApiResponse[PaymentPayout]: + """Create payout - This operation generates a payment link for a pay-in order. The link directs users to a hosted payment page where they can complete their payment for the order. You can share the link directly with users or embed the payment page in your website or application using an iframe. For more details, see [Payment Link](https://www.cobo.com/payments/en/guides/payment-link). + This operation creates a payout to withdraw available balances. - :param create_order_link_request: The request body to create a payment link for a pay-in order. - :type create_order_link_request: CreateOrderLinkRequest + :param create_payout_request: The request body to create a payout. + :type create_payout_request: CreatePayoutRequest :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 @@ -2601,12 +2413,12 @@ def create_order_link_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_order_link_serialize( - create_order_link_request=create_order_link_request, + _param = self._create_payout_serialize( + create_payout_request=create_payout_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Link", + '201': "PaymentPayout", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -2621,9 +2433,9 @@ def create_order_link_with_http_info( ) @validate_call - def create_order_link_without_preload_content( + def create_payout_without_preload_content( self, - create_order_link_request: Annotated[Optional[CreateOrderLinkRequest], Field(description="The request body to create a payment link for a pay-in order.")] = None, + create_payout_request: Annotated[Optional[CreatePayoutRequest], Field(description="The request body to create a payout.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2633,12 +2445,12 @@ def create_order_link_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Create order link + """Create payout - This operation generates a payment link for a pay-in order. The link directs users to a hosted payment page where they can complete their payment for the order. You can share the link directly with users or embed the payment page in your website or application using an iframe. For more details, see [Payment Link](https://www.cobo.com/payments/en/guides/payment-link). + This operation creates a payout to withdraw available balances. - :param create_order_link_request: The request body to create a payment link for a pay-in order. - :type create_order_link_request: CreateOrderLinkRequest + :param create_payout_request: The request body to create a payout. + :type create_payout_request: CreatePayoutRequest :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 @@ -2647,12 +2459,12 @@ def create_order_link_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_order_link_serialize( - create_order_link_request=create_order_link_request, + _param = self._create_payout_serialize( + create_payout_request=create_payout_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Link", + '201': "PaymentPayout", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -2662,9 +2474,9 @@ def create_order_link_without_preload_content( ) return response_data.response - def _create_order_link_serialize( + def _create_payout_serialize( self, - create_order_link_request, + create_payout_request, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2677,8 +2489,8 @@ def _create_order_link_serialize( # process the header parameters # process the form parameters # process the body parameter - if create_order_link_request is not None: - _body_params = create_order_link_request + if create_payout_request is not None: + _body_params = create_payout_request # set the HTTP header `Accept` _header_params = { @@ -2688,7 +2500,7 @@ def _create_order_link_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/payments/links/orders', + resource_path='/payments/payouts', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2698,9 +2510,9 @@ def _create_order_link_serialize( ) @validate_call - def create_payment_order( + def create_refund( self, - create_payment_order_request: Annotated[Optional[CreatePaymentOrderRequest], Field(description="The request body to create a pay-in order.")] = None, + create_refund_request: Annotated[Optional[CreateRefundRequest], Field(description="The request body to create a refund order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2709,13 +2521,13 @@ def create_payment_order( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> Order: - """Create pay-in order + ) -> Refund: + """Create refund order - This operation creates a pay-in order. + This operation creates a refund order to return cryptocurrency to a specified address. When creating a refund order, you can optionally link it to an existing pay-in order for tracking and reconciliation purposes. - :param create_payment_order_request: The request body to create a pay-in order. - :type create_payment_order_request: CreatePaymentOrderRequest + :param create_refund_request: The request body to create a refund order. + :type create_refund_request: CreateRefundRequest :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 @@ -2724,12 +2536,12 @@ def create_payment_order( :return: Returns the result object. """ # noqa: E501 - _param = self._create_payment_order_serialize( - create_payment_order_request=create_payment_order_request, + _param = self._create_refund_serialize( + create_refund_request=create_refund_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Order", + '201': "Refund", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -2744,9 +2556,9 @@ def create_payment_order( ).data @validate_call - def create_payment_order_with_http_info( + def create_refund_with_http_info( self, - create_payment_order_request: Annotated[Optional[CreatePaymentOrderRequest], Field(description="The request body to create a pay-in order.")] = None, + create_refund_request: Annotated[Optional[CreateRefundRequest], Field(description="The request body to create a refund order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2755,13 +2567,13 @@ def create_payment_order_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[Order]: - """Create pay-in order + ) -> ApiResponse[Refund]: + """Create refund order - This operation creates a pay-in order. + This operation creates a refund order to return cryptocurrency to a specified address. When creating a refund order, you can optionally link it to an existing pay-in order for tracking and reconciliation purposes. - :param create_payment_order_request: The request body to create a pay-in order. - :type create_payment_order_request: CreatePaymentOrderRequest + :param create_refund_request: The request body to create a refund order. + :type create_refund_request: CreateRefundRequest :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 @@ -2770,12 +2582,12 @@ def create_payment_order_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_payment_order_serialize( - create_payment_order_request=create_payment_order_request, - ) + _param = self._create_refund_serialize( + create_refund_request=create_refund_request, + ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Order", + '201': "Refund", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -2790,9 +2602,9 @@ def create_payment_order_with_http_info( ) @validate_call - def create_payment_order_without_preload_content( + def create_refund_without_preload_content( self, - create_payment_order_request: Annotated[Optional[CreatePaymentOrderRequest], Field(description="The request body to create a pay-in order.")] = None, + create_refund_request: Annotated[Optional[CreateRefundRequest], Field(description="The request body to create a refund order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2802,12 +2614,12 @@ def create_payment_order_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Create pay-in order + """Create refund order - This operation creates a pay-in order. + This operation creates a refund order to return cryptocurrency to a specified address. When creating a refund order, you can optionally link it to an existing pay-in order for tracking and reconciliation purposes. - :param create_payment_order_request: The request body to create a pay-in order. - :type create_payment_order_request: CreatePaymentOrderRequest + :param create_refund_request: The request body to create a refund order. + :type create_refund_request: CreateRefundRequest :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 @@ -2816,12 +2628,12 @@ def create_payment_order_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_payment_order_serialize( - create_payment_order_request=create_payment_order_request, + _param = self._create_refund_serialize( + create_refund_request=create_refund_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Order", + '201': "Refund", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -2831,9 +2643,9 @@ def create_payment_order_without_preload_content( ) return response_data.response - def _create_payment_order_serialize( + def _create_refund_serialize( self, - create_payment_order_request, + create_refund_request, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2846,8 +2658,8 @@ def _create_payment_order_serialize( # process the header parameters # process the form parameters # process the body parameter - if create_payment_order_request is not None: - _body_params = create_payment_order_request + if create_refund_request is not None: + _body_params = create_refund_request # set the HTTP header `Accept` _header_params = { @@ -2857,7 +2669,7 @@ def _create_payment_order_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/payments/orders', + resource_path='/payments/refunds', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2867,9 +2679,9 @@ def _create_payment_order_serialize( ) @validate_call - def create_payout( + def create_refund_link( self, - create_payout_request: Annotated[Optional[CreatePayoutRequest], Field(description="The request body to create a payout.")] = None, + create_refund_link_request: Annotated[Optional[CreateRefundLinkRequest], Field(description="The request body to create a refund link.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2878,13 +2690,13 @@ def create_payout( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> PaymentPayout: - """Create payout + ) -> Link: + """Create refund link - This operation creates a payout to withdraw available balances. + This operation creates a link that points to a Cobo-hosted refund page. The user can submit their desired refund address on the page. Once the address is submitted, Cobo will automatically create a refund order and initiate the refund process according to your configuration. For details, see [Create refund link](https://www.cobo.com/payments/en/guides/create-refund-link). - :param create_payout_request: The request body to create a payout. - :type create_payout_request: CreatePayoutRequest + :param create_refund_link_request: The request body to create a refund link. + :type create_refund_link_request: CreateRefundLinkRequest :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 @@ -2893,12 +2705,12 @@ def create_payout( :return: Returns the result object. """ # noqa: E501 - _param = self._create_payout_serialize( - create_payout_request=create_payout_request, + _param = self._create_refund_link_serialize( + create_refund_link_request=create_refund_link_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "PaymentPayout", + '201': "Link", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -2913,9 +2725,9 @@ def create_payout( ).data @validate_call - def create_payout_with_http_info( + def create_refund_link_with_http_info( self, - create_payout_request: Annotated[Optional[CreatePayoutRequest], Field(description="The request body to create a payout.")] = None, + create_refund_link_request: Annotated[Optional[CreateRefundLinkRequest], Field(description="The request body to create a refund link.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2924,13 +2736,13 @@ def create_payout_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[PaymentPayout]: - """Create payout + ) -> ApiResponse[Link]: + """Create refund link - This operation creates a payout to withdraw available balances. + This operation creates a link that points to a Cobo-hosted refund page. The user can submit their desired refund address on the page. Once the address is submitted, Cobo will automatically create a refund order and initiate the refund process according to your configuration. For details, see [Create refund link](https://www.cobo.com/payments/en/guides/create-refund-link). - :param create_payout_request: The request body to create a payout. - :type create_payout_request: CreatePayoutRequest + :param create_refund_link_request: The request body to create a refund link. + :type create_refund_link_request: CreateRefundLinkRequest :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 @@ -2939,12 +2751,12 @@ def create_payout_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_payout_serialize( - create_payout_request=create_payout_request, + _param = self._create_refund_link_serialize( + create_refund_link_request=create_refund_link_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "PaymentPayout", + '201': "Link", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -2959,9 +2771,9 @@ def create_payout_with_http_info( ) @validate_call - def create_payout_without_preload_content( + def create_refund_link_without_preload_content( self, - create_payout_request: Annotated[Optional[CreatePayoutRequest], Field(description="The request body to create a payout.")] = None, + create_refund_link_request: Annotated[Optional[CreateRefundLinkRequest], Field(description="The request body to create a refund link.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2971,12 +2783,12 @@ def create_payout_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Create payout + """Create refund link - This operation creates a payout to withdraw available balances. + This operation creates a link that points to a Cobo-hosted refund page. The user can submit their desired refund address on the page. Once the address is submitted, Cobo will automatically create a refund order and initiate the refund process according to your configuration. For details, see [Create refund link](https://www.cobo.com/payments/en/guides/create-refund-link). - :param create_payout_request: The request body to create a payout. - :type create_payout_request: CreatePayoutRequest + :param create_refund_link_request: The request body to create a refund link. + :type create_refund_link_request: CreateRefundLinkRequest :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 @@ -2985,12 +2797,12 @@ def create_payout_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_payout_serialize( - create_payout_request=create_payout_request, + _param = self._create_refund_link_serialize( + create_refund_link_request=create_refund_link_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "PaymentPayout", + '201': "Link", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -3000,9 +2812,9 @@ def create_payout_without_preload_content( ) return response_data.response - def _create_payout_serialize( + def _create_refund_link_serialize( self, - create_payout_request, + create_refund_link_request, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3015,8 +2827,8 @@ def _create_payout_serialize( # process the header parameters # process the form parameters # process the body parameter - if create_payout_request is not None: - _body_params = create_payout_request + if create_refund_link_request is not None: + _body_params = create_refund_link_request # set the HTTP header `Accept` _header_params = { @@ -3026,7 +2838,7 @@ def _create_payout_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/payments/payouts', + resource_path='/payments/links/refunds', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3036,9 +2848,9 @@ def _create_payout_serialize( ) @validate_call - def create_refund( + def create_report( self, - create_refund_request: Annotated[Optional[CreateRefundRequest], Field(description="The request body to create a refund order.")] = None, + create_report_request: Annotated[Optional[CreateReportRequest], Field(description="The request body to create payment reports.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3047,13 +2859,13 @@ def create_refund( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> Refund: - """Create refund order + ) -> Report: + """Generate reports - This operation creates a refund order to return cryptocurrency to a specified address. When creating a refund order, you can optionally link it to an existing pay-in order for tracking and reconciliation purposes. + This operation generates reports for a variety of payment activities, including pay-ins, payouts, and commission fees. - :param create_refund_request: The request body to create a refund order. - :type create_refund_request: CreateRefundRequest + :param create_report_request: The request body to create payment reports. + :type create_report_request: CreateReportRequest :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 @@ -3062,12 +2874,12 @@ def create_refund( :return: Returns the result object. """ # noqa: E501 - _param = self._create_refund_serialize( - create_refund_request=create_refund_request, + _param = self._create_report_serialize( + create_report_request=create_report_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Refund", + '201': "Report", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -3082,9 +2894,9 @@ def create_refund( ).data @validate_call - def create_refund_with_http_info( + def create_report_with_http_info( self, - create_refund_request: Annotated[Optional[CreateRefundRequest], Field(description="The request body to create a refund order.")] = None, + create_report_request: Annotated[Optional[CreateReportRequest], Field(description="The request body to create payment reports.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3093,13 +2905,13 @@ def create_refund_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[Refund]: - """Create refund order + ) -> ApiResponse[Report]: + """Generate reports - This operation creates a refund order to return cryptocurrency to a specified address. When creating a refund order, you can optionally link it to an existing pay-in order for tracking and reconciliation purposes. + This operation generates reports for a variety of payment activities, including pay-ins, payouts, and commission fees. - :param create_refund_request: The request body to create a refund order. - :type create_refund_request: CreateRefundRequest + :param create_report_request: The request body to create payment reports. + :type create_report_request: CreateReportRequest :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 @@ -3108,12 +2920,12 @@ def create_refund_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_refund_serialize( - create_refund_request=create_refund_request, + _param = self._create_report_serialize( + create_report_request=create_report_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Refund", + '201': "Report", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -3128,9 +2940,9 @@ def create_refund_with_http_info( ) @validate_call - def create_refund_without_preload_content( + def create_report_without_preload_content( self, - create_refund_request: Annotated[Optional[CreateRefundRequest], Field(description="The request body to create a refund order.")] = None, + create_report_request: Annotated[Optional[CreateReportRequest], Field(description="The request body to create payment reports.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3140,12 +2952,12 @@ def create_refund_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Create refund order + """Generate reports - This operation creates a refund order to return cryptocurrency to a specified address. When creating a refund order, you can optionally link it to an existing pay-in order for tracking and reconciliation purposes. + This operation generates reports for a variety of payment activities, including pay-ins, payouts, and commission fees. - :param create_refund_request: The request body to create a refund order. - :type create_refund_request: CreateRefundRequest + :param create_report_request: The request body to create payment reports. + :type create_report_request: CreateReportRequest :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 @@ -3154,12 +2966,12 @@ def create_refund_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_refund_serialize( - create_refund_request=create_refund_request, + _param = self._create_report_serialize( + create_report_request=create_report_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Refund", + '201': "Report", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -3169,9 +2981,9 @@ def create_refund_without_preload_content( ) return response_data.response - def _create_refund_serialize( + def _create_report_serialize( self, - create_refund_request, + create_report_request, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3184,8 +2996,8 @@ def _create_refund_serialize( # process the header parameters # process the form parameters # process the body parameter - if create_refund_request is not None: - _body_params = create_refund_request + if create_report_request is not None: + _body_params = create_report_request # set the HTTP header `Accept` _header_params = { @@ -3195,7 +3007,7 @@ def _create_refund_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/payments/refunds', + resource_path='/payments/reports', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3205,9 +3017,9 @@ def _create_refund_serialize( ) @validate_call - def create_refund_link( + def create_settlement_request( self, - create_refund_link_request: Annotated[Optional[CreateRefundLinkRequest], Field(description="The request body to create a refund link.")] = None, + create_settlement_request_request: Annotated[Optional[CreateSettlementRequestRequest], Field(description="The request body to create a settlement request.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3216,13 +3028,13 @@ def create_refund_link( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> Link: - """Create refund link + ) -> Settlement: + """Create settlement request - This operation creates a link that points to a Cobo-hosted refund page. The user can submit their desired refund address on the page. Once the address is submitted, Cobo will automatically create a refund order and initiate the refund process according to your configuration. For details, see [Create refund link](https://www.cobo.com/payments/en/guides/create-refund-link). + This operation has been deprecated. Please use [Create payout](https://www.cobo.com/payments/en/api-references/payment/create-payout) instead. You can include multiple merchants and cryptocurrencies in a single settlement request. - :param create_refund_link_request: The request body to create a refund link. - :type create_refund_link_request: CreateRefundLinkRequest + :param create_settlement_request_request: The request body to create a settlement request. + :type create_settlement_request_request: CreateSettlementRequestRequest :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 @@ -3231,12 +3043,12 @@ def create_refund_link( :return: Returns the result object. """ # noqa: E501 - _param = self._create_refund_link_serialize( - create_refund_link_request=create_refund_link_request, + _param = self._create_settlement_request_serialize( + create_settlement_request_request=create_settlement_request_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Link", + '201': "Settlement", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -3251,9 +3063,9 @@ def create_refund_link( ).data @validate_call - def create_refund_link_with_http_info( + def create_settlement_request_with_http_info( self, - create_refund_link_request: Annotated[Optional[CreateRefundLinkRequest], Field(description="The request body to create a refund link.")] = None, + create_settlement_request_request: Annotated[Optional[CreateSettlementRequestRequest], Field(description="The request body to create a settlement request.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3262,13 +3074,13 @@ def create_refund_link_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[Link]: - """Create refund link + ) -> ApiResponse[Settlement]: + """Create settlement request - This operation creates a link that points to a Cobo-hosted refund page. The user can submit their desired refund address on the page. Once the address is submitted, Cobo will automatically create a refund order and initiate the refund process according to your configuration. For details, see [Create refund link](https://www.cobo.com/payments/en/guides/create-refund-link). + This operation has been deprecated. Please use [Create payout](https://www.cobo.com/payments/en/api-references/payment/create-payout) instead. You can include multiple merchants and cryptocurrencies in a single settlement request. - :param create_refund_link_request: The request body to create a refund link. - :type create_refund_link_request: CreateRefundLinkRequest + :param create_settlement_request_request: The request body to create a settlement request. + :type create_settlement_request_request: CreateSettlementRequestRequest :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 @@ -3277,12 +3089,12 @@ def create_refund_link_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_refund_link_serialize( - create_refund_link_request=create_refund_link_request, + _param = self._create_settlement_request_serialize( + create_settlement_request_request=create_settlement_request_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Link", + '201': "Settlement", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -3297,9 +3109,9 @@ def create_refund_link_with_http_info( ) @validate_call - def create_refund_link_without_preload_content( + def create_settlement_request_without_preload_content( self, - create_refund_link_request: Annotated[Optional[CreateRefundLinkRequest], Field(description="The request body to create a refund link.")] = None, + create_settlement_request_request: Annotated[Optional[CreateSettlementRequestRequest], Field(description="The request body to create a settlement request.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3309,12 +3121,12 @@ def create_refund_link_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Create refund link + """Create settlement request - This operation creates a link that points to a Cobo-hosted refund page. The user can submit their desired refund address on the page. Once the address is submitted, Cobo will automatically create a refund order and initiate the refund process according to your configuration. For details, see [Create refund link](https://www.cobo.com/payments/en/guides/create-refund-link). + This operation has been deprecated. Please use [Create payout](https://www.cobo.com/payments/en/api-references/payment/create-payout) instead. You can include multiple merchants and cryptocurrencies in a single settlement request. - :param create_refund_link_request: The request body to create a refund link. - :type create_refund_link_request: CreateRefundLinkRequest + :param create_settlement_request_request: The request body to create a settlement request. + :type create_settlement_request_request: CreateSettlementRequestRequest :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 @@ -3323,12 +3135,12 @@ def create_refund_link_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_refund_link_serialize( - create_refund_link_request=create_refund_link_request, + _param = self._create_settlement_request_serialize( + create_settlement_request_request=create_settlement_request_request, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Link", + '201': "Settlement", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -3338,9 +3150,9 @@ def create_refund_link_without_preload_content( ) return response_data.response - def _create_refund_link_serialize( + def _create_settlement_request_serialize( self, - create_refund_link_request, + create_settlement_request_request, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3353,8 +3165,8 @@ def _create_refund_link_serialize( # process the header parameters # process the form parameters # process the body parameter - if create_refund_link_request is not None: - _body_params = create_refund_link_request + if create_settlement_request_request is not None: + _body_params = create_settlement_request_request # set the HTTP header `Accept` _header_params = { @@ -3364,7 +3176,7 @@ def _create_refund_link_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/payments/links/refunds', + resource_path='/payments/settlement_requests', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3374,9 +3186,9 @@ def _create_refund_link_serialize( ) @validate_call - def create_report( + def create_top_up_addresses( self, - create_report_request: Annotated[Optional[CreateReportRequest], Field(description="The request body to create payment reports.")] = None, + create_top_up_addresses: Annotated[Optional[CreateTopUpAddresses], Field(description="The request body of the create top-up addresses operation.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3385,13 +3197,13 @@ def create_report( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> Report: - """Generate reports + ) -> CreateTopUpAddresses201Response: + """Batch create top-up addresses - This operation generates reports for a variety of payment activities, including pay-ins, payouts, and commission fees. + This operation creates top-up addresses for multiple payers under a specific merchant and token in a single request. This operation supports batch processing of up to 50 payers per request. - :param create_report_request: The request body to create payment reports. - :type create_report_request: CreateReportRequest + :param create_top_up_addresses: The request body of the create top-up addresses operation. + :type create_top_up_addresses: CreateTopUpAddresses :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 @@ -3400,12 +3212,12 @@ def create_report( :return: Returns the result object. """ # noqa: E501 - _param = self._create_report_serialize( - create_report_request=create_report_request, + _param = self._create_top_up_addresses_serialize( + create_top_up_addresses=create_top_up_addresses, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Report", + '201': "CreateTopUpAddresses201Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -3420,9 +3232,9 @@ def create_report( ).data @validate_call - def create_report_with_http_info( + def create_top_up_addresses_with_http_info( self, - create_report_request: Annotated[Optional[CreateReportRequest], Field(description="The request body to create payment reports.")] = None, + create_top_up_addresses: Annotated[Optional[CreateTopUpAddresses], Field(description="The request body of the create top-up addresses operation.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3431,13 +3243,13 @@ def create_report_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[Report]: - """Generate reports + ) -> ApiResponse[CreateTopUpAddresses201Response]: + """Batch create top-up addresses - This operation generates reports for a variety of payment activities, including pay-ins, payouts, and commission fees. + This operation creates top-up addresses for multiple payers under a specific merchant and token in a single request. This operation supports batch processing of up to 50 payers per request. - :param create_report_request: The request body to create payment reports. - :type create_report_request: CreateReportRequest + :param create_top_up_addresses: The request body of the create top-up addresses operation. + :type create_top_up_addresses: CreateTopUpAddresses :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 @@ -3446,12 +3258,12 @@ def create_report_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_report_serialize( - create_report_request=create_report_request, + _param = self._create_top_up_addresses_serialize( + create_top_up_addresses=create_top_up_addresses, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Report", + '201': "CreateTopUpAddresses201Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -3466,9 +3278,9 @@ def create_report_with_http_info( ) @validate_call - def create_report_without_preload_content( + def create_top_up_addresses_without_preload_content( self, - create_report_request: Annotated[Optional[CreateReportRequest], Field(description="The request body to create payment reports.")] = None, + create_top_up_addresses: Annotated[Optional[CreateTopUpAddresses], Field(description="The request body of the create top-up addresses operation.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3478,12 +3290,12 @@ def create_report_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Generate reports + """Batch create top-up addresses - This operation generates reports for a variety of payment activities, including pay-ins, payouts, and commission fees. + This operation creates top-up addresses for multiple payers under a specific merchant and token in a single request. This operation supports batch processing of up to 50 payers per request. - :param create_report_request: The request body to create payment reports. - :type create_report_request: CreateReportRequest + :param create_top_up_addresses: The request body of the create top-up addresses operation. + :type create_top_up_addresses: CreateTopUpAddresses :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 @@ -3492,12 +3304,12 @@ def create_report_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_report_serialize( - create_report_request=create_report_request, + _param = self._create_top_up_addresses_serialize( + create_top_up_addresses=create_top_up_addresses, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Report", + '201': "CreateTopUpAddresses201Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -3507,9 +3319,9 @@ def create_report_without_preload_content( ) return response_data.response - def _create_report_serialize( + def _create_top_up_addresses_serialize( self, - create_report_request, + create_top_up_addresses, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3522,8 +3334,8 @@ def _create_report_serialize( # process the header parameters # process the form parameters # process the body parameter - if create_report_request is not None: - _body_params = create_report_request + if create_top_up_addresses is not None: + _body_params = create_top_up_addresses # set the HTTP header `Accept` _header_params = { @@ -3533,7 +3345,7 @@ def _create_report_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/payments/reports', + resource_path='/payments/topup/address', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3543,9 +3355,9 @@ def _create_report_serialize( ) @validate_call - def create_settlement_request( + def delete_counterparty_by_id( self, - create_settlement_request_request: Annotated[Optional[CreateSettlementRequestRequest], Field(description="The request body to create a settlement request.")] = None, + counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3554,13 +3366,13 @@ def create_settlement_request( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> Settlement: - """Create settlement request + ) -> DeleteCounterpartyById200Response: + """Delete counterparty - This operation has been deprecated. Please use [Create payout](https://www.cobo.com/payments/en/api-references/payment/create-payout) instead. You can include multiple merchants and cryptocurrencies in a single settlement request. + This operation deletes a counterparty. Note that this operation will delete all entries under the counterparty. - :param create_settlement_request_request: The request body to create a settlement request. - :type create_settlement_request_request: CreateSettlementRequestRequest + :param counterparty_id: The counterparty ID. (required) + :type counterparty_id: 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 @@ -3569,14 +3381,15 @@ def create_settlement_request( :return: Returns the result object. """ # noqa: E501 - _param = self._create_settlement_request_serialize( - create_settlement_request_request=create_settlement_request_request, + _param = self._delete_counterparty_by_id_serialize( + counterparty_id=counterparty_id, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Settlement", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", + '200': "DeleteCounterpartyById200Response", + '400': "ErrorResponse", + '401': "ErrorResponse", + '403': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3589,9 +3402,9 @@ def create_settlement_request( ).data @validate_call - def create_settlement_request_with_http_info( + def delete_counterparty_by_id_with_http_info( self, - create_settlement_request_request: Annotated[Optional[CreateSettlementRequestRequest], Field(description="The request body to create a settlement request.")] = None, + counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3600,13 +3413,13 @@ def create_settlement_request_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[Settlement]: - """Create settlement request + ) -> ApiResponse[DeleteCounterpartyById200Response]: + """Delete counterparty - This operation has been deprecated. Please use [Create payout](https://www.cobo.com/payments/en/api-references/payment/create-payout) instead. You can include multiple merchants and cryptocurrencies in a single settlement request. + This operation deletes a counterparty. Note that this operation will delete all entries under the counterparty. - :param create_settlement_request_request: The request body to create a settlement request. - :type create_settlement_request_request: CreateSettlementRequestRequest + :param counterparty_id: The counterparty ID. (required) + :type counterparty_id: 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 @@ -3615,14 +3428,15 @@ def create_settlement_request_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_settlement_request_serialize( - create_settlement_request_request=create_settlement_request_request, + _param = self._delete_counterparty_by_id_serialize( + counterparty_id=counterparty_id, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Settlement", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", + '200': "DeleteCounterpartyById200Response", + '400': "ErrorResponse", + '401': "ErrorResponse", + '403': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3635,9 +3449,9 @@ def create_settlement_request_with_http_info( ) @validate_call - def create_settlement_request_without_preload_content( + def delete_counterparty_by_id_without_preload_content( self, - create_settlement_request_request: Annotated[Optional[CreateSettlementRequestRequest], Field(description="The request body to create a settlement request.")] = None, + counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3647,12 +3461,12 @@ def create_settlement_request_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Create settlement request + """Delete counterparty - This operation has been deprecated. Please use [Create payout](https://www.cobo.com/payments/en/api-references/payment/create-payout) instead. You can include multiple merchants and cryptocurrencies in a single settlement request. + This operation deletes a counterparty. Note that this operation will delete all entries under the counterparty. - :param create_settlement_request_request: The request body to create a settlement request. - :type create_settlement_request_request: CreateSettlementRequestRequest + :param counterparty_id: The counterparty ID. (required) + :type counterparty_id: 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 @@ -3661,14 +3475,15 @@ def create_settlement_request_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_settlement_request_serialize( - create_settlement_request_request=create_settlement_request_request, + _param = self._delete_counterparty_by_id_serialize( + counterparty_id=counterparty_id, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "Settlement", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", + '200': "DeleteCounterpartyById200Response", + '400': "ErrorResponse", + '401': "ErrorResponse", + '403': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3676,9 +3491,9 @@ def create_settlement_request_without_preload_content( ) return response_data.response - def _create_settlement_request_serialize( + def _delete_counterparty_by_id_serialize( self, - create_settlement_request_request, + counterparty_id, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3687,12 +3502,12 @@ def _create_settlement_request_serialize( _body_params: Optional[bytes] = None # process the path parameters + if counterparty_id is not None: + _path_params['counterparty_id'] = counterparty_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_settlement_request_request is not None: - _body_params = create_settlement_request_request # set the HTTP header `Accept` _header_params = { @@ -3701,8 +3516,8 @@ def _create_settlement_request_serialize( } return self.api_client.param_serialize( - method='POST', - resource_path='/payments/settlement_requests', + method='DELETE', + resource_path='/payments/counterparty/{counterparty_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3712,9 +3527,11 @@ def _create_settlement_request_serialize( ) @validate_call - def create_top_up_addresses( + def delete_counterparty_entry( self, - create_top_up_addresses: Annotated[Optional[CreateTopUpAddresses], Field(description="The request body of the create top-up addresses operation.")] = None, + counterparty_entry_id: Annotated[StrictStr, Field(description="The counterparty entry ID. For example, the wallet address ID.")], + counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], + entry_type: Annotated[Optional[EntryType], Field(description="The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3723,13 +3540,17 @@ def create_top_up_addresses( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> CreateTopUpAddresses201Response: - """Batch create top-up addresses + ) -> DeleteCounterpartyEntry200Response: + """Delete counterparty entry - This operation creates top-up addresses for multiple payers under a specific merchant and token in a single request. This operation supports batch processing of up to 50 payers per request. + This operation deletes a counterparty entry. - :param create_top_up_addresses: The request body of the create top-up addresses operation. - :type create_top_up_addresses: CreateTopUpAddresses + :param counterparty_entry_id: The counterparty entry ID. For example, the wallet address ID. (required) + :type counterparty_entry_id: str + :param counterparty_id: The counterparty ID. (required) + :type counterparty_id: str + :param entry_type: The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. + :type entry_type: EntryType :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 @@ -3738,14 +3559,17 @@ def create_top_up_addresses( :return: Returns the result object. """ # noqa: E501 - _param = self._create_top_up_addresses_serialize( - create_top_up_addresses=create_top_up_addresses, + _param = self._delete_counterparty_entry_serialize( + counterparty_entry_id=counterparty_entry_id, + counterparty_id=counterparty_id, + entry_type=entry_type, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateTopUpAddresses201Response", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", + '200': "DeleteCounterpartyEntry200Response", + '400': "ErrorResponse", + '401': "ErrorResponse", + '403': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3758,9 +3582,11 @@ def create_top_up_addresses( ).data @validate_call - def create_top_up_addresses_with_http_info( + def delete_counterparty_entry_with_http_info( self, - create_top_up_addresses: Annotated[Optional[CreateTopUpAddresses], Field(description="The request body of the create top-up addresses operation.")] = None, + counterparty_entry_id: Annotated[StrictStr, Field(description="The counterparty entry ID. For example, the wallet address ID.")], + counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], + entry_type: Annotated[Optional[EntryType], Field(description="The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3769,13 +3595,17 @@ def create_top_up_addresses_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[CreateTopUpAddresses201Response]: - """Batch create top-up addresses + ) -> ApiResponse[DeleteCounterpartyEntry200Response]: + """Delete counterparty entry - This operation creates top-up addresses for multiple payers under a specific merchant and token in a single request. This operation supports batch processing of up to 50 payers per request. + This operation deletes a counterparty entry. - :param create_top_up_addresses: The request body of the create top-up addresses operation. - :type create_top_up_addresses: CreateTopUpAddresses + :param counterparty_entry_id: The counterparty entry ID. For example, the wallet address ID. (required) + :type counterparty_entry_id: str + :param counterparty_id: The counterparty ID. (required) + :type counterparty_id: str + :param entry_type: The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. + :type entry_type: EntryType :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 @@ -3784,14 +3614,17 @@ def create_top_up_addresses_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_top_up_addresses_serialize( - create_top_up_addresses=create_top_up_addresses, + _param = self._delete_counterparty_entry_serialize( + counterparty_entry_id=counterparty_entry_id, + counterparty_id=counterparty_id, + entry_type=entry_type, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateTopUpAddresses201Response", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", + '200': "DeleteCounterpartyEntry200Response", + '400': "ErrorResponse", + '401': "ErrorResponse", + '403': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3804,9 +3637,11 @@ def create_top_up_addresses_with_http_info( ) @validate_call - def create_top_up_addresses_without_preload_content( + def delete_counterparty_entry_without_preload_content( self, - create_top_up_addresses: Annotated[Optional[CreateTopUpAddresses], Field(description="The request body of the create top-up addresses operation.")] = None, + counterparty_entry_id: Annotated[StrictStr, Field(description="The counterparty entry ID. For example, the wallet address ID.")], + counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], + entry_type: Annotated[Optional[EntryType], Field(description="The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3816,12 +3651,16 @@ def create_top_up_addresses_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Batch create top-up addresses + """Delete counterparty entry - This operation creates top-up addresses for multiple payers under a specific merchant and token in a single request. This operation supports batch processing of up to 50 payers per request. + This operation deletes a counterparty entry. - :param create_top_up_addresses: The request body of the create top-up addresses operation. - :type create_top_up_addresses: CreateTopUpAddresses + :param counterparty_entry_id: The counterparty entry ID. For example, the wallet address ID. (required) + :type counterparty_entry_id: str + :param counterparty_id: The counterparty ID. (required) + :type counterparty_id: str + :param entry_type: The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. + :type entry_type: EntryType :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 @@ -3830,14 +3669,17 @@ def create_top_up_addresses_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_top_up_addresses_serialize( - create_top_up_addresses=create_top_up_addresses, + _param = self._delete_counterparty_entry_serialize( + counterparty_entry_id=counterparty_entry_id, + counterparty_id=counterparty_id, + entry_type=entry_type, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateTopUpAddresses201Response", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", + '200': "DeleteCounterpartyEntry200Response", + '400': "ErrorResponse", + '401': "ErrorResponse", + '403': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -3845,9 +3687,11 @@ def create_top_up_addresses_without_preload_content( ) return response_data.response - def _create_top_up_addresses_serialize( + def _delete_counterparty_entry_serialize( self, - create_top_up_addresses, + counterparty_entry_id, + counterparty_id, + entry_type, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3856,12 +3700,20 @@ def _create_top_up_addresses_serialize( _body_params: Optional[bytes] = None # process the path parameters + if counterparty_entry_id is not None: + _path_params['counterparty_entry_id'] = counterparty_entry_id # process the query parameters + if counterparty_id is not None: + + _query_params.append(('counterparty_id', counterparty_id)) + + if entry_type is not None: + + _query_params.append(('entry_type', entry_type.value)) + # process the header parameters # process the form parameters # process the body parameter - if create_top_up_addresses is not None: - _body_params = create_top_up_addresses # set the HTTP header `Accept` _header_params = { @@ -3870,8 +3722,8 @@ def _create_top_up_addresses_serialize( } return self.api_client.param_serialize( - method='POST', - resource_path='/payments/topup/address', + method='DELETE', + resource_path='/payments/counterparty_entry/{counterparty_entry_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3881,9 +3733,9 @@ def _create_top_up_addresses_serialize( ) @validate_call - def delete_counterparty( + def delete_crypto_address( self, - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], + crypto_address_id: Annotated[StrictStr, Field(description="The crypto address ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3892,13 +3744,13 @@ def delete_counterparty( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> DeleteCounterparty200Response: - """Delete counterparty (Deprecated) + ) -> DeleteCryptoAddress201Response: + """Delete crypto address - This operation deletes a counterparty. + This operation has been deprecated. This operation unregisters a crypto address from being used for crypto payouts. - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: str + :param crypto_address_id: The crypto address ID. (required) + :type crypto_address_id: 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 @@ -3907,12 +3759,12 @@ def delete_counterparty( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_counterparty_serialize( - counterparty_id=counterparty_id, + _param = self._delete_crypto_address_serialize( + crypto_address_id=crypto_address_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteCounterparty200Response", + '201': "DeleteCryptoAddress201Response", '400': "ErrorResponse", '401': "ErrorResponse", '403': "ErrorResponse", @@ -3928,9 +3780,9 @@ def delete_counterparty( ).data @validate_call - def delete_counterparty_with_http_info( + def delete_crypto_address_with_http_info( self, - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], + crypto_address_id: Annotated[StrictStr, Field(description="The crypto address ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3939,13 +3791,13 @@ def delete_counterparty_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[DeleteCounterparty200Response]: - """Delete counterparty (Deprecated) + ) -> ApiResponse[DeleteCryptoAddress201Response]: + """Delete crypto address - This operation deletes a counterparty. + This operation has been deprecated. This operation unregisters a crypto address from being used for crypto payouts. - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: str + :param crypto_address_id: The crypto address ID. (required) + :type crypto_address_id: 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 @@ -3954,12 +3806,12 @@ def delete_counterparty_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_counterparty_serialize( - counterparty_id=counterparty_id, + _param = self._delete_crypto_address_serialize( + crypto_address_id=crypto_address_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteCounterparty200Response", + '201': "DeleteCryptoAddress201Response", '400': "ErrorResponse", '401': "ErrorResponse", '403': "ErrorResponse", @@ -3975,9 +3827,9 @@ def delete_counterparty_with_http_info( ) @validate_call - def delete_counterparty_without_preload_content( + def delete_crypto_address_without_preload_content( self, - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], + crypto_address_id: Annotated[StrictStr, Field(description="The crypto address ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3987,12 +3839,12 @@ def delete_counterparty_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Delete counterparty (Deprecated) + """Delete crypto address - This operation deletes a counterparty. + This operation has been deprecated. This operation unregisters a crypto address from being used for crypto payouts. - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: str + :param crypto_address_id: The crypto address ID. (required) + :type crypto_address_id: 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 @@ -4001,12 +3853,12 @@ def delete_counterparty_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_counterparty_serialize( - counterparty_id=counterparty_id, + _param = self._delete_crypto_address_serialize( + crypto_address_id=crypto_address_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteCounterparty200Response", + '201': "DeleteCryptoAddress201Response", '400': "ErrorResponse", '401': "ErrorResponse", '403': "ErrorResponse", @@ -4017,9 +3869,9 @@ def delete_counterparty_without_preload_content( ) return response_data.response - def _delete_counterparty_serialize( + def _delete_crypto_address_serialize( self, - counterparty_id, + crypto_address_id, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4028,8 +3880,8 @@ def _delete_counterparty_serialize( _body_params: Optional[bytes] = None # process the path parameters - if counterparty_id is not None: - _path_params['counterparty_id'] = counterparty_id + if crypto_address_id is not None: + _path_params['crypto_address_id'] = crypto_address_id # process the query parameters # process the header parameters # process the form parameters @@ -4042,8 +3894,8 @@ def _delete_counterparty_serialize( } return self.api_client.param_serialize( - method='PUT', - resource_path='/payments/counterparty/{counterparty_id}/delete', + method='POST', + resource_path='/payments/crypto_addresses/{crypto_address_id}/delete', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4053,9 +3905,9 @@ def _delete_counterparty_serialize( ) @validate_call - def delete_counterparty_by_id( + def delete_destination_by_id( self, - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], + destination_id: Annotated[StrictStr, Field(description="The destination ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4064,13 +3916,13 @@ def delete_counterparty_by_id( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> DeleteCounterpartyById200Response: - """Delete counterparty + ) -> DeleteDestinationById200Response: + """Delete destination - This operation deletes a counterparty. Note that this operation will delete all entries under the counterparty. + This operation deletes a destination. Note that this operation will delete all entries under the destination, including bank accounts and addresses. - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: str + :param destination_id: The destination ID. (required) + :type destination_id: 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 @@ -4079,12 +3931,12 @@ def delete_counterparty_by_id( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_counterparty_by_id_serialize( - counterparty_id=counterparty_id, + _param = self._delete_destination_by_id_serialize( + destination_id=destination_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteCounterpartyById200Response", + '200': "DeleteDestinationById200Response", '400': "ErrorResponse", '401': "ErrorResponse", '403': "ErrorResponse", @@ -4100,9 +3952,9 @@ def delete_counterparty_by_id( ).data @validate_call - def delete_counterparty_by_id_with_http_info( + def delete_destination_by_id_with_http_info( self, - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], + destination_id: Annotated[StrictStr, Field(description="The destination ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4111,13 +3963,13 @@ def delete_counterparty_by_id_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[DeleteCounterpartyById200Response]: - """Delete counterparty + ) -> ApiResponse[DeleteDestinationById200Response]: + """Delete destination - This operation deletes a counterparty. Note that this operation will delete all entries under the counterparty. + This operation deletes a destination. Note that this operation will delete all entries under the destination, including bank accounts and addresses. - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: str + :param destination_id: The destination ID. (required) + :type destination_id: 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 @@ -4126,12 +3978,12 @@ def delete_counterparty_by_id_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_counterparty_by_id_serialize( - counterparty_id=counterparty_id, + _param = self._delete_destination_by_id_serialize( + destination_id=destination_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteCounterpartyById200Response", + '200': "DeleteDestinationById200Response", '400': "ErrorResponse", '401': "ErrorResponse", '403': "ErrorResponse", @@ -4147,9 +3999,9 @@ def delete_counterparty_by_id_with_http_info( ) @validate_call - def delete_counterparty_by_id_without_preload_content( + def delete_destination_by_id_without_preload_content( self, - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], + destination_id: Annotated[StrictStr, Field(description="The destination ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4159,12 +4011,12 @@ def delete_counterparty_by_id_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Delete counterparty + """Delete destination - This operation deletes a counterparty. Note that this operation will delete all entries under the counterparty. + This operation deletes a destination. Note that this operation will delete all entries under the destination, including bank accounts and addresses. - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: str + :param destination_id: The destination ID. (required) + :type destination_id: 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 @@ -4173,12 +4025,12 @@ def delete_counterparty_by_id_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_counterparty_by_id_serialize( - counterparty_id=counterparty_id, + _param = self._delete_destination_by_id_serialize( + destination_id=destination_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteCounterpartyById200Response", + '200': "DeleteDestinationById200Response", '400': "ErrorResponse", '401': "ErrorResponse", '403': "ErrorResponse", @@ -4189,9 +4041,9 @@ def delete_counterparty_by_id_without_preload_content( ) return response_data.response - def _delete_counterparty_by_id_serialize( + def _delete_destination_by_id_serialize( self, - counterparty_id, + destination_id, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4200,8 +4052,8 @@ def _delete_counterparty_by_id_serialize( _body_params: Optional[bytes] = None # process the path parameters - if counterparty_id is not None: - _path_params['counterparty_id'] = counterparty_id + if destination_id is not None: + _path_params['destination_id'] = destination_id # process the query parameters # process the header parameters # process the form parameters @@ -4215,7 +4067,7 @@ def _delete_counterparty_by_id_serialize( return self.api_client.param_serialize( method='DELETE', - resource_path='/payments/counterparty/{counterparty_id}', + resource_path='/payments/destination/{destination_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4225,11 +4077,11 @@ def _delete_counterparty_by_id_serialize( ) @validate_call - def delete_counterparty_entry( + def delete_destination_entry( self, - counterparty_entry_id: Annotated[StrictStr, Field(description="The counterparty entry ID. For example, the wallet address ID.")], - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], - entry_type: Annotated[Optional[EntryType], Field(description="The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")] = None, + destination_entry_id: Annotated[StrictStr, Field(description="The destination entry ID. For example, the wallet address ID or the bank account ID.")], + destination_id: Annotated[StrictStr, Field(description="The destination ID.")], + entry_type: Annotated[EntryType, Field(description="EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4238,16 +4090,16 @@ def delete_counterparty_entry( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> DeleteCounterpartyEntry200Response: - """Delete counterparty entry + ) -> DeleteDestinationEntry200Response: + """Delete destination entry - This operation deletes a counterparty entry. + This operation deletes a destination entry. - :param counterparty_entry_id: The counterparty entry ID. For example, the wallet address ID. (required) - :type counterparty_entry_id: str - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: str - :param entry_type: The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. + :param destination_entry_id: The destination entry ID. For example, the wallet address ID or the bank account ID. (required) + :type destination_entry_id: str + :param destination_id: The destination ID. (required) + :type destination_id: str + :param entry_type: EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. (required) :type entry_type: EntryType :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -4257,14 +4109,14 @@ def delete_counterparty_entry( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_counterparty_entry_serialize( - counterparty_entry_id=counterparty_entry_id, - counterparty_id=counterparty_id, + _param = self._delete_destination_entry_serialize( + destination_entry_id=destination_entry_id, + destination_id=destination_id, entry_type=entry_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteCounterpartyEntry200Response", + '200': "DeleteDestinationEntry200Response", '400': "ErrorResponse", '401': "ErrorResponse", '403': "ErrorResponse", @@ -4280,11 +4132,11 @@ def delete_counterparty_entry( ).data @validate_call - def delete_counterparty_entry_with_http_info( + def delete_destination_entry_with_http_info( self, - counterparty_entry_id: Annotated[StrictStr, Field(description="The counterparty entry ID. For example, the wallet address ID.")], - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], - entry_type: Annotated[Optional[EntryType], Field(description="The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")] = None, + destination_entry_id: Annotated[StrictStr, Field(description="The destination entry ID. For example, the wallet address ID or the bank account ID.")], + destination_id: Annotated[StrictStr, Field(description="The destination ID.")], + entry_type: Annotated[EntryType, Field(description="EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4293,16 +4145,16 @@ def delete_counterparty_entry_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[DeleteCounterpartyEntry200Response]: - """Delete counterparty entry + ) -> ApiResponse[DeleteDestinationEntry200Response]: + """Delete destination entry - This operation deletes a counterparty entry. + This operation deletes a destination entry. - :param counterparty_entry_id: The counterparty entry ID. For example, the wallet address ID. (required) - :type counterparty_entry_id: str - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: str - :param entry_type: The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. + :param destination_entry_id: The destination entry ID. For example, the wallet address ID or the bank account ID. (required) + :type destination_entry_id: str + :param destination_id: The destination ID. (required) + :type destination_id: str + :param entry_type: EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. (required) :type entry_type: EntryType :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -4312,14 +4164,14 @@ def delete_counterparty_entry_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_counterparty_entry_serialize( - counterparty_entry_id=counterparty_entry_id, - counterparty_id=counterparty_id, + _param = self._delete_destination_entry_serialize( + destination_entry_id=destination_entry_id, + destination_id=destination_id, entry_type=entry_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteCounterpartyEntry200Response", + '200': "DeleteDestinationEntry200Response", '400': "ErrorResponse", '401': "ErrorResponse", '403': "ErrorResponse", @@ -4335,11 +4187,11 @@ def delete_counterparty_entry_with_http_info( ) @validate_call - def delete_counterparty_entry_without_preload_content( + def delete_destination_entry_without_preload_content( self, - counterparty_entry_id: Annotated[StrictStr, Field(description="The counterparty entry ID. For example, the wallet address ID.")], - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], - entry_type: Annotated[Optional[EntryType], Field(description="The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")] = None, + destination_entry_id: Annotated[StrictStr, Field(description="The destination entry ID. For example, the wallet address ID or the bank account ID.")], + destination_id: Annotated[StrictStr, Field(description="The destination ID.")], + entry_type: Annotated[EntryType, Field(description="EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4349,15 +4201,15 @@ def delete_counterparty_entry_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Delete counterparty entry + """Delete destination entry - This operation deletes a counterparty entry. + This operation deletes a destination entry. - :param counterparty_entry_id: The counterparty entry ID. For example, the wallet address ID. (required) - :type counterparty_entry_id: str - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: str - :param entry_type: The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. + :param destination_entry_id: The destination entry ID. For example, the wallet address ID or the bank account ID. (required) + :type destination_entry_id: str + :param destination_id: The destination ID. (required) + :type destination_id: str + :param entry_type: EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. (required) :type entry_type: EntryType :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -4367,14 +4219,14 @@ def delete_counterparty_entry_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_counterparty_entry_serialize( - counterparty_entry_id=counterparty_entry_id, - counterparty_id=counterparty_id, + _param = self._delete_destination_entry_serialize( + destination_entry_id=destination_entry_id, + destination_id=destination_id, entry_type=entry_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteCounterpartyEntry200Response", + '200': "DeleteDestinationEntry200Response", '400': "ErrorResponse", '401': "ErrorResponse", '403': "ErrorResponse", @@ -4385,10 +4237,10 @@ def delete_counterparty_entry_without_preload_content( ) return response_data.response - def _delete_counterparty_entry_serialize( + def _delete_destination_entry_serialize( self, - counterparty_entry_id, - counterparty_id, + destination_entry_id, + destination_id, entry_type, ) -> RequestSerialized: _path_params: Dict[str, str] = {} @@ -4398,12 +4250,12 @@ def _delete_counterparty_entry_serialize( _body_params: Optional[bytes] = None # process the path parameters - if counterparty_entry_id is not None: - _path_params['counterparty_entry_id'] = counterparty_entry_id + if destination_entry_id is not None: + _path_params['destination_entry_id'] = destination_entry_id # process the query parameters - if counterparty_id is not None: + if destination_id is not None: - _query_params.append(('counterparty_id', counterparty_id)) + _query_params.append(('destination_id', destination_id)) if entry_type is not None: @@ -4421,7 +4273,7 @@ def _delete_counterparty_entry_serialize( return self.api_client.param_serialize( method='DELETE', - resource_path='/payments/counterparty_entry/{counterparty_entry_id}', + resource_path='/payments/destination_entry/{destination_entry_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4431,9 +4283,11 @@ def _delete_counterparty_entry_serialize( ) @validate_call - def delete_counterparty_wallet_address( + def get_available_allocation_amount( self, - wallet_address_id: Annotated[StrictStr, Field(description="The wallet address ID.")], + 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` ")], + source_account: Annotated[StrictStr, Field(description="The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. ")], + destination_account: Annotated[StrictStr, Field(description="The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4442,13 +4296,17 @@ def delete_counterparty_wallet_address( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> DeleteCounterpartyWalletAddress200Response: - """Delete counterparty wallet address + ) -> PaymentAllocationAmount: + """Get available allocation amount - This operation deletes a counterparty wallet address. + This operation retrieves the available amount that can be allocated from a source account to a destination account. - :param wallet_address_id: The wallet address ID. (required) - :type wallet_address_id: str + :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 source_account: The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. (required) + :type source_account: str + :param destination_account: The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. (required) + :type destination_account: 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 @@ -4457,15 +4315,16 @@ def delete_counterparty_wallet_address( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_counterparty_wallet_address_serialize( - wallet_address_id=wallet_address_id, + _param = self._get_available_allocation_amount_serialize( + token_id=token_id, + source_account=source_account, + destination_account=destination_account, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteCounterpartyWalletAddress200Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "PaymentAllocationAmount", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4478,9 +4337,11 @@ def delete_counterparty_wallet_address( ).data @validate_call - def delete_counterparty_wallet_address_with_http_info( + def get_available_allocation_amount_with_http_info( self, - wallet_address_id: Annotated[StrictStr, Field(description="The wallet address ID.")], + 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` ")], + source_account: Annotated[StrictStr, Field(description="The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. ")], + destination_account: Annotated[StrictStr, Field(description="The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4489,30 +4350,35 @@ def delete_counterparty_wallet_address_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[DeleteCounterpartyWalletAddress200Response]: - """Delete counterparty wallet address + ) -> ApiResponse[PaymentAllocationAmount]: + """Get available allocation amount - This operation deletes a counterparty wallet address. + This operation retrieves the available amount that can be allocated from a source account to a destination account. - :param wallet_address_id: The wallet address ID. (required) - :type wallet_address_id: 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 + :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 source_account: The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. (required) + :type source_account: str + :param destination_account: The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. (required) + :type destination_account: 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._delete_counterparty_wallet_address_serialize( - wallet_address_id=wallet_address_id, + _param = self._get_available_allocation_amount_serialize( + token_id=token_id, + source_account=source_account, + destination_account=destination_account, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteCounterpartyWalletAddress200Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "PaymentAllocationAmount", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4525,9 +4391,11 @@ def delete_counterparty_wallet_address_with_http_info( ) @validate_call - def delete_counterparty_wallet_address_without_preload_content( + def get_available_allocation_amount_without_preload_content( self, - wallet_address_id: Annotated[StrictStr, Field(description="The wallet address ID.")], + 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` ")], + source_account: Annotated[StrictStr, Field(description="The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. ")], + destination_account: Annotated[StrictStr, Field(description="The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4537,12 +4405,16 @@ def delete_counterparty_wallet_address_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Delete counterparty wallet address + """Get available allocation amount - This operation deletes a counterparty wallet address. + This operation retrieves the available amount that can be allocated from a source account to a destination account. - :param wallet_address_id: The wallet address ID. (required) - :type wallet_address_id: str + :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 source_account: The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. (required) + :type source_account: str + :param destination_account: The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. (required) + :type destination_account: 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 @@ -4551,15 +4423,16 @@ def delete_counterparty_wallet_address_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_counterparty_wallet_address_serialize( - wallet_address_id=wallet_address_id, + _param = self._get_available_allocation_amount_serialize( + token_id=token_id, + source_account=source_account, + destination_account=destination_account, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteCounterpartyWalletAddress200Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "PaymentAllocationAmount", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4567,9 +4440,11 @@ def delete_counterparty_wallet_address_without_preload_content( ) return response_data.response - def _delete_counterparty_wallet_address_serialize( + def _get_available_allocation_amount_serialize( self, - wallet_address_id, + token_id, + source_account, + destination_account, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4578,9 +4453,19 @@ def _delete_counterparty_wallet_address_serialize( _body_params: Optional[bytes] = None # process the path parameters - if wallet_address_id is not None: - _path_params['wallet_address_id'] = wallet_address_id # process the query parameters + if token_id is not None: + + _query_params.append(('token_id', token_id)) + + if source_account is not None: + + _query_params.append(('source_account', source_account)) + + if destination_account is not None: + + _query_params.append(('destination_account', destination_account)) + # process the header parameters # process the form parameters # process the body parameter @@ -4592,8 +4477,8 @@ def _delete_counterparty_wallet_address_serialize( } return self.api_client.param_serialize( - method='PUT', - resource_path='/payments/counterparty/wallet_address/{wallet_address_id}/delete', + method='GET', + resource_path='/payments/allocation_amount', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4603,9 +4488,9 @@ def _delete_counterparty_wallet_address_serialize( ) @validate_call - def delete_crypto_address( + def get_batch_allocation_by_id( self, - crypto_address_id: Annotated[StrictStr, Field(description="The crypto address ID.")], + batch_allocation_id: Annotated[StrictStr, Field(description="The batch allocation ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4614,13 +4499,13 @@ def delete_crypto_address( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> DeleteCryptoAddress201Response: - """Delete crypto address + ) -> BatchAllocationDetail: + """Get batch allocation information - This operation unregisters a crypto address from being used for crypto payouts. + This operation retrieves the information of a batch allocation. - :param crypto_address_id: The crypto address ID. (required) - :type crypto_address_id: str + :param batch_allocation_id: The batch allocation ID. (required) + :type batch_allocation_id: 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 @@ -4629,15 +4514,14 @@ def delete_crypto_address( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_crypto_address_serialize( - crypto_address_id=crypto_address_id, + _param = self._get_batch_allocation_by_id_serialize( + batch_allocation_id=batch_allocation_id, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "DeleteCryptoAddress201Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "BatchAllocationDetail", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4650,9 +4534,9 @@ def delete_crypto_address( ).data @validate_call - def delete_crypto_address_with_http_info( + def get_batch_allocation_by_id_with_http_info( self, - crypto_address_id: Annotated[StrictStr, Field(description="The crypto address ID.")], + batch_allocation_id: Annotated[StrictStr, Field(description="The batch allocation ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4661,13 +4545,13 @@ def delete_crypto_address_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[DeleteCryptoAddress201Response]: - """Delete crypto address + ) -> ApiResponse[BatchAllocationDetail]: + """Get batch allocation information - This operation unregisters a crypto address from being used for crypto payouts. + This operation retrieves the information of a batch allocation. - :param crypto_address_id: The crypto address ID. (required) - :type crypto_address_id: str + :param batch_allocation_id: The batch allocation ID. (required) + :type batch_allocation_id: 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 @@ -4676,15 +4560,14 @@ def delete_crypto_address_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_crypto_address_serialize( - crypto_address_id=crypto_address_id, + _param = self._get_batch_allocation_by_id_serialize( + batch_allocation_id=batch_allocation_id, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "DeleteCryptoAddress201Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "BatchAllocationDetail", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4697,9 +4580,9 @@ def delete_crypto_address_with_http_info( ) @validate_call - def delete_crypto_address_without_preload_content( + def get_batch_allocation_by_id_without_preload_content( self, - crypto_address_id: Annotated[StrictStr, Field(description="The crypto address ID.")], + batch_allocation_id: Annotated[StrictStr, Field(description="The batch allocation ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4709,12 +4592,12 @@ def delete_crypto_address_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Delete crypto address + """Get batch allocation information - This operation unregisters a crypto address from being used for crypto payouts. + This operation retrieves the information of a batch allocation. - :param crypto_address_id: The crypto address ID. (required) - :type crypto_address_id: str + :param batch_allocation_id: The batch allocation ID. (required) + :type batch_allocation_id: 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 @@ -4723,15 +4606,14 @@ def delete_crypto_address_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_crypto_address_serialize( - crypto_address_id=crypto_address_id, + _param = self._get_batch_allocation_by_id_serialize( + batch_allocation_id=batch_allocation_id, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "DeleteCryptoAddress201Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "BatchAllocationDetail", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4739,9 +4621,9 @@ def delete_crypto_address_without_preload_content( ) return response_data.response - def _delete_crypto_address_serialize( + def _get_batch_allocation_by_id_serialize( self, - crypto_address_id, + batch_allocation_id, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4750,8 +4632,8 @@ def _delete_crypto_address_serialize( _body_params: Optional[bytes] = None # process the path parameters - if crypto_address_id is not None: - _path_params['crypto_address_id'] = crypto_address_id + if batch_allocation_id is not None: + _path_params['batch_allocation_id'] = batch_allocation_id # process the query parameters # process the header parameters # process the form parameters @@ -4764,8 +4646,8 @@ def _delete_crypto_address_serialize( } return self.api_client.param_serialize( - method='POST', - resource_path='/payments/crypto_addresses/{crypto_address_id}/delete', + method='GET', + resource_path='/payments/batch_allocations/{batch_allocation_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4775,9 +4657,9 @@ def _delete_crypto_address_serialize( ) @validate_call - def delete_destination( + def get_bulk_send_by_id( self, - destination_id: Annotated[StrictStr, Field(description="The destination ID.")], + bulk_send_id: Annotated[StrictStr, Field(description="The bulk send ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4786,13 +4668,13 @@ def delete_destination( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> DeleteDestination200Response: - """Delete destination (Deprecated) + ) -> PaymentBulkSend: + """Get bulk send information - This operation deletes a destination. + This operation retrieves the information of a specific bulk send. - :param destination_id: The destination ID. (required) - :type destination_id: str + :param bulk_send_id: The bulk send ID. (required) + :type bulk_send_id: 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 @@ -4801,15 +4683,14 @@ def delete_destination( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_destination_serialize( - destination_id=destination_id, + _param = self._get_bulk_send_by_id_serialize( + bulk_send_id=bulk_send_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteDestination200Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "PaymentBulkSend", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4822,9 +4703,9 @@ def delete_destination( ).data @validate_call - def delete_destination_with_http_info( + def get_bulk_send_by_id_with_http_info( self, - destination_id: Annotated[StrictStr, Field(description="The destination ID.")], + bulk_send_id: Annotated[StrictStr, Field(description="The bulk send ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4833,13 +4714,13 @@ def delete_destination_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[DeleteDestination200Response]: - """Delete destination (Deprecated) + ) -> ApiResponse[PaymentBulkSend]: + """Get bulk send information - This operation deletes a destination. + This operation retrieves the information of a specific bulk send. - :param destination_id: The destination ID. (required) - :type destination_id: str + :param bulk_send_id: The bulk send ID. (required) + :type bulk_send_id: 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 @@ -4848,15 +4729,14 @@ def delete_destination_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_destination_serialize( - destination_id=destination_id, + _param = self._get_bulk_send_by_id_serialize( + bulk_send_id=bulk_send_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteDestination200Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "PaymentBulkSend", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4869,9 +4749,9 @@ def delete_destination_with_http_info( ) @validate_call - def delete_destination_without_preload_content( + def get_bulk_send_by_id_without_preload_content( self, - destination_id: Annotated[StrictStr, Field(description="The destination ID.")], + bulk_send_id: Annotated[StrictStr, Field(description="The bulk send ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4881,12 +4761,12 @@ def delete_destination_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Delete destination (Deprecated) + """Get bulk send information - This operation deletes a destination. + This operation retrieves the information of a specific bulk send. - :param destination_id: The destination ID. (required) - :type destination_id: str + :param bulk_send_id: The bulk send ID. (required) + :type bulk_send_id: 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 @@ -4895,15 +4775,14 @@ def delete_destination_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_destination_serialize( - destination_id=destination_id, + _param = self._get_bulk_send_by_id_serialize( + bulk_send_id=bulk_send_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteDestination200Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "PaymentBulkSend", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4911,9 +4790,9 @@ def delete_destination_without_preload_content( ) return response_data.response - def _delete_destination_serialize( + def _get_bulk_send_by_id_serialize( self, - destination_id, + bulk_send_id, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4922,8 +4801,8 @@ def _delete_destination_serialize( _body_params: Optional[bytes] = None # process the path parameters - if destination_id is not None: - _path_params['destination_id'] = destination_id + if bulk_send_id is not None: + _path_params['bulk_send_id'] = bulk_send_id # process the query parameters # process the header parameters # process the form parameters @@ -4936,8 +4815,8 @@ def _delete_destination_serialize( } return self.api_client.param_serialize( - method='PUT', - resource_path='/payments/destination/{destination_id}/delete', + method='GET', + resource_path='/payments/bulk_sends/{bulk_send_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4947,9 +4826,9 @@ def _delete_destination_serialize( ) @validate_call - def delete_destination_bank_account( + def get_counterparty( self, - bank_account_id: Annotated[StrictStr, Field(description="The bank account ID.")], + counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4958,13 +4837,13 @@ def delete_destination_bank_account( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> DeleteDestinationBankAccount200Response: - """Delete destination bank account + ) -> CounterpartyDetail: + """Get counterparty information - This operation deletes a destination bank account. + This operation retrieves the detailed information about a specified counterparty. - :param bank_account_id: The bank account ID. (required) - :type bank_account_id: str + :param counterparty_id: The counterparty ID. (required) + :type counterparty_id: 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 @@ -4973,15 +4852,14 @@ def delete_destination_bank_account( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_destination_bank_account_serialize( - bank_account_id=bank_account_id, + _param = self._get_counterparty_serialize( + counterparty_id=counterparty_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteDestinationBankAccount200Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "CounterpartyDetail", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -4994,9 +4872,9 @@ def delete_destination_bank_account( ).data @validate_call - def delete_destination_bank_account_with_http_info( + def get_counterparty_with_http_info( self, - bank_account_id: Annotated[StrictStr, Field(description="The bank account ID.")], + counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5005,13 +4883,13 @@ def delete_destination_bank_account_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[DeleteDestinationBankAccount200Response]: - """Delete destination bank account + ) -> ApiResponse[CounterpartyDetail]: + """Get counterparty information - This operation deletes a destination bank account. + This operation retrieves the detailed information about a specified counterparty. - :param bank_account_id: The bank account ID. (required) - :type bank_account_id: str + :param counterparty_id: The counterparty ID. (required) + :type counterparty_id: 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 @@ -5020,15 +4898,14 @@ def delete_destination_bank_account_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_destination_bank_account_serialize( - bank_account_id=bank_account_id, + _param = self._get_counterparty_serialize( + counterparty_id=counterparty_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteDestinationBankAccount200Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "CounterpartyDetail", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5041,9 +4918,9 @@ def delete_destination_bank_account_with_http_info( ) @validate_call - def delete_destination_bank_account_without_preload_content( + def get_counterparty_without_preload_content( self, - bank_account_id: Annotated[StrictStr, Field(description="The bank account ID.")], + counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5053,12 +4930,12 @@ def delete_destination_bank_account_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Delete destination bank account + """Get counterparty information - This operation deletes a destination bank account. + This operation retrieves the detailed information about a specified counterparty. - :param bank_account_id: The bank account ID. (required) - :type bank_account_id: str + :param counterparty_id: The counterparty ID. (required) + :type counterparty_id: 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 @@ -5067,15 +4944,14 @@ def delete_destination_bank_account_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_destination_bank_account_serialize( - bank_account_id=bank_account_id, + _param = self._get_counterparty_serialize( + counterparty_id=counterparty_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteDestinationBankAccount200Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "CounterpartyDetail", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5083,9 +4959,9 @@ def delete_destination_bank_account_without_preload_content( ) return response_data.response - def _delete_destination_bank_account_serialize( + def _get_counterparty_serialize( self, - bank_account_id, + counterparty_id, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -5094,8 +4970,8 @@ def _delete_destination_bank_account_serialize( _body_params: Optional[bytes] = None # process the path parameters - if bank_account_id is not None: - _path_params['bank_account_id'] = bank_account_id + if counterparty_id is not None: + _path_params['counterparty_id'] = counterparty_id # process the query parameters # process the header parameters # process the form parameters @@ -5108,8 +4984,8 @@ def _delete_destination_bank_account_serialize( } return self.api_client.param_serialize( - method='PUT', - resource_path='/payments/destination/bank_account/{bank_account_id}/delete', + method='GET', + resource_path='/payments/counterparty/{counterparty_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5119,9 +4995,10 @@ def _delete_destination_bank_account_serialize( ) @validate_call - def delete_destination_by_id( + def get_counterparty_entry( self, - destination_id: Annotated[StrictStr, Field(description="The destination ID.")], + counterparty_entry_id: Annotated[StrictStr, Field(description="The counterparty entry ID. For example, the wallet address ID.")], + entry_type: Annotated[Optional[EntryType], Field(description="The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5130,13 +5007,15 @@ def delete_destination_by_id( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> DeleteDestinationById200Response: - """Delete destination + ) -> GetCounterpartyEntry200Response: + """Get counterparty entry information - This operation deletes a destination. Note that this operation will delete all entries under the destination, including bank accounts and addresses. + This operation retrieves the detailed information about a specified counterparty entry. - :param destination_id: The destination ID. (required) - :type destination_id: str + :param counterparty_entry_id: The counterparty entry ID. For example, the wallet address ID. (required) + :type counterparty_entry_id: str + :param entry_type: The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. + :type entry_type: EntryType :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 @@ -5145,12 +5024,13 @@ def delete_destination_by_id( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_destination_by_id_serialize( - destination_id=destination_id, + _param = self._get_counterparty_entry_serialize( + counterparty_entry_id=counterparty_entry_id, + entry_type=entry_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteDestinationById200Response", + '200': "GetCounterpartyEntry200Response", '400': "ErrorResponse", '401': "ErrorResponse", '403': "ErrorResponse", @@ -5166,9 +5046,10 @@ def delete_destination_by_id( ).data @validate_call - def delete_destination_by_id_with_http_info( + def get_counterparty_entry_with_http_info( self, - destination_id: Annotated[StrictStr, Field(description="The destination ID.")], + counterparty_entry_id: Annotated[StrictStr, Field(description="The counterparty entry ID. For example, the wallet address ID.")], + entry_type: Annotated[Optional[EntryType], Field(description="The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5177,13 +5058,15 @@ def delete_destination_by_id_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[DeleteDestinationById200Response]: - """Delete destination + ) -> ApiResponse[GetCounterpartyEntry200Response]: + """Get counterparty entry information - This operation deletes a destination. Note that this operation will delete all entries under the destination, including bank accounts and addresses. + This operation retrieves the detailed information about a specified counterparty entry. - :param destination_id: The destination ID. (required) - :type destination_id: str + :param counterparty_entry_id: The counterparty entry ID. For example, the wallet address ID. (required) + :type counterparty_entry_id: str + :param entry_type: The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. + :type entry_type: EntryType :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 @@ -5192,12 +5075,13 @@ def delete_destination_by_id_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_destination_by_id_serialize( - destination_id=destination_id, + _param = self._get_counterparty_entry_serialize( + counterparty_entry_id=counterparty_entry_id, + entry_type=entry_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteDestinationById200Response", + '200': "GetCounterpartyEntry200Response", '400': "ErrorResponse", '401': "ErrorResponse", '403': "ErrorResponse", @@ -5213,9 +5097,10 @@ def delete_destination_by_id_with_http_info( ) @validate_call - def delete_destination_by_id_without_preload_content( + def get_counterparty_entry_without_preload_content( self, - destination_id: Annotated[StrictStr, Field(description="The destination ID.")], + counterparty_entry_id: Annotated[StrictStr, Field(description="The counterparty entry ID. For example, the wallet address ID.")], + entry_type: Annotated[Optional[EntryType], Field(description="The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5225,12 +5110,14 @@ def delete_destination_by_id_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Delete destination + """Get counterparty entry information - This operation deletes a destination. Note that this operation will delete all entries under the destination, including bank accounts and addresses. + This operation retrieves the detailed information about a specified counterparty entry. - :param destination_id: The destination ID. (required) - :type destination_id: str + :param counterparty_entry_id: The counterparty entry ID. For example, the wallet address ID. (required) + :type counterparty_entry_id: str + :param entry_type: The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. + :type entry_type: EntryType :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 @@ -5239,12 +5126,13 @@ def delete_destination_by_id_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_destination_by_id_serialize( - destination_id=destination_id, + _param = self._get_counterparty_entry_serialize( + counterparty_entry_id=counterparty_entry_id, + entry_type=entry_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteDestinationById200Response", + '200': "GetCounterpartyEntry200Response", '400': "ErrorResponse", '401': "ErrorResponse", '403': "ErrorResponse", @@ -5255,9 +5143,10 @@ def delete_destination_by_id_without_preload_content( ) return response_data.response - def _delete_destination_by_id_serialize( + def _get_counterparty_entry_serialize( self, - destination_id, + counterparty_entry_id, + entry_type, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -5266,9 +5155,13 @@ def _delete_destination_by_id_serialize( _body_params: Optional[bytes] = None # process the path parameters - if destination_id is not None: - _path_params['destination_id'] = destination_id + if counterparty_entry_id is not None: + _path_params['counterparty_entry_id'] = counterparty_entry_id # process the query parameters + if entry_type is not None: + + _query_params.append(('entry_type', entry_type.value)) + # process the header parameters # process the form parameters # process the body parameter @@ -5280,8 +5173,8 @@ def _delete_destination_by_id_serialize( } return self.api_client.param_serialize( - method='DELETE', - resource_path='/payments/destination/{destination_id}', + method='GET', + resource_path='/payments/counterparty_entry/{counterparty_entry_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5291,11 +5184,9 @@ def _delete_destination_by_id_serialize( ) @validate_call - def delete_destination_entry( + def get_destination( self, - destination_entry_id: Annotated[StrictStr, Field(description="The destination entry ID. For example, the wallet address ID or the bank account ID.")], destination_id: Annotated[StrictStr, Field(description="The destination ID.")], - entry_type: Annotated[EntryType, Field(description="EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5304,17 +5195,13 @@ def delete_destination_entry( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> DeleteDestinationEntry200Response: - """Delete destination entry + ) -> DestinationDetail: + """Get destination information - This operation deletes a destination entry. + This operation retrieves the detailed information about a specified destination. - :param destination_entry_id: The destination entry ID. For example, the wallet address ID or the bank account ID. (required) - :type destination_entry_id: str :param destination_id: The destination ID. (required) :type destination_id: str - :param entry_type: EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. (required) - :type entry_type: EntryType :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 @@ -5323,17 +5210,14 @@ def delete_destination_entry( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_destination_entry_serialize( - destination_entry_id=destination_entry_id, + _param = self._get_destination_serialize( destination_id=destination_id, - entry_type=entry_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteDestinationEntry200Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "DestinationDetail", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5346,11 +5230,9 @@ def delete_destination_entry( ).data @validate_call - def delete_destination_entry_with_http_info( + def get_destination_with_http_info( self, - destination_entry_id: Annotated[StrictStr, Field(description="The destination entry ID. For example, the wallet address ID or the bank account ID.")], destination_id: Annotated[StrictStr, Field(description="The destination ID.")], - entry_type: Annotated[EntryType, Field(description="EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5359,17 +5241,13 @@ def delete_destination_entry_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[DeleteDestinationEntry200Response]: - """Delete destination entry + ) -> ApiResponse[DestinationDetail]: + """Get destination information - This operation deletes a destination entry. + This operation retrieves the detailed information about a specified destination. - :param destination_entry_id: The destination entry ID. For example, the wallet address ID or the bank account ID. (required) - :type destination_entry_id: str :param destination_id: The destination ID. (required) :type destination_id: str - :param entry_type: EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. (required) - :type entry_type: EntryType :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 @@ -5378,17 +5256,14 @@ def delete_destination_entry_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_destination_entry_serialize( - destination_entry_id=destination_entry_id, + _param = self._get_destination_serialize( destination_id=destination_id, - entry_type=entry_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteDestinationEntry200Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "DestinationDetail", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5401,11 +5276,9 @@ def delete_destination_entry_with_http_info( ) @validate_call - def delete_destination_entry_without_preload_content( + def get_destination_without_preload_content( self, - destination_entry_id: Annotated[StrictStr, Field(description="The destination entry ID. For example, the wallet address ID or the bank account ID.")], destination_id: Annotated[StrictStr, Field(description="The destination ID.")], - entry_type: Annotated[EntryType, Field(description="EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5415,16 +5288,12 @@ def delete_destination_entry_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Delete destination entry + """Get destination information - This operation deletes a destination entry. + This operation retrieves the detailed information about a specified destination. - :param destination_entry_id: The destination entry ID. For example, the wallet address ID or the bank account ID. (required) - :type destination_entry_id: str :param destination_id: The destination ID. (required) :type destination_id: str - :param entry_type: EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. (required) - :type entry_type: EntryType :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 @@ -5433,17 +5302,14 @@ def delete_destination_entry_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_destination_entry_serialize( - destination_entry_id=destination_entry_id, + _param = self._get_destination_serialize( destination_id=destination_id, - entry_type=entry_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteDestinationEntry200Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "DestinationDetail", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -5451,11 +5317,9 @@ def delete_destination_entry_without_preload_content( ) return response_data.response - def _delete_destination_entry_serialize( + def _get_destination_serialize( self, - destination_entry_id, destination_id, - entry_type, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -5464,17 +5328,9 @@ def _delete_destination_entry_serialize( _body_params: Optional[bytes] = None # process the path parameters - if destination_entry_id is not None: - _path_params['destination_entry_id'] = destination_entry_id - # process the query parameters if destination_id is not None: - - _query_params.append(('destination_id', destination_id)) - - if entry_type is not None: - - _query_params.append(('entry_type', entry_type.value)) - + _path_params['destination_id'] = destination_id + # process the query parameters # process the header parameters # process the form parameters # process the body parameter @@ -5486,8 +5342,8 @@ def _delete_destination_entry_serialize( } return self.api_client.param_serialize( - method='DELETE', - resource_path='/payments/destination_entry/{destination_entry_id}', + method='GET', + resource_path='/payments/destination/{destination_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5497,9 +5353,10 @@ def _delete_destination_entry_serialize( ) @validate_call - def delete_destination_wallet_address( + def get_destination_entry( self, - wallet_address_id: Annotated[StrictStr, Field(description="The wallet address ID.")], + destination_entry_id: Annotated[StrictStr, Field(description="The destination entry ID. For example, the wallet address ID or the bank account ID.")], + entry_type: Annotated[EntryType, Field(description="EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5508,13 +5365,15 @@ def delete_destination_wallet_address( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> DeleteDestinationWalletAddress200Response: - """Delete destination wallet address + ) -> GetDestinationEntry200Response: + """Get destination entry information - This operation deletes a destination wallet address. + This operation retrieves the detailed information about a specified destination entry. - :param wallet_address_id: The wallet address ID. (required) - :type wallet_address_id: str + :param destination_entry_id: The destination entry ID. For example, the wallet address ID or the bank account ID. (required) + :type destination_entry_id: str + :param entry_type: EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. (required) + :type entry_type: EntryType :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 @@ -5523,12 +5382,13 @@ def delete_destination_wallet_address( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_destination_wallet_address_serialize( - wallet_address_id=wallet_address_id, + _param = self._get_destination_entry_serialize( + destination_entry_id=destination_entry_id, + entry_type=entry_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteDestinationWalletAddress200Response", + '200': "GetDestinationEntry200Response", '400': "ErrorResponse", '401': "ErrorResponse", '403': "ErrorResponse", @@ -5544,9 +5404,10 @@ def delete_destination_wallet_address( ).data @validate_call - def delete_destination_wallet_address_with_http_info( + def get_destination_entry_with_http_info( self, - wallet_address_id: Annotated[StrictStr, Field(description="The wallet address ID.")], + destination_entry_id: Annotated[StrictStr, Field(description="The destination entry ID. For example, the wallet address ID or the bank account ID.")], + entry_type: Annotated[EntryType, Field(description="EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5555,13 +5416,15 @@ def delete_destination_wallet_address_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[DeleteDestinationWalletAddress200Response]: - """Delete destination wallet address + ) -> ApiResponse[GetDestinationEntry200Response]: + """Get destination entry information - This operation deletes a destination wallet address. + This operation retrieves the detailed information about a specified destination entry. - :param wallet_address_id: The wallet address ID. (required) - :type wallet_address_id: str + :param destination_entry_id: The destination entry ID. For example, the wallet address ID or the bank account ID. (required) + :type destination_entry_id: str + :param entry_type: EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. (required) + :type entry_type: EntryType :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 @@ -5570,12 +5433,13 @@ def delete_destination_wallet_address_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_destination_wallet_address_serialize( - wallet_address_id=wallet_address_id, + _param = self._get_destination_entry_serialize( + destination_entry_id=destination_entry_id, + entry_type=entry_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteDestinationWalletAddress200Response", + '200': "GetDestinationEntry200Response", '400': "ErrorResponse", '401': "ErrorResponse", '403': "ErrorResponse", @@ -5591,9 +5455,10 @@ def delete_destination_wallet_address_with_http_info( ) @validate_call - def delete_destination_wallet_address_without_preload_content( + def get_destination_entry_without_preload_content( self, - wallet_address_id: Annotated[StrictStr, Field(description="The wallet address ID.")], + destination_entry_id: Annotated[StrictStr, Field(description="The destination entry ID. For example, the wallet address ID or the bank account ID.")], + entry_type: Annotated[EntryType, Field(description="EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5603,12 +5468,14 @@ def delete_destination_wallet_address_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Delete destination wallet address + """Get destination entry information - This operation deletes a destination wallet address. + This operation retrieves the detailed information about a specified destination entry. - :param wallet_address_id: The wallet address ID. (required) - :type wallet_address_id: str + :param destination_entry_id: The destination entry ID. For example, the wallet address ID or the bank account ID. (required) + :type destination_entry_id: str + :param entry_type: EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. (required) + :type entry_type: EntryType :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 @@ -5617,12 +5484,13 @@ def delete_destination_wallet_address_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_destination_wallet_address_serialize( - wallet_address_id=wallet_address_id, + _param = self._get_destination_entry_serialize( + destination_entry_id=destination_entry_id, + entry_type=entry_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeleteDestinationWalletAddress200Response", + '200': "GetDestinationEntry200Response", '400': "ErrorResponse", '401': "ErrorResponse", '403': "ErrorResponse", @@ -5633,9 +5501,10 @@ def delete_destination_wallet_address_without_preload_content( ) return response_data.response - def _delete_destination_wallet_address_serialize( + def _get_destination_entry_serialize( self, - wallet_address_id, + destination_entry_id, + entry_type, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -5644,9 +5513,13 @@ def _delete_destination_wallet_address_serialize( _body_params: Optional[bytes] = None # process the path parameters - if wallet_address_id is not None: - _path_params['wallet_address_id'] = wallet_address_id + if destination_entry_id is not None: + _path_params['destination_entry_id'] = destination_entry_id # process the query parameters + if entry_type is not None: + + _query_params.append(('entry_type', entry_type.value)) + # process the header parameters # process the form parameters # process the body parameter @@ -5658,8 +5531,8 @@ def _delete_destination_wallet_address_serialize( } return self.api_client.param_serialize( - method='PUT', - resource_path='/payments/destination/wallet_address/{wallet_address_id}/delete', + method='GET', + resource_path='/payments/destination_entry/{destination_entry_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5669,9 +5542,10 @@ def _delete_destination_wallet_address_serialize( ) @validate_call - def enable_destination_whitelist( + def get_exchange_rate( self, - enable_destination_whitelist_request: Annotated[Optional[EnableDestinationWhitelistRequest], Field(description="The request body to enable or disable the destination whitelist.")] = None, + 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` ")], + currency: Annotated[StrictStr, Field(description="The fiat currency. Currently, only `USD` is supported.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5680,13 +5554,15 @@ def enable_destination_whitelist( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> QueryDestinationWhitelistEnabled200Response: - """Enable or disable destination whitelist + ) -> GetExchangeRate200Response: + """Get exchange rate - This operation enables or disables the whitelist for a destination. + This operation retrieves the current exchange rate between a specified currency pair. The exchange rate is updated approximately every 10 minutes. This operation returns the exchange rate for reference only. The actual exchange rate may vary due to market fluctuations and other factors. - :param enable_destination_whitelist_request: The request body to enable or disable the destination whitelist. - :type enable_destination_whitelist_request: EnableDestinationWhitelistRequest + :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 currency: The fiat currency. Currently, only `USD` is supported. (required) + :type currency: 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 @@ -5695,12 +5571,13 @@ def enable_destination_whitelist( :return: Returns the result object. """ # noqa: E501 - _param = self._enable_destination_whitelist_serialize( - enable_destination_whitelist_request=enable_destination_whitelist_request, + _param = self._get_exchange_rate_serialize( + token_id=token_id, + currency=currency, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "QueryDestinationWhitelistEnabled200Response", + '200': "GetExchangeRate200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -5715,9 +5592,10 @@ def enable_destination_whitelist( ).data @validate_call - def enable_destination_whitelist_with_http_info( + def get_exchange_rate_with_http_info( self, - enable_destination_whitelist_request: Annotated[Optional[EnableDestinationWhitelistRequest], Field(description="The request body to enable or disable the destination whitelist.")] = None, + 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` ")], + currency: Annotated[StrictStr, Field(description="The fiat currency. Currently, only `USD` is supported.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5726,13 +5604,15 @@ def enable_destination_whitelist_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[QueryDestinationWhitelistEnabled200Response]: - """Enable or disable destination whitelist + ) -> ApiResponse[GetExchangeRate200Response]: + """Get exchange rate - This operation enables or disables the whitelist for a destination. + This operation retrieves the current exchange rate between a specified currency pair. The exchange rate is updated approximately every 10 minutes. This operation returns the exchange rate for reference only. The actual exchange rate may vary due to market fluctuations and other factors. - :param enable_destination_whitelist_request: The request body to enable or disable the destination whitelist. - :type enable_destination_whitelist_request: EnableDestinationWhitelistRequest + :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 currency: The fiat currency. Currently, only `USD` is supported. (required) + :type currency: 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 @@ -5741,12 +5621,13 @@ def enable_destination_whitelist_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._enable_destination_whitelist_serialize( - enable_destination_whitelist_request=enable_destination_whitelist_request, + _param = self._get_exchange_rate_serialize( + token_id=token_id, + currency=currency, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "QueryDestinationWhitelistEnabled200Response", + '200': "GetExchangeRate200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -5761,9 +5642,10 @@ def enable_destination_whitelist_with_http_info( ) @validate_call - def enable_destination_whitelist_without_preload_content( + def get_exchange_rate_without_preload_content( self, - enable_destination_whitelist_request: Annotated[Optional[EnableDestinationWhitelistRequest], Field(description="The request body to enable or disable the destination whitelist.")] = None, + 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` ")], + currency: Annotated[StrictStr, Field(description="The fiat currency. Currently, only `USD` is supported.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5773,12 +5655,14 @@ def enable_destination_whitelist_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Enable or disable destination whitelist + """Get exchange rate - This operation enables or disables the whitelist for a destination. + This operation retrieves the current exchange rate between a specified currency pair. The exchange rate is updated approximately every 10 minutes. This operation returns the exchange rate for reference only. The actual exchange rate may vary due to market fluctuations and other factors. - :param enable_destination_whitelist_request: The request body to enable or disable the destination whitelist. - :type enable_destination_whitelist_request: EnableDestinationWhitelistRequest + :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 currency: The fiat currency. Currently, only `USD` is supported. (required) + :type currency: 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 @@ -5787,12 +5671,13 @@ def enable_destination_whitelist_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._enable_destination_whitelist_serialize( - enable_destination_whitelist_request=enable_destination_whitelist_request, + _param = self._get_exchange_rate_serialize( + token_id=token_id, + currency=currency, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "QueryDestinationWhitelistEnabled200Response", + '200': "GetExchangeRate200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -5802,9 +5687,10 @@ def enable_destination_whitelist_without_preload_content( ) return response_data.response - def _enable_destination_whitelist_serialize( + def _get_exchange_rate_serialize( self, - enable_destination_whitelist_request, + token_id, + currency, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -5813,12 +5699,14 @@ def _enable_destination_whitelist_serialize( _body_params: Optional[bytes] = None # process the path parameters + if token_id is not None: + _path_params['token_id'] = token_id + if currency is not None: + _path_params['currency'] = currency # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if enable_destination_whitelist_request is not None: - _body_params = enable_destination_whitelist_request # set the HTTP header `Accept` _header_params = { @@ -5827,8 +5715,8 @@ def _enable_destination_whitelist_serialize( } return self.api_client.param_serialize( - method='POST', - resource_path='/payments/destination/enable_whitelist', + method='GET', + resource_path='/payments/exchange_rates/{token_id}/{currency}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5838,11 +5726,9 @@ def _enable_destination_whitelist_serialize( ) @validate_call - def get_available_allocation_amount( + def get_payment_order_detail_by_id( 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` ")], - source_account: Annotated[StrictStr, Field(description="The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. ")], - destination_account: Annotated[StrictStr, Field(description="The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. ")], + order_id: Annotated[StrictStr, Field(description="The pay-in order ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5851,17 +5737,13 @@ def get_available_allocation_amount( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> PaymentAllocationAmount: - """Get available allocation amount + ) -> Order: + """Get pay-in order information - This operation retrieves the available amount that can be allocated from a source account to a destination account. + This operation retrieves details of a specific pay-in order. - :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 source_account: The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. (required) - :type source_account: str - :param destination_account: The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. (required) - :type destination_account: str + :param order_id: The pay-in order ID. (required) + :type order_id: 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 @@ -5870,14 +5752,12 @@ def get_available_allocation_amount( :return: Returns the result object. """ # noqa: E501 - _param = self._get_available_allocation_amount_serialize( - token_id=token_id, - source_account=source_account, - destination_account=destination_account, + _param = self._get_payment_order_detail_by_id_serialize( + order_id=order_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PaymentAllocationAmount", + '200': "Order", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -5892,11 +5772,9 @@ def get_available_allocation_amount( ).data @validate_call - def get_available_allocation_amount_with_http_info( + def get_payment_order_detail_by_id_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` ")], - source_account: Annotated[StrictStr, Field(description="The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. ")], - destination_account: Annotated[StrictStr, Field(description="The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. ")], + order_id: Annotated[StrictStr, Field(description="The pay-in order ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5905,17 +5783,13 @@ def get_available_allocation_amount_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[PaymentAllocationAmount]: - """Get available allocation amount + ) -> ApiResponse[Order]: + """Get pay-in order information - This operation retrieves the available amount that can be allocated from a source account to a destination account. + This operation retrieves details of a specific pay-in order. - :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 source_account: The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. (required) - :type source_account: str - :param destination_account: The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. (required) - :type destination_account: str + :param order_id: The pay-in order ID. (required) + :type order_id: 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 @@ -5924,14 +5798,12 @@ def get_available_allocation_amount_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_available_allocation_amount_serialize( - token_id=token_id, - source_account=source_account, - destination_account=destination_account, + _param = self._get_payment_order_detail_by_id_serialize( + order_id=order_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PaymentAllocationAmount", + '200': "Order", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -5946,11 +5818,9 @@ def get_available_allocation_amount_with_http_info( ) @validate_call - def get_available_allocation_amount_without_preload_content( + def get_payment_order_detail_by_id_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` ")], - source_account: Annotated[StrictStr, Field(description="The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. ")], - destination_account: Annotated[StrictStr, Field(description="The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. ")], + order_id: Annotated[StrictStr, Field(description="The pay-in order ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5960,16 +5830,12 @@ def get_available_allocation_amount_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Get available allocation amount + """Get pay-in order information - This operation retrieves the available amount that can be allocated from a source account to a destination account. + This operation retrieves details of a specific pay-in order. - :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 source_account: The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. (required) - :type source_account: str - :param destination_account: The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. (required) - :type destination_account: str + :param order_id: The pay-in order ID. (required) + :type order_id: 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 @@ -5978,14 +5844,12 @@ def get_available_allocation_amount_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_available_allocation_amount_serialize( - token_id=token_id, - source_account=source_account, - destination_account=destination_account, + _param = self._get_payment_order_detail_by_id_serialize( + order_id=order_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PaymentAllocationAmount", + '200': "Order", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -5995,11 +5859,9 @@ def get_available_allocation_amount_without_preload_content( ) return response_data.response - def _get_available_allocation_amount_serialize( + def _get_payment_order_detail_by_id_serialize( self, - token_id, - source_account, - destination_account, + order_id, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -6008,19 +5870,9 @@ def _get_available_allocation_amount_serialize( _body_params: Optional[bytes] = None # process the path parameters + if order_id is not None: + _path_params['order_id'] = order_id # process the query parameters - if token_id is not None: - - _query_params.append(('token_id', token_id)) - - if source_account is not None: - - _query_params.append(('source_account', source_account)) - - if destination_account is not None: - - _query_params.append(('destination_account', destination_account)) - # process the header parameters # process the form parameters # process the body parameter @@ -6033,7 +5885,7 @@ def _get_available_allocation_amount_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/allocation_amount', + resource_path='/payments/orders/{order_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6043,9 +5895,9 @@ def _get_available_allocation_amount_serialize( ) @validate_call - def get_batch_allocation_by_id( + def get_payout_by_id( self, - batch_allocation_id: Annotated[StrictStr, Field(description="The batch allocation ID.")], + payout_id: Annotated[StrictStr, Field(description="The payout ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6054,13 +5906,13 @@ def get_batch_allocation_by_id( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> BatchAllocationDetail: - """Get batch allocation information + ) -> PaymentPayoutDetail: + """Get payout information - This operation retrieves the information of a batch allocation. + This operation retrieves the information of a specific payout. - :param batch_allocation_id: The batch allocation ID. (required) - :type batch_allocation_id: str + :param payout_id: The payout ID. (required) + :type payout_id: 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 @@ -6069,12 +5921,12 @@ def get_batch_allocation_by_id( :return: Returns the result object. """ # noqa: E501 - _param = self._get_batch_allocation_by_id_serialize( - batch_allocation_id=batch_allocation_id, + _param = self._get_payout_by_id_serialize( + payout_id=payout_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BatchAllocationDetail", + '200': "PaymentPayoutDetail", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -6089,9 +5941,9 @@ def get_batch_allocation_by_id( ).data @validate_call - def get_batch_allocation_by_id_with_http_info( + def get_payout_by_id_with_http_info( self, - batch_allocation_id: Annotated[StrictStr, Field(description="The batch allocation ID.")], + payout_id: Annotated[StrictStr, Field(description="The payout ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6100,13 +5952,13 @@ def get_batch_allocation_by_id_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[BatchAllocationDetail]: - """Get batch allocation information + ) -> ApiResponse[PaymentPayoutDetail]: + """Get payout information - This operation retrieves the information of a batch allocation. + This operation retrieves the information of a specific payout. - :param batch_allocation_id: The batch allocation ID. (required) - :type batch_allocation_id: str + :param payout_id: The payout ID. (required) + :type payout_id: 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 @@ -6115,12 +5967,12 @@ def get_batch_allocation_by_id_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_batch_allocation_by_id_serialize( - batch_allocation_id=batch_allocation_id, + _param = self._get_payout_by_id_serialize( + payout_id=payout_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BatchAllocationDetail", + '200': "PaymentPayoutDetail", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -6135,9 +5987,9 @@ def get_batch_allocation_by_id_with_http_info( ) @validate_call - def get_batch_allocation_by_id_without_preload_content( + def get_payout_by_id_without_preload_content( self, - batch_allocation_id: Annotated[StrictStr, Field(description="The batch allocation ID.")], + payout_id: Annotated[StrictStr, Field(description="The payout ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6147,12 +5999,12 @@ def get_batch_allocation_by_id_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Get batch allocation information + """Get payout information - This operation retrieves the information of a batch allocation. + This operation retrieves the information of a specific payout. - :param batch_allocation_id: The batch allocation ID. (required) - :type batch_allocation_id: str + :param payout_id: The payout ID. (required) + :type payout_id: 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 @@ -6161,12 +6013,12 @@ def get_batch_allocation_by_id_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_batch_allocation_by_id_serialize( - batch_allocation_id=batch_allocation_id, + _param = self._get_payout_by_id_serialize( + payout_id=payout_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BatchAllocationDetail", + '200': "PaymentPayoutDetail", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -6176,9 +6028,9 @@ def get_batch_allocation_by_id_without_preload_content( ) return response_data.response - def _get_batch_allocation_by_id_serialize( + def _get_payout_by_id_serialize( self, - batch_allocation_id, + payout_id, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -6187,8 +6039,8 @@ def _get_batch_allocation_by_id_serialize( _body_params: Optional[bytes] = None # process the path parameters - if batch_allocation_id is not None: - _path_params['batch_allocation_id'] = batch_allocation_id + if payout_id is not None: + _path_params['payout_id'] = payout_id # process the query parameters # process the header parameters # process the form parameters @@ -6202,7 +6054,7 @@ def _get_batch_allocation_by_id_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/batch_allocations/{batch_allocation_id}', + resource_path='/payments/payouts/{payout_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6212,9 +6064,9 @@ def _get_batch_allocation_by_id_serialize( ) @validate_call - def get_bulk_send_by_id( + def get_psp_balance( self, - bulk_send_id: Annotated[StrictStr, Field(description="The bulk send ID.")], + 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` ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6223,13 +6075,13 @@ def get_bulk_send_by_id( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> PaymentBulkSend: - """Get bulk send information + ) -> PspBalance: + """Get developer balance - This operation retrieves the information of a specific bulk send. + This operation retrieves the balance information for you as the developer. The balance information is grouped by token. For more information, please refer to [Accounts and fund allocation](https://www.cobo.com/payments/en/guides/amounts-and-balances). - :param bulk_send_id: The bulk send ID. (required) - :type bulk_send_id: str + :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 _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 @@ -6238,12 +6090,12 @@ def get_bulk_send_by_id( :return: Returns the result object. """ # noqa: E501 - _param = self._get_bulk_send_by_id_serialize( - bulk_send_id=bulk_send_id, + _param = self._get_psp_balance_serialize( + token_id=token_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PaymentBulkSend", + '200': "PspBalance", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -6258,9 +6110,9 @@ def get_bulk_send_by_id( ).data @validate_call - def get_bulk_send_by_id_with_http_info( + def get_psp_balance_with_http_info( self, - bulk_send_id: Annotated[StrictStr, Field(description="The bulk send ID.")], + 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` ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6269,13 +6121,13 @@ def get_bulk_send_by_id_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[PaymentBulkSend]: - """Get bulk send information + ) -> ApiResponse[PspBalance]: + """Get developer balance - This operation retrieves the information of a specific bulk send. + This operation retrieves the balance information for you as the developer. The balance information is grouped by token. For more information, please refer to [Accounts and fund allocation](https://www.cobo.com/payments/en/guides/amounts-and-balances). - :param bulk_send_id: The bulk send ID. (required) - :type bulk_send_id: str + :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 _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 @@ -6284,12 +6136,12 @@ def get_bulk_send_by_id_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_bulk_send_by_id_serialize( - bulk_send_id=bulk_send_id, + _param = self._get_psp_balance_serialize( + token_id=token_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PaymentBulkSend", + '200': "PspBalance", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -6304,9 +6156,9 @@ def get_bulk_send_by_id_with_http_info( ) @validate_call - def get_bulk_send_by_id_without_preload_content( + def get_psp_balance_without_preload_content( self, - bulk_send_id: Annotated[StrictStr, Field(description="The bulk send ID.")], + 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` ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6316,12 +6168,12 @@ def get_bulk_send_by_id_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Get bulk send information + """Get developer balance - This operation retrieves the information of a specific bulk send. + This operation retrieves the balance information for you as the developer. The balance information is grouped by token. For more information, please refer to [Accounts and fund allocation](https://www.cobo.com/payments/en/guides/amounts-and-balances). - :param bulk_send_id: The bulk send ID. (required) - :type bulk_send_id: str + :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 _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 @@ -6330,12 +6182,12 @@ def get_bulk_send_by_id_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_bulk_send_by_id_serialize( - bulk_send_id=bulk_send_id, + _param = self._get_psp_balance_serialize( + token_id=token_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PaymentBulkSend", + '200': "PspBalance", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -6345,9 +6197,9 @@ def get_bulk_send_by_id_without_preload_content( ) return response_data.response - def _get_bulk_send_by_id_serialize( + def _get_psp_balance_serialize( self, - bulk_send_id, + token_id, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -6356,9 +6208,11 @@ def _get_bulk_send_by_id_serialize( _body_params: Optional[bytes] = None # process the path parameters - if bulk_send_id is not None: - _path_params['bulk_send_id'] = bulk_send_id # process the query parameters + if token_id is not None: + + _query_params.append(('token_id', token_id)) + # process the header parameters # process the form parameters # process the body parameter @@ -6371,7 +6225,7 @@ def _get_bulk_send_by_id_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/bulk_sends/{bulk_send_id}', + resource_path='/payments/balance/psp', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6381,9 +6235,9 @@ def _get_bulk_send_by_id_serialize( ) @validate_call - def get_counterparty( + def get_refund_detail_by_id( self, - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], + refund_id: Annotated[StrictStr, Field(description="The refund order ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6392,13 +6246,13 @@ def get_counterparty( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> CounterpartyDetail: - """Get counterparty information + ) -> Refund: + """Get refund order information - This operation retrieves the detailed information about a specified counterparty. + This operation retrieves the detailed information about a specified refund order. - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: str + :param refund_id: The refund order ID. (required) + :type refund_id: 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 @@ -6407,12 +6261,12 @@ def get_counterparty( :return: Returns the result object. """ # noqa: E501 - _param = self._get_counterparty_serialize( - counterparty_id=counterparty_id, + _param = self._get_refund_detail_by_id_serialize( + refund_id=refund_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CounterpartyDetail", + '200': "Refund", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -6427,9 +6281,9 @@ def get_counterparty( ).data @validate_call - def get_counterparty_with_http_info( + def get_refund_detail_by_id_with_http_info( self, - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], + refund_id: Annotated[StrictStr, Field(description="The refund order ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6438,13 +6292,13 @@ def get_counterparty_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[CounterpartyDetail]: - """Get counterparty information + ) -> ApiResponse[Refund]: + """Get refund order information - This operation retrieves the detailed information about a specified counterparty. + This operation retrieves the detailed information about a specified refund order. - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: str + :param refund_id: The refund order ID. (required) + :type refund_id: 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 @@ -6453,12 +6307,12 @@ def get_counterparty_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_counterparty_serialize( - counterparty_id=counterparty_id, + _param = self._get_refund_detail_by_id_serialize( + refund_id=refund_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CounterpartyDetail", + '200': "Refund", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -6473,9 +6327,9 @@ def get_counterparty_with_http_info( ) @validate_call - def get_counterparty_without_preload_content( + def get_refund_detail_by_id_without_preload_content( self, - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], + refund_id: Annotated[StrictStr, Field(description="The refund order ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6485,12 +6339,12 @@ def get_counterparty_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Get counterparty information + """Get refund order information - This operation retrieves the detailed information about a specified counterparty. + This operation retrieves the detailed information about a specified refund order. - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: str + :param refund_id: The refund order ID. (required) + :type refund_id: 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 @@ -6499,12 +6353,12 @@ def get_counterparty_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_counterparty_serialize( - counterparty_id=counterparty_id, + _param = self._get_refund_detail_by_id_serialize( + refund_id=refund_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CounterpartyDetail", + '200': "Refund", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -6514,9 +6368,9 @@ def get_counterparty_without_preload_content( ) return response_data.response - def _get_counterparty_serialize( + def _get_refund_detail_by_id_serialize( self, - counterparty_id, + refund_id, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -6525,8 +6379,8 @@ def _get_counterparty_serialize( _body_params: Optional[bytes] = None # process the path parameters - if counterparty_id is not None: - _path_params['counterparty_id'] = counterparty_id + if refund_id is not None: + _path_params['refund_id'] = refund_id # process the query parameters # process the header parameters # process the form parameters @@ -6540,7 +6394,7 @@ def _get_counterparty_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/counterparty/{counterparty_id}', + resource_path='/payments/refunds/{refund_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6550,9 +6404,14 @@ def _get_counterparty_serialize( ) @validate_call - def get_counterparty_detail_by_id( + def get_refunds( self, - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], + 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, + merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, + statuses: Annotated[Optional[StrictStr], Field(description="A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6561,13 +6420,23 @@ def get_counterparty_detail_by_id( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> CounterpartyDetail: - """Get counterparty information (Deprecated) + ) -> GetRefunds200Response: + """List all refund orders - This operation retrieves the detailed information about a specified counterparty. + This operation retrieves the information of all refund orders. - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: 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 merchant_id: The merchant ID. + :type merchant_id: str + :param request_id: The request ID. + :type request_id: str + :param statuses: A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) + :type statuses: 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 @@ -6576,12 +6445,17 @@ def get_counterparty_detail_by_id( :return: Returns the result object. """ # noqa: E501 - _param = self._get_counterparty_detail_by_id_serialize( - counterparty_id=counterparty_id, + _param = self._get_refunds_serialize( + limit=limit, + before=before, + after=after, + merchant_id=merchant_id, + request_id=request_id, + statuses=statuses, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CounterpartyDetail", + '200': "GetRefunds200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -6596,9 +6470,14 @@ def get_counterparty_detail_by_id( ).data @validate_call - def get_counterparty_detail_by_id_with_http_info( + def get_refunds_with_http_info( self, - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], + 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, + merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, + statuses: Annotated[Optional[StrictStr], Field(description="A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6607,13 +6486,23 @@ def get_counterparty_detail_by_id_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[CounterpartyDetail]: - """Get counterparty information (Deprecated) + ) -> ApiResponse[GetRefunds200Response]: + """List all refund orders - This operation retrieves the detailed information about a specified counterparty. + This operation retrieves the information of all refund orders. - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: 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 merchant_id: The merchant ID. + :type merchant_id: str + :param request_id: The request ID. + :type request_id: str + :param statuses: A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) + :type statuses: 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 @@ -6622,12 +6511,17 @@ def get_counterparty_detail_by_id_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_counterparty_detail_by_id_serialize( - counterparty_id=counterparty_id, + _param = self._get_refunds_serialize( + limit=limit, + before=before, + after=after, + merchant_id=merchant_id, + request_id=request_id, + statuses=statuses, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CounterpartyDetail", + '200': "GetRefunds200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -6642,9 +6536,14 @@ def get_counterparty_detail_by_id_with_http_info( ) @validate_call - def get_counterparty_detail_by_id_without_preload_content( + def get_refunds_without_preload_content( self, - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], + 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, + merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, + statuses: Annotated[Optional[StrictStr], Field(description="A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6654,12 +6553,22 @@ def get_counterparty_detail_by_id_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Get counterparty information (Deprecated) + """List all refund orders - This operation retrieves the detailed information about a specified counterparty. + This operation retrieves the information of all refund orders. - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: 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 merchant_id: The merchant ID. + :type merchant_id: str + :param request_id: The request ID. + :type request_id: str + :param statuses: A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) + :type statuses: 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 @@ -6668,12 +6577,17 @@ def get_counterparty_detail_by_id_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_counterparty_detail_by_id_serialize( - counterparty_id=counterparty_id, + _param = self._get_refunds_serialize( + limit=limit, + before=before, + after=after, + merchant_id=merchant_id, + request_id=request_id, + statuses=statuses, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CounterpartyDetail", + '200': "GetRefunds200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -6683,9 +6597,14 @@ def get_counterparty_detail_by_id_without_preload_content( ) return response_data.response - def _get_counterparty_detail_by_id_serialize( + def _get_refunds_serialize( self, - counterparty_id, + limit, + before, + after, + merchant_id, + request_id, + statuses, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -6694,9 +6613,31 @@ def _get_counterparty_detail_by_id_serialize( _body_params: Optional[bytes] = None # process the path parameters - if counterparty_id is not None: - _path_params['counterparty_id'] = counterparty_id # process the query parameters + 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)) + + if merchant_id is not None: + + _query_params.append(('merchant_id', merchant_id)) + + if request_id is not None: + + _query_params.append(('request_id', request_id)) + + if statuses is not None: + + _query_params.append(('statuses', statuses)) + # process the header parameters # process the form parameters # process the body parameter @@ -6709,7 +6650,7 @@ def _get_counterparty_detail_by_id_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/counterparty/{counterparty_id}/detail', + resource_path='/payments/refunds', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6719,10 +6660,13 @@ def _get_counterparty_detail_by_id_serialize( ) @validate_call - def get_counterparty_entry( + def get_reports( self, - counterparty_entry_id: Annotated[StrictStr, Field(description="The counterparty entry ID. For example, the wallet address ID.")], - entry_type: Annotated[Optional[EntryType], Field(description="The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")] = 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, + report_type: Annotated[Optional[ReportType], Field(description="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. ")] = None, + report_status: Annotated[Optional[ReportStatus], Field(description="The status of the report. - `Completed`: The report has been generated successfully. - `Failed`: The report could not be generated. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6731,15 +6675,21 @@ def get_counterparty_entry( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> GetCounterpartyEntry200Response: - """Get counterparty entry information - - This operation retrieves the detailed information about a specified counterparty entry. + ) -> GetReports200Response: + """List all reports - :param counterparty_entry_id: The counterparty entry ID. For example, the wallet address ID. (required) - :type counterparty_entry_id: str - :param entry_type: The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. - :type entry_type: EntryType + This operation retrieves the information of all reports. + + :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 report_type: 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. + :type report_type: ReportType + :param report_status: The status of the report. - `Completed`: The report has been generated successfully. - `Failed`: The report could not be generated. + :type report_status: ReportStatus :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 @@ -6748,16 +6698,18 @@ def get_counterparty_entry( :return: Returns the result object. """ # noqa: E501 - _param = self._get_counterparty_entry_serialize( - counterparty_entry_id=counterparty_entry_id, - entry_type=entry_type, + _param = self._get_reports_serialize( + limit=limit, + before=before, + after=after, + report_type=report_type, + report_status=report_status, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetCounterpartyEntry200Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "GetReports200Response", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6770,10 +6722,13 @@ def get_counterparty_entry( ).data @validate_call - def get_counterparty_entry_with_http_info( + def get_reports_with_http_info( self, - counterparty_entry_id: Annotated[StrictStr, Field(description="The counterparty entry ID. For example, the wallet address ID.")], - entry_type: Annotated[Optional[EntryType], Field(description="The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")] = 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, + report_type: Annotated[Optional[ReportType], Field(description="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. ")] = None, + report_status: Annotated[Optional[ReportStatus], Field(description="The status of the report. - `Completed`: The report has been generated successfully. - `Failed`: The report could not be generated. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6782,15 +6737,21 @@ def get_counterparty_entry_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[GetCounterpartyEntry200Response]: - """Get counterparty entry information + ) -> ApiResponse[GetReports200Response]: + """List all reports - This operation retrieves the detailed information about a specified counterparty entry. + This operation retrieves the information of all reports. - :param counterparty_entry_id: The counterparty entry ID. For example, the wallet address ID. (required) - :type counterparty_entry_id: str - :param entry_type: The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. - :type entry_type: EntryType + :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 report_type: 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. + :type report_type: ReportType + :param report_status: The status of the report. - `Completed`: The report has been generated successfully. - `Failed`: The report could not be generated. + :type report_status: ReportStatus :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 @@ -6799,16 +6760,18 @@ def get_counterparty_entry_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_counterparty_entry_serialize( - counterparty_entry_id=counterparty_entry_id, - entry_type=entry_type, + _param = self._get_reports_serialize( + limit=limit, + before=before, + after=after, + report_type=report_type, + report_status=report_status, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetCounterpartyEntry200Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "GetReports200Response", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6821,10 +6784,13 @@ def get_counterparty_entry_with_http_info( ) @validate_call - def get_counterparty_entry_without_preload_content( + def get_reports_without_preload_content( self, - counterparty_entry_id: Annotated[StrictStr, Field(description="The counterparty entry ID. For example, the wallet address ID.")], - entry_type: Annotated[Optional[EntryType], Field(description="The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")] = 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, + report_type: Annotated[Optional[ReportType], Field(description="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. ")] = None, + report_status: Annotated[Optional[ReportStatus], Field(description="The status of the report. - `Completed`: The report has been generated successfully. - `Failed`: The report could not be generated. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6834,14 +6800,20 @@ def get_counterparty_entry_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Get counterparty entry information + """List all reports - This operation retrieves the detailed information about a specified counterparty entry. + This operation retrieves the information of all reports. - :param counterparty_entry_id: The counterparty entry ID. For example, the wallet address ID. (required) - :type counterparty_entry_id: str - :param entry_type: The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. - :type entry_type: EntryType + :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 report_type: 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. + :type report_type: ReportType + :param report_status: The status of the report. - `Completed`: The report has been generated successfully. - `Failed`: The report could not be generated. + :type report_status: ReportStatus :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 @@ -6850,16 +6822,18 @@ def get_counterparty_entry_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_counterparty_entry_serialize( - counterparty_entry_id=counterparty_entry_id, - entry_type=entry_type, + _param = self._get_reports_serialize( + limit=limit, + before=before, + after=after, + report_type=report_type, + report_status=report_status, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetCounterpartyEntry200Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "GetReports200Response", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -6867,10 +6841,13 @@ def get_counterparty_entry_without_preload_content( ) return response_data.response - def _get_counterparty_entry_serialize( + def _get_reports_serialize( self, - counterparty_entry_id, - entry_type, + limit, + before, + after, + report_type, + report_status, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -6879,12 +6856,26 @@ def _get_counterparty_entry_serialize( _body_params: Optional[bytes] = None # process the path parameters - if counterparty_entry_id is not None: - _path_params['counterparty_entry_id'] = counterparty_entry_id # process the query parameters - if entry_type is not None: + if limit is not None: - _query_params.append(('entry_type', entry_type.value)) + _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)) + + if report_type is not None: + + _query_params.append(('report_type', report_type.value)) + + if report_status is not None: + + _query_params.append(('report_status', report_status.value)) # process the header parameters # process the form parameters @@ -6898,7 +6889,7 @@ def _get_counterparty_entry_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/counterparty_entry/{counterparty_entry_id}', + resource_path='/payments/reports', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6908,9 +6899,9 @@ def _get_counterparty_entry_serialize( ) @validate_call - def get_destination( + def get_settlement_by_id( self, - destination_id: Annotated[StrictStr, Field(description="The destination ID.")], + settlement_request_id: Annotated[StrictStr, Field(description="The settlement request ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6919,13 +6910,13 @@ def get_destination( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> DestinationDetail: - """Get destination information + ) -> Settlement: + """Get settlement request information - This operation retrieves the detailed information about a specified destination. + This operation has been deprecated. Please use [Get payout information](https://www.cobo.com/payments/en/api-references/payment/get-payout-information) instead. This operation retrieves the information of a specific settlement request. - :param destination_id: The destination ID. (required) - :type destination_id: str + :param settlement_request_id: The settlement request ID. (required) + :type settlement_request_id: 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 @@ -6934,12 +6925,12 @@ def get_destination( :return: Returns the result object. """ # noqa: E501 - _param = self._get_destination_serialize( - destination_id=destination_id, + _param = self._get_settlement_by_id_serialize( + settlement_request_id=settlement_request_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DestinationDetail", + '200': "Settlement", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -6954,9 +6945,9 @@ def get_destination( ).data @validate_call - def get_destination_with_http_info( + def get_settlement_by_id_with_http_info( self, - destination_id: Annotated[StrictStr, Field(description="The destination ID.")], + settlement_request_id: Annotated[StrictStr, Field(description="The settlement request ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6965,13 +6956,13 @@ def get_destination_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[DestinationDetail]: - """Get destination information + ) -> ApiResponse[Settlement]: + """Get settlement request information - This operation retrieves the detailed information about a specified destination. + This operation has been deprecated. Please use [Get payout information](https://www.cobo.com/payments/en/api-references/payment/get-payout-information) instead. This operation retrieves the information of a specific settlement request. - :param destination_id: The destination ID. (required) - :type destination_id: str + :param settlement_request_id: The settlement request ID. (required) + :type settlement_request_id: 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 @@ -6980,12 +6971,12 @@ def get_destination_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_destination_serialize( - destination_id=destination_id, + _param = self._get_settlement_by_id_serialize( + settlement_request_id=settlement_request_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DestinationDetail", + '200': "Settlement", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -7000,9 +6991,9 @@ def get_destination_with_http_info( ) @validate_call - def get_destination_without_preload_content( + def get_settlement_by_id_without_preload_content( self, - destination_id: Annotated[StrictStr, Field(description="The destination ID.")], + settlement_request_id: Annotated[StrictStr, Field(description="The settlement request ID.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7012,12 +7003,12 @@ def get_destination_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Get destination information + """Get settlement request information - This operation retrieves the detailed information about a specified destination. + This operation has been deprecated. Please use [Get payout information](https://www.cobo.com/payments/en/api-references/payment/get-payout-information) instead. This operation retrieves the information of a specific settlement request. - :param destination_id: The destination ID. (required) - :type destination_id: str + :param settlement_request_id: The settlement request ID. (required) + :type settlement_request_id: 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 @@ -7026,12 +7017,12 @@ def get_destination_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_destination_serialize( - destination_id=destination_id, + _param = self._get_settlement_by_id_serialize( + settlement_request_id=settlement_request_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DestinationDetail", + '200': "Settlement", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -7041,9 +7032,9 @@ def get_destination_without_preload_content( ) return response_data.response - def _get_destination_serialize( + def _get_settlement_by_id_serialize( self, - destination_id, + settlement_request_id, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -7052,8 +7043,8 @@ def _get_destination_serialize( _body_params: Optional[bytes] = None # process the path parameters - if destination_id is not None: - _path_params['destination_id'] = destination_id + if settlement_request_id is not None: + _path_params['settlement_request_id'] = settlement_request_id # process the query parameters # process the header parameters # process the form parameters @@ -7067,7 +7058,7 @@ def _get_destination_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/destination/{destination_id}', + resource_path='/payments/settlement_requests/{settlement_request_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7077,9 +7068,11 @@ def _get_destination_serialize( ) @validate_call - def get_destination_bank_account_detail_by_id( + def get_settlement_info_by_ids( self, - bank_account_id: Annotated[StrictStr, Field(description="The bank account ID.")], + merchant_ids: Annotated[Optional[StrictStr], Field(description="A list of merchant IDs to query.")] = None, + currency: Annotated[Optional[StrictStr], Field(description="The currency for the operation. Currently, only `USD` is supported.")] = None, + acquiring_type: Annotated[Optional[AcquiringType], Field(description="This parameter has been deprecated")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7088,13 +7081,17 @@ def get_destination_bank_account_detail_by_id( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> DestinationBankAccountDetail: - """Get destination bank account information + ) -> GetSettlementInfoByIds200Response: + """Get withdrawable balances - This operation retrieves the detailed information about a specified destination bank account. + This operation has been deprecated. This operation retrieves the balances of specified merchants or the developer. - :param bank_account_id: The bank account ID. (required) - :type bank_account_id: str + :param merchant_ids: A list of merchant IDs to query. + :type merchant_ids: str + :param currency: The currency for the operation. Currently, only `USD` is supported. + :type currency: str + :param acquiring_type: This parameter has been deprecated + :type acquiring_type: AcquiringType :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 @@ -7103,12 +7100,14 @@ def get_destination_bank_account_detail_by_id( :return: Returns the result object. """ # noqa: E501 - _param = self._get_destination_bank_account_detail_by_id_serialize( - bank_account_id=bank_account_id, + _param = self._get_settlement_info_by_ids_serialize( + merchant_ids=merchant_ids, + currency=currency, + acquiring_type=acquiring_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DestinationBankAccountDetail", + '200': "GetSettlementInfoByIds200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -7123,9 +7122,11 @@ def get_destination_bank_account_detail_by_id( ).data @validate_call - def get_destination_bank_account_detail_by_id_with_http_info( + def get_settlement_info_by_ids_with_http_info( self, - bank_account_id: Annotated[StrictStr, Field(description="The bank account ID.")], + merchant_ids: Annotated[Optional[StrictStr], Field(description="A list of merchant IDs to query.")] = None, + currency: Annotated[Optional[StrictStr], Field(description="The currency for the operation. Currently, only `USD` is supported.")] = None, + acquiring_type: Annotated[Optional[AcquiringType], Field(description="This parameter has been deprecated")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7134,13 +7135,17 @@ def get_destination_bank_account_detail_by_id_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[DestinationBankAccountDetail]: - """Get destination bank account information + ) -> ApiResponse[GetSettlementInfoByIds200Response]: + """Get withdrawable balances - This operation retrieves the detailed information about a specified destination bank account. + This operation has been deprecated. This operation retrieves the balances of specified merchants or the developer. - :param bank_account_id: The bank account ID. (required) - :type bank_account_id: str + :param merchant_ids: A list of merchant IDs to query. + :type merchant_ids: str + :param currency: The currency for the operation. Currently, only `USD` is supported. + :type currency: str + :param acquiring_type: This parameter has been deprecated + :type acquiring_type: AcquiringType :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 @@ -7149,12 +7154,14 @@ def get_destination_bank_account_detail_by_id_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_destination_bank_account_detail_by_id_serialize( - bank_account_id=bank_account_id, + _param = self._get_settlement_info_by_ids_serialize( + merchant_ids=merchant_ids, + currency=currency, + acquiring_type=acquiring_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DestinationBankAccountDetail", + '200': "GetSettlementInfoByIds200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -7169,9 +7176,11 @@ def get_destination_bank_account_detail_by_id_with_http_info( ) @validate_call - def get_destination_bank_account_detail_by_id_without_preload_content( + def get_settlement_info_by_ids_without_preload_content( self, - bank_account_id: Annotated[StrictStr, Field(description="The bank account ID.")], + merchant_ids: Annotated[Optional[StrictStr], Field(description="A list of merchant IDs to query.")] = None, + currency: Annotated[Optional[StrictStr], Field(description="The currency for the operation. Currently, only `USD` is supported.")] = None, + acquiring_type: Annotated[Optional[AcquiringType], Field(description="This parameter has been deprecated")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7181,12 +7190,16 @@ def get_destination_bank_account_detail_by_id_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Get destination bank account information + """Get withdrawable balances - This operation retrieves the detailed information about a specified destination bank account. + This operation has been deprecated. This operation retrieves the balances of specified merchants or the developer. - :param bank_account_id: The bank account ID. (required) - :type bank_account_id: str + :param merchant_ids: A list of merchant IDs to query. + :type merchant_ids: str + :param currency: The currency for the operation. Currently, only `USD` is supported. + :type currency: str + :param acquiring_type: This parameter has been deprecated + :type acquiring_type: AcquiringType :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 @@ -7195,12 +7208,14 @@ def get_destination_bank_account_detail_by_id_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_destination_bank_account_detail_by_id_serialize( - bank_account_id=bank_account_id, + _param = self._get_settlement_info_by_ids_serialize( + merchant_ids=merchant_ids, + currency=currency, + acquiring_type=acquiring_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DestinationBankAccountDetail", + '200': "GetSettlementInfoByIds200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -7210,9 +7225,11 @@ def get_destination_bank_account_detail_by_id_without_preload_content( ) return response_data.response - def _get_destination_bank_account_detail_by_id_serialize( + def _get_settlement_info_by_ids_serialize( self, - bank_account_id, + merchant_ids, + currency, + acquiring_type, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -7221,9 +7238,19 @@ def _get_destination_bank_account_detail_by_id_serialize( _body_params: Optional[bytes] = None # process the path parameters - if bank_account_id is not None: - _path_params['bank_account_id'] = bank_account_id # process the query parameters + if merchant_ids is not None: + + _query_params.append(('merchant_ids', merchant_ids)) + + if currency is not None: + + _query_params.append(('currency', currency)) + + if acquiring_type is not None: + + _query_params.append(('acquiring_type', acquiring_type.value)) + # process the header parameters # process the form parameters # process the body parameter @@ -7236,7 +7263,7 @@ def _get_destination_bank_account_detail_by_id_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/destination/bank_account/{bank_account_id}/detail', + resource_path='/payments/settlement_info', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7246,9 +7273,11 @@ def _get_destination_bank_account_detail_by_id_serialize( ) @validate_call - def get_destination_detail_by_id( + def get_top_up_address( self, - destination_id: Annotated[StrictStr, Field(description="The destination ID.")], + 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` ")], + custom_payer_id: Annotated[StrictStr, Field(description="A unique identifier to track and identify individual payers in your system.")], + merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7257,13 +7286,17 @@ def get_destination_detail_by_id( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> DestinationDetail: - """Get destination information (Deprecated) + ) -> TopUpAddress: + """Create/Get top-up address - This operation retrieves the detailed information about a specified destination. + This operation creates or retrieves a unique top-up address for a payer. In the request, you need to provide the `custom_payer_id` parameter to identify the payer in your system and link them to the top-up address. - If no address exists for the payer on the specified chain, a new address will be created and returned. - If an address already exists for the payer on the specified chain, the existing address details will be returned. You can also provide the `merchant_id` parameter to specify the merchant to which the payer belongs. If not provided, the default merchant will be used. - :param destination_id: The destination ID. (required) - :type destination_id: str + :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 custom_payer_id: A unique identifier to track and identify individual payers in your system. (required) + :type custom_payer_id: str + :param merchant_id: The merchant ID. + :type merchant_id: 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 @@ -7272,12 +7305,14 @@ def get_destination_detail_by_id( :return: Returns the result object. """ # noqa: E501 - _param = self._get_destination_detail_by_id_serialize( - destination_id=destination_id, + _param = self._get_top_up_address_serialize( + token_id=token_id, + custom_payer_id=custom_payer_id, + merchant_id=merchant_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DestinationDetail", + '200': "TopUpAddress", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -7292,9 +7327,11 @@ def get_destination_detail_by_id( ).data @validate_call - def get_destination_detail_by_id_with_http_info( + def get_top_up_address_with_http_info( self, - destination_id: Annotated[StrictStr, Field(description="The destination ID.")], + 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` ")], + custom_payer_id: Annotated[StrictStr, Field(description="A unique identifier to track and identify individual payers in your system.")], + merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7303,13 +7340,17 @@ def get_destination_detail_by_id_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[DestinationDetail]: - """Get destination information (Deprecated) + ) -> ApiResponse[TopUpAddress]: + """Create/Get top-up address - This operation retrieves the detailed information about a specified destination. + This operation creates or retrieves a unique top-up address for a payer. In the request, you need to provide the `custom_payer_id` parameter to identify the payer in your system and link them to the top-up address. - If no address exists for the payer on the specified chain, a new address will be created and returned. - If an address already exists for the payer on the specified chain, the existing address details will be returned. You can also provide the `merchant_id` parameter to specify the merchant to which the payer belongs. If not provided, the default merchant will be used. - :param destination_id: The destination ID. (required) - :type destination_id: str + :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 custom_payer_id: A unique identifier to track and identify individual payers in your system. (required) + :type custom_payer_id: str + :param merchant_id: The merchant ID. + :type merchant_id: 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 @@ -7318,12 +7359,14 @@ def get_destination_detail_by_id_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_destination_detail_by_id_serialize( - destination_id=destination_id, + _param = self._get_top_up_address_serialize( + token_id=token_id, + custom_payer_id=custom_payer_id, + merchant_id=merchant_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DestinationDetail", + '200': "TopUpAddress", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -7338,9 +7381,11 @@ def get_destination_detail_by_id_with_http_info( ) @validate_call - def get_destination_detail_by_id_without_preload_content( + def get_top_up_address_without_preload_content( self, - destination_id: Annotated[StrictStr, Field(description="The destination ID.")], + 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` ")], + custom_payer_id: Annotated[StrictStr, Field(description="A unique identifier to track and identify individual payers in your system.")], + merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7350,12 +7395,16 @@ def get_destination_detail_by_id_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Get destination information (Deprecated) + """Create/Get top-up address - This operation retrieves the detailed information about a specified destination. + This operation creates or retrieves a unique top-up address for a payer. In the request, you need to provide the `custom_payer_id` parameter to identify the payer in your system and link them to the top-up address. - If no address exists for the payer on the specified chain, a new address will be created and returned. - If an address already exists for the payer on the specified chain, the existing address details will be returned. You can also provide the `merchant_id` parameter to specify the merchant to which the payer belongs. If not provided, the default merchant will be used. - :param destination_id: The destination ID. (required) - :type destination_id: str + :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 custom_payer_id: A unique identifier to track and identify individual payers in your system. (required) + :type custom_payer_id: str + :param merchant_id: The merchant ID. + :type merchant_id: 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 @@ -7364,12 +7413,14 @@ def get_destination_detail_by_id_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_destination_detail_by_id_serialize( - destination_id=destination_id, + _param = self._get_top_up_address_serialize( + token_id=token_id, + custom_payer_id=custom_payer_id, + merchant_id=merchant_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DestinationDetail", + '200': "TopUpAddress", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -7379,9 +7430,11 @@ def get_destination_detail_by_id_without_preload_content( ) return response_data.response - def _get_destination_detail_by_id_serialize( + def _get_top_up_address_serialize( self, - destination_id, + token_id, + custom_payer_id, + merchant_id, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -7390,9 +7443,19 @@ def _get_destination_detail_by_id_serialize( _body_params: Optional[bytes] = None # process the path parameters - if destination_id is not None: - _path_params['destination_id'] = destination_id # process the query parameters + if token_id is not None: + + _query_params.append(('token_id', token_id)) + + if custom_payer_id is not None: + + _query_params.append(('custom_payer_id', custom_payer_id)) + + if merchant_id is not None: + + _query_params.append(('merchant_id', merchant_id)) + # process the header parameters # process the form parameters # process the body parameter @@ -7405,7 +7468,7 @@ def _get_destination_detail_by_id_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/destination/{destination_id}/detail', + resource_path='/payments/topup/address', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7415,10 +7478,15 @@ def _get_destination_detail_by_id_serialize( ) @validate_call - def get_destination_entry( + def list_allocation_items( self, - destination_entry_id: Annotated[StrictStr, Field(description="The destination entry ID. For example, the wallet address ID or the bank account ID.")], - entry_type: Annotated[EntryType, Field(description="EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")], + 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, + source_account: Annotated[Optional[StrictStr], Field(description="The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. ")] = None, + destination_account: Annotated[Optional[StrictStr], Field(description="The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. ")] = None, + token_id: Annotated[Optional[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` ")] = None, + batch_allocation_id: Annotated[Optional[StrictStr], Field(description="The batch allocation ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7427,15 +7495,25 @@ def get_destination_entry( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> GetDestinationEntry200Response: - """Get destination entry information + ) -> ListAllocationItems200Response: + """List all allocation items - This operation retrieves the detailed information about a specified destination entry. + This operation retrieves the information of all allocations. - :param destination_entry_id: The destination entry ID. For example, the wallet address ID or the bank account ID. (required) - :type destination_entry_id: str - :param entry_type: EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. (required) - :type entry_type: EntryType + :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 source_account: The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. + :type source_account: str + :param destination_account: The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. + :type destination_account: str + :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` + :type token_id: str + :param batch_allocation_id: The batch allocation ID. + :type batch_allocation_id: 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 @@ -7444,16 +7522,20 @@ def get_destination_entry( :return: Returns the result object. """ # noqa: E501 - _param = self._get_destination_entry_serialize( - destination_entry_id=destination_entry_id, - entry_type=entry_type, + _param = self._list_allocation_items_serialize( + limit=limit, + before=before, + after=after, + source_account=source_account, + destination_account=destination_account, + token_id=token_id, + batch_allocation_id=batch_allocation_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDestinationEntry200Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "ListAllocationItems200Response", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7466,10 +7548,15 @@ def get_destination_entry( ).data @validate_call - def get_destination_entry_with_http_info( + def list_allocation_items_with_http_info( self, - destination_entry_id: Annotated[StrictStr, Field(description="The destination entry ID. For example, the wallet address ID or the bank account ID.")], - entry_type: Annotated[EntryType, Field(description="EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")], + 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, + source_account: Annotated[Optional[StrictStr], Field(description="The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. ")] = None, + destination_account: Annotated[Optional[StrictStr], Field(description="The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. ")] = None, + token_id: Annotated[Optional[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` ")] = None, + batch_allocation_id: Annotated[Optional[StrictStr], Field(description="The batch allocation ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7478,15 +7565,25 @@ def get_destination_entry_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[GetDestinationEntry200Response]: - """Get destination entry information + ) -> ApiResponse[ListAllocationItems200Response]: + """List all allocation items - This operation retrieves the detailed information about a specified destination entry. + This operation retrieves the information of all allocations. - :param destination_entry_id: The destination entry ID. For example, the wallet address ID or the bank account ID. (required) - :type destination_entry_id: str - :param entry_type: EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. (required) - :type entry_type: EntryType + :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 source_account: The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. + :type source_account: str + :param destination_account: The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. + :type destination_account: str + :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` + :type token_id: str + :param batch_allocation_id: The batch allocation ID. + :type batch_allocation_id: 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 @@ -7495,16 +7592,20 @@ def get_destination_entry_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_destination_entry_serialize( - destination_entry_id=destination_entry_id, - entry_type=entry_type, + _param = self._list_allocation_items_serialize( + limit=limit, + before=before, + after=after, + source_account=source_account, + destination_account=destination_account, + token_id=token_id, + batch_allocation_id=batch_allocation_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDestinationEntry200Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "ListAllocationItems200Response", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7517,10 +7618,15 @@ def get_destination_entry_with_http_info( ) @validate_call - def get_destination_entry_without_preload_content( + def list_allocation_items_without_preload_content( self, - destination_entry_id: Annotated[StrictStr, Field(description="The destination entry ID. For example, the wallet address ID or the bank account ID.")], - entry_type: Annotated[EntryType, Field(description="EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")], + 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, + source_account: Annotated[Optional[StrictStr], Field(description="The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. ")] = None, + destination_account: Annotated[Optional[StrictStr], Field(description="The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. ")] = None, + token_id: Annotated[Optional[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` ")] = None, + batch_allocation_id: Annotated[Optional[StrictStr], Field(description="The batch allocation ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7530,14 +7636,24 @@ def get_destination_entry_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Get destination entry information + """List all allocation items - This operation retrieves the detailed information about a specified destination entry. + This operation retrieves the information of all allocations. - :param destination_entry_id: The destination entry ID. For example, the wallet address ID or the bank account ID. (required) - :type destination_entry_id: str - :param entry_type: EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. (required) - :type entry_type: EntryType + :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 source_account: The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. + :type source_account: str + :param destination_account: The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. + :type destination_account: str + :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` + :type token_id: str + :param batch_allocation_id: The batch allocation ID. + :type batch_allocation_id: 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 @@ -7546,16 +7662,20 @@ def get_destination_entry_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_destination_entry_serialize( - destination_entry_id=destination_entry_id, - entry_type=entry_type, + _param = self._list_allocation_items_serialize( + limit=limit, + before=before, + after=after, + source_account=source_account, + destination_account=destination_account, + token_id=token_id, + batch_allocation_id=batch_allocation_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetDestinationEntry200Response", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", + '200': "ListAllocationItems200Response", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", } response_data = self.api_client.call_api( *_param, @@ -7563,10 +7683,15 @@ def get_destination_entry_without_preload_content( ) return response_data.response - def _get_destination_entry_serialize( + def _list_allocation_items_serialize( self, - destination_entry_id, - entry_type, + limit, + before, + after, + source_account, + destination_account, + token_id, + batch_allocation_id, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -7575,12 +7700,34 @@ def _get_destination_entry_serialize( _body_params: Optional[bytes] = None # process the path parameters - if destination_entry_id is not None: - _path_params['destination_entry_id'] = destination_entry_id # process the query parameters - if entry_type is not None: + if limit is not None: - _query_params.append(('entry_type', entry_type.value)) + _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)) + + if source_account is not None: + + _query_params.append(('source_account', source_account)) + + if destination_account is not None: + + _query_params.append(('destination_account', destination_account)) + + if token_id is not None: + + _query_params.append(('token_id', token_id)) + + if batch_allocation_id is not None: + + _query_params.append(('batch_allocation_id', batch_allocation_id)) # process the header parameters # process the form parameters @@ -7594,7 +7741,7 @@ def _get_destination_entry_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/destination_entry/{destination_entry_id}', + resource_path='/payments/allocation_items', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7604,10 +7751,8 @@ def _get_destination_entry_serialize( ) @validate_call - def get_exchange_rate( + def list_bank_accounts( 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` ")], - currency: Annotated[StrictStr, Field(description="The fiat currency. Currently, only `USD` is supported.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7616,15 +7761,11 @@ def get_exchange_rate( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> GetExchangeRate200Response: - """Get exchange rate + ) -> List[BankAccount]: + """List all bank accounts - This operation retrieves the current exchange rate between a specified currency pair. The exchange rate is updated approximately every 10 minutes. This operation returns the exchange rate for reference only. The actual exchange rate may vary due to market fluctuations and other factors. + This operation has been deprecated. Please use [List counterparty entries](https://www.cobo.com/payments/en/api-references/payment/list-counterparty-entries) instead. This operation retrieves the information of all bank accounts registered. - :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 currency: The fiat currency. Currently, only `USD` is supported. (required) - :type currency: 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 @@ -7633,13 +7774,11 @@ def get_exchange_rate( :return: Returns the result object. """ # noqa: E501 - _param = self._get_exchange_rate_serialize( - token_id=token_id, - currency=currency, + _param = self._list_bank_accounts_serialize( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetExchangeRate200Response", + '200': "List[BankAccount]", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -7654,10 +7793,8 @@ def get_exchange_rate( ).data @validate_call - def get_exchange_rate_with_http_info( + def list_bank_accounts_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` ")], - currency: Annotated[StrictStr, Field(description="The fiat currency. Currently, only `USD` is supported.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7666,15 +7803,11 @@ def get_exchange_rate_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[GetExchangeRate200Response]: - """Get exchange rate + ) -> ApiResponse[List[BankAccount]]: + """List all bank accounts - This operation retrieves the current exchange rate between a specified currency pair. The exchange rate is updated approximately every 10 minutes. This operation returns the exchange rate for reference only. The actual exchange rate may vary due to market fluctuations and other factors. + This operation has been deprecated. Please use [List counterparty entries](https://www.cobo.com/payments/en/api-references/payment/list-counterparty-entries) instead. This operation retrieves the information of all bank accounts registered. - :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 currency: The fiat currency. Currently, only `USD` is supported. (required) - :type currency: 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 @@ -7683,13 +7816,11 @@ def get_exchange_rate_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_exchange_rate_serialize( - token_id=token_id, - currency=currency, + _param = self._list_bank_accounts_serialize( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetExchangeRate200Response", + '200': "List[BankAccount]", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -7704,10 +7835,8 @@ def get_exchange_rate_with_http_info( ) @validate_call - def get_exchange_rate_without_preload_content( + def list_bank_accounts_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` ")], - currency: Annotated[StrictStr, Field(description="The fiat currency. Currently, only `USD` is supported.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7717,14 +7846,10 @@ def get_exchange_rate_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Get exchange rate + """List all bank accounts - This operation retrieves the current exchange rate between a specified currency pair. The exchange rate is updated approximately every 10 minutes. This operation returns the exchange rate for reference only. The actual exchange rate may vary due to market fluctuations and other factors. + This operation has been deprecated. Please use [List counterparty entries](https://www.cobo.com/payments/en/api-references/payment/list-counterparty-entries) instead. This operation retrieves the information of all bank accounts registered. - :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 currency: The fiat currency. Currently, only `USD` is supported. (required) - :type currency: 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 @@ -7733,13 +7858,11 @@ def get_exchange_rate_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_exchange_rate_serialize( - token_id=token_id, - currency=currency, + _param = self._list_bank_accounts_serialize( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetExchangeRate200Response", + '200': "List[BankAccount]", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -7749,10 +7872,8 @@ def get_exchange_rate_without_preload_content( ) return response_data.response - def _get_exchange_rate_serialize( + def _list_bank_accounts_serialize( self, - token_id, - currency, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -7761,10 +7882,6 @@ def _get_exchange_rate_serialize( _body_params: Optional[bytes] = None # process the path parameters - if token_id is not None: - _path_params['token_id'] = token_id - if currency is not None: - _path_params['currency'] = currency # process the query parameters # process the header parameters # process the form parameters @@ -7778,7 +7895,7 @@ def _get_exchange_rate_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/exchange_rates/{token_id}/{currency}', + resource_path='/payments/bank_accounts', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7788,9 +7905,12 @@ def _get_exchange_rate_serialize( ) @validate_call - def get_payment_order_detail_by_id( + def list_batch_allocations( self, - order_id: Annotated[StrictStr, Field(description="The pay-in order ID.")], + 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7799,13 +7919,19 @@ def get_payment_order_detail_by_id( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> Order: - """Get pay-in order information + ) -> ListBatchAllocations200Response: + """List all batch allocations - This operation retrieves details of a specific pay-in order. + This operation retrieves the information of all batch allocations. - :param order_id: The pay-in order ID. (required) - :type order_id: 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_id: The request ID. + :type request_id: 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 @@ -7814,12 +7940,15 @@ def get_payment_order_detail_by_id( :return: Returns the result object. """ # noqa: E501 - _param = self._get_payment_order_detail_by_id_serialize( - order_id=order_id, + _param = self._list_batch_allocations_serialize( + limit=limit, + before=before, + after=after, + request_id=request_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Order", + '200': "ListBatchAllocations200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -7834,9 +7963,12 @@ def get_payment_order_detail_by_id( ).data @validate_call - def get_payment_order_detail_by_id_with_http_info( + def list_batch_allocations_with_http_info( self, - order_id: Annotated[StrictStr, Field(description="The pay-in order ID.")], + 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7845,13 +7977,19 @@ def get_payment_order_detail_by_id_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[Order]: - """Get pay-in order information + ) -> ApiResponse[ListBatchAllocations200Response]: + """List all batch allocations - This operation retrieves details of a specific pay-in order. + This operation retrieves the information of all batch allocations. - :param order_id: The pay-in order ID. (required) - :type order_id: 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_id: The request ID. + :type request_id: 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 @@ -7860,12 +7998,15 @@ def get_payment_order_detail_by_id_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_payment_order_detail_by_id_serialize( - order_id=order_id, + _param = self._list_batch_allocations_serialize( + limit=limit, + before=before, + after=after, + request_id=request_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Order", + '200': "ListBatchAllocations200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -7880,9 +8021,12 @@ def get_payment_order_detail_by_id_with_http_info( ) @validate_call - def get_payment_order_detail_by_id_without_preload_content( + def list_batch_allocations_without_preload_content( self, - order_id: Annotated[StrictStr, Field(description="The pay-in order ID.")], + 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7892,12 +8036,18 @@ def get_payment_order_detail_by_id_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Get pay-in order information + """List all batch allocations - This operation retrieves details of a specific pay-in order. + This operation retrieves the information of all batch allocations. - :param order_id: The pay-in order ID. (required) - :type order_id: 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_id: The request ID. + :type request_id: 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 @@ -7906,12 +8056,15 @@ def get_payment_order_detail_by_id_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_payment_order_detail_by_id_serialize( - order_id=order_id, + _param = self._list_batch_allocations_serialize( + limit=limit, + before=before, + after=after, + request_id=request_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Order", + '200': "ListBatchAllocations200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -7921,10 +8074,13 @@ def get_payment_order_detail_by_id_without_preload_content( ) return response_data.response - def _get_payment_order_detail_by_id_serialize( + def _list_batch_allocations_serialize( self, - order_id, - ) -> RequestSerialized: + limit, + before, + after, + request_id, + ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _form_params: List[Tuple[str, str]] = [] @@ -7932,9 +8088,23 @@ def _get_payment_order_detail_by_id_serialize( _body_params: Optional[bytes] = None # process the path parameters - if order_id is not None: - _path_params['order_id'] = order_id # process the query parameters + 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)) + + if request_id is not None: + + _query_params.append(('request_id', request_id)) + # process the header parameters # process the form parameters # process the body parameter @@ -7947,7 +8117,7 @@ def _get_payment_order_detail_by_id_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/orders/{order_id}', + resource_path='/payments/batch_allocations', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7957,9 +8127,12 @@ def _get_payment_order_detail_by_id_serialize( ) @validate_call - def get_payout_by_id( + def list_bulk_send_items( self, - payout_id: Annotated[StrictStr, Field(description="The payout ID.")], + bulk_send_id: Annotated[StrictStr, Field(description="The bulk send ID.")], + 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)], @@ -7968,13 +8141,19 @@ def get_payout_by_id( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> PaymentPayoutDetail: - """Get payout information + ) -> ListBulkSendItems200Response: + """List bulk send items - This operation retrieves the information of a specific payout. + This operation retrieves the list of items for a specific bulk send. - :param payout_id: The payout ID. (required) - :type payout_id: str + :param bulk_send_id: The bulk send ID. (required) + :type bulk_send_id: 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 @@ -7983,12 +8162,15 @@ def get_payout_by_id( :return: Returns the result object. """ # noqa: E501 - _param = self._get_payout_by_id_serialize( - payout_id=payout_id, + _param = self._list_bulk_send_items_serialize( + bulk_send_id=bulk_send_id, + limit=limit, + before=before, + after=after, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PaymentPayoutDetail", + '200': "ListBulkSendItems200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -8003,9 +8185,12 @@ def get_payout_by_id( ).data @validate_call - def get_payout_by_id_with_http_info( + def list_bulk_send_items_with_http_info( self, - payout_id: Annotated[StrictStr, Field(description="The payout ID.")], + bulk_send_id: Annotated[StrictStr, Field(description="The bulk send ID.")], + 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)], @@ -8014,13 +8199,19 @@ def get_payout_by_id_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[PaymentPayoutDetail]: - """Get payout information + ) -> ApiResponse[ListBulkSendItems200Response]: + """List bulk send items - This operation retrieves the information of a specific payout. + This operation retrieves the list of items for a specific bulk send. - :param payout_id: The payout ID. (required) - :type payout_id: str + :param bulk_send_id: The bulk send ID. (required) + :type bulk_send_id: 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 @@ -8029,12 +8220,15 @@ def get_payout_by_id_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_payout_by_id_serialize( - payout_id=payout_id, + _param = self._list_bulk_send_items_serialize( + bulk_send_id=bulk_send_id, + limit=limit, + before=before, + after=after, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PaymentPayoutDetail", + '200': "ListBulkSendItems200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -8049,9 +8243,12 @@ def get_payout_by_id_with_http_info( ) @validate_call - def get_payout_by_id_without_preload_content( + def list_bulk_send_items_without_preload_content( self, - payout_id: Annotated[StrictStr, Field(description="The payout ID.")], + bulk_send_id: Annotated[StrictStr, Field(description="The bulk send ID.")], + 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)], @@ -8061,12 +8258,18 @@ def get_payout_by_id_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Get payout information + """List bulk send items - This operation retrieves the information of a specific payout. + This operation retrieves the list of items for a specific bulk send. - :param payout_id: The payout ID. (required) - :type payout_id: str + :param bulk_send_id: The bulk send ID. (required) + :type bulk_send_id: 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 @@ -8075,12 +8278,15 @@ def get_payout_by_id_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_payout_by_id_serialize( - payout_id=payout_id, + _param = self._list_bulk_send_items_serialize( + bulk_send_id=bulk_send_id, + limit=limit, + before=before, + after=after, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PaymentPayoutDetail", + '200': "ListBulkSendItems200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -8090,9 +8296,12 @@ def get_payout_by_id_without_preload_content( ) return response_data.response - def _get_payout_by_id_serialize( + def _list_bulk_send_items_serialize( self, - payout_id, + bulk_send_id, + limit, + before, + after, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -8101,9 +8310,21 @@ def _get_payout_by_id_serialize( _body_params: Optional[bytes] = None # process the path parameters - if payout_id is not None: - _path_params['payout_id'] = payout_id + if bulk_send_id is not None: + _path_params['bulk_send_id'] = bulk_send_id # process the query parameters + 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 @@ -8116,7 +8337,7 @@ def _get_payout_by_id_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/payouts/{payout_id}', + resource_path='/payments/bulk_sends/{bulk_send_id}/items', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8126,9 +8347,14 @@ def _get_payout_by_id_serialize( ) @validate_call - def get_psp_balance( + def list_counterparties( 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` ")], + 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, + keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, + counterparty_type: Annotated[Optional[CounterpartyType], Field(description="The type of the counterparty. - `Individual`: The counterparty is an individual. - `Organization`: The counterparty is an organization. ")] = None, + country: Annotated[Optional[StrictStr], Field(description="Country code, in ISO 3166-1 alpha-3 format.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8137,13 +8363,23 @@ def get_psp_balance( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> PspBalance: - """Get developer balance + ) -> ListCounterparties200Response: + """List all counterparties - This operation retrieves the balance information for you as the developer. The balance information is grouped by token. For more information, please refer to [Accounts and fund allocation](https://www.cobo.com/payments/en/guides/amounts-and-balances). + This operation retrieves the information of all counterparties. You can filter the results by using a keyword for fuzzy search on counterparty names. - :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 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 keyword: A search term for performing fuzzy matches in the search query. + :type keyword: str + :param counterparty_type: The type of the counterparty. - `Individual`: The counterparty is an individual. - `Organization`: The counterparty is an organization. + :type counterparty_type: CounterpartyType + :param country: Country code, in ISO 3166-1 alpha-3 format. + :type country: 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 @@ -8152,12 +8388,17 @@ def get_psp_balance( :return: Returns the result object. """ # noqa: E501 - _param = self._get_psp_balance_serialize( - token_id=token_id, + _param = self._list_counterparties_serialize( + limit=limit, + before=before, + after=after, + keyword=keyword, + counterparty_type=counterparty_type, + country=country, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PspBalance", + '200': "ListCounterparties200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -8172,9 +8413,14 @@ def get_psp_balance( ).data @validate_call - def get_psp_balance_with_http_info( + def list_counterparties_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` ")], + 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, + keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, + counterparty_type: Annotated[Optional[CounterpartyType], Field(description="The type of the counterparty. - `Individual`: The counterparty is an individual. - `Organization`: The counterparty is an organization. ")] = None, + country: Annotated[Optional[StrictStr], Field(description="Country code, in ISO 3166-1 alpha-3 format.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8183,13 +8429,23 @@ def get_psp_balance_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[PspBalance]: - """Get developer balance + ) -> ApiResponse[ListCounterparties200Response]: + """List all counterparties - This operation retrieves the balance information for you as the developer. The balance information is grouped by token. For more information, please refer to [Accounts and fund allocation](https://www.cobo.com/payments/en/guides/amounts-and-balances). + This operation retrieves the information of all counterparties. You can filter the results by using a keyword for fuzzy search on counterparty names. - :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 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 keyword: A search term for performing fuzzy matches in the search query. + :type keyword: str + :param counterparty_type: The type of the counterparty. - `Individual`: The counterparty is an individual. - `Organization`: The counterparty is an organization. + :type counterparty_type: CounterpartyType + :param country: Country code, in ISO 3166-1 alpha-3 format. + :type country: 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 @@ -8198,12 +8454,17 @@ def get_psp_balance_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_psp_balance_serialize( - token_id=token_id, + _param = self._list_counterparties_serialize( + limit=limit, + before=before, + after=after, + keyword=keyword, + counterparty_type=counterparty_type, + country=country, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "PspBalance", + '200': "ListCounterparties200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -8218,9 +8479,14 @@ def get_psp_balance_with_http_info( ) @validate_call - def get_psp_balance_without_preload_content( + def list_counterparties_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` ")], + 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, + keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, + counterparty_type: Annotated[Optional[CounterpartyType], Field(description="The type of the counterparty. - `Individual`: The counterparty is an individual. - `Organization`: The counterparty is an organization. ")] = None, + country: Annotated[Optional[StrictStr], Field(description="Country code, in ISO 3166-1 alpha-3 format.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8230,12 +8496,22 @@ def get_psp_balance_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Get developer balance + """List all counterparties - This operation retrieves the balance information for you as the developer. The balance information is grouped by token. For more information, please refer to [Accounts and fund allocation](https://www.cobo.com/payments/en/guides/amounts-and-balances). + This operation retrieves the information of all counterparties. You can filter the results by using a keyword for fuzzy search on counterparty names. - :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 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 keyword: A search term for performing fuzzy matches in the search query. + :type keyword: str + :param counterparty_type: The type of the counterparty. - `Individual`: The counterparty is an individual. - `Organization`: The counterparty is an organization. + :type counterparty_type: CounterpartyType + :param country: Country code, in ISO 3166-1 alpha-3 format. + :type country: 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 @@ -8244,4142 +8520,17 @@ def get_psp_balance_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_psp_balance_serialize( - token_id=token_id, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "PspBalance", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - def _get_psp_balance_serialize( - self, - token_id, - ) -> 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 - if token_id is not None: - - _query_params.append(('token_id', token_id)) - - # 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='/payments/balance/psp', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - ) - - @validate_call - def get_refund_detail_by_id( - self, - refund_id: Annotated[StrictStr, Field(description="The refund order ID.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> Refund: - """Get refund order information - - This operation retrieves the detailed information about a specified refund order. - - :param refund_id: The refund order ID. (required) - :type refund_id: 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._get_refund_detail_by_id_serialize( - refund_id=refund_id, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Refund", - '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 get_refund_detail_by_id_with_http_info( - self, - refund_id: Annotated[StrictStr, Field(description="The refund order ID.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ApiResponse[Refund]: - """Get refund order information - - This operation retrieves the detailed information about a specified refund order. - - :param refund_id: The refund order ID. (required) - :type refund_id: 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._get_refund_detail_by_id_serialize( - refund_id=refund_id, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Refund", - '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 get_refund_detail_by_id_without_preload_content( - self, - refund_id: Annotated[StrictStr, Field(description="The refund order ID.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> RESTResponseType: - """Get refund order information - - This operation retrieves the detailed information about a specified refund order. - - :param refund_id: The refund order ID. (required) - :type refund_id: 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._get_refund_detail_by_id_serialize( - refund_id=refund_id, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Refund", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - def _get_refund_detail_by_id_serialize( - self, - refund_id, - ) -> 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 refund_id is not None: - _path_params['refund_id'] = refund_id - # process the query parameters - # 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='/payments/refunds/{refund_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - ) - - @validate_call - def get_refunds( - self, - 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, - merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, - request_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, - statuses: Annotated[Optional[StrictStr], Field(description="A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) ")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> GetRefunds200Response: - """List all refund orders - - This operation retrieves the information of all refund orders. - - :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 merchant_id: The merchant ID. - :type merchant_id: str - :param request_id: The request ID. - :type request_id: str - :param statuses: A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) - :type statuses: 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._get_refunds_serialize( - limit=limit, - before=before, - after=after, - merchant_id=merchant_id, - request_id=request_id, - statuses=statuses, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetRefunds200Response", - '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 get_refunds_with_http_info( - self, - 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, - merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, - request_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, - statuses: Annotated[Optional[StrictStr], Field(description="A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) ")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ApiResponse[GetRefunds200Response]: - """List all refund orders - - This operation retrieves the information of all refund orders. - - :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 merchant_id: The merchant ID. - :type merchant_id: str - :param request_id: The request ID. - :type request_id: str - :param statuses: A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) - :type statuses: 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._get_refunds_serialize( - limit=limit, - before=before, - after=after, - merchant_id=merchant_id, - request_id=request_id, - statuses=statuses, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetRefunds200Response", - '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 get_refunds_without_preload_content( - self, - 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, - merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, - request_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, - statuses: Annotated[Optional[StrictStr], Field(description="A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) ")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> RESTResponseType: - """List all refund orders - - This operation retrieves the information of all refund orders. - - :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 merchant_id: The merchant ID. - :type merchant_id: str - :param request_id: The request ID. - :type request_id: str - :param statuses: A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) - :type statuses: 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._get_refunds_serialize( - limit=limit, - before=before, - after=after, - merchant_id=merchant_id, - request_id=request_id, - statuses=statuses, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetRefunds200Response", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - def _get_refunds_serialize( - self, - limit, - before, - after, - merchant_id, - request_id, - statuses, - ) -> 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 - 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)) - - if merchant_id is not None: - - _query_params.append(('merchant_id', merchant_id)) - - if request_id is not None: - - _query_params.append(('request_id', request_id)) - - if statuses is not None: - - _query_params.append(('statuses', statuses)) - - # 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='/payments/refunds', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - ) - - @validate_call - def get_reports( - self, - 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, - report_type: Annotated[Optional[ReportType], Field(description="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. ")] = None, - report_status: Annotated[Optional[ReportStatus], Field(description="The status of the report. - `Completed`: The report has been generated successfully. - `Failed`: The report could not be generated. ")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> GetReports200Response: - """List all reports - - This operation retrieves the information of all reports. - - :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 report_type: 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. - :type report_type: ReportType - :param report_status: The status of the report. - `Completed`: The report has been generated successfully. - `Failed`: The report could not be generated. - :type report_status: ReportStatus - :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._get_reports_serialize( - limit=limit, - before=before, - after=after, - report_type=report_type, - report_status=report_status, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetReports200Response", - '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 get_reports_with_http_info( - self, - 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, - report_type: Annotated[Optional[ReportType], Field(description="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. ")] = None, - report_status: Annotated[Optional[ReportStatus], Field(description="The status of the report. - `Completed`: The report has been generated successfully. - `Failed`: The report could not be generated. ")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ApiResponse[GetReports200Response]: - """List all reports - - This operation retrieves the information of all reports. - - :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 report_type: 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. - :type report_type: ReportType - :param report_status: The status of the report. - `Completed`: The report has been generated successfully. - `Failed`: The report could not be generated. - :type report_status: ReportStatus - :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._get_reports_serialize( - limit=limit, - before=before, - after=after, - report_type=report_type, - report_status=report_status, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetReports200Response", - '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 get_reports_without_preload_content( - self, - 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, - report_type: Annotated[Optional[ReportType], Field(description="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. ")] = None, - report_status: Annotated[Optional[ReportStatus], Field(description="The status of the report. - `Completed`: The report has been generated successfully. - `Failed`: The report could not be generated. ")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> RESTResponseType: - """List all reports - - This operation retrieves the information of all reports. - - :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 report_type: 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. - :type report_type: ReportType - :param report_status: The status of the report. - `Completed`: The report has been generated successfully. - `Failed`: The report could not be generated. - :type report_status: ReportStatus - :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._get_reports_serialize( - limit=limit, - before=before, - after=after, - report_type=report_type, - report_status=report_status, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetReports200Response", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - def _get_reports_serialize( - self, - limit, - before, - after, - report_type, - report_status, - ) -> 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 - 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)) - - if report_type is not None: - - _query_params.append(('report_type', report_type.value)) - - if report_status is not None: - - _query_params.append(('report_status', report_status.value)) - - # 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='/payments/reports', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - ) - - @validate_call - def get_settlement_by_id( - self, - settlement_request_id: Annotated[StrictStr, Field(description="The settlement request ID.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> Settlement: - """Get settlement request information - - This operation has been deprecated. Please use [Get payout information](https://www.cobo.com/payments/en/api-references/payment/get-payout-information) instead. This operation retrieves the information of a specific settlement request. - - :param settlement_request_id: The settlement request ID. (required) - :type settlement_request_id: 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._get_settlement_by_id_serialize( - settlement_request_id=settlement_request_id, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Settlement", - '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 get_settlement_by_id_with_http_info( - self, - settlement_request_id: Annotated[StrictStr, Field(description="The settlement request ID.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ApiResponse[Settlement]: - """Get settlement request information - - This operation has been deprecated. Please use [Get payout information](https://www.cobo.com/payments/en/api-references/payment/get-payout-information) instead. This operation retrieves the information of a specific settlement request. - - :param settlement_request_id: The settlement request ID. (required) - :type settlement_request_id: 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._get_settlement_by_id_serialize( - settlement_request_id=settlement_request_id, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Settlement", - '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 get_settlement_by_id_without_preload_content( - self, - settlement_request_id: Annotated[StrictStr, Field(description="The settlement request ID.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> RESTResponseType: - """Get settlement request information - - This operation has been deprecated. Please use [Get payout information](https://www.cobo.com/payments/en/api-references/payment/get-payout-information) instead. This operation retrieves the information of a specific settlement request. - - :param settlement_request_id: The settlement request ID. (required) - :type settlement_request_id: 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._get_settlement_by_id_serialize( - settlement_request_id=settlement_request_id, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Settlement", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - def _get_settlement_by_id_serialize( - self, - settlement_request_id, - ) -> 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 settlement_request_id is not None: - _path_params['settlement_request_id'] = settlement_request_id - # process the query parameters - # 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='/payments/settlement_requests/{settlement_request_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - ) - - @validate_call - def get_settlement_info_by_ids( - self, - merchant_ids: Annotated[Optional[StrictStr], Field(description="A list of merchant IDs to query.")] = None, - currency: Annotated[Optional[StrictStr], Field(description="The currency for the operation. Currently, only `USD` is supported.")] = None, - acquiring_type: Annotated[Optional[AcquiringType], Field(description="This parameter has been deprecated")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> GetSettlementInfoByIds200Response: - """Get withdrawable balances - - This operation has been deprecated. This operation retrieves the balances of specified merchants or the developer. - - :param merchant_ids: A list of merchant IDs to query. - :type merchant_ids: str - :param currency: The currency for the operation. Currently, only `USD` is supported. - :type currency: str - :param acquiring_type: This parameter has been deprecated - :type acquiring_type: AcquiringType - :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._get_settlement_info_by_ids_serialize( - merchant_ids=merchant_ids, - currency=currency, - acquiring_type=acquiring_type, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSettlementInfoByIds200Response", - '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 get_settlement_info_by_ids_with_http_info( - self, - merchant_ids: Annotated[Optional[StrictStr], Field(description="A list of merchant IDs to query.")] = None, - currency: Annotated[Optional[StrictStr], Field(description="The currency for the operation. Currently, only `USD` is supported.")] = None, - acquiring_type: Annotated[Optional[AcquiringType], Field(description="This parameter has been deprecated")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ApiResponse[GetSettlementInfoByIds200Response]: - """Get withdrawable balances - - This operation has been deprecated. This operation retrieves the balances of specified merchants or the developer. - - :param merchant_ids: A list of merchant IDs to query. - :type merchant_ids: str - :param currency: The currency for the operation. Currently, only `USD` is supported. - :type currency: str - :param acquiring_type: This parameter has been deprecated - :type acquiring_type: AcquiringType - :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._get_settlement_info_by_ids_serialize( - merchant_ids=merchant_ids, - currency=currency, - acquiring_type=acquiring_type, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSettlementInfoByIds200Response", - '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 get_settlement_info_by_ids_without_preload_content( - self, - merchant_ids: Annotated[Optional[StrictStr], Field(description="A list of merchant IDs to query.")] = None, - currency: Annotated[Optional[StrictStr], Field(description="The currency for the operation. Currently, only `USD` is supported.")] = None, - acquiring_type: Annotated[Optional[AcquiringType], Field(description="This parameter has been deprecated")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> RESTResponseType: - """Get withdrawable balances - - This operation has been deprecated. This operation retrieves the balances of specified merchants or the developer. - - :param merchant_ids: A list of merchant IDs to query. - :type merchant_ids: str - :param currency: The currency for the operation. Currently, only `USD` is supported. - :type currency: str - :param acquiring_type: This parameter has been deprecated - :type acquiring_type: AcquiringType - :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._get_settlement_info_by_ids_serialize( - merchant_ids=merchant_ids, - currency=currency, - acquiring_type=acquiring_type, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSettlementInfoByIds200Response", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - def _get_settlement_info_by_ids_serialize( - self, - merchant_ids, - currency, - acquiring_type, - ) -> 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 - if merchant_ids is not None: - - _query_params.append(('merchant_ids', merchant_ids)) - - if currency is not None: - - _query_params.append(('currency', currency)) - - if acquiring_type is not None: - - _query_params.append(('acquiring_type', acquiring_type.value)) - - # 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='/payments/settlement_info', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - ) - - @validate_call - def get_top_up_address( - 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` ")], - custom_payer_id: Annotated[StrictStr, Field(description="A unique identifier to track and identify individual payers in your system.")], - merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> TopUpAddress: - """Create/Get top-up address - - This operation creates or retrieves a unique top-up address for a payer. In the request, you need to provide the `custom_payer_id` parameter to identify the payer in your system and link them to the top-up address. - If no address exists for the payer on the specified chain, a new address will be created and returned. - If an address already exists for the payer on the specified chain, the existing address details will be returned. You can also provide the `merchant_id` parameter to specify the merchant to which the payer belongs. If not provided, the default merchant will be used. - - :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 custom_payer_id: A unique identifier to track and identify individual payers in your system. (required) - :type custom_payer_id: str - :param merchant_id: The merchant ID. - :type merchant_id: 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._get_top_up_address_serialize( - token_id=token_id, - custom_payer_id=custom_payer_id, - merchant_id=merchant_id, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "TopUpAddress", - '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 get_top_up_address_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` ")], - custom_payer_id: Annotated[StrictStr, Field(description="A unique identifier to track and identify individual payers in your system.")], - merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ApiResponse[TopUpAddress]: - """Create/Get top-up address - - This operation creates or retrieves a unique top-up address for a payer. In the request, you need to provide the `custom_payer_id` parameter to identify the payer in your system and link them to the top-up address. - If no address exists for the payer on the specified chain, a new address will be created and returned. - If an address already exists for the payer on the specified chain, the existing address details will be returned. You can also provide the `merchant_id` parameter to specify the merchant to which the payer belongs. If not provided, the default merchant will be used. - - :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 custom_payer_id: A unique identifier to track and identify individual payers in your system. (required) - :type custom_payer_id: str - :param merchant_id: The merchant ID. - :type merchant_id: 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._get_top_up_address_serialize( - token_id=token_id, - custom_payer_id=custom_payer_id, - merchant_id=merchant_id, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "TopUpAddress", - '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 get_top_up_address_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` ")], - custom_payer_id: Annotated[StrictStr, Field(description="A unique identifier to track and identify individual payers in your system.")], - merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> RESTResponseType: - """Create/Get top-up address - - This operation creates or retrieves a unique top-up address for a payer. In the request, you need to provide the `custom_payer_id` parameter to identify the payer in your system and link them to the top-up address. - If no address exists for the payer on the specified chain, a new address will be created and returned. - If an address already exists for the payer on the specified chain, the existing address details will be returned. You can also provide the `merchant_id` parameter to specify the merchant to which the payer belongs. If not provided, the default merchant will be used. - - :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 custom_payer_id: A unique identifier to track and identify individual payers in your system. (required) - :type custom_payer_id: str - :param merchant_id: The merchant ID. - :type merchant_id: 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._get_top_up_address_serialize( - token_id=token_id, - custom_payer_id=custom_payer_id, - merchant_id=merchant_id, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "TopUpAddress", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - def _get_top_up_address_serialize( - self, - token_id, - custom_payer_id, - merchant_id, - ) -> 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 - if token_id is not None: - - _query_params.append(('token_id', token_id)) - - if custom_payer_id is not None: - - _query_params.append(('custom_payer_id', custom_payer_id)) - - if merchant_id is not None: - - _query_params.append(('merchant_id', merchant_id)) - - # 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='/payments/topup/address', - 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_allocation_items( - self, - 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, - source_account: Annotated[Optional[StrictStr], Field(description="The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. ")] = None, - destination_account: Annotated[Optional[StrictStr], Field(description="The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. ")] = None, - token_id: Annotated[Optional[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` ")] = None, - batch_allocation_id: Annotated[Optional[StrictStr], Field(description="The batch allocation ID.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ListAllocationItems200Response: - """List all allocation items - - This operation retrieves the information of all allocations. - - :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 source_account: The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. - :type source_account: str - :param destination_account: The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. - :type destination_account: str - :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` - :type token_id: str - :param batch_allocation_id: The batch allocation ID. - :type batch_allocation_id: 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_allocation_items_serialize( - limit=limit, - before=before, - after=after, - source_account=source_account, - destination_account=destination_account, - token_id=token_id, - batch_allocation_id=batch_allocation_id, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListAllocationItems200Response", - '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_allocation_items_with_http_info( - self, - 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, - source_account: Annotated[Optional[StrictStr], Field(description="The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. ")] = None, - destination_account: Annotated[Optional[StrictStr], Field(description="The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. ")] = None, - token_id: Annotated[Optional[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` ")] = None, - batch_allocation_id: Annotated[Optional[StrictStr], Field(description="The batch allocation ID.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ApiResponse[ListAllocationItems200Response]: - """List all allocation items - - This operation retrieves the information of all allocations. - - :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 source_account: The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. - :type source_account: str - :param destination_account: The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. - :type destination_account: str - :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` - :type token_id: str - :param batch_allocation_id: The batch allocation ID. - :type batch_allocation_id: 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_allocation_items_serialize( - limit=limit, - before=before, - after=after, - source_account=source_account, - destination_account=destination_account, - token_id=token_id, - batch_allocation_id=batch_allocation_id, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListAllocationItems200Response", - '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_allocation_items_without_preload_content( - self, - 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, - source_account: Annotated[Optional[StrictStr], Field(description="The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. ")] = None, - destination_account: Annotated[Optional[StrictStr], Field(description="The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. ")] = None, - token_id: Annotated[Optional[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` ")] = None, - batch_allocation_id: Annotated[Optional[StrictStr], Field(description="The batch allocation ID.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> RESTResponseType: - """List all allocation items - - This operation retrieves the information of all allocations. - - :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 source_account: The source account. - If the source account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the source account is the developer account, use the string `\"developer\"`. - :type source_account: str - :param destination_account: The destination account. - If the destination account is a merchant account, provide the merchant's ID (e.g., \"M1001\"). - If the destination account is the developer account, use the string `\"developer\"`. - :type destination_account: str - :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` - :type token_id: str - :param batch_allocation_id: The batch allocation ID. - :type batch_allocation_id: 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_allocation_items_serialize( - limit=limit, - before=before, - after=after, - source_account=source_account, - destination_account=destination_account, - token_id=token_id, - batch_allocation_id=batch_allocation_id, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListAllocationItems200Response", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - def _list_allocation_items_serialize( - self, - limit, - before, - after, - source_account, - destination_account, - token_id, - batch_allocation_id, - ) -> 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 - 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)) - - if source_account is not None: - - _query_params.append(('source_account', source_account)) - - if destination_account is not None: - - _query_params.append(('destination_account', destination_account)) - - if token_id is not None: - - _query_params.append(('token_id', token_id)) - - if batch_allocation_id is not None: - - _query_params.append(('batch_allocation_id', batch_allocation_id)) - - # 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='/payments/allocation_items', - 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_bank_accounts( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> List[BankAccount]: - """List all bank accounts - - This operation has been deprecated. Please use [List counterparty entries](https://www.cobo.com/payments/en/api-references/payment/list-counterparty-entries) instead. This operation retrieves the information of all bank accounts registered. - - :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_bank_accounts_serialize( - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[BankAccount]", - '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_bank_accounts_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ApiResponse[List[BankAccount]]: - """List all bank accounts - - This operation has been deprecated. Please use [List counterparty entries](https://www.cobo.com/payments/en/api-references/payment/list-counterparty-entries) instead. This operation retrieves the information of all bank accounts registered. - - :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_bank_accounts_serialize( - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[BankAccount]", - '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_bank_accounts_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> RESTResponseType: - """List all bank accounts - - This operation has been deprecated. Please use [List counterparty entries](https://www.cobo.com/payments/en/api-references/payment/list-counterparty-entries) instead. This operation retrieves the information of all bank accounts registered. - - :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_bank_accounts_serialize( - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[BankAccount]", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - def _list_bank_accounts_serialize( - self, - ) -> 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 - - # set the HTTP header `Accept` - _header_params = { - "Accept": "application/json", - "Content-Type": "application/json" - } - - return self.api_client.param_serialize( - method='GET', - resource_path='/payments/bank_accounts', - 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_batch_allocations( - self, - 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ListBatchAllocations200Response: - """List all batch allocations - - This operation retrieves the information of all batch allocations. - - :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_id: The request ID. - :type request_id: 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_batch_allocations_serialize( - limit=limit, - before=before, - after=after, - request_id=request_id, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListBatchAllocations200Response", - '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_batch_allocations_with_http_info( - self, - 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ApiResponse[ListBatchAllocations200Response]: - """List all batch allocations - - This operation retrieves the information of all batch allocations. - - :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_id: The request ID. - :type request_id: 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_batch_allocations_serialize( - limit=limit, - before=before, - after=after, - request_id=request_id, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListBatchAllocations200Response", - '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_batch_allocations_without_preload_content( - self, - 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> RESTResponseType: - """List all batch allocations - - This operation retrieves the information of all batch allocations. - - :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_id: The request ID. - :type request_id: 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_batch_allocations_serialize( - limit=limit, - before=before, - after=after, - request_id=request_id, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListBatchAllocations200Response", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - def _list_batch_allocations_serialize( - self, - limit, - before, - after, - request_id, - ) -> 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 - 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)) - - if request_id is not None: - - _query_params.append(('request_id', request_id)) - - # 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='/payments/batch_allocations', - 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_bulk_send_items( - self, - bulk_send_id: Annotated[StrictStr, Field(description="The bulk send ID.")], - 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, - ) -> ListBulkSendItems200Response: - """List bulk send items - - This operation retrieves the list of items for a specific bulk send. - - :param bulk_send_id: The bulk send ID. (required) - :type bulk_send_id: 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_bulk_send_items_serialize( - bulk_send_id=bulk_send_id, - limit=limit, - before=before, - after=after, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListBulkSendItems200Response", - '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_bulk_send_items_with_http_info( - self, - bulk_send_id: Annotated[StrictStr, Field(description="The bulk send ID.")], - 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[ListBulkSendItems200Response]: - """List bulk send items - - This operation retrieves the list of items for a specific bulk send. - - :param bulk_send_id: The bulk send ID. (required) - :type bulk_send_id: 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_bulk_send_items_serialize( - bulk_send_id=bulk_send_id, - limit=limit, - before=before, - after=after, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListBulkSendItems200Response", - '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_bulk_send_items_without_preload_content( - self, - bulk_send_id: Annotated[StrictStr, Field(description="The bulk send ID.")], - 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 bulk send items - - This operation retrieves the list of items for a specific bulk send. - - :param bulk_send_id: The bulk send ID. (required) - :type bulk_send_id: 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_bulk_send_items_serialize( - bulk_send_id=bulk_send_id, - limit=limit, - before=before, - after=after, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListBulkSendItems200Response", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - def _list_bulk_send_items_serialize( - self, - bulk_send_id, - 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 bulk_send_id is not None: - _path_params['bulk_send_id'] = bulk_send_id - # process the query parameters - 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='/payments/bulk_sends/{bulk_send_id}/items', - 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_counterparties( - self, - 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, - keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, - counterparty_type: Annotated[Optional[CounterpartyType], Field(description="The type of the counterparty. - `Individual`: The counterparty is an individual. - `Organization`: The counterparty is an organization. ")] = None, - country: Annotated[Optional[StrictStr], Field(description="Country code, in ISO 3166-1 alpha-3 format.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ListCounterparties200Response: - """List all counterparties - - This operation retrieves the information of all counterparties. You can filter the results by using a keyword for fuzzy search on counterparty names. - - :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 keyword: A search term for performing fuzzy matches in the search query. - :type keyword: str - :param counterparty_type: The type of the counterparty. - `Individual`: The counterparty is an individual. - `Organization`: The counterparty is an organization. - :type counterparty_type: CounterpartyType - :param country: Country code, in ISO 3166-1 alpha-3 format. - :type country: 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_counterparties_serialize( - limit=limit, - before=before, - after=after, - keyword=keyword, - counterparty_type=counterparty_type, - country=country, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListCounterparties200Response", - '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_counterparties_with_http_info( - self, - 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, - keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, - counterparty_type: Annotated[Optional[CounterpartyType], Field(description="The type of the counterparty. - `Individual`: The counterparty is an individual. - `Organization`: The counterparty is an organization. ")] = None, - country: Annotated[Optional[StrictStr], Field(description="Country code, in ISO 3166-1 alpha-3 format.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ApiResponse[ListCounterparties200Response]: - """List all counterparties - - This operation retrieves the information of all counterparties. You can filter the results by using a keyword for fuzzy search on counterparty names. - - :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 keyword: A search term for performing fuzzy matches in the search query. - :type keyword: str - :param counterparty_type: The type of the counterparty. - `Individual`: The counterparty is an individual. - `Organization`: The counterparty is an organization. - :type counterparty_type: CounterpartyType - :param country: Country code, in ISO 3166-1 alpha-3 format. - :type country: 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_counterparties_serialize( - limit=limit, - before=before, - after=after, - keyword=keyword, - counterparty_type=counterparty_type, - country=country, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListCounterparties200Response", - '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_counterparties_without_preload_content( - self, - 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, - keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, - counterparty_type: Annotated[Optional[CounterpartyType], Field(description="The type of the counterparty. - `Individual`: The counterparty is an individual. - `Organization`: The counterparty is an organization. ")] = None, - country: Annotated[Optional[StrictStr], Field(description="Country code, in ISO 3166-1 alpha-3 format.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> RESTResponseType: - """List all counterparties - - This operation retrieves the information of all counterparties. You can filter the results by using a keyword for fuzzy search on counterparty names. - - :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 keyword: A search term for performing fuzzy matches in the search query. - :type keyword: str - :param counterparty_type: The type of the counterparty. - `Individual`: The counterparty is an individual. - `Organization`: The counterparty is an organization. - :type counterparty_type: CounterpartyType - :param country: Country code, in ISO 3166-1 alpha-3 format. - :type country: 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_counterparties_serialize( - limit=limit, - before=before, - after=after, - keyword=keyword, - counterparty_type=counterparty_type, - country=country, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListCounterparties200Response", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - def _list_counterparties_serialize( - self, - limit, - before, - after, - keyword, - counterparty_type, - country, - ) -> 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 - 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)) - - if keyword is not None: - - _query_params.append(('keyword', keyword)) - - if counterparty_type is not None: - - _query_params.append(('counterparty_type', counterparty_type.value)) - - if country is not None: - - _query_params.append(('country', country)) - - # 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='/payments/counterparty', - 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_counterparty_entries( - self, - 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, - entry_type: Annotated[Optional[EntryType], Field(description="The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")] = None, - counterparty_id: Annotated[Optional[StrictStr], Field(description="The counterparty ID.")] = None, - chain_ids: Annotated[Optional[StrictStr], Field(description="The chain ID, which is the unique identifier of a blockchain.")] = None, - wallet_address: Annotated[Optional[StrictStr], Field(description="The wallet address.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ListCounterpartyEntries200Response: - """List counterparty entries - - This operation retrieves the information of counterparty entries. - - :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 entry_type: The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. - :type entry_type: EntryType - :param counterparty_id: The counterparty ID. - :type counterparty_id: str - :param chain_ids: The chain ID, which is the unique identifier of a blockchain. - :type chain_ids: str - :param wallet_address: The wallet address. - :type wallet_address: 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_counterparty_entries_serialize( - limit=limit, - before=before, - after=after, - entry_type=entry_type, - counterparty_id=counterparty_id, - chain_ids=chain_ids, - wallet_address=wallet_address, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListCounterpartyEntries200Response", - '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_counterparty_entries_with_http_info( - self, - 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, - entry_type: Annotated[Optional[EntryType], Field(description="The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")] = None, - counterparty_id: Annotated[Optional[StrictStr], Field(description="The counterparty ID.")] = None, - chain_ids: Annotated[Optional[StrictStr], Field(description="The chain ID, which is the unique identifier of a blockchain.")] = None, - wallet_address: Annotated[Optional[StrictStr], Field(description="The wallet address.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ApiResponse[ListCounterpartyEntries200Response]: - """List counterparty entries - - This operation retrieves the information of counterparty entries. - - :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 entry_type: The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. - :type entry_type: EntryType - :param counterparty_id: The counterparty ID. - :type counterparty_id: str - :param chain_ids: The chain ID, which is the unique identifier of a blockchain. - :type chain_ids: str - :param wallet_address: The wallet address. - :type wallet_address: 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_counterparty_entries_serialize( - limit=limit, - before=before, - after=after, - entry_type=entry_type, - counterparty_id=counterparty_id, - chain_ids=chain_ids, - wallet_address=wallet_address, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListCounterpartyEntries200Response", - '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_counterparty_entries_without_preload_content( - self, - 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, - entry_type: Annotated[Optional[EntryType], Field(description="The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")] = None, - counterparty_id: Annotated[Optional[StrictStr], Field(description="The counterparty ID.")] = None, - chain_ids: Annotated[Optional[StrictStr], Field(description="The chain ID, which is the unique identifier of a blockchain.")] = None, - wallet_address: Annotated[Optional[StrictStr], Field(description="The wallet address.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> RESTResponseType: - """List counterparty entries - - This operation retrieves the information of counterparty entries. - - :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 entry_type: The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. - :type entry_type: EntryType - :param counterparty_id: The counterparty ID. - :type counterparty_id: str - :param chain_ids: The chain ID, which is the unique identifier of a blockchain. - :type chain_ids: str - :param wallet_address: The wallet address. - :type wallet_address: 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_counterparty_entries_serialize( - limit=limit, - before=before, - after=after, - entry_type=entry_type, - counterparty_id=counterparty_id, - chain_ids=chain_ids, - wallet_address=wallet_address, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListCounterpartyEntries200Response", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - def _list_counterparty_entries_serialize( - self, - limit, - before, - after, - entry_type, - counterparty_id, - chain_ids, - wallet_address, - ) -> 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 - 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)) - - if entry_type is not None: - - _query_params.append(('entry_type', entry_type.value)) - - if counterparty_id is not None: - - _query_params.append(('counterparty_id', counterparty_id)) - - if chain_ids is not None: - - _query_params.append(('chain_ids', chain_ids)) - - if wallet_address is not None: - - _query_params.append(('wallet_address', wallet_address)) - - # 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='/payments/counterparty_entry', - 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_counterparty_wallet_address( - self, - 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, - counterparty_id: Annotated[Optional[StrictStr], Field(description="The counterparty ID.")] = None, - chain_ids: Annotated[Optional[StrictStr], Field(description="The chain ID, which is the unique identifier of a blockchain.")] = None, - wallet_address: Annotated[Optional[StrictStr], Field(description="The wallet address.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ListCounterpartyWalletAddress200Response: - """List counterparty wallet addresses - - This operation retrieves the information of counterparty wallet addresses. - - :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 counterparty_id: The counterparty ID. - :type counterparty_id: str - :param chain_ids: The chain ID, which is the unique identifier of a blockchain. - :type chain_ids: str - :param wallet_address: The wallet address. - :type wallet_address: 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_counterparty_wallet_address_serialize( - limit=limit, - before=before, - after=after, - counterparty_id=counterparty_id, - chain_ids=chain_ids, - wallet_address=wallet_address, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListCounterpartyWalletAddress200Response", - '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_counterparty_wallet_address_with_http_info( - self, - 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, - counterparty_id: Annotated[Optional[StrictStr], Field(description="The counterparty ID.")] = None, - chain_ids: Annotated[Optional[StrictStr], Field(description="The chain ID, which is the unique identifier of a blockchain.")] = None, - wallet_address: Annotated[Optional[StrictStr], Field(description="The wallet address.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ApiResponse[ListCounterpartyWalletAddress200Response]: - """List counterparty wallet addresses - - This operation retrieves the information of counterparty wallet addresses. - - :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 counterparty_id: The counterparty ID. - :type counterparty_id: str - :param chain_ids: The chain ID, which is the unique identifier of a blockchain. - :type chain_ids: str - :param wallet_address: The wallet address. - :type wallet_address: 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_counterparty_wallet_address_serialize( - limit=limit, - before=before, - after=after, - counterparty_id=counterparty_id, - chain_ids=chain_ids, - wallet_address=wallet_address, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListCounterpartyWalletAddress200Response", - '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_counterparty_wallet_address_without_preload_content( - self, - 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, - counterparty_id: Annotated[Optional[StrictStr], Field(description="The counterparty ID.")] = None, - chain_ids: Annotated[Optional[StrictStr], Field(description="The chain ID, which is the unique identifier of a blockchain.")] = None, - wallet_address: Annotated[Optional[StrictStr], Field(description="The wallet address.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> RESTResponseType: - """List counterparty wallet addresses - - This operation retrieves the information of counterparty wallet addresses. - - :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 counterparty_id: The counterparty ID. - :type counterparty_id: str - :param chain_ids: The chain ID, which is the unique identifier of a blockchain. - :type chain_ids: str - :param wallet_address: The wallet address. - :type wallet_address: 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_counterparty_wallet_address_serialize( - limit=limit, - before=before, - after=after, - counterparty_id=counterparty_id, - chain_ids=chain_ids, - wallet_address=wallet_address, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListCounterpartyWalletAddress200Response", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - def _list_counterparty_wallet_address_serialize( - self, - limit, - before, - after, - counterparty_id, - chain_ids, - wallet_address, - ) -> 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 - 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)) - - if counterparty_id is not None: - - _query_params.append(('counterparty_id', counterparty_id)) - - if chain_ids is not None: - - _query_params.append(('chain_ids', chain_ids)) - - if wallet_address is not None: - - _query_params.append(('wallet_address', wallet_address)) - - # 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='/payments/counterparty/wallet_address', - 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_crypto_addresses( - self, - token_id: Annotated[Optional[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` ")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> List[CryptoAddress]: - """List crypto addresses - - This operation retrieves a list of crypto addresses registered for crypto payouts. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new crypto address. - - :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` - :type token_id: 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_crypto_addresses_serialize( - token_id=token_id, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[CryptoAddress]", - '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_crypto_addresses_with_http_info( - self, - token_id: Annotated[Optional[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` ")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ApiResponse[List[CryptoAddress]]: - """List crypto addresses - - This operation retrieves a list of crypto addresses registered for crypto payouts. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new crypto address. - - :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` - :type token_id: 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_crypto_addresses_serialize( - token_id=token_id, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[CryptoAddress]", - '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_crypto_addresses_without_preload_content( - self, - token_id: Annotated[Optional[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` ")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> RESTResponseType: - """List crypto addresses - - This operation retrieves a list of crypto addresses registered for crypto payouts. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new crypto address. - - :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` - :type token_id: 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_crypto_addresses_serialize( - token_id=token_id, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[CryptoAddress]", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - def _list_crypto_addresses_serialize( - self, - token_id, - ) -> 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 - if token_id is not None: - - _query_params.append(('token_id', token_id)) - - # 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='/payments/crypto_addresses', - 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_destination_bank_accounts( - self, - 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, - keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, - destination_id: Annotated[Optional[StrictStr], Field(description="The destination ID.")] = None, - bank_account_status: Annotated[Optional[BankAccountStatus], Field(description="BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. ")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ListDestinationBankAccounts200Response: - """List destination bank accounts - - This operation retrieves the information of destination bank accounts. - - :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 keyword: A search term for performing fuzzy matches in the search query. - :type keyword: str - :param destination_id: The destination ID. - :type destination_id: str - :param bank_account_status: BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. - :type bank_account_status: BankAccountStatus - :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_destination_bank_accounts_serialize( - limit=limit, - before=before, - after=after, - keyword=keyword, - destination_id=destination_id, - bank_account_status=bank_account_status, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListDestinationBankAccounts200Response", - '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_destination_bank_accounts_with_http_info( - self, - 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, - keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, - destination_id: Annotated[Optional[StrictStr], Field(description="The destination ID.")] = None, - bank_account_status: Annotated[Optional[BankAccountStatus], Field(description="BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. ")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ApiResponse[ListDestinationBankAccounts200Response]: - """List destination bank accounts - - This operation retrieves the information of destination bank accounts. - - :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 keyword: A search term for performing fuzzy matches in the search query. - :type keyword: str - :param destination_id: The destination ID. - :type destination_id: str - :param bank_account_status: BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. - :type bank_account_status: BankAccountStatus - :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_destination_bank_accounts_serialize( - limit=limit, - before=before, - after=after, - keyword=keyword, - destination_id=destination_id, - bank_account_status=bank_account_status, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListDestinationBankAccounts200Response", - '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_destination_bank_accounts_without_preload_content( - self, - 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, - keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, - destination_id: Annotated[Optional[StrictStr], Field(description="The destination ID.")] = None, - bank_account_status: Annotated[Optional[BankAccountStatus], Field(description="BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. ")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> RESTResponseType: - """List destination bank accounts - - This operation retrieves the information of destination bank accounts. - - :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 keyword: A search term for performing fuzzy matches in the search query. - :type keyword: str - :param destination_id: The destination ID. - :type destination_id: str - :param bank_account_status: BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. - :type bank_account_status: BankAccountStatus - :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_destination_bank_accounts_serialize( - limit=limit, - before=before, - after=after, - keyword=keyword, - destination_id=destination_id, - bank_account_status=bank_account_status, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListDestinationBankAccounts200Response", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - def _list_destination_bank_accounts_serialize( - self, - limit, - before, - after, - keyword, - destination_id, - bank_account_status, - ) -> 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 - 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)) - - if keyword is not None: - - _query_params.append(('keyword', keyword)) - - if destination_id is not None: - - _query_params.append(('destination_id', destination_id)) - - if bank_account_status is not None: - - _query_params.append(('bank_account_status', bank_account_status.value)) - - # 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='/payments/destination/bank_account', - 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_destination_entries( - self, - entry_type: Annotated[EntryType, Field(description="EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")], - 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, - destination_id: Annotated[Optional[StrictStr], Field(description="The destination ID.")] = None, - chain_ids: Annotated[Optional[StrictStr], Field(description="The chain ID, which is the unique identifier of a blockchain.")] = None, - wallet_address: Annotated[Optional[StrictStr], Field(description="The wallet address.")] = None, - keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, - bank_account_status: Annotated[Optional[BankAccountStatus], Field(description="BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. ")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ListDestinationEntries200Response: - """List destination entries - - This operation retrieves the information of destination entries. - - :param entry_type: EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. (required) - :type entry_type: EntryType - :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 destination_id: The destination ID. - :type destination_id: str - :param chain_ids: The chain ID, which is the unique identifier of a blockchain. - :type chain_ids: str - :param wallet_address: The wallet address. - :type wallet_address: str - :param keyword: A search term for performing fuzzy matches in the search query. - :type keyword: str - :param bank_account_status: BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. - :type bank_account_status: BankAccountStatus - :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_destination_entries_serialize( - entry_type=entry_type, - limit=limit, - before=before, - after=after, - destination_id=destination_id, - chain_ids=chain_ids, - wallet_address=wallet_address, - keyword=keyword, - bank_account_status=bank_account_status, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListDestinationEntries200Response", - '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_destination_entries_with_http_info( - self, - entry_type: Annotated[EntryType, Field(description="EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")], - 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, - destination_id: Annotated[Optional[StrictStr], Field(description="The destination ID.")] = None, - chain_ids: Annotated[Optional[StrictStr], Field(description="The chain ID, which is the unique identifier of a blockchain.")] = None, - wallet_address: Annotated[Optional[StrictStr], Field(description="The wallet address.")] = None, - keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, - bank_account_status: Annotated[Optional[BankAccountStatus], Field(description="BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. ")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ApiResponse[ListDestinationEntries200Response]: - """List destination entries - - This operation retrieves the information of destination entries. - - :param entry_type: EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. (required) - :type entry_type: EntryType - :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 destination_id: The destination ID. - :type destination_id: str - :param chain_ids: The chain ID, which is the unique identifier of a blockchain. - :type chain_ids: str - :param wallet_address: The wallet address. - :type wallet_address: str - :param keyword: A search term for performing fuzzy matches in the search query. - :type keyword: str - :param bank_account_status: BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. - :type bank_account_status: BankAccountStatus - :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_destination_entries_serialize( - entry_type=entry_type, - limit=limit, - before=before, - after=after, - destination_id=destination_id, - chain_ids=chain_ids, - wallet_address=wallet_address, - keyword=keyword, - bank_account_status=bank_account_status, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListDestinationEntries200Response", - '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_destination_entries_without_preload_content( - self, - entry_type: Annotated[EntryType, Field(description="EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")], - 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, - destination_id: Annotated[Optional[StrictStr], Field(description="The destination ID.")] = None, - chain_ids: Annotated[Optional[StrictStr], Field(description="The chain ID, which is the unique identifier of a blockchain.")] = None, - wallet_address: Annotated[Optional[StrictStr], Field(description="The wallet address.")] = None, - keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, - bank_account_status: Annotated[Optional[BankAccountStatus], Field(description="BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. ")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> RESTResponseType: - """List destination entries - - This operation retrieves the information of destination entries. - - :param entry_type: EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. (required) - :type entry_type: EntryType - :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 destination_id: The destination ID. - :type destination_id: str - :param chain_ids: The chain ID, which is the unique identifier of a blockchain. - :type chain_ids: str - :param wallet_address: The wallet address. - :type wallet_address: str - :param keyword: A search term for performing fuzzy matches in the search query. - :type keyword: str - :param bank_account_status: BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. - :type bank_account_status: BankAccountStatus - :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_destination_entries_serialize( - entry_type=entry_type, - limit=limit, - before=before, - after=after, - destination_id=destination_id, - chain_ids=chain_ids, - wallet_address=wallet_address, - keyword=keyword, - bank_account_status=bank_account_status, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListDestinationEntries200Response", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - def _list_destination_entries_serialize( - self, - entry_type, - limit, - before, - after, - destination_id, - chain_ids, - wallet_address, - keyword, - bank_account_status, - ) -> 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 - 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)) - - if entry_type is not None: - - _query_params.append(('entry_type', entry_type.value)) - - if destination_id is not None: - - _query_params.append(('destination_id', destination_id)) - - if chain_ids is not None: - - _query_params.append(('chain_ids', chain_ids)) - - if wallet_address is not None: - - _query_params.append(('wallet_address', wallet_address)) - - if keyword is not None: - - _query_params.append(('keyword', keyword)) - - if bank_account_status is not None: - - _query_params.append(('bank_account_status', bank_account_status.value)) - - # 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='/payments/destination_entry', - 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_destination_wallet_addresses( - self, - 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, - destination_id: Annotated[Optional[StrictStr], Field(description="The destination ID.")] = None, - chain_ids: Annotated[Optional[StrictStr], Field(description="The chain ID, which is the unique identifier of a blockchain.")] = None, - wallet_address: Annotated[Optional[StrictStr], Field(description="The wallet address.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ListDestinationWalletAddresses200Response: - """List destination wallet addresses - - This operation retrieves the information of destination wallet addresses. - - :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 destination_id: The destination ID. - :type destination_id: str - :param chain_ids: The chain ID, which is the unique identifier of a blockchain. - :type chain_ids: str - :param wallet_address: The wallet address. - :type wallet_address: 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_destination_wallet_addresses_serialize( - limit=limit, - before=before, - after=after, - destination_id=destination_id, - chain_ids=chain_ids, - wallet_address=wallet_address, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListDestinationWalletAddresses200Response", - '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_destination_wallet_addresses_with_http_info( - self, - 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, - destination_id: Annotated[Optional[StrictStr], Field(description="The destination ID.")] = None, - chain_ids: Annotated[Optional[StrictStr], Field(description="The chain ID, which is the unique identifier of a blockchain.")] = None, - wallet_address: Annotated[Optional[StrictStr], Field(description="The wallet address.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ApiResponse[ListDestinationWalletAddresses200Response]: - """List destination wallet addresses - - This operation retrieves the information of destination wallet addresses. - - :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 destination_id: The destination ID. - :type destination_id: str - :param chain_ids: The chain ID, which is the unique identifier of a blockchain. - :type chain_ids: str - :param wallet_address: The wallet address. - :type wallet_address: 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_destination_wallet_addresses_serialize( - limit=limit, - before=before, - after=after, - destination_id=destination_id, - chain_ids=chain_ids, - wallet_address=wallet_address, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListDestinationWalletAddresses200Response", - '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_destination_wallet_addresses_without_preload_content( - self, - 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, - destination_id: Annotated[Optional[StrictStr], Field(description="The destination ID.")] = None, - chain_ids: Annotated[Optional[StrictStr], Field(description="The chain ID, which is the unique identifier of a blockchain.")] = None, - wallet_address: Annotated[Optional[StrictStr], Field(description="The wallet address.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> RESTResponseType: - """List destination wallet addresses - - This operation retrieves the information of destination wallet addresses. - - :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 destination_id: The destination ID. - :type destination_id: str - :param chain_ids: The chain ID, which is the unique identifier of a blockchain. - :type chain_ids: str - :param wallet_address: The wallet address. - :type wallet_address: 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_destination_wallet_addresses_serialize( - limit=limit, - before=before, - after=after, - destination_id=destination_id, - chain_ids=chain_ids, - wallet_address=wallet_address, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListDestinationWalletAddresses200Response", - '4XX': "ErrorResponse", - '5XX': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - def _list_destination_wallet_addresses_serialize( - self, - limit, - before, - after, - destination_id, - chain_ids, - wallet_address, - ) -> 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 - 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)) - - if destination_id is not None: - - _query_params.append(('destination_id', destination_id)) - - if chain_ids is not None: - - _query_params.append(('chain_ids', chain_ids)) - - if wallet_address is not None: - - _query_params.append(('wallet_address', wallet_address)) - - # 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='/payments/destination/wallet_address', - 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_destinations( - self, - 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, - keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, - destination_type: Annotated[Optional[DestinationType], Field(description="DestinationType defines the type of the destination: - `Individual`: The destination is an individual. - `Organization`: The destination is an organization. ")] = None, - country: Annotated[Optional[StrictStr], Field(description="Country code, in ISO 3166-1 alpha-3 format.")] = None, - merchant_ids: Annotated[Optional[StrictStr], Field(description="A list of merchant IDs to query.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ListDestinations200Response: - """List all destinations - - This operation retrieves the information of all destinations. You can filter the results by using a keyword for fuzzy search on destination names. - - :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 keyword: A search term for performing fuzzy matches in the search query. - :type keyword: str - :param destination_type: DestinationType defines the type of the destination: - `Individual`: The destination is an individual. - `Organization`: The destination is an organization. - :type destination_type: DestinationType - :param country: Country code, in ISO 3166-1 alpha-3 format. - :type country: str - :param merchant_ids: A list of merchant IDs to query. - :type merchant_ids: 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_destinations_serialize( - limit=limit, - before=before, - after=after, - keyword=keyword, - destination_type=destination_type, - country=country, - merchant_ids=merchant_ids, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListDestinations200Response", - '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_destinations_with_http_info( - self, - 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, - keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, - destination_type: Annotated[Optional[DestinationType], Field(description="DestinationType defines the type of the destination: - `Individual`: The destination is an individual. - `Organization`: The destination is an organization. ")] = None, - country: Annotated[Optional[StrictStr], Field(description="Country code, in ISO 3166-1 alpha-3 format.")] = None, - merchant_ids: Annotated[Optional[StrictStr], Field(description="A list of merchant IDs to query.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> ApiResponse[ListDestinations200Response]: - """List all destinations - - This operation retrieves the information of all destinations. You can filter the results by using a keyword for fuzzy search on destination names. - - :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 keyword: A search term for performing fuzzy matches in the search query. - :type keyword: str - :param destination_type: DestinationType defines the type of the destination: - `Individual`: The destination is an individual. - `Organization`: The destination is an organization. - :type destination_type: DestinationType - :param country: Country code, in ISO 3166-1 alpha-3 format. - :type country: str - :param merchant_ids: A list of merchant IDs to query. - :type merchant_ids: 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_destinations_serialize( - limit=limit, - before=before, - after=after, - keyword=keyword, - destination_type=destination_type, - country=country, - merchant_ids=merchant_ids, - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListDestinations200Response", - '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_destinations_without_preload_content( - self, - 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, - keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, - destination_type: Annotated[Optional[DestinationType], Field(description="DestinationType defines the type of the destination: - `Individual`: The destination is an individual. - `Organization`: The destination is an organization. ")] = None, - country: Annotated[Optional[StrictStr], Field(description="Country code, in ISO 3166-1 alpha-3 format.")] = None, - merchant_ids: Annotated[Optional[StrictStr], Field(description="A list of merchant IDs to query.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - ) -> RESTResponseType: - """List all destinations - - This operation retrieves the information of all destinations. You can filter the results by using a keyword for fuzzy search on destination names. - - :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 keyword: A search term for performing fuzzy matches in the search query. - :type keyword: str - :param destination_type: DestinationType defines the type of the destination: - `Individual`: The destination is an individual. - `Organization`: The destination is an organization. - :type destination_type: DestinationType - :param country: Country code, in ISO 3166-1 alpha-3 format. - :type country: str - :param merchant_ids: A list of merchant IDs to query. - :type merchant_ids: 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_destinations_serialize( + _param = self._list_counterparties_serialize( limit=limit, before=before, after=after, keyword=keyword, - destination_type=destination_type, + counterparty_type=counterparty_type, country=country, - merchant_ids=merchant_ids, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListDestinations200Response", + '200': "ListCounterparties200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -12389,15 +8540,14 @@ def list_destinations_without_preload_content( ) return response_data.response - def _list_destinations_serialize( + def _list_counterparties_serialize( self, limit, before, after, keyword, - destination_type, + counterparty_type, country, - merchant_ids, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -12423,18 +8573,14 @@ def _list_destinations_serialize( _query_params.append(('keyword', keyword)) - if destination_type is not None: + if counterparty_type is not None: - _query_params.append(('destination_type', destination_type.value)) + _query_params.append(('counterparty_type', counterparty_type.value)) if country is not None: _query_params.append(('country', country)) - if merchant_ids is not None: - - _query_params.append(('merchant_ids', merchant_ids)) - # process the header parameters # process the form parameters # process the body parameter @@ -12447,7 +8593,7 @@ def _list_destinations_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/destination', + resource_path='/payments/counterparty', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -12457,12 +8603,15 @@ def _list_destinations_serialize( ) @validate_call - def list_forced_sweep_requests( + def list_counterparty_entries( self, 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, + entry_type: Annotated[Optional[EntryType], Field(description="The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")] = None, + counterparty_id: Annotated[Optional[StrictStr], Field(description="The counterparty ID.")] = None, + chain_ids: Annotated[Optional[StrictStr], Field(description="The chain ID, which is the unique identifier of a blockchain.")] = None, + wallet_address: Annotated[Optional[StrictStr], Field(description="The wallet address.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12471,10 +8620,10 @@ def list_forced_sweep_requests( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ListForcedSweepRequests200Response: - """List forced sweeps + ) -> ListCounterpartyEntries200Response: + """List counterparty entries - This operation has been deprecated. This operation retrieves the information of all forced sweeps. + This operation retrieves the information of counterparty entries. :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -12482,8 +8631,14 @@ def list_forced_sweep_requests( :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_id: The request ID. - :type request_id: str + :param entry_type: The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. + :type entry_type: EntryType + :param counterparty_id: The counterparty ID. + :type counterparty_id: str + :param chain_ids: The chain ID, which is the unique identifier of a blockchain. + :type chain_ids: str + :param wallet_address: The wallet address. + :type wallet_address: 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 @@ -12492,15 +8647,18 @@ def list_forced_sweep_requests( :return: Returns the result object. """ # noqa: E501 - _param = self._list_forced_sweep_requests_serialize( + _param = self._list_counterparty_entries_serialize( limit=limit, before=before, after=after, - request_id=request_id, + entry_type=entry_type, + counterparty_id=counterparty_id, + chain_ids=chain_ids, + wallet_address=wallet_address, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListForcedSweepRequests200Response", + '200': "ListCounterpartyEntries200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -12515,12 +8673,15 @@ def list_forced_sweep_requests( ).data @validate_call - def list_forced_sweep_requests_with_http_info( + def list_counterparty_entries_with_http_info( self, 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, + entry_type: Annotated[Optional[EntryType], Field(description="The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")] = None, + counterparty_id: Annotated[Optional[StrictStr], Field(description="The counterparty ID.")] = None, + chain_ids: Annotated[Optional[StrictStr], Field(description="The chain ID, which is the unique identifier of a blockchain.")] = None, + wallet_address: Annotated[Optional[StrictStr], Field(description="The wallet address.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12529,10 +8690,10 @@ def list_forced_sweep_requests_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[ListForcedSweepRequests200Response]: - """List forced sweeps + ) -> ApiResponse[ListCounterpartyEntries200Response]: + """List counterparty entries - This operation has been deprecated. This operation retrieves the information of all forced sweeps. + This operation retrieves the information of counterparty entries. :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -12540,8 +8701,14 @@ def list_forced_sweep_requests_with_http_info( :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_id: The request ID. - :type request_id: str + :param entry_type: The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. + :type entry_type: EntryType + :param counterparty_id: The counterparty ID. + :type counterparty_id: str + :param chain_ids: The chain ID, which is the unique identifier of a blockchain. + :type chain_ids: str + :param wallet_address: The wallet address. + :type wallet_address: 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 @@ -12550,15 +8717,18 @@ def list_forced_sweep_requests_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_forced_sweep_requests_serialize( + _param = self._list_counterparty_entries_serialize( limit=limit, before=before, after=after, - request_id=request_id, + entry_type=entry_type, + counterparty_id=counterparty_id, + chain_ids=chain_ids, + wallet_address=wallet_address, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListForcedSweepRequests200Response", + '200': "ListCounterpartyEntries200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -12573,12 +8743,15 @@ def list_forced_sweep_requests_with_http_info( ) @validate_call - def list_forced_sweep_requests_without_preload_content( + def list_counterparty_entries_without_preload_content( self, 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, + entry_type: Annotated[Optional[EntryType], Field(description="The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")] = None, + counterparty_id: Annotated[Optional[StrictStr], Field(description="The counterparty ID.")] = None, + chain_ids: Annotated[Optional[StrictStr], Field(description="The chain ID, which is the unique identifier of a blockchain.")] = None, + wallet_address: Annotated[Optional[StrictStr], Field(description="The wallet address.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12588,9 +8761,9 @@ def list_forced_sweep_requests_without_preload_content( ] ] = None, ) -> RESTResponseType: - """List forced sweeps + """List counterparty entries - This operation has been deprecated. This operation retrieves the information of all forced sweeps. + This operation retrieves the information of counterparty entries. :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -12598,8 +8771,14 @@ def list_forced_sweep_requests_without_preload_content( :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_id: The request ID. - :type request_id: str + :param entry_type: The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. + :type entry_type: EntryType + :param counterparty_id: The counterparty ID. + :type counterparty_id: str + :param chain_ids: The chain ID, which is the unique identifier of a blockchain. + :type chain_ids: str + :param wallet_address: The wallet address. + :type wallet_address: 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 @@ -12608,15 +8787,18 @@ def list_forced_sweep_requests_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_forced_sweep_requests_serialize( + _param = self._list_counterparty_entries_serialize( limit=limit, before=before, after=after, - request_id=request_id, + entry_type=entry_type, + counterparty_id=counterparty_id, + chain_ids=chain_ids, + wallet_address=wallet_address, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListForcedSweepRequests200Response", + '200': "ListCounterpartyEntries200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -12626,12 +8808,15 @@ def list_forced_sweep_requests_without_preload_content( ) return response_data.response - def _list_forced_sweep_requests_serialize( + def _list_counterparty_entries_serialize( self, limit, before, after, - request_id, + entry_type, + counterparty_id, + chain_ids, + wallet_address, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -12653,9 +8838,21 @@ def _list_forced_sweep_requests_serialize( _query_params.append(('after', after)) - if request_id is not None: + if entry_type is not None: - _query_params.append(('request_id', request_id)) + _query_params.append(('entry_type', entry_type.value)) + + if counterparty_id is not None: + + _query_params.append(('counterparty_id', counterparty_id)) + + if chain_ids is not None: + + _query_params.append(('chain_ids', chain_ids)) + + if wallet_address is not None: + + _query_params.append(('wallet_address', wallet_address)) # process the header parameters # process the form parameters @@ -12669,7 +8866,7 @@ def _list_forced_sweep_requests_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/force_sweep_requests', + resource_path='/payments/counterparty_entry', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -12679,11 +8876,9 @@ def _list_forced_sweep_requests_serialize( ) @validate_call - def list_merchant_balances( + def list_crypto_addresses( 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, - acquiring_type: Annotated[Optional[AcquiringType], Field(description="This parameter has been deprecated")] = None, + token_id: Annotated[Optional[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` ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12692,17 +8887,13 @@ def list_merchant_balances( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ListMerchantBalances200Response: - """List merchant balances + ) -> List[CryptoAddress]: + """List crypto addresses - 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 has been deprecated. This operation retrieves a list of crypto addresses registered for crypto payouts. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new crypto address. - :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) + :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` :type token_id: str - :param merchant_ids: A list of merchant IDs to query. - :type merchant_ids: str - :param acquiring_type: This parameter has been deprecated - :type acquiring_type: AcquiringType :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 @@ -12711,14 +8902,12 @@ def list_merchant_balances( :return: Returns the result object. """ # noqa: E501 - _param = self._list_merchant_balances_serialize( + _param = self._list_crypto_addresses_serialize( token_id=token_id, - merchant_ids=merchant_ids, - acquiring_type=acquiring_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListMerchantBalances200Response", + '200': "List[CryptoAddress]", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -12733,11 +8922,9 @@ def list_merchant_balances( ).data @validate_call - def list_merchant_balances_with_http_info( + def list_crypto_addresses_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, - acquiring_type: Annotated[Optional[AcquiringType], Field(description="This parameter has been deprecated")] = None, + token_id: Annotated[Optional[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` ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12746,17 +8933,13 @@ def list_merchant_balances_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[ListMerchantBalances200Response]: - """List merchant balances + ) -> ApiResponse[List[CryptoAddress]]: + """List crypto addresses - 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 has been deprecated. This operation retrieves a list of crypto addresses registered for crypto payouts. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new crypto address. - :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) + :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` :type token_id: str - :param merchant_ids: A list of merchant IDs to query. - :type merchant_ids: str - :param acquiring_type: This parameter has been deprecated - :type acquiring_type: AcquiringType :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 @@ -12765,14 +8948,12 @@ def list_merchant_balances_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_merchant_balances_serialize( + _param = self._list_crypto_addresses_serialize( token_id=token_id, - merchant_ids=merchant_ids, - acquiring_type=acquiring_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListMerchantBalances200Response", + '200': "List[CryptoAddress]", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -12787,11 +8968,9 @@ def list_merchant_balances_with_http_info( ) @validate_call - def list_merchant_balances_without_preload_content( + def list_crypto_addresses_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, - acquiring_type: Annotated[Optional[AcquiringType], Field(description="This parameter has been deprecated")] = None, + token_id: Annotated[Optional[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` ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12801,16 +8980,12 @@ def list_merchant_balances_without_preload_content( ] ] = None, ) -> RESTResponseType: - """List merchant balances + """List crypto addresses - 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 has been deprecated. This operation retrieves a list of crypto addresses registered for crypto payouts. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new crypto address. - :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) + :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` :type token_id: str - :param merchant_ids: A list of merchant IDs to query. - :type merchant_ids: str - :param acquiring_type: This parameter has been deprecated - :type acquiring_type: AcquiringType :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 @@ -12819,14 +8994,12 @@ def list_merchant_balances_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_merchant_balances_serialize( + _param = self._list_crypto_addresses_serialize( token_id=token_id, - merchant_ids=merchant_ids, - acquiring_type=acquiring_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListMerchantBalances200Response", + '200': "List[CryptoAddress]", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -12836,11 +9009,9 @@ def list_merchant_balances_without_preload_content( ) return response_data.response - def _list_merchant_balances_serialize( + def _list_crypto_addresses_serialize( self, token_id, - merchant_ids, - acquiring_type, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -12850,18 +9021,10 @@ def _list_merchant_balances_serialize( # process the path parameters # process the query parameters - if merchant_ids is not None: - - _query_params.append(('merchant_ids', merchant_ids)) - if token_id is not None: _query_params.append(('token_id', token_id)) - if acquiring_type is not None: - - _query_params.append(('acquiring_type', acquiring_type.value)) - # process the header parameters # process the form parameters # process the body parameter @@ -12874,7 +9037,7 @@ def _list_merchant_balances_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/balance/merchants', + resource_path='/payments/crypto_addresses', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -12884,14 +9047,17 @@ def _list_merchant_balances_serialize( ) @validate_call - def list_merchants( + def list_destination_entries( self, + entry_type: Annotated[EntryType, Field(description="EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")], 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, + destination_id: Annotated[Optional[StrictStr], Field(description="The destination ID.")] = None, + chain_ids: Annotated[Optional[StrictStr], Field(description="The chain ID, which is the unique identifier of a blockchain.")] = None, + wallet_address: Annotated[Optional[StrictStr], Field(description="The wallet address.")] = None, keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, - wallet_id: Annotated[Optional[StrictStr], Field(description="This parameter has been deprecated.")] = None, - wallet_setup: Annotated[Optional[WalletSetup], Field(description="The type of wallet setup for the merchant. Each wallet contains multiple cryptocurrency addresses that serve as the merchant’s receiving addresses. - `Shared`: Multiple merchants share the same wallet. The wallet’s addresses may be used to receive payments for multiple merchants simultaneously. - `Separate`: Create a dedicated wallet for the merchant to achieve complete fund isolation. All addresses in this wallet are only used to receive payments for this merchant. - `Default`: The default wallet automatically created by the system for the default merchant (the merchant that shares the same name as your organization). ")] = None, + bank_account_status: Annotated[Optional[BankAccountStatus], Field(description="BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12900,23 +9066,29 @@ def list_merchants( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ListMerchants200Response: - """List all merchants + ) -> ListDestinationEntries200Response: + """List destination entries - This operation retrieves the information of all merchants. You can filter the results by using a keyword for fuzzy search on merchant names or by specifying a wallet ID. + This operation retrieves the information of destination entries. + :param entry_type: EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. (required) + :type entry_type: EntryType :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 destination_id: The destination ID. + :type destination_id: str + :param chain_ids: The chain ID, which is the unique identifier of a blockchain. + :type chain_ids: str + :param wallet_address: The wallet address. + :type wallet_address: str :param keyword: A search term for performing fuzzy matches in the search query. :type keyword: str - :param wallet_id: This parameter has been deprecated. - :type wallet_id: str - :param wallet_setup: The type of wallet setup for the merchant. Each wallet contains multiple cryptocurrency addresses that serve as the merchant’s receiving addresses. - `Shared`: Multiple merchants share the same wallet. The wallet’s addresses may be used to receive payments for multiple merchants simultaneously. - `Separate`: Create a dedicated wallet for the merchant to achieve complete fund isolation. All addresses in this wallet are only used to receive payments for this merchant. - `Default`: The default wallet automatically created by the system for the default merchant (the merchant that shares the same name as your organization). - :type wallet_setup: WalletSetup + :param bank_account_status: BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. + :type bank_account_status: BankAccountStatus :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 @@ -12925,17 +9097,20 @@ def list_merchants( :return: Returns the result object. """ # noqa: E501 - _param = self._list_merchants_serialize( + _param = self._list_destination_entries_serialize( + entry_type=entry_type, limit=limit, before=before, after=after, + destination_id=destination_id, + chain_ids=chain_ids, + wallet_address=wallet_address, keyword=keyword, - wallet_id=wallet_id, - wallet_setup=wallet_setup, + bank_account_status=bank_account_status, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListMerchants200Response", + '200': "ListDestinationEntries200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -12950,14 +9125,17 @@ def list_merchants( ).data @validate_call - def list_merchants_with_http_info( + def list_destination_entries_with_http_info( self, + entry_type: Annotated[EntryType, Field(description="EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")], 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, + destination_id: Annotated[Optional[StrictStr], Field(description="The destination ID.")] = None, + chain_ids: Annotated[Optional[StrictStr], Field(description="The chain ID, which is the unique identifier of a blockchain.")] = None, + wallet_address: Annotated[Optional[StrictStr], Field(description="The wallet address.")] = None, keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, - wallet_id: Annotated[Optional[StrictStr], Field(description="This parameter has been deprecated.")] = None, - wallet_setup: Annotated[Optional[WalletSetup], Field(description="The type of wallet setup for the merchant. Each wallet contains multiple cryptocurrency addresses that serve as the merchant’s receiving addresses. - `Shared`: Multiple merchants share the same wallet. The wallet’s addresses may be used to receive payments for multiple merchants simultaneously. - `Separate`: Create a dedicated wallet for the merchant to achieve complete fund isolation. All addresses in this wallet are only used to receive payments for this merchant. - `Default`: The default wallet automatically created by the system for the default merchant (the merchant that shares the same name as your organization). ")] = None, + bank_account_status: Annotated[Optional[BankAccountStatus], Field(description="BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12966,23 +9144,29 @@ def list_merchants_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[ListMerchants200Response]: - """List all merchants + ) -> ApiResponse[ListDestinationEntries200Response]: + """List destination entries - This operation retrieves the information of all merchants. You can filter the results by using a keyword for fuzzy search on merchant names or by specifying a wallet ID. + This operation retrieves the information of destination entries. + :param entry_type: EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. (required) + :type entry_type: EntryType :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 destination_id: The destination ID. + :type destination_id: str + :param chain_ids: The chain ID, which is the unique identifier of a blockchain. + :type chain_ids: str + :param wallet_address: The wallet address. + :type wallet_address: str :param keyword: A search term for performing fuzzy matches in the search query. :type keyword: str - :param wallet_id: This parameter has been deprecated. - :type wallet_id: str - :param wallet_setup: The type of wallet setup for the merchant. Each wallet contains multiple cryptocurrency addresses that serve as the merchant’s receiving addresses. - `Shared`: Multiple merchants share the same wallet. The wallet’s addresses may be used to receive payments for multiple merchants simultaneously. - `Separate`: Create a dedicated wallet for the merchant to achieve complete fund isolation. All addresses in this wallet are only used to receive payments for this merchant. - `Default`: The default wallet automatically created by the system for the default merchant (the merchant that shares the same name as your organization). - :type wallet_setup: WalletSetup + :param bank_account_status: BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. + :type bank_account_status: BankAccountStatus :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 @@ -12991,17 +9175,20 @@ def list_merchants_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_merchants_serialize( + _param = self._list_destination_entries_serialize( + entry_type=entry_type, limit=limit, before=before, after=after, + destination_id=destination_id, + chain_ids=chain_ids, + wallet_address=wallet_address, keyword=keyword, - wallet_id=wallet_id, - wallet_setup=wallet_setup, + bank_account_status=bank_account_status, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListMerchants200Response", + '200': "ListDestinationEntries200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -13016,14 +9203,17 @@ def list_merchants_with_http_info( ) @validate_call - def list_merchants_without_preload_content( + def list_destination_entries_without_preload_content( self, + entry_type: Annotated[EntryType, Field(description="EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. ")], 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, + destination_id: Annotated[Optional[StrictStr], Field(description="The destination ID.")] = None, + chain_ids: Annotated[Optional[StrictStr], Field(description="The chain ID, which is the unique identifier of a blockchain.")] = None, + wallet_address: Annotated[Optional[StrictStr], Field(description="The wallet address.")] = None, keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, - wallet_id: Annotated[Optional[StrictStr], Field(description="This parameter has been deprecated.")] = None, - wallet_setup: Annotated[Optional[WalletSetup], Field(description="The type of wallet setup for the merchant. Each wallet contains multiple cryptocurrency addresses that serve as the merchant’s receiving addresses. - `Shared`: Multiple merchants share the same wallet. The wallet’s addresses may be used to receive payments for multiple merchants simultaneously. - `Separate`: Create a dedicated wallet for the merchant to achieve complete fund isolation. All addresses in this wallet are only used to receive payments for this merchant. - `Default`: The default wallet automatically created by the system for the default merchant (the merchant that shares the same name as your organization). ")] = None, + bank_account_status: Annotated[Optional[BankAccountStatus], Field(description="BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13033,22 +9223,28 @@ def list_merchants_without_preload_content( ] ] = None, ) -> RESTResponseType: - """List all merchants + """List destination entries - This operation retrieves the information of all merchants. You can filter the results by using a keyword for fuzzy search on merchant names or by specifying a wallet ID. + This operation retrieves the information of destination entries. + :param entry_type: EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. (required) + :type entry_type: EntryType :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 destination_id: The destination ID. + :type destination_id: str + :param chain_ids: The chain ID, which is the unique identifier of a blockchain. + :type chain_ids: str + :param wallet_address: The wallet address. + :type wallet_address: str :param keyword: A search term for performing fuzzy matches in the search query. :type keyword: str - :param wallet_id: This parameter has been deprecated. - :type wallet_id: str - :param wallet_setup: The type of wallet setup for the merchant. Each wallet contains multiple cryptocurrency addresses that serve as the merchant’s receiving addresses. - `Shared`: Multiple merchants share the same wallet. The wallet’s addresses may be used to receive payments for multiple merchants simultaneously. - `Separate`: Create a dedicated wallet for the merchant to achieve complete fund isolation. All addresses in this wallet are only used to receive payments for this merchant. - `Default`: The default wallet automatically created by the system for the default merchant (the merchant that shares the same name as your organization). - :type wallet_setup: WalletSetup + :param bank_account_status: BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. + :type bank_account_status: BankAccountStatus :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 @@ -13057,17 +9253,20 @@ def list_merchants_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_merchants_serialize( + _param = self._list_destination_entries_serialize( + entry_type=entry_type, limit=limit, before=before, after=after, + destination_id=destination_id, + chain_ids=chain_ids, + wallet_address=wallet_address, keyword=keyword, - wallet_id=wallet_id, - wallet_setup=wallet_setup, + bank_account_status=bank_account_status, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListMerchants200Response", + '200': "ListDestinationEntries200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -13077,14 +9276,17 @@ def list_merchants_without_preload_content( ) return response_data.response - def _list_merchants_serialize( + def _list_destination_entries_serialize( self, + entry_type, limit, before, after, + destination_id, + chain_ids, + wallet_address, keyword, - wallet_id, - wallet_setup, + bank_account_status, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -13106,17 +9308,29 @@ def _list_merchants_serialize( _query_params.append(('after', after)) - if keyword is not None: + if entry_type is not None: - _query_params.append(('keyword', keyword)) + _query_params.append(('entry_type', entry_type.value)) - if wallet_id is not None: + if destination_id is not None: - _query_params.append(('wallet_id', wallet_id)) + _query_params.append(('destination_id', destination_id)) - if wallet_setup is not None: + if chain_ids is not None: - _query_params.append(('wallet_setup', wallet_setup.value)) + _query_params.append(('chain_ids', chain_ids)) + + if wallet_address is not None: + + _query_params.append(('wallet_address', wallet_address)) + + if keyword is not None: + + _query_params.append(('keyword', keyword)) + + if bank_account_status is not None: + + _query_params.append(('bank_account_status', bank_account_status.value)) # process the header parameters # process the form parameters @@ -13130,7 +9344,7 @@ def _list_merchants_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/merchants', + resource_path='/payments/destination_entry', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -13140,14 +9354,15 @@ def _list_merchants_serialize( ) @validate_call - def list_payment_orders( + def list_destinations( self, 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, - merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, - psp_order_id: Annotated[Optional[StrictStr], Field(description="A unique reference code assigned by the developer to identify this order in their system.")] = None, - statuses: Annotated[Optional[StrictStr], Field(description="A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) ")] = None, + keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, + destination_type: Annotated[Optional[DestinationType], Field(description="DestinationType defines the type of the destination: - `Individual`: The destination is an individual. - `Organization`: The destination is an organization. ")] = None, + country: Annotated[Optional[StrictStr], Field(description="Country code, in ISO 3166-1 alpha-3 format.")] = None, + merchant_ids: Annotated[Optional[StrictStr], Field(description="A list of merchant IDs to query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13156,10 +9371,10 @@ def list_payment_orders( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ListPaymentOrders200Response: - """List all pay-in orders + ) -> ListDestinations200Response: + """List all destinations - This operation retrieves the information of all pay-in orders. You can filter the result by merchant ID. + This operation retrieves the information of all destinations. You can filter the results by using a keyword for fuzzy search on destination names. :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -13167,12 +9382,14 @@ def list_payment_orders( :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 merchant_id: The merchant ID. - :type merchant_id: str - :param psp_order_id: A unique reference code assigned by the developer to identify this order in their system. - :type psp_order_id: str - :param statuses: A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) - :type statuses: str + :param keyword: A search term for performing fuzzy matches in the search query. + :type keyword: str + :param destination_type: DestinationType defines the type of the destination: - `Individual`: The destination is an individual. - `Organization`: The destination is an organization. + :type destination_type: DestinationType + :param country: Country code, in ISO 3166-1 alpha-3 format. + :type country: str + :param merchant_ids: A list of merchant IDs to query. + :type merchant_ids: 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 @@ -13181,17 +9398,18 @@ def list_payment_orders( :return: Returns the result object. """ # noqa: E501 - _param = self._list_payment_orders_serialize( + _param = self._list_destinations_serialize( limit=limit, before=before, after=after, - merchant_id=merchant_id, - psp_order_id=psp_order_id, - statuses=statuses, + keyword=keyword, + destination_type=destination_type, + country=country, + merchant_ids=merchant_ids, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListPaymentOrders200Response", + '200': "ListDestinations200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -13206,14 +9424,15 @@ def list_payment_orders( ).data @validate_call - def list_payment_orders_with_http_info( + def list_destinations_with_http_info( self, 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, - merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, - psp_order_id: Annotated[Optional[StrictStr], Field(description="A unique reference code assigned by the developer to identify this order in their system.")] = None, - statuses: Annotated[Optional[StrictStr], Field(description="A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) ")] = None, + keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, + destination_type: Annotated[Optional[DestinationType], Field(description="DestinationType defines the type of the destination: - `Individual`: The destination is an individual. - `Organization`: The destination is an organization. ")] = None, + country: Annotated[Optional[StrictStr], Field(description="Country code, in ISO 3166-1 alpha-3 format.")] = None, + merchant_ids: Annotated[Optional[StrictStr], Field(description="A list of merchant IDs to query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13222,10 +9441,10 @@ def list_payment_orders_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[ListPaymentOrders200Response]: - """List all pay-in orders + ) -> ApiResponse[ListDestinations200Response]: + """List all destinations - This operation retrieves the information of all pay-in orders. You can filter the result by merchant ID. + This operation retrieves the information of all destinations. You can filter the results by using a keyword for fuzzy search on destination names. :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -13233,12 +9452,14 @@ def list_payment_orders_with_http_info( :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 merchant_id: The merchant ID. - :type merchant_id: str - :param psp_order_id: A unique reference code assigned by the developer to identify this order in their system. - :type psp_order_id: str - :param statuses: A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) - :type statuses: str + :param keyword: A search term for performing fuzzy matches in the search query. + :type keyword: str + :param destination_type: DestinationType defines the type of the destination: - `Individual`: The destination is an individual. - `Organization`: The destination is an organization. + :type destination_type: DestinationType + :param country: Country code, in ISO 3166-1 alpha-3 format. + :type country: str + :param merchant_ids: A list of merchant IDs to query. + :type merchant_ids: 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 @@ -13247,17 +9468,18 @@ def list_payment_orders_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_payment_orders_serialize( + _param = self._list_destinations_serialize( limit=limit, before=before, after=after, - merchant_id=merchant_id, - psp_order_id=psp_order_id, - statuses=statuses, + keyword=keyword, + destination_type=destination_type, + country=country, + merchant_ids=merchant_ids, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListPaymentOrders200Response", + '200': "ListDestinations200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -13272,14 +9494,15 @@ def list_payment_orders_with_http_info( ) @validate_call - def list_payment_orders_without_preload_content( + def list_destinations_without_preload_content( self, 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, - merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, - psp_order_id: Annotated[Optional[StrictStr], Field(description="A unique reference code assigned by the developer to identify this order in their system.")] = None, - statuses: Annotated[Optional[StrictStr], Field(description="A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) ")] = 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, + keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, + destination_type: Annotated[Optional[DestinationType], Field(description="DestinationType defines the type of the destination: - `Individual`: The destination is an individual. - `Organization`: The destination is an organization. ")] = None, + country: Annotated[Optional[StrictStr], Field(description="Country code, in ISO 3166-1 alpha-3 format.")] = None, + merchant_ids: Annotated[Optional[StrictStr], Field(description="A list of merchant IDs to query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13289,9 +9512,9 @@ def list_payment_orders_without_preload_content( ] ] = None, ) -> RESTResponseType: - """List all pay-in orders + """List all destinations - This operation retrieves the information of all pay-in orders. You can filter the result by merchant ID. + This operation retrieves the information of all destinations. You can filter the results by using a keyword for fuzzy search on destination names. :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -13299,12 +9522,14 @@ def list_payment_orders_without_preload_content( :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 merchant_id: The merchant ID. - :type merchant_id: str - :param psp_order_id: A unique reference code assigned by the developer to identify this order in their system. - :type psp_order_id: str - :param statuses: A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) - :type statuses: str + :param keyword: A search term for performing fuzzy matches in the search query. + :type keyword: str + :param destination_type: DestinationType defines the type of the destination: - `Individual`: The destination is an individual. - `Organization`: The destination is an organization. + :type destination_type: DestinationType + :param country: Country code, in ISO 3166-1 alpha-3 format. + :type country: str + :param merchant_ids: A list of merchant IDs to query. + :type merchant_ids: 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 @@ -13313,17 +9538,18 @@ def list_payment_orders_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_payment_orders_serialize( + _param = self._list_destinations_serialize( limit=limit, before=before, after=after, - merchant_id=merchant_id, - psp_order_id=psp_order_id, - statuses=statuses, + keyword=keyword, + destination_type=destination_type, + country=country, + merchant_ids=merchant_ids, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListPaymentOrders200Response", + '200': "ListDestinations200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -13333,14 +9559,15 @@ def list_payment_orders_without_preload_content( ) return response_data.response - def _list_payment_orders_serialize( + def _list_destinations_serialize( self, limit, before, after, - merchant_id, - psp_order_id, - statuses, + keyword, + destination_type, + country, + merchant_ids, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -13362,17 +9589,21 @@ def _list_payment_orders_serialize( _query_params.append(('after', after)) - if merchant_id is not None: + if keyword is not None: - _query_params.append(('merchant_id', merchant_id)) + _query_params.append(('keyword', keyword)) - if psp_order_id is not None: + if destination_type is not None: - _query_params.append(('psp_order_id', psp_order_id)) + _query_params.append(('destination_type', destination_type.value)) - if statuses is not None: + if country is not None: - _query_params.append(('statuses', statuses)) + _query_params.append(('country', country)) + + if merchant_ids is not None: + + _query_params.append(('merchant_ids', merchant_ids)) # process the header parameters # process the form parameters @@ -13386,7 +9617,7 @@ def _list_payment_orders_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/orders', + resource_path='/payments/destination', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -13396,8 +9627,12 @@ def _list_payment_orders_serialize( ) @validate_call - def list_payment_supported_tokens( + def list_forced_sweep_requests( self, + 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13406,11 +9641,19 @@ def list_payment_supported_tokens( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> List[SupportedToken]: - """List all supported tokens + ) -> ListForcedSweepRequests200Response: + """List forced sweeps - This operation retrieves the information of all supported tokens. + This operation has been deprecated. This operation retrieves the information of all forced sweeps. + :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_id: The request ID. + :type request_id: 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 @@ -13419,11 +9662,15 @@ def list_payment_supported_tokens( :return: Returns the result object. """ # noqa: E501 - _param = self._list_payment_supported_tokens_serialize( + _param = self._list_forced_sweep_requests_serialize( + limit=limit, + before=before, + after=after, + request_id=request_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[SupportedToken]", + '200': "ListForcedSweepRequests200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -13438,8 +9685,12 @@ def list_payment_supported_tokens( ).data @validate_call - def list_payment_supported_tokens_with_http_info( + def list_forced_sweep_requests_with_http_info( self, + 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13448,11 +9699,19 @@ def list_payment_supported_tokens_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[List[SupportedToken]]: - """List all supported tokens + ) -> ApiResponse[ListForcedSweepRequests200Response]: + """List forced sweeps - This operation retrieves the information of all supported tokens. + This operation has been deprecated. This operation retrieves the information of all forced sweeps. + :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_id: The request ID. + :type request_id: 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 @@ -13461,11 +9720,15 @@ def list_payment_supported_tokens_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_payment_supported_tokens_serialize( + _param = self._list_forced_sweep_requests_serialize( + limit=limit, + before=before, + after=after, + request_id=request_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[SupportedToken]", + '200': "ListForcedSweepRequests200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -13480,8 +9743,12 @@ def list_payment_supported_tokens_with_http_info( ) @validate_call - def list_payment_supported_tokens_without_preload_content( + def list_forced_sweep_requests_without_preload_content( self, + 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13491,10 +9758,18 @@ def list_payment_supported_tokens_without_preload_content( ] ] = None, ) -> RESTResponseType: - """List all supported tokens + """List forced sweeps - This operation retrieves the information of all supported tokens. + This operation has been deprecated. This operation retrieves the information of all forced sweeps. + :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_id: The request ID. + :type request_id: 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 @@ -13503,11 +9778,15 @@ def list_payment_supported_tokens_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_payment_supported_tokens_serialize( + _param = self._list_forced_sweep_requests_serialize( + limit=limit, + before=before, + after=after, + request_id=request_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "List[SupportedToken]", + '200': "ListForcedSweepRequests200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -13517,8 +9796,12 @@ def list_payment_supported_tokens_without_preload_content( ) return response_data.response - def _list_payment_supported_tokens_serialize( + def _list_forced_sweep_requests_serialize( self, + limit, + before, + after, + request_id, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -13528,6 +9811,22 @@ def _list_payment_supported_tokens_serialize( # process the path parameters # process the query parameters + 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)) + + if request_id is not None: + + _query_params.append(('request_id', request_id)) + # process the header parameters # process the form parameters # process the body parameter @@ -13540,7 +9839,7 @@ def _list_payment_supported_tokens_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/supported_tokens', + resource_path='/payments/force_sweep_requests', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -13550,10 +9849,11 @@ def _list_payment_supported_tokens_serialize( ) @validate_call - def list_payment_wallet_balances( + 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` ")], - wallet_ids: Annotated[Optional[StrictStr], Field(description="A list of wallet IDs to query.")] = None, + merchant_ids: Annotated[Optional[StrictStr], Field(description="A list of merchant IDs to query.")] = None, + acquiring_type: Annotated[Optional[AcquiringType], Field(description="This parameter has been deprecated")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13562,15 +9862,17 @@ def list_payment_wallet_balances( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ListPaymentWalletBalances200Response: - """List payment wallet balances + ) -> ListMerchantBalances200Response: + """List merchant balances - This operation has been deprecated. This operation retrieves the balance information for specified payment wallets. The balance information is grouped by token. If you do not specify the `wallet_ids` parameter, the balance information for all payment wallets will be returned. + 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). :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 wallet_ids: A list of wallet IDs to query. - :type wallet_ids: str + :param merchant_ids: A list of merchant IDs to query. + :type merchant_ids: str + :param acquiring_type: This parameter has been deprecated + :type acquiring_type: AcquiringType :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 @@ -13579,13 +9881,14 @@ def list_payment_wallet_balances( :return: Returns the result object. """ # noqa: E501 - _param = self._list_payment_wallet_balances_serialize( + _param = self._list_merchant_balances_serialize( token_id=token_id, - wallet_ids=wallet_ids, + merchant_ids=merchant_ids, + acquiring_type=acquiring_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListPaymentWalletBalances200Response", + '200': "ListMerchantBalances200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -13600,10 +9903,11 @@ def list_payment_wallet_balances( ).data @validate_call - def list_payment_wallet_balances_with_http_info( + 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` ")], - wallet_ids: Annotated[Optional[StrictStr], Field(description="A list of wallet IDs to query.")] = None, + merchant_ids: Annotated[Optional[StrictStr], Field(description="A list of merchant IDs to query.")] = None, + acquiring_type: Annotated[Optional[AcquiringType], Field(description="This parameter has been deprecated")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13612,15 +9916,17 @@ def list_payment_wallet_balances_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[ListPaymentWalletBalances200Response]: - """List payment wallet balances + ) -> ApiResponse[ListMerchantBalances200Response]: + """List merchant balances - This operation has been deprecated. This operation retrieves the balance information for specified payment wallets. The balance information is grouped by token. If you do not specify the `wallet_ids` parameter, the balance information for all payment wallets will be returned. + 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). :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 wallet_ids: A list of wallet IDs to query. - :type wallet_ids: str + :param merchant_ids: A list of merchant IDs to query. + :type merchant_ids: str + :param acquiring_type: This parameter has been deprecated + :type acquiring_type: AcquiringType :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 @@ -13629,13 +9935,14 @@ def list_payment_wallet_balances_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_payment_wallet_balances_serialize( + _param = self._list_merchant_balances_serialize( token_id=token_id, - wallet_ids=wallet_ids, + merchant_ids=merchant_ids, + acquiring_type=acquiring_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListPaymentWalletBalances200Response", + '200': "ListMerchantBalances200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -13650,10 +9957,11 @@ def list_payment_wallet_balances_with_http_info( ) @validate_call - def list_payment_wallet_balances_without_preload_content( + 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` ")], - wallet_ids: Annotated[Optional[StrictStr], Field(description="A list of wallet IDs to query.")] = None, + merchant_ids: Annotated[Optional[StrictStr], Field(description="A list of merchant IDs to query.")] = None, + acquiring_type: Annotated[Optional[AcquiringType], Field(description="This parameter has been deprecated")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13663,14 +9971,16 @@ def list_payment_wallet_balances_without_preload_content( ] ] = None, ) -> RESTResponseType: - """List payment wallet balances + """List merchant balances - This operation has been deprecated. This operation retrieves the balance information for specified payment wallets. The balance information is grouped by token. If you do not specify the `wallet_ids` parameter, the balance information for all payment wallets will be returned. + 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). :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 wallet_ids: A list of wallet IDs to query. - :type wallet_ids: str + :param merchant_ids: A list of merchant IDs to query. + :type merchant_ids: str + :param acquiring_type: This parameter has been deprecated + :type acquiring_type: AcquiringType :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 @@ -13679,13 +9989,14 @@ def list_payment_wallet_balances_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_payment_wallet_balances_serialize( + _param = self._list_merchant_balances_serialize( token_id=token_id, - wallet_ids=wallet_ids, + merchant_ids=merchant_ids, + acquiring_type=acquiring_type, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListPaymentWalletBalances200Response", + '200': "ListMerchantBalances200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -13695,10 +10006,11 @@ def list_payment_wallet_balances_without_preload_content( ) return response_data.response - def _list_payment_wallet_balances_serialize( + def _list_merchant_balances_serialize( self, token_id, - wallet_ids, + merchant_ids, + acquiring_type, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -13708,14 +10020,18 @@ def _list_payment_wallet_balances_serialize( # process the path parameters # process the query parameters - if wallet_ids is not None: + if merchant_ids is not None: - _query_params.append(('wallet_ids', wallet_ids)) + _query_params.append(('merchant_ids', merchant_ids)) if token_id is not None: _query_params.append(('token_id', token_id)) + if acquiring_type is not None: + + _query_params.append(('acquiring_type', acquiring_type.value)) + # process the header parameters # process the form parameters # process the body parameter @@ -13728,7 +10044,7 @@ def _list_payment_wallet_balances_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/balance/payment_wallets', + resource_path='/payments/balance/merchants', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -13738,12 +10054,14 @@ def _list_payment_wallet_balances_serialize( ) @validate_call - def list_payouts( + def list_merchants( self, 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, + keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, + wallet_id: Annotated[Optional[StrictStr], Field(description="This parameter has been deprecated.")] = None, + wallet_setup: Annotated[Optional[WalletSetup], Field(description="The type of wallet setup for the merchant. Each wallet contains multiple cryptocurrency addresses that serve as the merchant’s receiving addresses. - `Shared`: Multiple merchants share the same wallet. The wallet’s addresses may be used to receive payments for multiple merchants simultaneously. - `Separate`: Create a dedicated wallet for the merchant to achieve complete fund isolation. All addresses in this wallet are only used to receive payments for this merchant. - `Default`: The default wallet automatically created by the system for the default merchant (the merchant that shares the same name as your organization). ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13752,10 +10070,10 @@ def list_payouts( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ListPayouts200Response: - """List all payouts + ) -> ListMerchants200Response: + """List all merchants - This operation retrieves the information of all payouts. + This operation retrieves the information of all merchants. You can filter the results by using a keyword for fuzzy search on merchant names or by specifying a wallet ID. :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -13763,8 +10081,12 @@ def list_payouts( :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_id: The request ID. - :type request_id: str + :param keyword: A search term for performing fuzzy matches in the search query. + :type keyword: str + :param wallet_id: This parameter has been deprecated. + :type wallet_id: str + :param wallet_setup: The type of wallet setup for the merchant. Each wallet contains multiple cryptocurrency addresses that serve as the merchant’s receiving addresses. - `Shared`: Multiple merchants share the same wallet. The wallet’s addresses may be used to receive payments for multiple merchants simultaneously. - `Separate`: Create a dedicated wallet for the merchant to achieve complete fund isolation. All addresses in this wallet are only used to receive payments for this merchant. - `Default`: The default wallet automatically created by the system for the default merchant (the merchant that shares the same name as your organization). + :type wallet_setup: WalletSetup :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 @@ -13773,15 +10095,17 @@ def list_payouts( :return: Returns the result object. """ # noqa: E501 - _param = self._list_payouts_serialize( + _param = self._list_merchants_serialize( limit=limit, before=before, after=after, - request_id=request_id, + keyword=keyword, + wallet_id=wallet_id, + wallet_setup=wallet_setup, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListPayouts200Response", + '200': "ListMerchants200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -13796,12 +10120,14 @@ def list_payouts( ).data @validate_call - def list_payouts_with_http_info( + def list_merchants_with_http_info( self, 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, + keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, + wallet_id: Annotated[Optional[StrictStr], Field(description="This parameter has been deprecated.")] = None, + wallet_setup: Annotated[Optional[WalletSetup], Field(description="The type of wallet setup for the merchant. Each wallet contains multiple cryptocurrency addresses that serve as the merchant’s receiving addresses. - `Shared`: Multiple merchants share the same wallet. The wallet’s addresses may be used to receive payments for multiple merchants simultaneously. - `Separate`: Create a dedicated wallet for the merchant to achieve complete fund isolation. All addresses in this wallet are only used to receive payments for this merchant. - `Default`: The default wallet automatically created by the system for the default merchant (the merchant that shares the same name as your organization). ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13810,10 +10136,10 @@ def list_payouts_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[ListPayouts200Response]: - """List all payouts + ) -> ApiResponse[ListMerchants200Response]: + """List all merchants - This operation retrieves the information of all payouts. + This operation retrieves the information of all merchants. You can filter the results by using a keyword for fuzzy search on merchant names or by specifying a wallet ID. :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -13821,8 +10147,12 @@ def list_payouts_with_http_info( :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_id: The request ID. - :type request_id: str + :param keyword: A search term for performing fuzzy matches in the search query. + :type keyword: str + :param wallet_id: This parameter has been deprecated. + :type wallet_id: str + :param wallet_setup: The type of wallet setup for the merchant. Each wallet contains multiple cryptocurrency addresses that serve as the merchant’s receiving addresses. - `Shared`: Multiple merchants share the same wallet. The wallet’s addresses may be used to receive payments for multiple merchants simultaneously. - `Separate`: Create a dedicated wallet for the merchant to achieve complete fund isolation. All addresses in this wallet are only used to receive payments for this merchant. - `Default`: The default wallet automatically created by the system for the default merchant (the merchant that shares the same name as your organization). + :type wallet_setup: WalletSetup :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 @@ -13831,15 +10161,17 @@ def list_payouts_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_payouts_serialize( + _param = self._list_merchants_serialize( limit=limit, before=before, after=after, - request_id=request_id, + keyword=keyword, + wallet_id=wallet_id, + wallet_setup=wallet_setup, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListPayouts200Response", + '200': "ListMerchants200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -13854,12 +10186,14 @@ def list_payouts_with_http_info( ) @validate_call - def list_payouts_without_preload_content( + def list_merchants_without_preload_content( self, 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, + keyword: Annotated[Optional[StrictStr], Field(description="A search term for performing fuzzy matches in the search query.")] = None, + wallet_id: Annotated[Optional[StrictStr], Field(description="This parameter has been deprecated.")] = None, + wallet_setup: Annotated[Optional[WalletSetup], Field(description="The type of wallet setup for the merchant. Each wallet contains multiple cryptocurrency addresses that serve as the merchant’s receiving addresses. - `Shared`: Multiple merchants share the same wallet. The wallet’s addresses may be used to receive payments for multiple merchants simultaneously. - `Separate`: Create a dedicated wallet for the merchant to achieve complete fund isolation. All addresses in this wallet are only used to receive payments for this merchant. - `Default`: The default wallet automatically created by the system for the default merchant (the merchant that shares the same name as your organization). ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13869,9 +10203,9 @@ def list_payouts_without_preload_content( ] ] = None, ) -> RESTResponseType: - """List all payouts + """List all merchants - This operation retrieves the information of all payouts. + This operation retrieves the information of all merchants. You can filter the results by using a keyword for fuzzy search on merchant names or by specifying a wallet ID. :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -13879,8 +10213,12 @@ def list_payouts_without_preload_content( :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_id: The request ID. - :type request_id: str + :param keyword: A search term for performing fuzzy matches in the search query. + :type keyword: str + :param wallet_id: This parameter has been deprecated. + :type wallet_id: str + :param wallet_setup: The type of wallet setup for the merchant. Each wallet contains multiple cryptocurrency addresses that serve as the merchant’s receiving addresses. - `Shared`: Multiple merchants share the same wallet. The wallet’s addresses may be used to receive payments for multiple merchants simultaneously. - `Separate`: Create a dedicated wallet for the merchant to achieve complete fund isolation. All addresses in this wallet are only used to receive payments for this merchant. - `Default`: The default wallet automatically created by the system for the default merchant (the merchant that shares the same name as your organization). + :type wallet_setup: WalletSetup :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 @@ -13889,15 +10227,17 @@ def list_payouts_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_payouts_serialize( + _param = self._list_merchants_serialize( limit=limit, before=before, after=after, - request_id=request_id, + keyword=keyword, + wallet_id=wallet_id, + wallet_setup=wallet_setup, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListPayouts200Response", + '200': "ListMerchants200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -13907,12 +10247,14 @@ def list_payouts_without_preload_content( ) return response_data.response - def _list_payouts_serialize( + def _list_merchants_serialize( self, limit, before, after, - request_id, + keyword, + wallet_id, + wallet_setup, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -13934,9 +10276,17 @@ def _list_payouts_serialize( _query_params.append(('after', after)) - if request_id is not None: + if keyword is not None: - _query_params.append(('request_id', request_id)) + _query_params.append(('keyword', keyword)) + + if wallet_id is not None: + + _query_params.append(('wallet_id', wallet_id)) + + if wallet_setup is not None: + + _query_params.append(('wallet_setup', wallet_setup.value)) # process the header parameters # process the form parameters @@ -13950,7 +10300,7 @@ def _list_payouts_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/payouts', + resource_path='/payments/merchants', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -13960,12 +10310,13 @@ def _list_payouts_serialize( ) @validate_call - def list_settlement_details( + def list_payment_orders( self, 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, merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, + psp_order_id: Annotated[Optional[StrictStr], Field(description="A unique reference code assigned by the developer to identify this order in their system.")] = None, statuses: Annotated[Optional[StrictStr], Field(description="A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) ")] = None, _request_timeout: Union[ None, @@ -13975,10 +10326,10 @@ def list_settlement_details( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ListSettlementDetails200Response: - """List all settlement details + ) -> ListPaymentOrders200Response: + """List all pay-in orders - This operation has been deprecated. This operation retrieves the information of all settlement details. You can filter the result by merchant ID or status. + This operation retrieves the information of all pay-in orders. You can filter the result by merchant ID. :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -13988,6 +10339,8 @@ def list_settlement_details( :type after: str :param merchant_id: The merchant ID. :type merchant_id: str + :param psp_order_id: A unique reference code assigned by the developer to identify this order in their system. + :type psp_order_id: str :param statuses: A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) :type statuses: str :param _request_timeout: timeout setting for this request. If one @@ -13998,16 +10351,17 @@ def list_settlement_details( :return: Returns the result object. """ # noqa: E501 - _param = self._list_settlement_details_serialize( + _param = self._list_payment_orders_serialize( limit=limit, before=before, after=after, merchant_id=merchant_id, + psp_order_id=psp_order_id, statuses=statuses, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListSettlementDetails200Response", + '200': "ListPaymentOrders200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -14022,12 +10376,13 @@ def list_settlement_details( ).data @validate_call - def list_settlement_details_with_http_info( + def list_payment_orders_with_http_info( self, 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, merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, + psp_order_id: Annotated[Optional[StrictStr], Field(description="A unique reference code assigned by the developer to identify this order in their system.")] = None, statuses: Annotated[Optional[StrictStr], Field(description="A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) ")] = None, _request_timeout: Union[ None, @@ -14037,10 +10392,10 @@ def list_settlement_details_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[ListSettlementDetails200Response]: - """List all settlement details + ) -> ApiResponse[ListPaymentOrders200Response]: + """List all pay-in orders - This operation has been deprecated. This operation retrieves the information of all settlement details. You can filter the result by merchant ID or status. + This operation retrieves the information of all pay-in orders. You can filter the result by merchant ID. :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -14050,6 +10405,8 @@ def list_settlement_details_with_http_info( :type after: str :param merchant_id: The merchant ID. :type merchant_id: str + :param psp_order_id: A unique reference code assigned by the developer to identify this order in their system. + :type psp_order_id: str :param statuses: A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) :type statuses: str :param _request_timeout: timeout setting for this request. If one @@ -14060,16 +10417,17 @@ def list_settlement_details_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_settlement_details_serialize( + _param = self._list_payment_orders_serialize( limit=limit, before=before, after=after, merchant_id=merchant_id, + psp_order_id=psp_order_id, statuses=statuses, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListSettlementDetails200Response", + '200': "ListPaymentOrders200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -14084,12 +10442,13 @@ def list_settlement_details_with_http_info( ) @validate_call - def list_settlement_details_without_preload_content( + def list_payment_orders_without_preload_content( self, 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, merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, + psp_order_id: Annotated[Optional[StrictStr], Field(description="A unique reference code assigned by the developer to identify this order in their system.")] = None, statuses: Annotated[Optional[StrictStr], Field(description="A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) ")] = None, _request_timeout: Union[ None, @@ -14100,9 +10459,9 @@ def list_settlement_details_without_preload_content( ] ] = None, ) -> RESTResponseType: - """List all settlement details + """List all pay-in orders - This operation has been deprecated. This operation retrieves the information of all settlement details. You can filter the result by merchant ID or status. + This operation retrieves the information of all pay-in orders. You can filter the result by merchant ID. :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -14112,6 +10471,8 @@ def list_settlement_details_without_preload_content( :type after: str :param merchant_id: The merchant ID. :type merchant_id: str + :param psp_order_id: A unique reference code assigned by the developer to identify this order in their system. + :type psp_order_id: str :param statuses: A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) :type statuses: str :param _request_timeout: timeout setting for this request. If one @@ -14122,16 +10483,17 @@ def list_settlement_details_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_settlement_details_serialize( + _param = self._list_payment_orders_serialize( limit=limit, before=before, after=after, merchant_id=merchant_id, + psp_order_id=psp_order_id, statuses=statuses, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListSettlementDetails200Response", + '200': "ListPaymentOrders200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -14141,12 +10503,13 @@ def list_settlement_details_without_preload_content( ) return response_data.response - def _list_settlement_details_serialize( + def _list_payment_orders_serialize( self, limit, before, after, merchant_id, + psp_order_id, statuses, ) -> RequestSerialized: _path_params: Dict[str, str] = {} @@ -14173,6 +10536,10 @@ def _list_settlement_details_serialize( _query_params.append(('merchant_id', merchant_id)) + if psp_order_id is not None: + + _query_params.append(('psp_order_id', psp_order_id)) + if statuses is not None: _query_params.append(('statuses', statuses)) @@ -14189,7 +10556,7 @@ def _list_settlement_details_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/settlement_details', + resource_path='/payments/orders', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -14199,12 +10566,8 @@ def _list_settlement_details_serialize( ) @validate_call - def list_settlement_requests( + def list_payment_supported_tokens( self, - 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14213,19 +10576,11 @@ def list_settlement_requests( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ListSettlementRequests200Response: - """List all settlement requests + ) -> List[SupportedToken]: + """List supported tokens - This operation has been deprecated. Please use [List all payouts](https://www.cobo.com/payments/en/api-references/payment/list-all-payouts) instead. This operation retrieves the information of all settlement requests. + This operation retrieves all tokens supported by Cobo Payments. Use this operation to get token details such as token ID, symbol, decimal precision, contract address, and chain information before creating payment orders. For more information about Cobo Payments, see [Cobo Payments Overview](https://www.cobo.com/payments/en/guides/overview). - :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_id: The request ID. - :type request_id: 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 @@ -14234,15 +10589,11 @@ def list_settlement_requests( :return: Returns the result object. """ # noqa: E501 - _param = self._list_settlement_requests_serialize( - limit=limit, - before=before, - after=after, - request_id=request_id, + _param = self._list_payment_supported_tokens_serialize( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListSettlementRequests200Response", + '200': "List[SupportedToken]", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -14257,12 +10608,8 @@ def list_settlement_requests( ).data @validate_call - def list_settlement_requests_with_http_info( + def list_payment_supported_tokens_with_http_info( self, - 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14271,19 +10618,11 @@ def list_settlement_requests_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[ListSettlementRequests200Response]: - """List all settlement requests + ) -> ApiResponse[List[SupportedToken]]: + """List supported tokens - This operation has been deprecated. Please use [List all payouts](https://www.cobo.com/payments/en/api-references/payment/list-all-payouts) instead. This operation retrieves the information of all settlement requests. + This operation retrieves all tokens supported by Cobo Payments. Use this operation to get token details such as token ID, symbol, decimal precision, contract address, and chain information before creating payment orders. For more information about Cobo Payments, see [Cobo Payments Overview](https://www.cobo.com/payments/en/guides/overview). - :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_id: The request ID. - :type request_id: 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 @@ -14292,15 +10631,11 @@ def list_settlement_requests_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_settlement_requests_serialize( - limit=limit, - before=before, - after=after, - request_id=request_id, + _param = self._list_payment_supported_tokens_serialize( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListSettlementRequests200Response", + '200': "List[SupportedToken]", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -14315,12 +10650,8 @@ def list_settlement_requests_with_http_info( ) @validate_call - def list_settlement_requests_without_preload_content( + def list_payment_supported_tokens_without_preload_content( self, - 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14330,18 +10661,10 @@ def list_settlement_requests_without_preload_content( ] ] = None, ) -> RESTResponseType: - """List all settlement requests + """List supported tokens - This operation has been deprecated. Please use [List all payouts](https://www.cobo.com/payments/en/api-references/payment/list-all-payouts) instead. This operation retrieves the information of all settlement requests. + This operation retrieves all tokens supported by Cobo Payments. Use this operation to get token details such as token ID, symbol, decimal precision, contract address, and chain information before creating payment orders. For more information about Cobo Payments, see [Cobo Payments Overview](https://www.cobo.com/payments/en/guides/overview). - :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_id: The request ID. - :type request_id: 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 @@ -14350,15 +10673,11 @@ def list_settlement_requests_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_settlement_requests_serialize( - limit=limit, - before=before, - after=after, - request_id=request_id, + _param = self._list_payment_supported_tokens_serialize( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListSettlementRequests200Response", + '200': "List[SupportedToken]", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -14368,37 +10687,17 @@ def list_settlement_requests_without_preload_content( ) return response_data.response - def _list_settlement_requests_serialize( - self, - limit, - before, - after, - request_id, - ) -> 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 - 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)) - - if request_id is not None: - - _query_params.append(('request_id', request_id)) - + def _list_payment_supported_tokens_serialize( + self, + ) -> 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 @@ -14411,7 +10710,7 @@ def _list_settlement_requests_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/settlement_requests', + resource_path='/payments/supported_tokens', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -14421,13 +10720,10 @@ def _list_settlement_requests_serialize( ) @validate_call - def list_top_up_payer_accounts( + def list_payment_wallet_balances( self, - 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, - merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, - payer_id: Annotated[Optional[StrictStr], Field(description="A unique identifier assigned by Cobo to track and identify individual payers.")] = None, + 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` ")], + wallet_ids: Annotated[Optional[StrictStr], Field(description="A list of wallet IDs to query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14436,21 +10732,15 @@ def list_top_up_payer_accounts( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ListTopUpPayerAccounts200Response: - """List top-up payer accounts + ) -> ListPaymentWalletBalances200Response: + """List payment wallet balances - This operation retrieves the accounts of all payers. You can filter the result by merchant ID and payer_id. + This operation has been deprecated. This operation retrieves the balance information for specified payment wallets. The balance information is grouped by token. If you do not specify the `wallet_ids` parameter, the balance information for all payment wallets will be returned. - :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 merchant_id: The merchant ID. - :type merchant_id: str - :param payer_id: A unique identifier assigned by Cobo to track and identify individual payers. - :type payer_id: str + :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 wallet_ids: A list of wallet IDs to query. + :type wallet_ids: 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 @@ -14459,16 +10749,13 @@ def list_top_up_payer_accounts( :return: Returns the result object. """ # noqa: E501 - _param = self._list_top_up_payer_accounts_serialize( - limit=limit, - before=before, - after=after, - merchant_id=merchant_id, - payer_id=payer_id, + _param = self._list_payment_wallet_balances_serialize( + token_id=token_id, + wallet_ids=wallet_ids, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListTopUpPayerAccounts200Response", + '200': "ListPaymentWalletBalances200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -14483,13 +10770,10 @@ def list_top_up_payer_accounts( ).data @validate_call - def list_top_up_payer_accounts_with_http_info( + def list_payment_wallet_balances_with_http_info( self, - 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, - merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, - payer_id: Annotated[Optional[StrictStr], Field(description="A unique identifier assigned by Cobo to track and identify individual payers.")] = None, + 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` ")], + wallet_ids: Annotated[Optional[StrictStr], Field(description="A list of wallet IDs to query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14498,21 +10782,15 @@ def list_top_up_payer_accounts_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[ListTopUpPayerAccounts200Response]: - """List top-up payer accounts + ) -> ApiResponse[ListPaymentWalletBalances200Response]: + """List payment wallet balances - This operation retrieves the accounts of all payers. You can filter the result by merchant ID and payer_id. + This operation has been deprecated. This operation retrieves the balance information for specified payment wallets. The balance information is grouped by token. If you do not specify the `wallet_ids` parameter, the balance information for all payment wallets will be returned. - :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 merchant_id: The merchant ID. - :type merchant_id: str - :param payer_id: A unique identifier assigned by Cobo to track and identify individual payers. - :type payer_id: str + :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 wallet_ids: A list of wallet IDs to query. + :type wallet_ids: 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 @@ -14521,16 +10799,13 @@ def list_top_up_payer_accounts_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_top_up_payer_accounts_serialize( - limit=limit, - before=before, - after=after, - merchant_id=merchant_id, - payer_id=payer_id, + _param = self._list_payment_wallet_balances_serialize( + token_id=token_id, + wallet_ids=wallet_ids, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListTopUpPayerAccounts200Response", + '200': "ListPaymentWalletBalances200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -14545,13 +10820,10 @@ def list_top_up_payer_accounts_with_http_info( ) @validate_call - def list_top_up_payer_accounts_without_preload_content( + def list_payment_wallet_balances_without_preload_content( self, - 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, - merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, - payer_id: Annotated[Optional[StrictStr], Field(description="A unique identifier assigned by Cobo to track and identify individual payers.")] = None, + 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` ")], + wallet_ids: Annotated[Optional[StrictStr], Field(description="A list of wallet IDs to query.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14561,20 +10833,14 @@ def list_top_up_payer_accounts_without_preload_content( ] ] = None, ) -> RESTResponseType: - """List top-up payer accounts + """List payment wallet balances - This operation retrieves the accounts of all payers. You can filter the result by merchant ID and payer_id. + This operation has been deprecated. This operation retrieves the balance information for specified payment wallets. The balance information is grouped by token. If you do not specify the `wallet_ids` parameter, the balance information for all payment wallets will be returned. - :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 merchant_id: The merchant ID. - :type merchant_id: str - :param payer_id: A unique identifier assigned by Cobo to track and identify individual payers. - :type payer_id: str + :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 wallet_ids: A list of wallet IDs to query. + :type wallet_ids: 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 @@ -14583,16 +10849,13 @@ def list_top_up_payer_accounts_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_top_up_payer_accounts_serialize( - limit=limit, - before=before, - after=after, - merchant_id=merchant_id, - payer_id=payer_id, + _param = self._list_payment_wallet_balances_serialize( + token_id=token_id, + wallet_ids=wallet_ids, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListTopUpPayerAccounts200Response", + '200': "ListPaymentWalletBalances200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -14602,13 +10865,10 @@ def list_top_up_payer_accounts_without_preload_content( ) return response_data.response - def _list_top_up_payer_accounts_serialize( + def _list_payment_wallet_balances_serialize( self, - limit, - before, - after, - merchant_id, - payer_id, + token_id, + wallet_ids, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -14618,25 +10878,13 @@ def _list_top_up_payer_accounts_serialize( # process the path parameters # process the query parameters - 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)) - - if merchant_id is not None: + if wallet_ids is not None: - _query_params.append(('merchant_id', merchant_id)) + _query_params.append(('wallet_ids', wallet_ids)) - if payer_id is not None: + if token_id is not None: - _query_params.append(('payer_id', payer_id)) + _query_params.append(('token_id', token_id)) # process the header parameters # process the form parameters @@ -14650,7 +10898,7 @@ def _list_top_up_payer_accounts_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/topup/payer_accounts', + resource_path='/payments/balance/payment_wallets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -14660,13 +10908,12 @@ def _list_top_up_payer_accounts_serialize( ) @validate_call - def list_top_up_payers( + def list_payouts( self, 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, - merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, - payer_id: Annotated[Optional[StrictStr], Field(description="A unique identifier assigned by Cobo to track and identify individual payers.")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14675,10 +10922,10 @@ def list_top_up_payers( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ListTopUpPayers200Response: - """List payers + ) -> ListPayouts200Response: + """List all payouts - This operation retrieves the information of all payers under a merchant. You can filter the result by the payer ID. + This operation retrieves the information of all payouts. :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -14686,10 +10933,8 @@ def list_top_up_payers( :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 merchant_id: The merchant ID. - :type merchant_id: str - :param payer_id: A unique identifier assigned by Cobo to track and identify individual payers. - :type payer_id: str + :param request_id: The request ID. + :type request_id: 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 @@ -14698,16 +10943,15 @@ def list_top_up_payers( :return: Returns the result object. """ # noqa: E501 - _param = self._list_top_up_payers_serialize( + _param = self._list_payouts_serialize( limit=limit, before=before, after=after, - merchant_id=merchant_id, - payer_id=payer_id, + request_id=request_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListTopUpPayers200Response", + '200': "ListPayouts200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -14722,13 +10966,12 @@ def list_top_up_payers( ).data @validate_call - def list_top_up_payers_with_http_info( + def list_payouts_with_http_info( self, 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, - merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, - payer_id: Annotated[Optional[StrictStr], Field(description="A unique identifier assigned by Cobo to track and identify individual payers.")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14737,10 +10980,10 @@ def list_top_up_payers_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[ListTopUpPayers200Response]: - """List payers + ) -> ApiResponse[ListPayouts200Response]: + """List all payouts - This operation retrieves the information of all payers under a merchant. You can filter the result by the payer ID. + This operation retrieves the information of all payouts. :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -14748,10 +10991,8 @@ def list_top_up_payers_with_http_info( :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 merchant_id: The merchant ID. - :type merchant_id: str - :param payer_id: A unique identifier assigned by Cobo to track and identify individual payers. - :type payer_id: str + :param request_id: The request ID. + :type request_id: 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 @@ -14760,16 +11001,15 @@ def list_top_up_payers_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_top_up_payers_serialize( + _param = self._list_payouts_serialize( limit=limit, before=before, after=after, - merchant_id=merchant_id, - payer_id=payer_id, + request_id=request_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListTopUpPayers200Response", + '200': "ListPayouts200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -14784,13 +11024,12 @@ def list_top_up_payers_with_http_info( ) @validate_call - def list_top_up_payers_without_preload_content( + def list_payouts_without_preload_content( self, 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, - merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, - payer_id: Annotated[Optional[StrictStr], Field(description="A unique identifier assigned by Cobo to track and identify individual payers.")] = None, + request_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14800,9 +11039,9 @@ def list_top_up_payers_without_preload_content( ] ] = None, ) -> RESTResponseType: - """List payers + """List all payouts - This operation retrieves the information of all payers under a merchant. You can filter the result by the payer ID. + This operation retrieves the information of all payouts. :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int @@ -14810,10 +11049,8 @@ def list_top_up_payers_without_preload_content( :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 merchant_id: The merchant ID. - :type merchant_id: str - :param payer_id: A unique identifier assigned by Cobo to track and identify individual payers. - :type payer_id: str + :param request_id: The request ID. + :type request_id: 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 @@ -14822,16 +11059,15 @@ def list_top_up_payers_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_top_up_payers_serialize( + _param = self._list_payouts_serialize( limit=limit, before=before, after=after, - merchant_id=merchant_id, - payer_id=payer_id, + request_id=request_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListTopUpPayers200Response", + '200': "ListPayouts200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -14841,13 +11077,12 @@ def list_top_up_payers_without_preload_content( ) return response_data.response - def _list_top_up_payers_serialize( + def _list_payouts_serialize( self, limit, before, after, - merchant_id, - payer_id, + request_id, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -14869,13 +11104,9 @@ def _list_top_up_payers_serialize( _query_params.append(('after', after)) - if merchant_id is not None: - - _query_params.append(('merchant_id', merchant_id)) - - if payer_id is not None: + if request_id is not None: - _query_params.append(('payer_id', payer_id)) + _query_params.append(('request_id', request_id)) # process the header parameters # process the form parameters @@ -14889,7 +11120,7 @@ def _list_top_up_payers_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/topup/payers', + resource_path='/payments/payouts', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -14899,9 +11130,13 @@ def _list_top_up_payers_serialize( ) @validate_call - def payment_estimate_fee( + def list_settlement_details( self, - payment_estimate_fee_request: Annotated[Optional[PaymentEstimateFeeRequest], Field(description="The request body for fee estimation.")] = 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, + merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, + statuses: Annotated[Optional[StrictStr], Field(description="A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14910,13 +11145,21 @@ def payment_estimate_fee( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> PaymentEstimateFee201Response: - """Estimate fees + ) -> ListSettlementDetails200Response: + """List all settlement details - This operation calculates fees for payment-related operations, including: - **Pay-in**: Fees for accepting payments - **Refunds**: Fees for refunding the payment - **Crypto payouts**: Fees for payouts in crypto - **Fiat off-ramp**: Fees for fiat currency transfers via off-ramp. The returned fees represent the charges that would apply if the operation were executed immediately. Note that actual fees may vary over time based on your usage volume and applicable fee rates. + This operation has been deprecated. This operation retrieves the information of all settlement details. You can filter the result by merchant ID or status. - :param payment_estimate_fee_request: The request body for fee estimation. - :type payment_estimate_fee_request: PaymentEstimateFeeRequest + :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 merchant_id: The merchant ID. + :type merchant_id: str + :param statuses: A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) + :type statuses: 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 @@ -14925,12 +11168,16 @@ def payment_estimate_fee( :return: Returns the result object. """ # noqa: E501 - _param = self._payment_estimate_fee_serialize( - payment_estimate_fee_request=payment_estimate_fee_request, + _param = self._list_settlement_details_serialize( + limit=limit, + before=before, + after=after, + merchant_id=merchant_id, + statuses=statuses, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "PaymentEstimateFee201Response", + '200': "ListSettlementDetails200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -14945,9 +11192,13 @@ def payment_estimate_fee( ).data @validate_call - def payment_estimate_fee_with_http_info( + def list_settlement_details_with_http_info( self, - payment_estimate_fee_request: Annotated[Optional[PaymentEstimateFeeRequest], Field(description="The request body for fee estimation.")] = 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, + merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, + statuses: Annotated[Optional[StrictStr], Field(description="A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14956,13 +11207,21 @@ def payment_estimate_fee_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[PaymentEstimateFee201Response]: - """Estimate fees + ) -> ApiResponse[ListSettlementDetails200Response]: + """List all settlement details - This operation calculates fees for payment-related operations, including: - **Pay-in**: Fees for accepting payments - **Refunds**: Fees for refunding the payment - **Crypto payouts**: Fees for payouts in crypto - **Fiat off-ramp**: Fees for fiat currency transfers via off-ramp. The returned fees represent the charges that would apply if the operation were executed immediately. Note that actual fees may vary over time based on your usage volume and applicable fee rates. + This operation has been deprecated. This operation retrieves the information of all settlement details. You can filter the result by merchant ID or status. - :param payment_estimate_fee_request: The request body for fee estimation. - :type payment_estimate_fee_request: PaymentEstimateFeeRequest + :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 merchant_id: The merchant ID. + :type merchant_id: str + :param statuses: A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) + :type statuses: 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 @@ -14971,12 +11230,16 @@ def payment_estimate_fee_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._payment_estimate_fee_serialize( - payment_estimate_fee_request=payment_estimate_fee_request, + _param = self._list_settlement_details_serialize( + limit=limit, + before=before, + after=after, + merchant_id=merchant_id, + statuses=statuses, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "PaymentEstimateFee201Response", + '200': "ListSettlementDetails200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -14991,9 +11254,13 @@ def payment_estimate_fee_with_http_info( ) @validate_call - def payment_estimate_fee_without_preload_content( + def list_settlement_details_without_preload_content( self, - payment_estimate_fee_request: Annotated[Optional[PaymentEstimateFeeRequest], Field(description="The request body for fee estimation.")] = 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, + merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, + statuses: Annotated[Optional[StrictStr], Field(description="A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15003,12 +11270,20 @@ def payment_estimate_fee_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Estimate fees + """List all settlement details - This operation calculates fees for payment-related operations, including: - **Pay-in**: Fees for accepting payments - **Refunds**: Fees for refunding the payment - **Crypto payouts**: Fees for payouts in crypto - **Fiat off-ramp**: Fees for fiat currency transfers via off-ramp. The returned fees represent the charges that would apply if the operation were executed immediately. Note that actual fees may vary over time based on your usage volume and applicable fee rates. + This operation has been deprecated. This operation retrieves the information of all settlement details. You can filter the result by merchant ID or status. - :param payment_estimate_fee_request: The request body for fee estimation. - :type payment_estimate_fee_request: PaymentEstimateFeeRequest + :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 merchant_id: The merchant ID. + :type merchant_id: str + :param statuses: A list of order, refund or payout item statuses. You can refer to the following operations for the possible status values: - [Get pay-in order information](https://www.cobo.com/payments/en/api-references/payment/get-pay-in-order-information) - [Get refund order information](https://www.cobo.com/payments/en/api-references/payment/get-refund-order-information) - [List all payout items](https://www.cobo.com/payments/en/api-references/payment/list-all-payout-items) + :type statuses: 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 @@ -15017,12 +11292,16 @@ def payment_estimate_fee_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._payment_estimate_fee_serialize( - payment_estimate_fee_request=payment_estimate_fee_request, + _param = self._list_settlement_details_serialize( + limit=limit, + before=before, + after=after, + merchant_id=merchant_id, + statuses=statuses, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "PaymentEstimateFee201Response", + '200': "ListSettlementDetails200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -15032,9 +11311,13 @@ def payment_estimate_fee_without_preload_content( ) return response_data.response - def _payment_estimate_fee_serialize( + def _list_settlement_details_serialize( self, - payment_estimate_fee_request, + limit, + before, + after, + merchant_id, + statuses, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -15044,11 +11327,29 @@ def _payment_estimate_fee_serialize( # process the path parameters # process the query parameters + 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)) + + if merchant_id is not None: + + _query_params.append(('merchant_id', merchant_id)) + + if statuses is not None: + + _query_params.append(('statuses', statuses)) + # process the header parameters # process the form parameters # process the body parameter - if payment_estimate_fee_request is not None: - _body_params = payment_estimate_fee_request # set the HTTP header `Accept` _header_params = { @@ -15057,8 +11358,8 @@ def _payment_estimate_fee_serialize( } return self.api_client.param_serialize( - method='POST', - resource_path='/payments/estimate_fee', + method='GET', + resource_path='/payments/settlement_details', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -15068,8 +11369,12 @@ def _payment_estimate_fee_serialize( ) @validate_call - def query_destination_whitelist_enabled( + def list_settlement_requests( self, + 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15078,11 +11383,19 @@ def query_destination_whitelist_enabled( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> QueryDestinationWhitelistEnabled200Response: - """Query destination whitelist enabled status + ) -> ListSettlementRequests200Response: + """List all settlement requests - This operation retrieves the information of whether the destination whitelist is enabled. + This operation has been deprecated. Please use [List all payouts](https://www.cobo.com/payments/en/api-references/payment/list-all-payouts) instead. This operation retrieves the information of all settlement requests. + :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_id: The request ID. + :type request_id: 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 @@ -15091,11 +11404,15 @@ def query_destination_whitelist_enabled( :return: Returns the result object. """ # noqa: E501 - _param = self._query_destination_whitelist_enabled_serialize( + _param = self._list_settlement_requests_serialize( + limit=limit, + before=before, + after=after, + request_id=request_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "QueryDestinationWhitelistEnabled200Response", + '200': "ListSettlementRequests200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -15110,8 +11427,12 @@ def query_destination_whitelist_enabled( ).data @validate_call - def query_destination_whitelist_enabled_with_http_info( + def list_settlement_requests_with_http_info( self, + 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15120,11 +11441,19 @@ def query_destination_whitelist_enabled_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[QueryDestinationWhitelistEnabled200Response]: - """Query destination whitelist enabled status + ) -> ApiResponse[ListSettlementRequests200Response]: + """List all settlement requests - This operation retrieves the information of whether the destination whitelist is enabled. + This operation has been deprecated. Please use [List all payouts](https://www.cobo.com/payments/en/api-references/payment/list-all-payouts) instead. This operation retrieves the information of all settlement requests. + :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_id: The request ID. + :type request_id: 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 @@ -15133,11 +11462,15 @@ def query_destination_whitelist_enabled_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._query_destination_whitelist_enabled_serialize( + _param = self._list_settlement_requests_serialize( + limit=limit, + before=before, + after=after, + request_id=request_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "QueryDestinationWhitelistEnabled200Response", + '200': "ListSettlementRequests200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -15152,8 +11485,12 @@ def query_destination_whitelist_enabled_with_http_info( ) @validate_call - def query_destination_whitelist_enabled_without_preload_content( + def list_settlement_requests_without_preload_content( self, + 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_id: Annotated[Optional[StrictStr], Field(description="The request ID.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15163,10 +11500,18 @@ def query_destination_whitelist_enabled_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Query destination whitelist enabled status + """List all settlement requests - This operation retrieves the information of whether the destination whitelist is enabled. + This operation has been deprecated. Please use [List all payouts](https://www.cobo.com/payments/en/api-references/payment/list-all-payouts) instead. This operation retrieves the information of all settlement requests. + :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_id: The request ID. + :type request_id: 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 @@ -15175,11 +11520,15 @@ def query_destination_whitelist_enabled_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._query_destination_whitelist_enabled_serialize( + _param = self._list_settlement_requests_serialize( + limit=limit, + before=before, + after=after, + request_id=request_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "QueryDestinationWhitelistEnabled200Response", + '200': "ListSettlementRequests200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -15189,8 +11538,12 @@ def query_destination_whitelist_enabled_without_preload_content( ) return response_data.response - def _query_destination_whitelist_enabled_serialize( + def _list_settlement_requests_serialize( self, + limit, + before, + after, + request_id, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -15200,6 +11553,22 @@ def _query_destination_whitelist_enabled_serialize( # process the path parameters # process the query parameters + 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)) + + if request_id is not None: + + _query_params.append(('request_id', request_id)) + # process the header parameters # process the form parameters # process the body parameter @@ -15212,7 +11581,7 @@ def _query_destination_whitelist_enabled_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/payments/destination/enable_whitelist', + resource_path='/payments/settlement_requests', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -15222,10 +11591,13 @@ def _query_destination_whitelist_enabled_serialize( ) @validate_call - def update_bank_account_by_id( + def list_top_up_payer_accounts( self, - bank_account_id: Annotated[StrictStr, Field(description="The bank account ID.")], - update_bank_account_by_id_request: Annotated[Optional[UpdateBankAccountByIdRequest], Field(description="The request body for updating an existing bank account.")] = 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, + merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, + payer_id: Annotated[Optional[StrictStr], Field(description="A unique identifier assigned by Cobo to track and identify individual payers.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15234,15 +11606,21 @@ def update_bank_account_by_id( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> BankAccount: - """Update bank account + ) -> ListTopUpPayerAccounts200Response: + """List top-up payer accounts - This operation updates the information of an existing bank account. + This operation retrieves the accounts of all payers. You can filter the result by merchant ID and payer_id. - :param bank_account_id: The bank account ID. (required) - :type bank_account_id: str - :param update_bank_account_by_id_request: The request body for updating an existing bank account. - :type update_bank_account_by_id_request: UpdateBankAccountByIdRequest + :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 merchant_id: The merchant ID. + :type merchant_id: str + :param payer_id: A unique identifier assigned by Cobo to track and identify individual payers. + :type payer_id: 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 @@ -15251,13 +11629,16 @@ def update_bank_account_by_id( :return: Returns the result object. """ # noqa: E501 - _param = self._update_bank_account_by_id_serialize( - bank_account_id=bank_account_id, - update_bank_account_by_id_request=update_bank_account_by_id_request, + _param = self._list_top_up_payer_accounts_serialize( + limit=limit, + before=before, + after=after, + merchant_id=merchant_id, + payer_id=payer_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BankAccount", + '200': "ListTopUpPayerAccounts200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -15272,10 +11653,13 @@ def update_bank_account_by_id( ).data @validate_call - def update_bank_account_by_id_with_http_info( + def list_top_up_payer_accounts_with_http_info( self, - bank_account_id: Annotated[StrictStr, Field(description="The bank account ID.")], - update_bank_account_by_id_request: Annotated[Optional[UpdateBankAccountByIdRequest], Field(description="The request body for updating an existing bank account.")] = 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, + merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, + payer_id: Annotated[Optional[StrictStr], Field(description="A unique identifier assigned by Cobo to track and identify individual payers.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15284,15 +11668,21 @@ def update_bank_account_by_id_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[BankAccount]: - """Update bank account + ) -> ApiResponse[ListTopUpPayerAccounts200Response]: + """List top-up payer accounts - This operation updates the information of an existing bank account. + This operation retrieves the accounts of all payers. You can filter the result by merchant ID and payer_id. - :param bank_account_id: The bank account ID. (required) - :type bank_account_id: str - :param update_bank_account_by_id_request: The request body for updating an existing bank account. - :type update_bank_account_by_id_request: UpdateBankAccountByIdRequest + :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 merchant_id: The merchant ID. + :type merchant_id: str + :param payer_id: A unique identifier assigned by Cobo to track and identify individual payers. + :type payer_id: 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 @@ -15301,13 +11691,16 @@ def update_bank_account_by_id_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_bank_account_by_id_serialize( - bank_account_id=bank_account_id, - update_bank_account_by_id_request=update_bank_account_by_id_request, + _param = self._list_top_up_payer_accounts_serialize( + limit=limit, + before=before, + after=after, + merchant_id=merchant_id, + payer_id=payer_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BankAccount", + '200': "ListTopUpPayerAccounts200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -15322,10 +11715,13 @@ def update_bank_account_by_id_with_http_info( ) @validate_call - def update_bank_account_by_id_without_preload_content( + def list_top_up_payer_accounts_without_preload_content( self, - bank_account_id: Annotated[StrictStr, Field(description="The bank account ID.")], - update_bank_account_by_id_request: Annotated[Optional[UpdateBankAccountByIdRequest], Field(description="The request body for updating an existing bank account.")] = 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, + merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, + payer_id: Annotated[Optional[StrictStr], Field(description="A unique identifier assigned by Cobo to track and identify individual payers.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15335,14 +11731,20 @@ def update_bank_account_by_id_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Update bank account + """List top-up payer accounts - This operation updates the information of an existing bank account. + This operation retrieves the accounts of all payers. You can filter the result by merchant ID and payer_id. - :param bank_account_id: The bank account ID. (required) - :type bank_account_id: str - :param update_bank_account_by_id_request: The request body for updating an existing bank account. - :type update_bank_account_by_id_request: UpdateBankAccountByIdRequest + :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 merchant_id: The merchant ID. + :type merchant_id: str + :param payer_id: A unique identifier assigned by Cobo to track and identify individual payers. + :type payer_id: 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 @@ -15351,13 +11753,16 @@ def update_bank_account_by_id_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_bank_account_by_id_serialize( - bank_account_id=bank_account_id, - update_bank_account_by_id_request=update_bank_account_by_id_request, + _param = self._list_top_up_payer_accounts_serialize( + limit=limit, + before=before, + after=after, + merchant_id=merchant_id, + payer_id=payer_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BankAccount", + '200': "ListTopUpPayerAccounts200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -15367,10 +11772,13 @@ def update_bank_account_by_id_without_preload_content( ) return response_data.response - def _update_bank_account_by_id_serialize( + def _list_top_up_payer_accounts_serialize( self, - bank_account_id, - update_bank_account_by_id_request, + limit, + before, + after, + merchant_id, + payer_id, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -15379,14 +11787,30 @@ def _update_bank_account_by_id_serialize( _body_params: Optional[bytes] = None # process the path parameters - if bank_account_id is not None: - _path_params['bank_account_id'] = bank_account_id # process the query parameters + 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)) + + if merchant_id is not None: + + _query_params.append(('merchant_id', merchant_id)) + + if payer_id is not None: + + _query_params.append(('payer_id', payer_id)) + # process the header parameters # process the form parameters # process the body parameter - if update_bank_account_by_id_request is not None: - _body_params = update_bank_account_by_id_request # set the HTTP header `Accept` _header_params = { @@ -15395,8 +11819,8 @@ def _update_bank_account_by_id_serialize( } return self.api_client.param_serialize( - method='PUT', - resource_path='/payments/bank_accounts/{bank_account_id}', + method='GET', + resource_path='/payments/topup/payer_accounts', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -15406,10 +11830,13 @@ def _update_bank_account_by_id_serialize( ) @validate_call - def update_counterparty( + def list_top_up_payers( self, - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], - update_counterparty_request: Annotated[Optional[UpdateCounterpartyRequest], Field(description="The request body to update a counterparty.")] = 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, + merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, + payer_id: Annotated[Optional[StrictStr], Field(description="A unique identifier assigned by Cobo to track and identify individual payers.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15418,15 +11845,21 @@ def update_counterparty( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> Counterparty: - """Update counterparty + ) -> ListTopUpPayers200Response: + """List payers - This operation updates the information of a specified counterparty. + This operation retrieves the information of all payers under a merchant. You can filter the result by the payer ID. - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: str - :param update_counterparty_request: The request body to update a counterparty. - :type update_counterparty_request: UpdateCounterpartyRequest + :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 merchant_id: The merchant ID. + :type merchant_id: str + :param payer_id: A unique identifier assigned by Cobo to track and identify individual payers. + :type payer_id: 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 @@ -15435,13 +11868,16 @@ def update_counterparty( :return: Returns the result object. """ # noqa: E501 - _param = self._update_counterparty_serialize( - counterparty_id=counterparty_id, - update_counterparty_request=update_counterparty_request, + _param = self._list_top_up_payers_serialize( + limit=limit, + before=before, + after=after, + merchant_id=merchant_id, + payer_id=payer_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Counterparty", + '200': "ListTopUpPayers200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -15456,10 +11892,13 @@ def update_counterparty( ).data @validate_call - def update_counterparty_with_http_info( + def list_top_up_payers_with_http_info( self, - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], - update_counterparty_request: Annotated[Optional[UpdateCounterpartyRequest], Field(description="The request body to update a counterparty.")] = 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, + merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, + payer_id: Annotated[Optional[StrictStr], Field(description="A unique identifier assigned by Cobo to track and identify individual payers.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15468,15 +11907,21 @@ def update_counterparty_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[Counterparty]: - """Update counterparty + ) -> ApiResponse[ListTopUpPayers200Response]: + """List payers - This operation updates the information of a specified counterparty. + This operation retrieves the information of all payers under a merchant. You can filter the result by the payer ID. - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: str - :param update_counterparty_request: The request body to update a counterparty. - :type update_counterparty_request: UpdateCounterpartyRequest + :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 merchant_id: The merchant ID. + :type merchant_id: str + :param payer_id: A unique identifier assigned by Cobo to track and identify individual payers. + :type payer_id: 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 @@ -15485,13 +11930,16 @@ def update_counterparty_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_counterparty_serialize( - counterparty_id=counterparty_id, - update_counterparty_request=update_counterparty_request, + _param = self._list_top_up_payers_serialize( + limit=limit, + before=before, + after=after, + merchant_id=merchant_id, + payer_id=payer_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Counterparty", + '200': "ListTopUpPayers200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -15506,10 +11954,13 @@ def update_counterparty_with_http_info( ) @validate_call - def update_counterparty_without_preload_content( + def list_top_up_payers_without_preload_content( self, - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], - update_counterparty_request: Annotated[Optional[UpdateCounterpartyRequest], Field(description="The request body to update a counterparty.")] = 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, + merchant_id: Annotated[Optional[StrictStr], Field(description="The merchant ID.")] = None, + payer_id: Annotated[Optional[StrictStr], Field(description="A unique identifier assigned by Cobo to track and identify individual payers.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15519,14 +11970,20 @@ def update_counterparty_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Update counterparty + """List payers - This operation updates the information of a specified counterparty. + This operation retrieves the information of all payers under a merchant. You can filter the result by the payer ID. - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: str - :param update_counterparty_request: The request body to update a counterparty. - :type update_counterparty_request: UpdateCounterpartyRequest + :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 merchant_id: The merchant ID. + :type merchant_id: str + :param payer_id: A unique identifier assigned by Cobo to track and identify individual payers. + :type payer_id: 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 @@ -15535,13 +11992,16 @@ def update_counterparty_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_counterparty_serialize( - counterparty_id=counterparty_id, - update_counterparty_request=update_counterparty_request, + _param = self._list_top_up_payers_serialize( + limit=limit, + before=before, + after=after, + merchant_id=merchant_id, + payer_id=payer_id, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Counterparty", + '200': "ListTopUpPayers200Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -15551,10 +12011,13 @@ def update_counterparty_without_preload_content( ) return response_data.response - def _update_counterparty_serialize( + def _list_top_up_payers_serialize( self, - counterparty_id, - update_counterparty_request, + limit, + before, + after, + merchant_id, + payer_id, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -15563,14 +12026,30 @@ def _update_counterparty_serialize( _body_params: Optional[bytes] = None # process the path parameters - if counterparty_id is not None: - _path_params['counterparty_id'] = counterparty_id # process the query parameters + 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)) + + if merchant_id is not None: + + _query_params.append(('merchant_id', merchant_id)) + + if payer_id is not None: + + _query_params.append(('payer_id', payer_id)) + # process the header parameters # process the form parameters # process the body parameter - if update_counterparty_request is not None: - _body_params = update_counterparty_request # set the HTTP header `Accept` _header_params = { @@ -15579,8 +12058,8 @@ def _update_counterparty_serialize( } return self.api_client.param_serialize( - method='PUT', - resource_path='/payments/counterparty/{counterparty_id}', + method='GET', + resource_path='/payments/topup/payers', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -15590,10 +12069,9 @@ def _update_counterparty_serialize( ) @validate_call - def update_counterparty_by_id( + def payment_estimate_fee( self, - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], - update_counterparty_by_id_request: Annotated[Optional[UpdateCounterpartyByIdRequest], Field(description="The request body to update a counterparty.")] = None, + payment_estimate_fee_request: Annotated[Optional[PaymentEstimateFeeRequest], Field(description="The request body for fee estimation.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15602,15 +12080,13 @@ def update_counterparty_by_id( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> Counterparty: - """Update counterparty (Deprecated) + ) -> PaymentEstimateFee201Response: + """Estimate fees - This operation updates the information of a specified counterparty. + This operation calculates fees for payment-related operations, including: - **Pay-in**: Fees for accepting payments - **Refunds**: Fees for refunding the payment - **Crypto payouts**: Fees for payouts in crypto - **Fiat off-ramp**: Fees for fiat currency transfers via off-ramp. The returned fees represent the charges that would apply if the operation were executed immediately. Note that actual fees may vary over time based on your usage volume and applicable fee rates. - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: str - :param update_counterparty_by_id_request: The request body to update a counterparty. - :type update_counterparty_by_id_request: UpdateCounterpartyByIdRequest + :param payment_estimate_fee_request: The request body for fee estimation. + :type payment_estimate_fee_request: PaymentEstimateFeeRequest :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 @@ -15619,13 +12095,12 @@ def update_counterparty_by_id( :return: Returns the result object. """ # noqa: E501 - _param = self._update_counterparty_by_id_serialize( - counterparty_id=counterparty_id, - update_counterparty_by_id_request=update_counterparty_by_id_request, + _param = self._payment_estimate_fee_serialize( + payment_estimate_fee_request=payment_estimate_fee_request, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Counterparty", + '201': "PaymentEstimateFee201Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -15640,10 +12115,9 @@ def update_counterparty_by_id( ).data @validate_call - def update_counterparty_by_id_with_http_info( + def payment_estimate_fee_with_http_info( self, - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], - update_counterparty_by_id_request: Annotated[Optional[UpdateCounterpartyByIdRequest], Field(description="The request body to update a counterparty.")] = None, + payment_estimate_fee_request: Annotated[Optional[PaymentEstimateFeeRequest], Field(description="The request body for fee estimation.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15652,15 +12126,13 @@ def update_counterparty_by_id_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[Counterparty]: - """Update counterparty (Deprecated) + ) -> ApiResponse[PaymentEstimateFee201Response]: + """Estimate fees - This operation updates the information of a specified counterparty. + This operation calculates fees for payment-related operations, including: - **Pay-in**: Fees for accepting payments - **Refunds**: Fees for refunding the payment - **Crypto payouts**: Fees for payouts in crypto - **Fiat off-ramp**: Fees for fiat currency transfers via off-ramp. The returned fees represent the charges that would apply if the operation were executed immediately. Note that actual fees may vary over time based on your usage volume and applicable fee rates. - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: str - :param update_counterparty_by_id_request: The request body to update a counterparty. - :type update_counterparty_by_id_request: UpdateCounterpartyByIdRequest + :param payment_estimate_fee_request: The request body for fee estimation. + :type payment_estimate_fee_request: PaymentEstimateFeeRequest :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 @@ -15669,13 +12141,12 @@ def update_counterparty_by_id_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_counterparty_by_id_serialize( - counterparty_id=counterparty_id, - update_counterparty_by_id_request=update_counterparty_by_id_request, + _param = self._payment_estimate_fee_serialize( + payment_estimate_fee_request=payment_estimate_fee_request, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Counterparty", + '201': "PaymentEstimateFee201Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -15690,10 +12161,9 @@ def update_counterparty_by_id_with_http_info( ) @validate_call - def update_counterparty_by_id_without_preload_content( + def payment_estimate_fee_without_preload_content( self, - counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], - update_counterparty_by_id_request: Annotated[Optional[UpdateCounterpartyByIdRequest], Field(description="The request body to update a counterparty.")] = None, + payment_estimate_fee_request: Annotated[Optional[PaymentEstimateFeeRequest], Field(description="The request body for fee estimation.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15703,14 +12173,12 @@ def update_counterparty_by_id_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Update counterparty (Deprecated) + """Estimate fees - This operation updates the information of a specified counterparty. + This operation calculates fees for payment-related operations, including: - **Pay-in**: Fees for accepting payments - **Refunds**: Fees for refunding the payment - **Crypto payouts**: Fees for payouts in crypto - **Fiat off-ramp**: Fees for fiat currency transfers via off-ramp. The returned fees represent the charges that would apply if the operation were executed immediately. Note that actual fees may vary over time based on your usage volume and applicable fee rates. - :param counterparty_id: The counterparty ID. (required) - :type counterparty_id: str - :param update_counterparty_by_id_request: The request body to update a counterparty. - :type update_counterparty_by_id_request: UpdateCounterpartyByIdRequest + :param payment_estimate_fee_request: The request body for fee estimation. + :type payment_estimate_fee_request: PaymentEstimateFeeRequest :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 @@ -15719,13 +12187,12 @@ def update_counterparty_by_id_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_counterparty_by_id_serialize( - counterparty_id=counterparty_id, - update_counterparty_by_id_request=update_counterparty_by_id_request, + _param = self._payment_estimate_fee_serialize( + payment_estimate_fee_request=payment_estimate_fee_request, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Counterparty", + '201': "PaymentEstimateFee201Response", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -15735,10 +12202,9 @@ def update_counterparty_by_id_without_preload_content( ) return response_data.response - def _update_counterparty_by_id_serialize( + def _payment_estimate_fee_serialize( self, - counterparty_id, - update_counterparty_by_id_request, + payment_estimate_fee_request, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -15747,14 +12213,12 @@ def _update_counterparty_by_id_serialize( _body_params: Optional[bytes] = None # process the path parameters - if counterparty_id is not None: - _path_params['counterparty_id'] = counterparty_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if update_counterparty_by_id_request is not None: - _body_params = update_counterparty_by_id_request + if payment_estimate_fee_request is not None: + _body_params = payment_estimate_fee_request # set the HTTP header `Accept` _header_params = { @@ -15763,8 +12227,8 @@ def _update_counterparty_by_id_serialize( } return self.api_client.param_serialize( - method='PUT', - resource_path='/payments/counterparty/{counterparty_id}/update', + method='POST', + resource_path='/payments/estimate_fee', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -15774,10 +12238,10 @@ def _update_counterparty_by_id_serialize( ) @validate_call - def update_destination( + def update_bank_account_by_id( self, - destination_id: Annotated[StrictStr, Field(description="The destination ID.")], - update_destination_request: Annotated[Optional[UpdateDestinationRequest], Field(description="The request body to update a destination.")] = None, + bank_account_id: Annotated[StrictStr, Field(description="The bank account ID.")], + update_bank_account_by_id_request: Annotated[Optional[UpdateBankAccountByIdRequest], Field(description="The request body for updating an existing bank account.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15786,15 +12250,15 @@ def update_destination( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> Destination: - """Update destination + ) -> BankAccount: + """Update bank account - This operation updates the information of a specified destination. + This operation has been deprecated. This operation updates the information of an existing bank account. - :param destination_id: The destination ID. (required) - :type destination_id: str - :param update_destination_request: The request body to update a destination. - :type update_destination_request: UpdateDestinationRequest + :param bank_account_id: The bank account ID. (required) + :type bank_account_id: str + :param update_bank_account_by_id_request: The request body for updating an existing bank account. + :type update_bank_account_by_id_request: UpdateBankAccountByIdRequest :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 @@ -15803,13 +12267,13 @@ def update_destination( :return: Returns the result object. """ # noqa: E501 - _param = self._update_destination_serialize( - destination_id=destination_id, - update_destination_request=update_destination_request, + _param = self._update_bank_account_by_id_serialize( + bank_account_id=bank_account_id, + update_bank_account_by_id_request=update_bank_account_by_id_request, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Destination", + '200': "BankAccount", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -15824,10 +12288,10 @@ def update_destination( ).data @validate_call - def update_destination_with_http_info( + def update_bank_account_by_id_with_http_info( self, - destination_id: Annotated[StrictStr, Field(description="The destination ID.")], - update_destination_request: Annotated[Optional[UpdateDestinationRequest], Field(description="The request body to update a destination.")] = None, + bank_account_id: Annotated[StrictStr, Field(description="The bank account ID.")], + update_bank_account_by_id_request: Annotated[Optional[UpdateBankAccountByIdRequest], Field(description="The request body for updating an existing bank account.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15836,15 +12300,15 @@ def update_destination_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[Destination]: - """Update destination + ) -> ApiResponse[BankAccount]: + """Update bank account - This operation updates the information of a specified destination. + This operation has been deprecated. This operation updates the information of an existing bank account. - :param destination_id: The destination ID. (required) - :type destination_id: str - :param update_destination_request: The request body to update a destination. - :type update_destination_request: UpdateDestinationRequest + :param bank_account_id: The bank account ID. (required) + :type bank_account_id: str + :param update_bank_account_by_id_request: The request body for updating an existing bank account. + :type update_bank_account_by_id_request: UpdateBankAccountByIdRequest :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 @@ -15853,13 +12317,13 @@ def update_destination_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_destination_serialize( - destination_id=destination_id, - update_destination_request=update_destination_request, + _param = self._update_bank_account_by_id_serialize( + bank_account_id=bank_account_id, + update_bank_account_by_id_request=update_bank_account_by_id_request, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Destination", + '200': "BankAccount", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -15874,10 +12338,10 @@ def update_destination_with_http_info( ) @validate_call - def update_destination_without_preload_content( + def update_bank_account_by_id_without_preload_content( self, - destination_id: Annotated[StrictStr, Field(description="The destination ID.")], - update_destination_request: Annotated[Optional[UpdateDestinationRequest], Field(description="The request body to update a destination.")] = None, + bank_account_id: Annotated[StrictStr, Field(description="The bank account ID.")], + update_bank_account_by_id_request: Annotated[Optional[UpdateBankAccountByIdRequest], Field(description="The request body for updating an existing bank account.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15887,14 +12351,14 @@ def update_destination_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Update destination + """Update bank account - This operation updates the information of a specified destination. + This operation has been deprecated. This operation updates the information of an existing bank account. - :param destination_id: The destination ID. (required) - :type destination_id: str - :param update_destination_request: The request body to update a destination. - :type update_destination_request: UpdateDestinationRequest + :param bank_account_id: The bank account ID. (required) + :type bank_account_id: str + :param update_bank_account_by_id_request: The request body for updating an existing bank account. + :type update_bank_account_by_id_request: UpdateBankAccountByIdRequest :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 @@ -15903,13 +12367,13 @@ def update_destination_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_destination_serialize( - destination_id=destination_id, - update_destination_request=update_destination_request, + _param = self._update_bank_account_by_id_serialize( + bank_account_id=bank_account_id, + update_bank_account_by_id_request=update_bank_account_by_id_request, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Destination", + '200': "BankAccount", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -15919,10 +12383,10 @@ def update_destination_without_preload_content( ) return response_data.response - def _update_destination_serialize( + def _update_bank_account_by_id_serialize( self, - destination_id, - update_destination_request, + bank_account_id, + update_bank_account_by_id_request, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -15931,14 +12395,14 @@ def _update_destination_serialize( _body_params: Optional[bytes] = None # process the path parameters - if destination_id is not None: - _path_params['destination_id'] = destination_id + if bank_account_id is not None: + _path_params['bank_account_id'] = bank_account_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if update_destination_request is not None: - _body_params = update_destination_request + if update_bank_account_by_id_request is not None: + _body_params = update_bank_account_by_id_request # set the HTTP header `Accept` _header_params = { @@ -15948,7 +12412,7 @@ def _update_destination_serialize( return self.api_client.param_serialize( method='PUT', - resource_path='/payments/destination/{destination_id}', + resource_path='/payments/bank_accounts/{bank_account_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -15958,10 +12422,10 @@ def _update_destination_serialize( ) @validate_call - def update_destination_bank_account_by_id( + def update_counterparty( self, - bank_account_id: Annotated[StrictStr, Field(description="The bank account ID.")], - update_destination_bank_account: Annotated[Optional[UpdateDestinationBankAccount], Field(description="The request body to update a destination bank account.")] = None, + counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], + update_counterparty_request: Annotated[Optional[UpdateCounterpartyRequest], Field(description="The request body to update a counterparty.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15970,15 +12434,15 @@ def update_destination_bank_account_by_id( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> DestinationBankAccount: - """Update destination bank account + ) -> Counterparty: + """Update counterparty - This operation updates the information of a specified destination bank account. + This operation updates the information of a specified counterparty. - :param bank_account_id: The bank account ID. (required) - :type bank_account_id: str - :param update_destination_bank_account: The request body to update a destination bank account. - :type update_destination_bank_account: UpdateDestinationBankAccount + :param counterparty_id: The counterparty ID. (required) + :type counterparty_id: str + :param update_counterparty_request: The request body to update a counterparty. + :type update_counterparty_request: UpdateCounterpartyRequest :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 @@ -15987,13 +12451,13 @@ def update_destination_bank_account_by_id( :return: Returns the result object. """ # noqa: E501 - _param = self._update_destination_bank_account_by_id_serialize( - bank_account_id=bank_account_id, - update_destination_bank_account=update_destination_bank_account, + _param = self._update_counterparty_serialize( + counterparty_id=counterparty_id, + update_counterparty_request=update_counterparty_request, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DestinationBankAccount", + '200': "Counterparty", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -16008,10 +12472,10 @@ def update_destination_bank_account_by_id( ).data @validate_call - def update_destination_bank_account_by_id_with_http_info( + def update_counterparty_with_http_info( self, - bank_account_id: Annotated[StrictStr, Field(description="The bank account ID.")], - update_destination_bank_account: Annotated[Optional[UpdateDestinationBankAccount], Field(description="The request body to update a destination bank account.")] = None, + counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], + update_counterparty_request: Annotated[Optional[UpdateCounterpartyRequest], Field(description="The request body to update a counterparty.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16020,15 +12484,15 @@ def update_destination_bank_account_by_id_with_http_info( Annotated[StrictFloat, Field(gt=0)] ] ] = None, - ) -> ApiResponse[DestinationBankAccount]: - """Update destination bank account + ) -> ApiResponse[Counterparty]: + """Update counterparty - This operation updates the information of a specified destination bank account. + This operation updates the information of a specified counterparty. - :param bank_account_id: The bank account ID. (required) - :type bank_account_id: str - :param update_destination_bank_account: The request body to update a destination bank account. - :type update_destination_bank_account: UpdateDestinationBankAccount + :param counterparty_id: The counterparty ID. (required) + :type counterparty_id: str + :param update_counterparty_request: The request body to update a counterparty. + :type update_counterparty_request: UpdateCounterpartyRequest :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 @@ -16037,13 +12501,13 @@ def update_destination_bank_account_by_id_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_destination_bank_account_by_id_serialize( - bank_account_id=bank_account_id, - update_destination_bank_account=update_destination_bank_account, + _param = self._update_counterparty_serialize( + counterparty_id=counterparty_id, + update_counterparty_request=update_counterparty_request, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DestinationBankAccount", + '200': "Counterparty", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -16058,10 +12522,10 @@ def update_destination_bank_account_by_id_with_http_info( ) @validate_call - def update_destination_bank_account_by_id_without_preload_content( + def update_counterparty_without_preload_content( self, - bank_account_id: Annotated[StrictStr, Field(description="The bank account ID.")], - update_destination_bank_account: Annotated[Optional[UpdateDestinationBankAccount], Field(description="The request body to update a destination bank account.")] = None, + counterparty_id: Annotated[StrictStr, Field(description="The counterparty ID.")], + update_counterparty_request: Annotated[Optional[UpdateCounterpartyRequest], Field(description="The request body to update a counterparty.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16071,14 +12535,14 @@ def update_destination_bank_account_by_id_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Update destination bank account + """Update counterparty - This operation updates the information of a specified destination bank account. + This operation updates the information of a specified counterparty. - :param bank_account_id: The bank account ID. (required) - :type bank_account_id: str - :param update_destination_bank_account: The request body to update a destination bank account. - :type update_destination_bank_account: UpdateDestinationBankAccount + :param counterparty_id: The counterparty ID. (required) + :type counterparty_id: str + :param update_counterparty_request: The request body to update a counterparty. + :type update_counterparty_request: UpdateCounterpartyRequest :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 @@ -16087,13 +12551,13 @@ def update_destination_bank_account_by_id_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_destination_bank_account_by_id_serialize( - bank_account_id=bank_account_id, - update_destination_bank_account=update_destination_bank_account, + _param = self._update_counterparty_serialize( + counterparty_id=counterparty_id, + update_counterparty_request=update_counterparty_request, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DestinationBankAccount", + '200': "Counterparty", '4XX': "ErrorResponse", '5XX': "ErrorResponse", } @@ -16103,10 +12567,10 @@ def update_destination_bank_account_by_id_without_preload_content( ) return response_data.response - def _update_destination_bank_account_by_id_serialize( + def _update_counterparty_serialize( self, - bank_account_id, - update_destination_bank_account, + counterparty_id, + update_counterparty_request, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -16115,14 +12579,14 @@ def _update_destination_bank_account_by_id_serialize( _body_params: Optional[bytes] = None # process the path parameters - if bank_account_id is not None: - _path_params['bank_account_id'] = bank_account_id + if counterparty_id is not None: + _path_params['counterparty_id'] = counterparty_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if update_destination_bank_account is not None: - _body_params = update_destination_bank_account + if update_counterparty_request is not None: + _body_params = update_counterparty_request # set the HTTP header `Accept` _header_params = { @@ -16132,7 +12596,7 @@ def _update_destination_bank_account_by_id_serialize( return self.api_client.param_serialize( method='PUT', - resource_path='/payments/destination/bank_account/{bank_account_id}/update', + resource_path='/payments/counterparty/{counterparty_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -16142,10 +12606,10 @@ def _update_destination_bank_account_by_id_serialize( ) @validate_call - def update_destination_by_id( + def update_destination( self, destination_id: Annotated[StrictStr, Field(description="The destination ID.")], - update_destination_by_id_request: Annotated[Optional[UpdateDestinationByIdRequest], Field(description="The request body to update a destination.")] = None, + update_destination_request: Annotated[Optional[UpdateDestinationRequest], Field(description="The request body to update a destination.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16155,14 +12619,14 @@ def update_destination_by_id( ] ] = None, ) -> Destination: - """Update destination (Deprecated) + """Update destination This operation updates the information of a specified destination. :param destination_id: The destination ID. (required) :type destination_id: str - :param update_destination_by_id_request: The request body to update a destination. - :type update_destination_by_id_request: UpdateDestinationByIdRequest + :param update_destination_request: The request body to update a destination. + :type update_destination_request: UpdateDestinationRequest :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 @@ -16171,9 +12635,9 @@ def update_destination_by_id( :return: Returns the result object. """ # noqa: E501 - _param = self._update_destination_by_id_serialize( + _param = self._update_destination_serialize( destination_id=destination_id, - update_destination_by_id_request=update_destination_by_id_request, + update_destination_request=update_destination_request, ) _response_types_map: Dict[str, Optional[str]] = { @@ -16192,10 +12656,10 @@ def update_destination_by_id( ).data @validate_call - def update_destination_by_id_with_http_info( + def update_destination_with_http_info( self, destination_id: Annotated[StrictStr, Field(description="The destination ID.")], - update_destination_by_id_request: Annotated[Optional[UpdateDestinationByIdRequest], Field(description="The request body to update a destination.")] = None, + update_destination_request: Annotated[Optional[UpdateDestinationRequest], Field(description="The request body to update a destination.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16205,14 +12669,14 @@ def update_destination_by_id_with_http_info( ] ] = None, ) -> ApiResponse[Destination]: - """Update destination (Deprecated) + """Update destination This operation updates the information of a specified destination. :param destination_id: The destination ID. (required) :type destination_id: str - :param update_destination_by_id_request: The request body to update a destination. - :type update_destination_by_id_request: UpdateDestinationByIdRequest + :param update_destination_request: The request body to update a destination. + :type update_destination_request: UpdateDestinationRequest :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 @@ -16221,9 +12685,9 @@ def update_destination_by_id_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_destination_by_id_serialize( + _param = self._update_destination_serialize( destination_id=destination_id, - update_destination_by_id_request=update_destination_by_id_request, + update_destination_request=update_destination_request, ) _response_types_map: Dict[str, Optional[str]] = { @@ -16242,10 +12706,10 @@ def update_destination_by_id_with_http_info( ) @validate_call - def update_destination_by_id_without_preload_content( + def update_destination_without_preload_content( self, destination_id: Annotated[StrictStr, Field(description="The destination ID.")], - update_destination_by_id_request: Annotated[Optional[UpdateDestinationByIdRequest], Field(description="The request body to update a destination.")] = None, + update_destination_request: Annotated[Optional[UpdateDestinationRequest], Field(description="The request body to update a destination.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16255,14 +12719,14 @@ def update_destination_by_id_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Update destination (Deprecated) + """Update destination This operation updates the information of a specified destination. :param destination_id: The destination ID. (required) :type destination_id: str - :param update_destination_by_id_request: The request body to update a destination. - :type update_destination_by_id_request: UpdateDestinationByIdRequest + :param update_destination_request: The request body to update a destination. + :type update_destination_request: UpdateDestinationRequest :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 @@ -16271,9 +12735,9 @@ def update_destination_by_id_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_destination_by_id_serialize( + _param = self._update_destination_serialize( destination_id=destination_id, - update_destination_by_id_request=update_destination_by_id_request, + update_destination_request=update_destination_request, ) _response_types_map: Dict[str, Optional[str]] = { @@ -16287,10 +12751,10 @@ def update_destination_by_id_without_preload_content( ) return response_data.response - def _update_destination_by_id_serialize( + def _update_destination_serialize( self, destination_id, - update_destination_by_id_request, + update_destination_request, ) -> RequestSerialized: _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -16305,8 +12769,8 @@ def _update_destination_by_id_serialize( # process the header parameters # process the form parameters # process the body parameter - if update_destination_by_id_request is not None: - _body_params = update_destination_by_id_request + if update_destination_request is not None: + _body_params = update_destination_request # set the HTTP header `Accept` _header_params = { @@ -16316,7 +12780,7 @@ def _update_destination_by_id_serialize( return self.api_client.param_serialize( method='PUT', - resource_path='/payments/destination/{destination_id}/update', + resource_path='/payments/destination/{destination_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/cobo_waas2/api_client.py b/cobo_waas2/api_client.py index 4e731f5f..9291ce75 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.30.0' + self.user_agent = 'cobo-waas2-python-sdk/1.31.0' def __enter__(self): return self diff --git a/cobo_waas2/models/__init__.py b/cobo_waas2/models/__init__.py index 1203ecad..ff46b4d4 100644 --- a/cobo_waas2/models/__init__.py +++ b/cobo_waas2/models/__init__.py @@ -134,15 +134,12 @@ from cobo_waas2.models.create_counterparty_entry201_response import CreateCounterpartyEntry201Response from cobo_waas2.models.create_counterparty_entry_request import CreateCounterpartyEntryRequest from cobo_waas2.models.create_counterparty_request import CreateCounterpartyRequest -from cobo_waas2.models.create_counterparty_wallet_address_request import CreateCounterpartyWalletAddressRequest from cobo_waas2.models.create_crypto_address_request import CreateCryptoAddressRequest from cobo_waas2.models.create_custodial_wallet_params import CreateCustodialWalletParams from cobo_waas2.models.create_destination_bank_account import CreateDestinationBankAccount -from cobo_waas2.models.create_destination_bank_account_request import CreateDestinationBankAccountRequest from cobo_waas2.models.create_destination_entry201_response import CreateDestinationEntry201Response from cobo_waas2.models.create_destination_entry_request import CreateDestinationEntryRequest from cobo_waas2.models.create_destination_request import CreateDestinationRequest -from cobo_waas2.models.create_destination_wallet_address_request import CreateDestinationWalletAddressRequest from cobo_waas2.models.create_exchange_wallet_params import CreateExchangeWalletParams from cobo_waas2.models.create_key_share_holder import CreateKeyShareHolder from cobo_waas2.models.create_key_share_holder_group_request import CreateKeyShareHolderGroupRequest @@ -193,16 +190,11 @@ from cobo_waas2.models.custodial_web3_message_sign_source import CustodialWeb3MessageSignSource from cobo_waas2.models.custodial_web3_transfer_source import CustodialWeb3TransferSource from cobo_waas2.models.delete_address_book_by_id201_response import DeleteAddressBookById201Response -from cobo_waas2.models.delete_counterparty200_response import DeleteCounterparty200Response from cobo_waas2.models.delete_counterparty_by_id200_response import DeleteCounterpartyById200Response from cobo_waas2.models.delete_counterparty_entry200_response import DeleteCounterpartyEntry200Response -from cobo_waas2.models.delete_counterparty_wallet_address200_response import DeleteCounterpartyWalletAddress200Response from cobo_waas2.models.delete_crypto_address201_response import DeleteCryptoAddress201Response -from cobo_waas2.models.delete_destination200_response import DeleteDestination200Response -from cobo_waas2.models.delete_destination_bank_account200_response import DeleteDestinationBankAccount200Response from cobo_waas2.models.delete_destination_by_id200_response import DeleteDestinationById200Response from cobo_waas2.models.delete_destination_entry200_response import DeleteDestinationEntry200Response -from cobo_waas2.models.delete_destination_wallet_address200_response import DeleteDestinationWalletAddress200Response from cobo_waas2.models.delete_guard_pubkey201_response import DeleteGuardPubkey201Response from cobo_waas2.models.delete_key_share_holder_group_by_id201_response import DeleteKeyShareHolderGroupById201Response from cobo_waas2.models.delete_wallet_by_id201_response import DeleteWalletById201Response @@ -221,7 +213,6 @@ from cobo_waas2.models.eigen_layer_lst_stake_extra import EigenLayerLstStakeExtra from cobo_waas2.models.eigen_layer_native_stake_extra import EigenLayerNativeStakeExtra from cobo_waas2.models.eigenlayer_validator import EigenlayerValidator -from cobo_waas2.models.enable_destination_whitelist_request import EnableDestinationWhitelistRequest from cobo_waas2.models.entry_type import EntryType from cobo_waas2.models.error_response import ErrorResponse from cobo_waas2.models.estimate_claim_fee import EstimateClaimFee @@ -343,10 +334,7 @@ from cobo_waas2.models.list_callback_messages200_response import ListCallbackMessages200Response from cobo_waas2.models.list_counterparties200_response import ListCounterparties200Response from cobo_waas2.models.list_counterparty_entries200_response import ListCounterpartyEntries200Response -from cobo_waas2.models.list_counterparty_wallet_address200_response import ListCounterpartyWalletAddress200Response -from cobo_waas2.models.list_destination_bank_accounts200_response import ListDestinationBankAccounts200Response from cobo_waas2.models.list_destination_entries200_response import ListDestinationEntries200Response -from cobo_waas2.models.list_destination_wallet_addresses200_response import ListDestinationWalletAddresses200Response from cobo_waas2.models.list_destinations200_response import ListDestinations200Response from cobo_waas2.models.list_exchanges200_response_inner import ListExchanges200ResponseInner from cobo_waas2.models.list_forced_sweep_requests200_response import ListForcedSweepRequests200Response @@ -423,6 +411,7 @@ from cobo_waas2.models.payer_account import PayerAccount from cobo_waas2.models.payment_address_update_event_data import PaymentAddressUpdateEventData from cobo_waas2.models.payment_allocation_amount import PaymentAllocationAmount +from cobo_waas2.models.payment_bridge_status import PaymentBridgeStatus from cobo_waas2.models.payment_bulk_send import PaymentBulkSend from cobo_waas2.models.payment_bulk_send_event import PaymentBulkSendEvent from cobo_waas2.models.payment_bulk_send_execution_mode import PaymentBulkSendExecutionMode @@ -459,9 +448,9 @@ from cobo_waas2.models.pool_details import PoolDetails from cobo_waas2.models.pool_details_all_of_validators_info import PoolDetailsAllOfValidatorsInfo from cobo_waas2.models.pool_summary import PoolSummary +from cobo_waas2.models.pre_check import PreCheck from cobo_waas2.models.psp_balance import PspBalance from cobo_waas2.models.query_approval_statement200_response import QueryApprovalStatement200Response -from cobo_waas2.models.query_destination_whitelist_enabled200_response import QueryDestinationWhitelistEnabled200Response from cobo_waas2.models.query_guard_pubkey200_response import QueryGuardPubkey200Response from cobo_waas2.models.query_guard_pubkey200_response_addresses_inner import QueryGuardPubkey200ResponseAddressesInner from cobo_waas2.models.refresh_address_balances_by_token200_response import RefreshAddressBalancesByToken200Response @@ -509,6 +498,7 @@ from cobo_waas2.models.settlement_detail import SettlementDetail from cobo_waas2.models.settlement_info import SettlementInfo from cobo_waas2.models.settlement_type import SettlementType +from cobo_waas2.models.skip_check_type import SkipCheckType from cobo_waas2.models.smart_contract_initiator import SmartContractInitiator from cobo_waas2.models.smart_contract_wallet_info import SmartContractWalletInfo from cobo_waas2.models.smart_contract_wallet_operation_type import SmartContractWalletOperationType @@ -795,11 +785,9 @@ from cobo_waas2.models.unfreeze_disposition import UnfreezeDisposition from cobo_waas2.models.update_address_book_param import UpdateAddressBookParam from cobo_waas2.models.update_bank_account_by_id_request import UpdateBankAccountByIdRequest -from cobo_waas2.models.update_counterparty_by_id_request import UpdateCounterpartyByIdRequest from cobo_waas2.models.update_counterparty_request import UpdateCounterpartyRequest from cobo_waas2.models.update_custodial_wallet_params import UpdateCustodialWalletParams from cobo_waas2.models.update_destination_bank_account import UpdateDestinationBankAccount -from cobo_waas2.models.update_destination_by_id_request import UpdateDestinationByIdRequest from cobo_waas2.models.update_destination_entry200_response import UpdateDestinationEntry200Response from cobo_waas2.models.update_destination_entry_request import UpdateDestinationEntryRequest from cobo_waas2.models.update_destination_request import UpdateDestinationRequest diff --git a/cobo_waas2/models/balance.py b/cobo_waas2/models/balance.py index 16e9c45c..d8f5d1d3 100644 --- a/cobo_waas2/models/balance.py +++ b/cobo_waas2/models/balance.py @@ -29,7 +29,8 @@ class Balance(BaseModel): available: StrictStr = Field(description="The amount of tokens ready to be spent. To learn more, see [Balances and transaction amounts for MPC Wallets](https://www.cobo.com/developers/v2/guides/mpc-wallets/balance-amounts) for more details.") pending: Optional[StrictStr] = Field(default='0', description="The total amount being sent in a transaction, which is calculated as the withdrawal amount plus the transaction fee. To learn more, see [Balances and transaction amounts for MPC Wallets](https://www.cobo.com/developers/v2/guides/mpc-wallets/balance-amounts) for more details.") locked: Optional[StrictStr] = Field(default='0', description="For UTXO chains, this is the combined value of the selected UTXOs for the transaction. For other chains, it is equal to the Pending amount. To learn more, see [Balances and transaction amounts for MPC Wallets](https://www.cobo.com/developers/v2/guides/mpc-wallets/balance-amounts) for more details.") - __properties: ClassVar[List[str]] = ["total", "available", "pending", "locked"] + frozen: Optional[StrictStr] = Field(default='0', description="Amount frozen due to compliance inspection. To learn more, see [Balances and transaction amounts for MPC Wallets](https://www.cobo.com/developers/v2/guides/mpc-wallets/balance-amounts) for more details.") + __properties: ClassVar[List[str]] = ["total", "available", "pending", "locked", "frozen"] model_config = ConfigDict( populate_by_name=True, @@ -85,7 +86,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "total": obj.get("total"), "available": obj.get("available"), "pending": obj.get("pending") if obj.get("pending") is not None else '0', - "locked": obj.get("locked") if obj.get("locked") is not None else '0' + "locked": obj.get("locked") if obj.get("locked") is not None else '0', + "frozen": obj.get("frozen") if obj.get("frozen") is not None else '0' }) return _obj diff --git a/cobo_waas2/models/bridging_fee.py b/cobo_waas2/models/bridging_fee.py index 91048747..b6386c67 100644 --- a/cobo_waas2/models/bridging_fee.py +++ b/cobo_waas2/models/bridging_fee.py @@ -17,6 +17,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from cobo_waas2.models.payment_bridge_status import PaymentBridgeStatus from typing import Optional, Set from typing_extensions import Self @@ -28,7 +29,8 @@ class BridgingFee(BaseModel): fee_amount: StrictStr = Field(description="The fee charged for bridging tokens to another chain. ") received_token_id: Optional[StrictStr] = Field(default=None, description="The ID of the destination token received after bridging.") received_amount: Optional[StrictStr] = Field(default=None, description="The final amount of the token received after bridging.") - __properties: ClassVar[List[str]] = ["fee_amount", "received_token_id", "received_amount"] + bridge_status: Optional[PaymentBridgeStatus] = None + __properties: ClassVar[List[str]] = ["fee_amount", "received_token_id", "received_amount", "bridge_status"] model_config = ConfigDict( populate_by_name=True, @@ -83,7 +85,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "fee_amount": obj.get("fee_amount"), "received_token_id": obj.get("received_token_id"), - "received_amount": obj.get("received_amount") + "received_amount": obj.get("received_amount"), + "bridge_status": obj.get("bridge_status") }) return _obj diff --git a/cobo_waas2/models/contract_call_params.py b/cobo_waas2/models/contract_call_params.py index fbf74b57..b059e1ff 100644 --- a/cobo_waas2/models/contract_call_params.py +++ b/cobo_waas2/models/contract_call_params.py @@ -20,6 +20,7 @@ from cobo_waas2.models.auto_fuel_type import AutoFuelType from cobo_waas2.models.contract_call_destination import ContractCallDestination from cobo_waas2.models.contract_call_source import ContractCallSource +from cobo_waas2.models.pre_check import PreCheck from cobo_waas2.models.transaction_process_type import TransactionProcessType from cobo_waas2.models.transaction_request_fee import TransactionRequestFee from typing import Optional, Set @@ -39,7 +40,8 @@ class ContractCallParams(BaseModel): fee: Optional[TransactionRequestFee] = None transaction_process_type: Optional[TransactionProcessType] = None auto_fuel: Optional[AutoFuelType] = None - __properties: ClassVar[List[str]] = ["request_id", "chain_id", "source", "destination", "description", "category_names", "fee", "transaction_process_type", "auto_fuel"] + pre_check: Optional[PreCheck] = None + __properties: ClassVar[List[str]] = ["request_id", "chain_id", "source", "destination", "description", "category_names", "fee", "transaction_process_type", "auto_fuel", "pre_check"] model_config = ConfigDict( populate_by_name=True, @@ -89,6 +91,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of fee if self.fee: _dict['fee'] = self.fee.to_dict() + # override the default output from pydantic by calling `to_dict()` of pre_check + if self.pre_check: + _dict['pre_check'] = self.pre_check.to_dict() return _dict @classmethod @@ -109,7 +114,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "category_names": obj.get("category_names"), "fee": TransactionRequestFee.from_dict(obj["fee"]) if obj.get("fee") is not None else None, "transaction_process_type": obj.get("transaction_process_type"), - "auto_fuel": obj.get("auto_fuel") + "auto_fuel": obj.get("auto_fuel"), + "pre_check": PreCheck.from_dict(obj["pre_check"]) if obj.get("pre_check") is not None else None }) return _obj diff --git a/cobo_waas2/models/create_counterparty_wallet_address_request.py b/cobo_waas2/models/create_counterparty_wallet_address_request.py deleted file mode 100644 index dbdca82b..00000000 --- a/cobo_waas2/models/create_counterparty_wallet_address_request.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - - -class CreateCounterpartyWalletAddressRequest(BaseModel): - """ - CreateCounterpartyWalletAddressRequest - """ # noqa: E501 - counterparty_id: StrictStr = Field(description="The counterparty ID.") - address: StrictStr = Field(description="The wallet address.") - chain_id: StrictStr = Field(description="The chain ID of the cryptocurrency.") - __properties: ClassVar[List[str]] = ["counterparty_id", "address", "chain_id"] - - 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 CreateCounterpartyWalletAddressRequest 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 CreateCounterpartyWalletAddressRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "counterparty_id": obj.get("counterparty_id"), - "address": obj.get("address"), - "chain_id": obj.get("chain_id") - }) - return _obj - - diff --git a/cobo_waas2/models/create_destination_bank_account_request.py b/cobo_waas2/models/create_destination_bank_account_request.py deleted file mode 100644 index ae274a18..00000000 --- a/cobo_waas2/models/create_destination_bank_account_request.py +++ /dev/null @@ -1,112 +0,0 @@ -# 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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from cobo_waas2.models.intermediary_bank_info import IntermediaryBankInfo -from typing import Optional, Set -from typing_extensions import Self - - -class CreateDestinationBankAccountRequest(BaseModel): - """ - CreateDestinationBankAccountRequest - """ # noqa: E501 - destination_id: StrictStr = Field(description="The destination ID.") - account_alias: StrictStr = Field(description="The alias of the bank account.") - account_number: StrictStr = Field(description="The bank account number.") - swift_code: StrictStr = Field(description="The SWIFT or BIC code of the bank.") - currency: StrictStr = Field(description="The currency of the bank account.") - beneficiary_name: StrictStr = Field(description="The name of the account holder.") - beneficiary_address: StrictStr = Field(description="The address of the account holder.") - bank_name: StrictStr = Field(description="The name of the bank.") - bank_address: StrictStr = Field(description="The address of the bank.") - 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]] = ["destination_id", "account_alias", "account_number", "swift_code", "currency", "beneficiary_name", "beneficiary_address", "bank_name", "bank_address", "iban_code", "further_credit", "intermediary_bank_info"] - - 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 CreateDestinationBankAccountRequest 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, - ) - # override the default output from pydantic by calling `to_dict()` of intermediary_bank_info - if self.intermediary_bank_info: - _dict['intermediary_bank_info'] = self.intermediary_bank_info.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateDestinationBankAccountRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "destination_id": obj.get("destination_id"), - "account_alias": obj.get("account_alias"), - "account_number": obj.get("account_number"), - "swift_code": obj.get("swift_code"), - "currency": obj.get("currency"), - "beneficiary_name": obj.get("beneficiary_name"), - "beneficiary_address": obj.get("beneficiary_address"), - "bank_name": obj.get("bank_name"), - "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 - }) - return _obj - - diff --git a/cobo_waas2/models/create_destination_wallet_address_request.py b/cobo_waas2/models/create_destination_wallet_address_request.py deleted file mode 100644 index 2db7e83d..00000000 --- a/cobo_waas2/models/create_destination_wallet_address_request.py +++ /dev/null @@ -1,90 +0,0 @@ -# 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, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - - -class CreateDestinationWalletAddressRequest(BaseModel): - """ - CreateDestinationWalletAddressRequest - """ # noqa: E501 - destination_id: StrictStr = Field(description="The destination ID.") - address: StrictStr = Field(description="The wallet address.") - chain_id: StrictStr = Field(description="The chain ID of the cryptocurrency.") - __properties: ClassVar[List[str]] = ["destination_id", "address", "chain_id"] - - 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 CreateDestinationWalletAddressRequest 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 CreateDestinationWalletAddressRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "destination_id": obj.get("destination_id"), - "address": obj.get("address"), - "chain_id": obj.get("chain_id") - }) - return _obj - - diff --git a/cobo_waas2/models/create_payment_order_request.py b/cobo_waas2/models/create_payment_order_request.py index 112676bf..44f627c4 100644 --- a/cobo_waas2/models/create_payment_order_request.py +++ b/cobo_waas2/models/create_payment_order_request.py @@ -28,12 +28,12 @@ class CreatePaymentOrderRequest(BaseModel): merchant_id: StrictStr = Field(description="The merchant ID.") merchant_order_code: Optional[StrictStr] = Field(default=None, description="A unique reference code assigned by the merchant to identify this order in their system.") psp_order_code: StrictStr = Field(description="A unique reference code assigned by the developer to identify this order in their system.") - pricing_currency: Optional[StrictStr] = Field(default=None, description="The pricing currency that denominates `pricing_amount` and `fee_amount`. If left empty, both values will be denominated in `payable_currency`. Currently, For a complete list of supported currencies, see [Supported chains and tokens](https://www.cobo.com/developers/v2/guides/overview/supported-chains-and-tokens). ") + pricing_currency: Optional[StrictStr] = Field(default=None, description="The pricing currency that denominates `pricing_amount` and `fee_amount`. If left empty, both values will be denominated in `payable_currency`. Currently, For a complete list of supported currencies, see [Supported chains and tokens](https://www.cobo.com//payments/en/guides/supported-chains-and-tokens#pricing-currency). ") pricing_amount: Optional[StrictStr] = Field(default=None, description="The base amount of the order, excluding the developer fee (specified in `fee_amount`). Values must be greater than `0` and contain two decimal places.") fee_amount: StrictStr = Field(description="The developer fee for the order. It is added to the base amount (`pricing_amount`) to determine the final charge. For example, if `pricing_amount` is \"100.00\" and `fee_amount` is \"2.00\", the payer will be charged \"102.00\" in total, with \"100.00\" being settled to the merchant account and \"2.00\" settled to the developer account. Values must be greater than 0 and contain two decimal places.") payable_currency: StrictStr = Field(description="The ID of the cryptocurrency used for payment. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` ") payable_amount: Optional[StrictStr] = Field(default=None, description="The total amount the payer needs to pay, denominated in the specified `payable_currency`. If this field is left blank, the system will automatically calculate the amount at order creation using the following formula: (`pricing_amount` + `fee_amount`) / current exchange rate. Values must be greater than 0 and contain two decimal places. ") - expired_in: Optional[StrictInt] = Field(default=None, description="The pay-in order will expire after approximately a certain number of seconds: - The order status becomes final and cannot be changed - The `received_token_amount` field will no longer be updated - Funds received after expiration will be categorized as late payments and can only be settled from the developer balance. - A late payment will trigger a `transactionLate` webhook event. ") + expired_in: Optional[StrictInt] = Field(default=1800, description="The number of seconds until the pay-in order expires, counted from when the request is sent. For example, if set to `1800`, the order will expire in 30 minutes. Must be greater than zero and cannot exceed 3 hours (10800 seconds). After expiration: - The order status becomes final and cannot be changed - The `received_token_amount` field will no longer be updated - Funds received after expiration will be categorized as late payments and can only be settled from the developer balance. - A late payment will trigger a `transactionLate` webhook event. ") amount_tolerance: Optional[StrictStr] = Field(default=None, description="The allowed amount deviation, with precision up to 1 decimal place. For example, if `payable_amount` is `100.00` and `amount_tolerance` is `0.50`: - Payer pays 99.55 → Success (difference of 0.45 ≤ 0.5) - Payer pays 99.40 → Underpaid (difference of 0.60 > 0.5) ") currency: Optional[StrictStr] = Field(default='', description="This field has been deprecated. Please use `pricing_currency` instead.") order_amount: Optional[StrictStr] = Field(default=None, description="This field has been deprecated. Please use `pricing_amount` instead.") @@ -101,7 +101,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "fee_amount": obj.get("fee_amount"), "payable_currency": obj.get("payable_currency"), "payable_amount": obj.get("payable_amount"), - "expired_in": obj.get("expired_in"), + "expired_in": obj.get("expired_in") if obj.get("expired_in") is not None else 1800, "amount_tolerance": obj.get("amount_tolerance"), "currency": obj.get("currency") if obj.get("currency") is not None else '', "order_amount": obj.get("order_amount"), diff --git a/cobo_waas2/models/create_top_up_addresses.py b/cobo_waas2/models/create_top_up_addresses.py index 672ae1d9..4ea51671 100644 --- a/cobo_waas2/models/create_top_up_addresses.py +++ b/cobo_waas2/models/create_top_up_addresses.py @@ -28,7 +28,7 @@ class CreateTopUpAddresses(BaseModel): """ # noqa: E501 merchant_id: Optional[StrictStr] = Field(default=None, description="The merchant ID. If not provided, the default merchant created during organization initialization will be used.") token_id: StrictStr = Field(description="The token ID, which identifies the cryptocurrency. ") - custom_payer_ids: Annotated[List[StrictStr], Field(max_length=50)] = Field(description="A list of unique custom payer IDs required to create top-up addresses. The maximum number of items is 50. ") + custom_payer_ids: Annotated[List[StrictStr], Field(max_length=50)] = Field(description="A list of unique custom payer IDs required to create top-up addresses. ") __properties: ClassVar[List[str]] = ["merchant_id", "token_id", "custom_payer_ids"] model_config = ConfigDict( diff --git a/cobo_waas2/models/create_wallet_address.py b/cobo_waas2/models/create_wallet_address.py index 829a34f1..6281b3a7 100644 --- a/cobo_waas2/models/create_wallet_address.py +++ b/cobo_waas2/models/create_wallet_address.py @@ -26,7 +26,7 @@ class CreateWalletAddress(BaseModel): CreateWalletAddress """ # noqa: E501 address: StrictStr = Field(description="The wallet address.") - chain_id: StrictStr = Field(description="The chain ID of the address.") + chain_id: StrictStr = Field(description="The chain ID of the cryptocurrency. Supported values in the development environment: - Counterparty: `ARBITRUM_ETH`, `BASE_ETH`, `BSC_BNB`, `ETH`, `TRON`, `MATIC`, `SOL`, `TTRON`, `SOLDEV_SOL`, `SETH` - Destination: `All EVM Networks`, `SOL`, `TRON`, `TTRON`, `SOLDEV_SOL` Supported values in the production environment: - Counterparty: `ARBITRUM_ETH`, `BASE_ETH`, `BSC_BNB`, `ETH`, `TRON`, `MATIC`, `SOL` - Destination: `All EVM Networks`, `SOL`, `TRON` ") __properties: ClassVar[List[str]] = ["address", "chain_id"] model_config = ConfigDict( diff --git a/cobo_waas2/models/delete_counterparty200_response.py b/cobo_waas2/models/delete_counterparty200_response.py deleted file mode 100644 index 73baf377..00000000 --- a/cobo_waas2/models/delete_counterparty200_response.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - - -class DeleteCounterparty200Response(BaseModel): - """ - DeleteCounterparty200Response - """ # noqa: E501 - counterparty_id: StrictStr = Field(description="The counterparty ID.") - __properties: ClassVar[List[str]] = ["counterparty_id"] - - 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 DeleteCounterparty200Response 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 DeleteCounterparty200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "counterparty_id": obj.get("counterparty_id") - }) - return _obj - - diff --git a/cobo_waas2/models/delete_counterparty_wallet_address200_response.py b/cobo_waas2/models/delete_counterparty_wallet_address200_response.py deleted file mode 100644 index ef58c497..00000000 --- a/cobo_waas2/models/delete_counterparty_wallet_address200_response.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - - -class DeleteCounterpartyWalletAddress200Response(BaseModel): - """ - DeleteCounterpartyWalletAddress200Response - """ # noqa: E501 - wallet_address_id: StrictStr = Field(description="The wallet address ID under the counterparty.") - __properties: ClassVar[List[str]] = ["wallet_address_id"] - - 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 DeleteCounterpartyWalletAddress200Response 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 DeleteCounterpartyWalletAddress200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "wallet_address_id": obj.get("wallet_address_id") - }) - return _obj - - diff --git a/cobo_waas2/models/delete_destination_bank_account200_response.py b/cobo_waas2/models/delete_destination_bank_account200_response.py deleted file mode 100644 index f38295d2..00000000 --- a/cobo_waas2/models/delete_destination_bank_account200_response.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - - -class DeleteDestinationBankAccount200Response(BaseModel): - """ - DeleteDestinationBankAccount200Response - """ # noqa: E501 - bank_account_id: StrictStr = Field(description="The destination bank account ID.") - __properties: ClassVar[List[str]] = ["bank_account_id"] - - 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 DeleteDestinationBankAccount200Response 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 DeleteDestinationBankAccount200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "bank_account_id": obj.get("bank_account_id") - }) - return _obj - - diff --git a/cobo_waas2/models/delete_destination_wallet_address200_response.py b/cobo_waas2/models/delete_destination_wallet_address200_response.py deleted file mode 100644 index 575410f2..00000000 --- a/cobo_waas2/models/delete_destination_wallet_address200_response.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - - -class DeleteDestinationWalletAddress200Response(BaseModel): - """ - DeleteDestinationWalletAddress200Response - """ # noqa: E501 - wallet_address_id: StrictStr = Field(description="The wallet address ID under the destination.") - __properties: ClassVar[List[str]] = ["wallet_address_id"] - - 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 DeleteDestinationWalletAddress200Response 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 DeleteDestinationWalletAddress200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "wallet_address_id": obj.get("wallet_address_id") - }) - return _obj - - diff --git a/cobo_waas2/models/enable_destination_whitelist_request.py b/cobo_waas2/models/enable_destination_whitelist_request.py deleted file mode 100644 index 639e7532..00000000 --- a/cobo_waas2/models/enable_destination_whitelist_request.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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 -from typing import Optional, Set -from typing_extensions import Self - - -class EnableDestinationWhitelistRequest(BaseModel): - """ - EnableDestinationWhitelistRequest - """ # noqa: E501 - enable_destination_whitelist: StrictBool = Field(description="Indicates whether to enable the destination whitelist.") - __properties: ClassVar[List[str]] = ["enable_destination_whitelist"] - - 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 EnableDestinationWhitelistRequest 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 EnableDestinationWhitelistRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "enable_destination_whitelist": obj.get("enable_destination_whitelist") - }) - return _obj - - diff --git a/cobo_waas2/models/list_counterparty_wallet_address200_response.py b/cobo_waas2/models/list_counterparty_wallet_address200_response.py deleted file mode 100644 index 1500e158..00000000 --- a/cobo_waas2/models/list_counterparty_wallet_address200_response.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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 -from typing import Any, ClassVar, Dict, List, Optional -from cobo_waas2.models.counterparty_wallet_address_detail import CounterpartyWalletAddressDetail -from cobo_waas2.models.pagination import Pagination -from typing import Optional, Set -from typing_extensions import Self - - -class ListCounterpartyWalletAddress200Response(BaseModel): - """ - ListCounterpartyWalletAddress200Response - """ # noqa: E501 - data: Optional[List[CounterpartyWalletAddressDetail]] = None - pagination: Optional[Pagination] = None - __properties: ClassVar[List[str]] = ["data", "pagination"] - - 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 ListCounterpartyWalletAddress200Response 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, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - # override the default output from pydantic by calling `to_dict()` of pagination - if self.pagination: - _dict['pagination'] = self.pagination.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListCounterpartyWalletAddress200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [CounterpartyWalletAddressDetail.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, - "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None - }) - return _obj - - diff --git a/cobo_waas2/models/list_destination_bank_accounts200_response.py b/cobo_waas2/models/list_destination_bank_accounts200_response.py deleted file mode 100644 index c6667d00..00000000 --- a/cobo_waas2/models/list_destination_bank_accounts200_response.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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 -from typing import Any, ClassVar, Dict, List, Optional -from cobo_waas2.models.destination_bank_account_detail import DestinationBankAccountDetail -from cobo_waas2.models.pagination import Pagination -from typing import Optional, Set -from typing_extensions import Self - - -class ListDestinationBankAccounts200Response(BaseModel): - """ - ListDestinationBankAccounts200Response - """ # noqa: E501 - data: Optional[List[DestinationBankAccountDetail]] = None - pagination: Optional[Pagination] = None - __properties: ClassVar[List[str]] = ["data", "pagination"] - - 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 ListDestinationBankAccounts200Response 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, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - # override the default output from pydantic by calling `to_dict()` of pagination - if self.pagination: - _dict['pagination'] = self.pagination.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListDestinationBankAccounts200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [DestinationBankAccountDetail.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, - "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None - }) - return _obj - - diff --git a/cobo_waas2/models/list_destination_wallet_addresses200_response.py b/cobo_waas2/models/list_destination_wallet_addresses200_response.py deleted file mode 100644 index 1ec25d50..00000000 --- a/cobo_waas2/models/list_destination_wallet_addresses200_response.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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 -from typing import Any, ClassVar, Dict, List, Optional -from cobo_waas2.models.destination_wallet_address_detail import DestinationWalletAddressDetail -from cobo_waas2.models.pagination import Pagination -from typing import Optional, Set -from typing_extensions import Self - - -class ListDestinationWalletAddresses200Response(BaseModel): - """ - ListDestinationWalletAddresses200Response - """ # noqa: E501 - data: Optional[List[DestinationWalletAddressDetail]] = None - pagination: Optional[Pagination] = None - __properties: ClassVar[List[str]] = ["data", "pagination"] - - 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 ListDestinationWalletAddresses200Response 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, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - # override the default output from pydantic by calling `to_dict()` of pagination - if self.pagination: - _dict['pagination'] = self.pagination.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListDestinationWalletAddresses200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [DestinationWalletAddressDetail.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, - "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None - }) - return _obj - - diff --git a/cobo_waas2/models/payment_bridge_status.py b/cobo_waas2/models/payment_bridge_status.py new file mode 100644 index 00000000..e76ba553 --- /dev/null +++ b/cobo_waas2/models/payment_bridge_status.py @@ -0,0 +1,41 @@ +# 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 json +from enum import Enum +from typing_extensions import Self + + +class PaymentBridgeStatus(str, Enum): + """ + The current status of the payout bridge. Possible values include: - `Completed`: The payout bridge has been completed successfully. - `Failed`: The payout bridge has failed. + """ + + """ + allowed enum values + """ + COMPLETED = 'Completed' + FAILED = 'Failed' + + UNKNOWN = None + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of PaymentBridgeStatus from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + return cls.UNKNOWN + + diff --git a/cobo_waas2/models/payment_bulk_send_item.py b/cobo_waas2/models/payment_bulk_send_item.py index c52f872b..439c45ca 100644 --- a/cobo_waas2/models/payment_bulk_send_item.py +++ b/cobo_waas2/models/payment_bulk_send_item.py @@ -27,11 +27,11 @@ class PaymentBulkSendItem(BaseModel): """ PaymentBulkSendItem """ # noqa: E501 - bulk_send_item_id: StrictStr = Field(description="The payout item ID.") - token_id: StrictStr = Field(description="The token ID of the payout item.") - receiving_address: StrictStr = Field(description="The receiving address of the payout item.") - amount: StrictStr = Field(description="The amount of the payout item.") - description: Optional[StrictStr] = Field(default=None, description="The note of the payout item.") + bulk_send_item_id: StrictStr = Field(description="The bulk send item ID.") + token_id: StrictStr = Field(description="The token ID of the cryptocurrency to be sent to the recipient.") + receiving_address: StrictStr = Field(description="The receiving address.") + amount: StrictStr = Field(description="The amount of the cryptocurrency to be sent to the recipient.") + description: Optional[StrictStr] = Field(default=None, description="A note or comment about the bulk send item.") status: PaymentBulkSendItemStatus validation_status: PaymentBulkSendItemValidationStatus __properties: ClassVar[List[str]] = ["bulk_send_item_id", "token_id", "receiving_address", "amount", "description", "status", "validation_status"] diff --git a/cobo_waas2/models/payment_payout.py b/cobo_waas2/models/payment_payout.py index f6ba7f52..56b8826e 100644 --- a/cobo_waas2/models/payment_payout.py +++ b/cobo_waas2/models/payment_payout.py @@ -17,6 +17,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from cobo_waas2.models.commission_fee import CommissionFee from cobo_waas2.models.payment_payout_item import PaymentPayoutItem from cobo_waas2.models.payment_payout_recipient_info import PaymentPayoutRecipientInfo from cobo_waas2.models.payment_payout_status import PaymentPayoutStatus @@ -37,11 +38,12 @@ class PaymentPayout(BaseModel): recipient_info: Optional[PaymentPayoutRecipientInfo] = None initiator: Optional[StrictStr] = Field(default=None, description="The initiator of this payout, usually the user's API key.") actual_payout_amount: Optional[StrictStr] = Field(default=None, description="- For `Crypto` payouts: The amount of cryptocurrency sent to the recipient's address, denominated in the token specified in `recipient_info.token_id`. - For `OffRamp` payouts: The amount of fiat currency sent to the recipient's bank account, denominated in the currency specified in `recipient_info.currency`. (Note: The actual amount received may be lower due to additional bank transfer fees.) ") - status: PaymentPayoutStatus + commission_fees: Optional[List[CommissionFee]] = Field(default=None, description="The commission fees of the payout.") remark: Optional[StrictStr] = Field(default=None, description="A note or comment about the payout.") + status: PaymentPayoutStatus created_timestamp: StrictInt = Field(description="The created time of the payout, represented as a UNIX timestamp in seconds.") updated_timestamp: StrictInt = Field(description="The updated time of the payout, represented as a UNIX timestamp in seconds.") - __properties: ClassVar[List[str]] = ["payout_id", "request_id", "payout_channel", "source_account", "payout_items", "recipient_info", "initiator", "actual_payout_amount", "status", "remark", "created_timestamp", "updated_timestamp"] + __properties: ClassVar[List[str]] = ["payout_id", "request_id", "payout_channel", "source_account", "payout_items", "recipient_info", "initiator", "actual_payout_amount", "commission_fees", "remark", "status", "created_timestamp", "updated_timestamp"] model_config = ConfigDict( populate_by_name=True, @@ -92,6 +94,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of recipient_info if self.recipient_info: _dict['recipient_info'] = self.recipient_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in commission_fees (list) + _items = [] + if self.commission_fees: + for _item in self.commission_fees: + if _item: + _items.append(_item.to_dict()) + _dict['commission_fees'] = _items return _dict @classmethod @@ -112,8 +121,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "recipient_info": PaymentPayoutRecipientInfo.from_dict(obj["recipient_info"]) if obj.get("recipient_info") is not None else None, "initiator": obj.get("initiator"), "actual_payout_amount": obj.get("actual_payout_amount"), - "status": obj.get("status"), + "commission_fees": [CommissionFee.from_dict(_item) for _item in obj["commission_fees"]] if obj.get("commission_fees") is not None else None, "remark": obj.get("remark"), + "status": obj.get("status"), "created_timestamp": obj.get("created_timestamp"), "updated_timestamp": obj.get("updated_timestamp") }) diff --git a/cobo_waas2/models/payment_payout_detail.py b/cobo_waas2/models/payment_payout_detail.py index b0281a11..91b9bef9 100644 --- a/cobo_waas2/models/payment_payout_detail.py +++ b/cobo_waas2/models/payment_payout_detail.py @@ -17,6 +17,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from cobo_waas2.models.commission_fee import CommissionFee from cobo_waas2.models.payment_payout_item import PaymentPayoutItem from cobo_waas2.models.payment_payout_recipient_info import PaymentPayoutRecipientInfo from cobo_waas2.models.payment_payout_status import PaymentPayoutStatus @@ -38,12 +39,13 @@ class PaymentPayoutDetail(BaseModel): recipient_info: Optional[PaymentPayoutRecipientInfo] = None initiator: Optional[StrictStr] = Field(default=None, description="The initiator of this payout, usually the user's API key.") actual_payout_amount: Optional[StrictStr] = Field(default=None, description="- For `Crypto` payouts: The amount of cryptocurrency sent to the recipient's address, denominated in the token specified in `recipient_info.token_id`. - For `OffRamp` payouts: The amount of fiat currency sent to the recipient's bank account, denominated in the currency specified in `recipient_info.currency`. (Note: The actual amount received may be lower due to additional bank transfer fees.) ") - status: PaymentPayoutStatus + commission_fees: Optional[List[CommissionFee]] = Field(default=None, description="The commission fees of the payout.") remark: Optional[StrictStr] = Field(default=None, description="A note or comment about the payout.") + status: PaymentPayoutStatus created_timestamp: StrictInt = Field(description="The created time of the payout, represented as a UNIX timestamp in seconds.") updated_timestamp: StrictInt = Field(description="The updated time of the payout, represented as a UNIX timestamp in seconds.") transactions: Optional[List[PaymentTransaction]] = Field(default=None, description="An array of payout transactions.") - __properties: ClassVar[List[str]] = ["payout_id", "request_id", "payout_channel", "source_account", "payout_items", "recipient_info", "initiator", "actual_payout_amount", "status", "remark", "created_timestamp", "updated_timestamp", "transactions"] + __properties: ClassVar[List[str]] = ["payout_id", "request_id", "payout_channel", "source_account", "payout_items", "recipient_info", "initiator", "actual_payout_amount", "commission_fees", "remark", "status", "created_timestamp", "updated_timestamp", "transactions"] model_config = ConfigDict( populate_by_name=True, @@ -94,6 +96,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of recipient_info if self.recipient_info: _dict['recipient_info'] = self.recipient_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in commission_fees (list) + _items = [] + if self.commission_fees: + for _item in self.commission_fees: + if _item: + _items.append(_item.to_dict()) + _dict['commission_fees'] = _items # override the default output from pydantic by calling `to_dict()` of each item in transactions (list) _items = [] if self.transactions: @@ -121,8 +130,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "recipient_info": PaymentPayoutRecipientInfo.from_dict(obj["recipient_info"]) if obj.get("recipient_info") is not None else None, "initiator": obj.get("initiator"), "actual_payout_amount": obj.get("actual_payout_amount"), - "status": obj.get("status"), + "commission_fees": [CommissionFee.from_dict(_item) for _item in obj["commission_fees"]] if obj.get("commission_fees") is not None else None, "remark": obj.get("remark"), + "status": obj.get("status"), "created_timestamp": obj.get("created_timestamp"), "updated_timestamp": obj.get("updated_timestamp"), "transactions": [PaymentTransaction.from_dict(_item) for _item in obj["transactions"]] if obj.get("transactions") is not None else None diff --git a/cobo_waas2/models/payment_payout_event.py b/cobo_waas2/models/payment_payout_event.py index 6031e8e3..9c4887cf 100644 --- a/cobo_waas2/models/payment_payout_event.py +++ b/cobo_waas2/models/payment_payout_event.py @@ -17,6 +17,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional +from cobo_waas2.models.commission_fee import CommissionFee from cobo_waas2.models.payment_payout_item import PaymentPayoutItem from cobo_waas2.models.payment_payout_recipient_info import PaymentPayoutRecipientInfo from cobo_waas2.models.payment_payout_status import PaymentPayoutStatus @@ -39,12 +40,13 @@ class PaymentPayoutEvent(BaseModel): recipient_info: Optional[PaymentPayoutRecipientInfo] = None initiator: Optional[StrictStr] = Field(default=None, description="The initiator of this payout, usually the user's API key.") actual_payout_amount: Optional[StrictStr] = Field(default=None, description="- For `Crypto` payouts: The amount of cryptocurrency sent to the recipient's address, denominated in the token specified in `recipient_info.token_id`. - For `OffRamp` payouts: The amount of fiat currency sent to the recipient's bank account, denominated in the currency specified in `recipient_info.currency`. (Note: The actual amount received may be lower due to additional bank transfer fees.) ") - status: PaymentPayoutStatus + commission_fees: Optional[List[CommissionFee]] = Field(default=None, description="The commission fees of the payout.") remark: Optional[StrictStr] = Field(default=None, description="A note or comment about the payout.") + status: PaymentPayoutStatus created_timestamp: StrictInt = Field(description="The created time of the payout, represented as a UNIX timestamp in seconds.") updated_timestamp: StrictInt = Field(description="The updated time of the payout, represented as a UNIX timestamp in seconds.") transactions: Optional[List[PaymentTransaction]] = Field(default=None, description="An array of payout transactions.") - __properties: ClassVar[List[str]] = ["data_type", "payout_id", "request_id", "payout_channel", "source_account", "payout_items", "recipient_info", "initiator", "actual_payout_amount", "status", "remark", "created_timestamp", "updated_timestamp", "transactions"] + __properties: ClassVar[List[str]] = ["data_type", "payout_id", "request_id", "payout_channel", "source_account", "payout_items", "recipient_info", "initiator", "actual_payout_amount", "commission_fees", "remark", "status", "created_timestamp", "updated_timestamp", "transactions"] @field_validator('data_type') def data_type_validate_enum(cls, value): @@ -102,6 +104,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of recipient_info if self.recipient_info: _dict['recipient_info'] = self.recipient_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in commission_fees (list) + _items = [] + if self.commission_fees: + for _item in self.commission_fees: + if _item: + _items.append(_item.to_dict()) + _dict['commission_fees'] = _items # override the default output from pydantic by calling `to_dict()` of each item in transactions (list) _items = [] if self.transactions: @@ -130,8 +139,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "recipient_info": PaymentPayoutRecipientInfo.from_dict(obj["recipient_info"]) if obj.get("recipient_info") is not None else None, "initiator": obj.get("initiator"), "actual_payout_amount": obj.get("actual_payout_amount"), - "status": obj.get("status"), + "commission_fees": [CommissionFee.from_dict(_item) for _item in obj["commission_fees"]] if obj.get("commission_fees") is not None else None, "remark": obj.get("remark"), + "status": obj.get("status"), "created_timestamp": obj.get("created_timestamp"), "updated_timestamp": obj.get("updated_timestamp"), "transactions": [PaymentTransaction.from_dict(_item) for _item in obj["transactions"]] if obj.get("transactions") is not None else None diff --git a/cobo_waas2/models/delete_destination200_response.py b/cobo_waas2/models/pre_check.py similarity index 76% rename from cobo_waas2/models/delete_destination200_response.py rename to cobo_waas2/models/pre_check.py index f89bd5fc..f0d9b1ad 100644 --- a/cobo_waas2/models/delete_destination200_response.py +++ b/cobo_waas2/models/pre_check.py @@ -15,18 +15,19 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from cobo_waas2.models.skip_check_type import SkipCheckType from typing import Optional, Set from typing_extensions import Self -class DeleteDestination200Response(BaseModel): +class PreCheck(BaseModel): """ - DeleteDestination200Response + Some validation settings for creating a transaction. """ # noqa: E501 - destination_id: StrictStr = Field(description="The destination ID.") - __properties: ClassVar[List[str]] = ["destination_id"] + skip_checks: Optional[List[SkipCheckType]] = Field(default=None, description="Selection to skip verification.") + __properties: ClassVar[List[str]] = ["skip_checks"] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +47,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DeleteDestination200Response from a JSON string""" + """Create an instance of PreCheck from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DeleteDestination200Response from a dict""" + """Create an instance of PreCheck from a dict""" if obj is None: return None @@ -79,7 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "destination_id": obj.get("destination_id") + "skip_checks": obj.get("skip_checks") }) return _obj diff --git a/cobo_waas2/models/query_destination_whitelist_enabled200_response.py b/cobo_waas2/models/query_destination_whitelist_enabled200_response.py deleted file mode 100644 index ff9370ed..00000000 --- a/cobo_waas2/models/query_destination_whitelist_enabled200_response.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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 -from typing import Optional, Set -from typing_extensions import Self - - -class QueryDestinationWhitelistEnabled200Response(BaseModel): - """ - QueryDestinationWhitelistEnabled200Response - """ # noqa: E501 - enable_destination_whitelist: StrictBool = Field(description="Indicates whether the destination whitelist is enabled.") - __properties: ClassVar[List[str]] = ["enable_destination_whitelist"] - - 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 QueryDestinationWhitelistEnabled200Response 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 QueryDestinationWhitelistEnabled200Response from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "enable_destination_whitelist": obj.get("enable_destination_whitelist") - }) - return _obj - - diff --git a/cobo_waas2/models/skip_check_type.py b/cobo_waas2/models/skip_check_type.py new file mode 100644 index 00000000..fbbd1c2e --- /dev/null +++ b/cobo_waas2/models/skip_check_type.py @@ -0,0 +1,40 @@ +# 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 json +from enum import Enum +from typing_extensions import Self + + +class SkipCheckType(str, Enum): + """ + The skip check type. Possible values include: - `OnchainFeeBalance`: The system does not verify whether the balance is sufficient to pay the on-chain transaction fees; currently, this only applies to the TRON chain for MPC and Custodial Web3 wallets. + """ + + """ + allowed enum values + """ + ONCHAINFEEBALANCE = 'OnchainFeeBalance' + + UNKNOWN = None + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SkipCheckType from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + return cls.UNKNOWN + + diff --git a/cobo_waas2/models/supported_token.py b/cobo_waas2/models/supported_token.py index 53d088b1..649a5d55 100644 --- a/cobo_waas2/models/supported_token.py +++ b/cobo_waas2/models/supported_token.py @@ -25,16 +25,16 @@ class SupportedToken(BaseModel): """ SupportedToken """ # noqa: E501 - token_id: StrictStr = Field(description="Unique identifier of the token") - name: StrictStr = Field(description="Full name of the token") - symbol: StrictStr = Field(description="Symbol representation of the token") - decimal: StrictInt = Field(description="Number of decimal places for the token") - token_address: Optional[StrictStr] = Field(description="Contract address of the token (may be null for native coins)") - chain_id: StrictStr = Field(description="Identifier of the blockchain where the token exists") - chain_symbol: Optional[StrictStr] = Field(description="Symbol of the underlying blockchain") - chain_icon_url: Optional[StrictStr] = Field(default=None, description="URL to the blockchain's icon image") - token_icon_url: Optional[StrictStr] = Field(default=None, description="URL to the token's icon image") - can_off_ramp: Optional[StrictBool] = Field(default=None, description="Whether the token is supported by the off-ramp service.") + token_id: StrictStr = Field(description="The unique identifier of the token, in the format of `{chain_id}_{token_symbol}`.") + name: StrictStr = Field(description="The full name of the token.") + symbol: StrictStr = Field(description="The symbol of the token.") + decimal: StrictInt = Field(description="The number of decimal places for the token. This value is used to convert between the token's smallest unit and its display value. ") + token_address: Optional[StrictStr] = Field(description="The contract address of the token. This is `null` for native coins (e.g., ETH on Ethereum). ") + chain_id: StrictStr = Field(description="The ID of the chain on which the token exists.") + chain_symbol: Optional[StrictStr] = Field(description="The symbol of the chain on which the token exists.") + chain_icon_url: Optional[StrictStr] = Field(default=None, description="The URL of the chain icon image.") + token_icon_url: Optional[StrictStr] = Field(default=None, description="The URL of the token icon image.") + can_off_ramp: Optional[StrictBool] = Field(default=None, description="Whether the token supports fiat off-ramp. - `true`: The token can be used for fiat off-ramp. - `false`: The token cannot be used for fiat off-ramp. ") __properties: ClassVar[List[str]] = ["token_id", "name", "symbol", "decimal", "token_address", "chain_id", "chain_symbol", "chain_icon_url", "token_icon_url", "can_off_ramp"] model_config = ConfigDict( diff --git a/cobo_waas2/models/transfer_params.py b/cobo_waas2/models/transfer_params.py index c2821a54..d13938cd 100644 --- a/cobo_waas2/models/transfer_params.py +++ b/cobo_waas2/models/transfer_params.py @@ -18,6 +18,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from cobo_waas2.models.auto_fuel_type import AutoFuelType +from cobo_waas2.models.pre_check import PreCheck from cobo_waas2.models.transaction_process_type import TransactionProcessType from cobo_waas2.models.transaction_request_fee import TransactionRequestFee from cobo_waas2.models.transfer_destination import TransferDestination @@ -39,7 +40,8 @@ class TransferParams(BaseModel): fee: Optional[TransactionRequestFee] = None transaction_process_type: Optional[TransactionProcessType] = None auto_fuel: Optional[AutoFuelType] = None - __properties: ClassVar[List[str]] = ["request_id", "source", "token_id", "destination", "category_names", "description", "fee", "transaction_process_type", "auto_fuel"] + pre_check: Optional[PreCheck] = None + __properties: ClassVar[List[str]] = ["request_id", "source", "token_id", "destination", "category_names", "description", "fee", "transaction_process_type", "auto_fuel", "pre_check"] model_config = ConfigDict( populate_by_name=True, @@ -89,6 +91,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of fee if self.fee: _dict['fee'] = self.fee.to_dict() + # override the default output from pydantic by calling `to_dict()` of pre_check + if self.pre_check: + _dict['pre_check'] = self.pre_check.to_dict() return _dict @classmethod @@ -109,7 +114,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "description": obj.get("description"), "fee": TransactionRequestFee.from_dict(obj["fee"]) if obj.get("fee") is not None else None, "transaction_process_type": obj.get("transaction_process_type"), - "auto_fuel": obj.get("auto_fuel") + "auto_fuel": obj.get("auto_fuel"), + "pre_check": PreCheck.from_dict(obj["pre_check"]) if obj.get("pre_check") is not None else None }) return _obj diff --git a/cobo_waas2/models/update_counterparty_by_id_request.py b/cobo_waas2/models/update_counterparty_by_id_request.py deleted file mode 100644 index 73da7c94..00000000 --- a/cobo_waas2/models/update_counterparty_by_id_request.py +++ /dev/null @@ -1,95 +0,0 @@ -# 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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from cobo_waas2.models.counterparty_type import CounterpartyType -from typing import Optional, Set -from typing_extensions import Self - - -class UpdateCounterpartyByIdRequest(BaseModel): - """ - UpdateCounterpartyByIdRequest - """ # noqa: E501 - counterparty_name: StrictStr = Field(description="The counterparty name.") - counterparty_type: CounterpartyType - country: Optional[StrictStr] = Field(default=None, description="The country of the counterparty, in ISO 3166-1 alpha-3 format.") - email: Optional[StrictStr] = Field(default=None, description="The email of the counterparty.") - contact_address: Optional[StrictStr] = Field(default=None, description="The contact address of the counterparty.") - __properties: ClassVar[List[str]] = ["counterparty_name", "counterparty_type", "country", "email", "contact_address"] - - 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 UpdateCounterpartyByIdRequest 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 UpdateCounterpartyByIdRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "counterparty_name": obj.get("counterparty_name"), - "counterparty_type": obj.get("counterparty_type"), - "country": obj.get("country"), - "email": obj.get("email"), - "contact_address": obj.get("contact_address") - }) - return _obj - - diff --git a/cobo_waas2/models/update_destination_by_id_request.py b/cobo_waas2/models/update_destination_by_id_request.py deleted file mode 100644 index cfcabc0a..00000000 --- a/cobo_waas2/models/update_destination_by_id_request.py +++ /dev/null @@ -1,97 +0,0 @@ -# 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, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from cobo_waas2.models.destination_type import DestinationType -from typing import Optional, Set -from typing_extensions import Self - - -class UpdateDestinationByIdRequest(BaseModel): - """ - UpdateDestinationByIdRequest - """ # noqa: E501 - destination_name: StrictStr = Field(description="The destination name.") - destination_type: DestinationType - merchant_id: Optional[StrictStr] = Field(default=None, description="The ID of the merchant linked to the destination.") - country: Optional[StrictStr] = Field(default=None, description="The country of the destination, in ISO 3166-1 alpha-3 format.") - email: Optional[StrictStr] = Field(default=None, description="The email of the destination.") - contact_address: Optional[StrictStr] = Field(default=None, description="The contact address of the destination.") - __properties: ClassVar[List[str]] = ["destination_name", "destination_type", "merchant_id", "country", "email", "contact_address"] - - 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 UpdateDestinationByIdRequest 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 UpdateDestinationByIdRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "destination_name": obj.get("destination_name"), - "destination_type": obj.get("destination_type"), - "merchant_id": obj.get("merchant_id"), - "country": obj.get("country"), - "email": obj.get("email"), - "contact_address": obj.get("contact_address") - }) - return _obj - - diff --git a/cobo_waas2/models/webhook_event_type.py b/cobo_waas2/models/webhook_event_type.py index ac7d977b..50f2db61 100644 --- a/cobo_waas2/models/webhook_event_type.py +++ b/cobo_waas2/models/webhook_event_type.py @@ -55,6 +55,7 @@ class WebhookEventType(str, Enum): PAYMENT_DOT_TRANSACTION_DOT_HELD = 'payment.transaction.held' PAYMENT_DOT_TRANSACTION_DOT_FAILED = 'payment.transaction.failed' PAYMENT_DOT_STATUS_DOT_UPDATED = 'payment.status.updated' + PAYMENT_DOT_ORDER_DOT_STATUS_DOT_UPDATED = 'payment.order.status.updated' PAYMENT_DOT_REFUND_DOT_STATUS_DOT_UPDATED = 'payment.refund.status.updated' PAYMENT_DOT_SETTLEMENT_DOT_STATUS_DOT_UPDATED = 'payment.settlement.status.updated' PAYMENT_DOT_PAYOUT_DOT_STATUS_DOT_UPDATED = 'payment.payout.status.updated' @@ -62,6 +63,8 @@ class WebhookEventType(str, Enum): PAYMENT_DOT_SUBSCRIPTION_DOT_STATUS_DOT_UPDATED = 'payment.subscription.status.updated' PAYMENT_DOT_CHARGE_DOT_STATUS_DOT_UPDATED = 'payment.charge.status.updated' 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' 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/Balance.md b/docs/Balance.md index 0d7af6dd..b067dedc 100644 --- a/docs/Balance.md +++ b/docs/Balance.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **available** | **str** | The amount of tokens ready to be spent. To learn more, see [Balances and transaction amounts for MPC Wallets](https://www.cobo.com/developers/v2/guides/mpc-wallets/balance-amounts) for more details. | **pending** | **str** | The total amount being sent in a transaction, which is calculated as the withdrawal amount plus the transaction fee. To learn more, see [Balances and transaction amounts for MPC Wallets](https://www.cobo.com/developers/v2/guides/mpc-wallets/balance-amounts) for more details. | [optional] [default to '0'] **locked** | **str** | For UTXO chains, this is the combined value of the selected UTXOs for the transaction. For other chains, it is equal to the Pending amount. To learn more, see [Balances and transaction amounts for MPC Wallets](https://www.cobo.com/developers/v2/guides/mpc-wallets/balance-amounts) for more details. | [optional] [default to '0'] +**frozen** | **str** | Amount frozen due to compliance inspection. To learn more, see [Balances and transaction amounts for MPC Wallets](https://www.cobo.com/developers/v2/guides/mpc-wallets/balance-amounts) for more details. | [optional] [default to '0'] ## Example diff --git a/docs/BridgingFee.md b/docs/BridgingFee.md index fa660c04..edaddd45 100644 --- a/docs/BridgingFee.md +++ b/docs/BridgingFee.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **fee_amount** | **str** | The fee charged for bridging tokens to another chain. | **received_token_id** | **str** | The ID of the destination token received after bridging. | [optional] **received_amount** | **str** | The final amount of the token received after bridging. | [optional] +**bridge_status** | [**PaymentBridgeStatus**](PaymentBridgeStatus.md) | | [optional] ## Example diff --git a/docs/ContractCallParams.md b/docs/ContractCallParams.md index 5ba5ef8d..47bff752 100644 --- a/docs/ContractCallParams.md +++ b/docs/ContractCallParams.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **fee** | [**TransactionRequestFee**](TransactionRequestFee.md) | | [optional] **transaction_process_type** | [**TransactionProcessType**](TransactionProcessType.md) | | [optional] **auto_fuel** | [**AutoFuelType**](AutoFuelType.md) | | [optional] +**pre_check** | [**PreCheck**](PreCheck.md) | | [optional] ## Example diff --git a/docs/CreateCounterpartyWalletAddressRequest.md b/docs/CreateCounterpartyWalletAddressRequest.md deleted file mode 100644 index cadda1e0..00000000 --- a/docs/CreateCounterpartyWalletAddressRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# CreateCounterpartyWalletAddressRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**counterparty_id** | **str** | The counterparty ID. | -**address** | **str** | The wallet address. | -**chain_id** | **str** | The chain ID of the cryptocurrency. | - -## Example - -```python -from cobo_waas2.models.create_counterparty_wallet_address_request import CreateCounterpartyWalletAddressRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateCounterpartyWalletAddressRequest from a JSON string -create_counterparty_wallet_address_request_instance = CreateCounterpartyWalletAddressRequest.from_json(json) -# print the JSON string representation of the object -print(CreateCounterpartyWalletAddressRequest.to_json()) - -# convert the object into a dict -create_counterparty_wallet_address_request_dict = create_counterparty_wallet_address_request_instance.to_dict() -# create an instance of CreateCounterpartyWalletAddressRequest from a dict -create_counterparty_wallet_address_request_from_dict = CreateCounterpartyWalletAddressRequest.from_dict(create_counterparty_wallet_address_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/CreateDestinationBankAccountRequest.md b/docs/CreateDestinationBankAccountRequest.md deleted file mode 100644 index 6e48d6c2..00000000 --- a/docs/CreateDestinationBankAccountRequest.md +++ /dev/null @@ -1,40 +0,0 @@ -# CreateDestinationBankAccountRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**destination_id** | **str** | The destination ID. | -**account_alias** | **str** | The alias of the bank account. | -**account_number** | **str** | The bank account number. | -**swift_code** | **str** | The SWIFT or BIC code of the bank. | -**currency** | **str** | The currency of the bank account. | -**beneficiary_name** | **str** | The name of the account holder. | -**beneficiary_address** | **str** | The address of the account holder. | -**bank_name** | **str** | The name of the bank. | -**bank_address** | **str** | The address of the bank. | -**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] - -## Example - -```python -from cobo_waas2.models.create_destination_bank_account_request import CreateDestinationBankAccountRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateDestinationBankAccountRequest from a JSON string -create_destination_bank_account_request_instance = CreateDestinationBankAccountRequest.from_json(json) -# print the JSON string representation of the object -print(CreateDestinationBankAccountRequest.to_json()) - -# convert the object into a dict -create_destination_bank_account_request_dict = create_destination_bank_account_request_instance.to_dict() -# create an instance of CreateDestinationBankAccountRequest from a dict -create_destination_bank_account_request_from_dict = CreateDestinationBankAccountRequest.from_dict(create_destination_bank_account_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/CreateDestinationWalletAddressRequest.md b/docs/CreateDestinationWalletAddressRequest.md deleted file mode 100644 index 7182072a..00000000 --- a/docs/CreateDestinationWalletAddressRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# CreateDestinationWalletAddressRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**destination_id** | **str** | The destination ID. | -**address** | **str** | The wallet address. | -**chain_id** | **str** | The chain ID of the cryptocurrency. | - -## Example - -```python -from cobo_waas2.models.create_destination_wallet_address_request import CreateDestinationWalletAddressRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateDestinationWalletAddressRequest from a JSON string -create_destination_wallet_address_request_instance = CreateDestinationWalletAddressRequest.from_json(json) -# print the JSON string representation of the object -print(CreateDestinationWalletAddressRequest.to_json()) - -# convert the object into a dict -create_destination_wallet_address_request_dict = create_destination_wallet_address_request_instance.to_dict() -# create an instance of CreateDestinationWalletAddressRequest from a dict -create_destination_wallet_address_request_from_dict = CreateDestinationWalletAddressRequest.from_dict(create_destination_wallet_address_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/CreatePaymentOrderRequest.md b/docs/CreatePaymentOrderRequest.md index 8d6d9acb..360aff2c 100644 --- a/docs/CreatePaymentOrderRequest.md +++ b/docs/CreatePaymentOrderRequest.md @@ -8,12 +8,12 @@ Name | Type | Description | Notes **merchant_id** | **str** | The merchant ID. | **merchant_order_code** | **str** | A unique reference code assigned by the merchant to identify this order in their system. | [optional] **psp_order_code** | **str** | A unique reference code assigned by the developer to identify this order in their system. | -**pricing_currency** | **str** | The pricing currency that denominates `pricing_amount` and `fee_amount`. If left empty, both values will be denominated in `payable_currency`. Currently, For a complete list of supported currencies, see [Supported chains and tokens](https://www.cobo.com/developers/v2/guides/overview/supported-chains-and-tokens). | [optional] +**pricing_currency** | **str** | The pricing currency that denominates `pricing_amount` and `fee_amount`. If left empty, both values will be denominated in `payable_currency`. Currently, For a complete list of supported currencies, see [Supported chains and tokens](https://www.cobo.com//payments/en/guides/supported-chains-and-tokens#pricing-currency). | [optional] **pricing_amount** | **str** | The base amount of the order, excluding the developer fee (specified in `fee_amount`). Values must be greater than `0` and contain two decimal places. | [optional] **fee_amount** | **str** | The developer fee for the order. It is added to the base amount (`pricing_amount`) to determine the final charge. For example, if `pricing_amount` is \"100.00\" and `fee_amount` is \"2.00\", the payer will be charged \"102.00\" in total, with \"100.00\" being settled to the merchant account and \"2.00\" settled to the developer account. Values must be greater than 0 and contain two decimal places. | **payable_currency** | **str** | The ID of the cryptocurrency used for payment. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDC`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` | **payable_amount** | **str** | The total amount the payer needs to pay, denominated in the specified `payable_currency`. If this field is left blank, the system will automatically calculate the amount at order creation using the following formula: (`pricing_amount` + `fee_amount`) / current exchange rate. Values must be greater than 0 and contain two decimal places. | [optional] -**expired_in** | **int** | The pay-in order will expire after approximately a certain number of seconds: - The order status becomes final and cannot be changed - The `received_token_amount` field will no longer be updated - Funds received after expiration will be categorized as late payments and can only be settled from the developer balance. - A late payment will trigger a `transactionLate` webhook event. | [optional] +**expired_in** | **int** | The number of seconds until the pay-in order expires, counted from when the request is sent. For example, if set to `1800`, the order will expire in 30 minutes. Must be greater than zero and cannot exceed 3 hours (10800 seconds). After expiration: - The order status becomes final and cannot be changed - The `received_token_amount` field will no longer be updated - Funds received after expiration will be categorized as late payments and can only be settled from the developer balance. - A late payment will trigger a `transactionLate` webhook event. | [optional] [default to 1800] **amount_tolerance** | **str** | The allowed amount deviation, with precision up to 1 decimal place. For example, if `payable_amount` is `100.00` and `amount_tolerance` is `0.50`: - Payer pays 99.55 → Success (difference of 0.45 ≤ 0.5) - Payer pays 99.40 → Underpaid (difference of 0.60 > 0.5) | [optional] **currency** | **str** | This field has been deprecated. Please use `pricing_currency` instead. | [optional] [default to ''] **order_amount** | **str** | This field has been deprecated. Please use `pricing_amount` instead. | [optional] diff --git a/docs/CreateTopUpAddresses.md b/docs/CreateTopUpAddresses.md index b6417a19..8c712303 100644 --- a/docs/CreateTopUpAddresses.md +++ b/docs/CreateTopUpAddresses.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **merchant_id** | **str** | The merchant ID. If not provided, the default merchant created during organization initialization will be used. | [optional] **token_id** | **str** | The token ID, which identifies the cryptocurrency. | -**custom_payer_ids** | **List[str]** | A list of unique custom payer IDs required to create top-up addresses. The maximum number of items is 50. | +**custom_payer_ids** | **List[str]** | A list of unique custom payer IDs required to create top-up addresses. | ## Example diff --git a/docs/CreateWalletAddress.md b/docs/CreateWalletAddress.md index 205b0c05..ec7d8d22 100644 --- a/docs/CreateWalletAddress.md +++ b/docs/CreateWalletAddress.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **address** | **str** | The wallet address. | -**chain_id** | **str** | The chain ID of the address. | +**chain_id** | **str** | The chain ID of the cryptocurrency. Supported values in the development environment: - Counterparty: `ARBITRUM_ETH`, `BASE_ETH`, `BSC_BNB`, `ETH`, `TRON`, `MATIC`, `SOL`, `TTRON`, `SOLDEV_SOL`, `SETH` - Destination: `All EVM Networks`, `SOL`, `TRON`, `TTRON`, `SOLDEV_SOL` Supported values in the production environment: - Counterparty: `ARBITRUM_ETH`, `BASE_ETH`, `BSC_BNB`, `ETH`, `TRON`, `MATIC`, `SOL` - Destination: `All EVM Networks`, `SOL`, `TRON` | ## Example diff --git a/docs/DeleteCounterparty200Response.md b/docs/DeleteCounterparty200Response.md deleted file mode 100644 index 0085f733..00000000 --- a/docs/DeleteCounterparty200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# DeleteCounterparty200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**counterparty_id** | **str** | The counterparty ID. | - -## Example - -```python -from cobo_waas2.models.delete_counterparty200_response import DeleteCounterparty200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of DeleteCounterparty200Response from a JSON string -delete_counterparty200_response_instance = DeleteCounterparty200Response.from_json(json) -# print the JSON string representation of the object -print(DeleteCounterparty200Response.to_json()) - -# convert the object into a dict -delete_counterparty200_response_dict = delete_counterparty200_response_instance.to_dict() -# create an instance of DeleteCounterparty200Response from a dict -delete_counterparty200_response_from_dict = DeleteCounterparty200Response.from_dict(delete_counterparty200_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/DeleteCounterpartyWalletAddress200Response.md b/docs/DeleteCounterpartyWalletAddress200Response.md deleted file mode 100644 index bab178c6..00000000 --- a/docs/DeleteCounterpartyWalletAddress200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# DeleteCounterpartyWalletAddress200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**wallet_address_id** | **str** | The wallet address ID under the counterparty. | - -## Example - -```python -from cobo_waas2.models.delete_counterparty_wallet_address200_response import DeleteCounterpartyWalletAddress200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of DeleteCounterpartyWalletAddress200Response from a JSON string -delete_counterparty_wallet_address200_response_instance = DeleteCounterpartyWalletAddress200Response.from_json(json) -# print the JSON string representation of the object -print(DeleteCounterpartyWalletAddress200Response.to_json()) - -# convert the object into a dict -delete_counterparty_wallet_address200_response_dict = delete_counterparty_wallet_address200_response_instance.to_dict() -# create an instance of DeleteCounterpartyWalletAddress200Response from a dict -delete_counterparty_wallet_address200_response_from_dict = DeleteCounterpartyWalletAddress200Response.from_dict(delete_counterparty_wallet_address200_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/DeleteDestination200Response.md b/docs/DeleteDestination200Response.md deleted file mode 100644 index e75245e3..00000000 --- a/docs/DeleteDestination200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# DeleteDestination200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**destination_id** | **str** | The destination ID. | - -## Example - -```python -from cobo_waas2.models.delete_destination200_response import DeleteDestination200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of DeleteDestination200Response from a JSON string -delete_destination200_response_instance = DeleteDestination200Response.from_json(json) -# print the JSON string representation of the object -print(DeleteDestination200Response.to_json()) - -# convert the object into a dict -delete_destination200_response_dict = delete_destination200_response_instance.to_dict() -# create an instance of DeleteDestination200Response from a dict -delete_destination200_response_from_dict = DeleteDestination200Response.from_dict(delete_destination200_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/DeleteDestinationBankAccount200Response.md b/docs/DeleteDestinationBankAccount200Response.md deleted file mode 100644 index 7dcbde68..00000000 --- a/docs/DeleteDestinationBankAccount200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# DeleteDestinationBankAccount200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bank_account_id** | **str** | The destination bank account ID. | - -## Example - -```python -from cobo_waas2.models.delete_destination_bank_account200_response import DeleteDestinationBankAccount200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of DeleteDestinationBankAccount200Response from a JSON string -delete_destination_bank_account200_response_instance = DeleteDestinationBankAccount200Response.from_json(json) -# print the JSON string representation of the object -print(DeleteDestinationBankAccount200Response.to_json()) - -# convert the object into a dict -delete_destination_bank_account200_response_dict = delete_destination_bank_account200_response_instance.to_dict() -# create an instance of DeleteDestinationBankAccount200Response from a dict -delete_destination_bank_account200_response_from_dict = DeleteDestinationBankAccount200Response.from_dict(delete_destination_bank_account200_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/DeleteDestinationWalletAddress200Response.md b/docs/DeleteDestinationWalletAddress200Response.md deleted file mode 100644 index cdcb7f5e..00000000 --- a/docs/DeleteDestinationWalletAddress200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# DeleteDestinationWalletAddress200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**wallet_address_id** | **str** | The wallet address ID under the destination. | - -## Example - -```python -from cobo_waas2.models.delete_destination_wallet_address200_response import DeleteDestinationWalletAddress200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of DeleteDestinationWalletAddress200Response from a JSON string -delete_destination_wallet_address200_response_instance = DeleteDestinationWalletAddress200Response.from_json(json) -# print the JSON string representation of the object -print(DeleteDestinationWalletAddress200Response.to_json()) - -# convert the object into a dict -delete_destination_wallet_address200_response_dict = delete_destination_wallet_address200_response_instance.to_dict() -# create an instance of DeleteDestinationWalletAddress200Response from a dict -delete_destination_wallet_address200_response_from_dict = DeleteDestinationWalletAddress200Response.from_dict(delete_destination_wallet_address200_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/EnableDestinationWhitelistRequest.md b/docs/EnableDestinationWhitelistRequest.md deleted file mode 100644 index 1fd88d59..00000000 --- a/docs/EnableDestinationWhitelistRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# EnableDestinationWhitelistRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enable_destination_whitelist** | **bool** | Indicates whether to enable the destination whitelist. | - -## Example - -```python -from cobo_waas2.models.enable_destination_whitelist_request import EnableDestinationWhitelistRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of EnableDestinationWhitelistRequest from a JSON string -enable_destination_whitelist_request_instance = EnableDestinationWhitelistRequest.from_json(json) -# print the JSON string representation of the object -print(EnableDestinationWhitelistRequest.to_json()) - -# convert the object into a dict -enable_destination_whitelist_request_dict = enable_destination_whitelist_request_instance.to_dict() -# create an instance of EnableDestinationWhitelistRequest from a dict -enable_destination_whitelist_request_from_dict = EnableDestinationWhitelistRequest.from_dict(enable_destination_whitelist_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/ListCounterpartyWalletAddress200Response.md b/docs/ListCounterpartyWalletAddress200Response.md deleted file mode 100644 index a13199f2..00000000 --- a/docs/ListCounterpartyWalletAddress200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# ListCounterpartyWalletAddress200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[CounterpartyWalletAddressDetail]**](CounterpartyWalletAddressDetail.md) | | [optional] -**pagination** | [**Pagination**](Pagination.md) | | [optional] - -## Example - -```python -from cobo_waas2.models.list_counterparty_wallet_address200_response import ListCounterpartyWalletAddress200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of ListCounterpartyWalletAddress200Response from a JSON string -list_counterparty_wallet_address200_response_instance = ListCounterpartyWalletAddress200Response.from_json(json) -# print the JSON string representation of the object -print(ListCounterpartyWalletAddress200Response.to_json()) - -# convert the object into a dict -list_counterparty_wallet_address200_response_dict = list_counterparty_wallet_address200_response_instance.to_dict() -# create an instance of ListCounterpartyWalletAddress200Response from a dict -list_counterparty_wallet_address200_response_from_dict = ListCounterpartyWalletAddress200Response.from_dict(list_counterparty_wallet_address200_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/ListDestinationBankAccounts200Response.md b/docs/ListDestinationBankAccounts200Response.md deleted file mode 100644 index f21bc572..00000000 --- a/docs/ListDestinationBankAccounts200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# ListDestinationBankAccounts200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[DestinationBankAccountDetail]**](DestinationBankAccountDetail.md) | | [optional] -**pagination** | [**Pagination**](Pagination.md) | | [optional] - -## Example - -```python -from cobo_waas2.models.list_destination_bank_accounts200_response import ListDestinationBankAccounts200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of ListDestinationBankAccounts200Response from a JSON string -list_destination_bank_accounts200_response_instance = ListDestinationBankAccounts200Response.from_json(json) -# print the JSON string representation of the object -print(ListDestinationBankAccounts200Response.to_json()) - -# convert the object into a dict -list_destination_bank_accounts200_response_dict = list_destination_bank_accounts200_response_instance.to_dict() -# create an instance of ListDestinationBankAccounts200Response from a dict -list_destination_bank_accounts200_response_from_dict = ListDestinationBankAccounts200Response.from_dict(list_destination_bank_accounts200_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/ListDestinationWalletAddresses200Response.md b/docs/ListDestinationWalletAddresses200Response.md deleted file mode 100644 index b0e5185f..00000000 --- a/docs/ListDestinationWalletAddresses200Response.md +++ /dev/null @@ -1,30 +0,0 @@ -# ListDestinationWalletAddresses200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[DestinationWalletAddressDetail]**](DestinationWalletAddressDetail.md) | | [optional] -**pagination** | [**Pagination**](Pagination.md) | | [optional] - -## Example - -```python -from cobo_waas2.models.list_destination_wallet_addresses200_response import ListDestinationWalletAddresses200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of ListDestinationWalletAddresses200Response from a JSON string -list_destination_wallet_addresses200_response_instance = ListDestinationWalletAddresses200Response.from_json(json) -# print the JSON string representation of the object -print(ListDestinationWalletAddresses200Response.to_json()) - -# convert the object into a dict -list_destination_wallet_addresses200_response_dict = list_destination_wallet_addresses200_response_instance.to_dict() -# create an instance of ListDestinationWalletAddresses200Response from a dict -list_destination_wallet_addresses200_response_from_dict = ListDestinationWalletAddresses200Response.from_dict(list_destination_wallet_addresses200_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/PaymentApi.md b/docs/PaymentApi.md index 1e5d7e4c..d09bd599 100644 --- a/docs/PaymentApi.md +++ b/docs/PaymentApi.md @@ -10,12 +10,9 @@ Method | HTTP request | Description [**create_bulk_send**](PaymentApi.md#create_bulk_send) | **POST** /payments/bulk_sends | Create bulk send [**create_counterparty**](PaymentApi.md#create_counterparty) | **POST** /payments/counterparty | Create counterparty [**create_counterparty_entry**](PaymentApi.md#create_counterparty_entry) | **POST** /payments/counterparty_entry | Create counterparty entry -[**create_counterparty_wallet_address**](PaymentApi.md#create_counterparty_wallet_address) | **POST** /payments/counterparty/wallet_address | Create counterparty wallet address [**create_crypto_address**](PaymentApi.md#create_crypto_address) | **POST** /payments/crypto_addresses | Create crypto address [**create_destination**](PaymentApi.md#create_destination) | **POST** /payments/destination | Create destination -[**create_destination_bank_account**](PaymentApi.md#create_destination_bank_account) | **POST** /payments/destination/bank_account | Create destination bank account [**create_destination_entry**](PaymentApi.md#create_destination_entry) | **POST** /payments/destination_entry | Create destination entry -[**create_destination_wallet_address**](PaymentApi.md#create_destination_wallet_address) | **POST** /payments/destination/wallet_address | Create destination wallet address [**create_forced_sweep_request**](PaymentApi.md#create_forced_sweep_request) | **POST** /payments/force_sweep_requests | Create forced sweep [**create_merchant**](PaymentApi.md#create_merchant) | **POST** /payments/merchants | Create merchant [**create_order_link**](PaymentApi.md#create_order_link) | **POST** /payments/links/orders | Create order link @@ -26,26 +23,17 @@ Method | HTTP request | Description [**create_report**](PaymentApi.md#create_report) | **POST** /payments/reports | Generate reports [**create_settlement_request**](PaymentApi.md#create_settlement_request) | **POST** /payments/settlement_requests | Create settlement request [**create_top_up_addresses**](PaymentApi.md#create_top_up_addresses) | **POST** /payments/topup/address | Batch create top-up addresses -[**delete_counterparty**](PaymentApi.md#delete_counterparty) | **PUT** /payments/counterparty/{counterparty_id}/delete | Delete counterparty (Deprecated) [**delete_counterparty_by_id**](PaymentApi.md#delete_counterparty_by_id) | **DELETE** /payments/counterparty/{counterparty_id} | Delete counterparty [**delete_counterparty_entry**](PaymentApi.md#delete_counterparty_entry) | **DELETE** /payments/counterparty_entry/{counterparty_entry_id} | Delete counterparty entry -[**delete_counterparty_wallet_address**](PaymentApi.md#delete_counterparty_wallet_address) | **PUT** /payments/counterparty/wallet_address/{wallet_address_id}/delete | Delete counterparty wallet address [**delete_crypto_address**](PaymentApi.md#delete_crypto_address) | **POST** /payments/crypto_addresses/{crypto_address_id}/delete | Delete crypto address -[**delete_destination**](PaymentApi.md#delete_destination) | **PUT** /payments/destination/{destination_id}/delete | Delete destination (Deprecated) -[**delete_destination_bank_account**](PaymentApi.md#delete_destination_bank_account) | **PUT** /payments/destination/bank_account/{bank_account_id}/delete | Delete destination bank account [**delete_destination_by_id**](PaymentApi.md#delete_destination_by_id) | **DELETE** /payments/destination/{destination_id} | Delete destination [**delete_destination_entry**](PaymentApi.md#delete_destination_entry) | **DELETE** /payments/destination_entry/{destination_entry_id} | Delete destination entry -[**delete_destination_wallet_address**](PaymentApi.md#delete_destination_wallet_address) | **PUT** /payments/destination/wallet_address/{wallet_address_id}/delete | Delete destination wallet address -[**enable_destination_whitelist**](PaymentApi.md#enable_destination_whitelist) | **POST** /payments/destination/enable_whitelist | Enable or disable destination whitelist [**get_available_allocation_amount**](PaymentApi.md#get_available_allocation_amount) | **GET** /payments/allocation_amount | Get available allocation amount [**get_batch_allocation_by_id**](PaymentApi.md#get_batch_allocation_by_id) | **GET** /payments/batch_allocations/{batch_allocation_id} | Get batch allocation information [**get_bulk_send_by_id**](PaymentApi.md#get_bulk_send_by_id) | **GET** /payments/bulk_sends/{bulk_send_id} | Get bulk send information [**get_counterparty**](PaymentApi.md#get_counterparty) | **GET** /payments/counterparty/{counterparty_id} | Get counterparty information -[**get_counterparty_detail_by_id**](PaymentApi.md#get_counterparty_detail_by_id) | **GET** /payments/counterparty/{counterparty_id}/detail | Get counterparty information (Deprecated) [**get_counterparty_entry**](PaymentApi.md#get_counterparty_entry) | **GET** /payments/counterparty_entry/{counterparty_entry_id} | Get counterparty entry information [**get_destination**](PaymentApi.md#get_destination) | **GET** /payments/destination/{destination_id} | Get destination information -[**get_destination_bank_account_detail_by_id**](PaymentApi.md#get_destination_bank_account_detail_by_id) | **GET** /payments/destination/bank_account/{bank_account_id}/detail | Get destination bank account information -[**get_destination_detail_by_id**](PaymentApi.md#get_destination_detail_by_id) | **GET** /payments/destination/{destination_id}/detail | Get destination information (Deprecated) [**get_destination_entry**](PaymentApi.md#get_destination_entry) | **GET** /payments/destination_entry/{destination_entry_id} | Get destination entry information [**get_exchange_rate**](PaymentApi.md#get_exchange_rate) | **GET** /payments/exchange_rates/{token_id}/{currency} | Get exchange rate [**get_payment_order_detail_by_id**](PaymentApi.md#get_payment_order_detail_by_id) | **GET** /payments/orders/{order_id} | Get pay-in order information @@ -63,17 +51,14 @@ Method | HTTP request | Description [**list_bulk_send_items**](PaymentApi.md#list_bulk_send_items) | **GET** /payments/bulk_sends/{bulk_send_id}/items | List bulk send items [**list_counterparties**](PaymentApi.md#list_counterparties) | **GET** /payments/counterparty | List all counterparties [**list_counterparty_entries**](PaymentApi.md#list_counterparty_entries) | **GET** /payments/counterparty_entry | List counterparty entries -[**list_counterparty_wallet_address**](PaymentApi.md#list_counterparty_wallet_address) | **GET** /payments/counterparty/wallet_address | List counterparty wallet addresses [**list_crypto_addresses**](PaymentApi.md#list_crypto_addresses) | **GET** /payments/crypto_addresses | List crypto addresses -[**list_destination_bank_accounts**](PaymentApi.md#list_destination_bank_accounts) | **GET** /payments/destination/bank_account | List destination bank accounts [**list_destination_entries**](PaymentApi.md#list_destination_entries) | **GET** /payments/destination_entry | List destination entries -[**list_destination_wallet_addresses**](PaymentApi.md#list_destination_wallet_addresses) | **GET** /payments/destination/wallet_address | List destination wallet addresses [**list_destinations**](PaymentApi.md#list_destinations) | **GET** /payments/destination | List all destinations [**list_forced_sweep_requests**](PaymentApi.md#list_forced_sweep_requests) | **GET** /payments/force_sweep_requests | List forced sweeps [**list_merchant_balances**](PaymentApi.md#list_merchant_balances) | **GET** /payments/balance/merchants | List merchant balances [**list_merchants**](PaymentApi.md#list_merchants) | **GET** /payments/merchants | List all merchants [**list_payment_orders**](PaymentApi.md#list_payment_orders) | **GET** /payments/orders | List all pay-in orders -[**list_payment_supported_tokens**](PaymentApi.md#list_payment_supported_tokens) | **GET** /payments/supported_tokens | List all supported tokens +[**list_payment_supported_tokens**](PaymentApi.md#list_payment_supported_tokens) | **GET** /payments/supported_tokens | List supported tokens [**list_payment_wallet_balances**](PaymentApi.md#list_payment_wallet_balances) | **GET** /payments/balance/payment_wallets | List payment wallet balances [**list_payouts**](PaymentApi.md#list_payouts) | **GET** /payments/payouts | List all payouts [**list_settlement_details**](PaymentApi.md#list_settlement_details) | **GET** /payments/settlement_details | List all settlement details @@ -81,13 +66,9 @@ 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 -[**query_destination_whitelist_enabled**](PaymentApi.md#query_destination_whitelist_enabled) | **GET** /payments/destination/enable_whitelist | Query destination whitelist enabled status [**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_counterparty_by_id**](PaymentApi.md#update_counterparty_by_id) | **PUT** /payments/counterparty/{counterparty_id}/update | Update counterparty (Deprecated) [**update_destination**](PaymentApi.md#update_destination) | **PUT** /payments/destination/{destination_id} | Update destination -[**update_destination_bank_account_by_id**](PaymentApi.md#update_destination_bank_account_by_id) | **PUT** /payments/destination/bank_account/{bank_account_id}/update | Update destination bank account -[**update_destination_by_id**](PaymentApi.md#update_destination_by_id) | **PUT** /payments/destination/{destination_id}/update | Update destination (Deprecated) [**update_destination_entry**](PaymentApi.md#update_destination_entry) | **PUT** /payments/destination_entry/{destination_entry_id} | Update destination entry [**update_merchant_by_id**](PaymentApi.md#update_merchant_by_id) | **PUT** /payments/merchants/{merchant_id} | Update merchant [**update_payment_order**](PaymentApi.md#update_payment_order) | **PUT** /payments/orders/{order_id} | Update pay-in order @@ -532,85 +513,12 @@ 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) -# **create_counterparty_wallet_address** -> WalletAddress create_counterparty_wallet_address(create_counterparty_wallet_address_request=create_counterparty_wallet_address_request) - -Create counterparty wallet address - -This operation creates a counterparty wallet address. - -### Example - -* OAuth Authentication (OAuth2): -* Api Key Authentication (CoboAuth): - -```python -import cobo_waas2 -from cobo_waas2.models.create_counterparty_wallet_address_request import CreateCounterpartyWalletAddressRequest -from cobo_waas2.models.wallet_address import WalletAddress -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) - create_counterparty_wallet_address_request = cobo_waas2.CreateCounterpartyWalletAddressRequest() - - try: - # Create counterparty wallet address - api_response = api_instance.create_counterparty_wallet_address(create_counterparty_wallet_address_request=create_counterparty_wallet_address_request) - print("The response of PaymentApi->create_counterparty_wallet_address:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PaymentApi->create_counterparty_wallet_address: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_counterparty_wallet_address_request** | [**CreateCounterpartyWalletAddressRequest**](CreateCounterpartyWalletAddressRequest.md)| The request body to create a counterparty wallet address. | [optional] - -### Return type - -[**WalletAddress**](WalletAddress.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 | -|-------------|-------------|------------------| -**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) - # **create_crypto_address** > CryptoAddress create_crypto_address(create_crypto_address_request=create_crypto_address_request) Create crypto address -This operation registers a crypto address for crypto payouts. The registered address can later be referenced by its ID when creating settlement requests. +This operation has been deprecated. This operation registers a crypto address for crypto payouts. The registered address can later be referenced by its ID when creating settlement requests. ### Example @@ -751,79 +659,6 @@ 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) -# **create_destination_bank_account** -> DestinationBankAccount create_destination_bank_account(create_destination_bank_account_request=create_destination_bank_account_request) - -Create destination bank account - -This operation creates a destination bank account. - -### Example - -* OAuth Authentication (OAuth2): -* Api Key Authentication (CoboAuth): - -```python -import cobo_waas2 -from cobo_waas2.models.create_destination_bank_account_request import CreateDestinationBankAccountRequest -from cobo_waas2.models.destination_bank_account import DestinationBankAccount -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) - create_destination_bank_account_request = cobo_waas2.CreateDestinationBankAccountRequest() - - try: - # Create destination bank account - api_response = api_instance.create_destination_bank_account(create_destination_bank_account_request=create_destination_bank_account_request) - print("The response of PaymentApi->create_destination_bank_account:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PaymentApi->create_destination_bank_account: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_destination_bank_account_request** | [**CreateDestinationBankAccountRequest**](CreateDestinationBankAccountRequest.md)| The request body to create a destination bank account. | [optional] - -### Return type - -[**DestinationBankAccount**](DestinationBankAccount.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 | -|-------------|-------------|------------------| -**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) - # **create_destination_entry** > CreateDestinationEntry201Response create_destination_entry(create_destination_entry_request=create_destination_entry_request) @@ -897,79 +732,6 @@ 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) -# **create_destination_wallet_address** -> WalletAddress create_destination_wallet_address(create_destination_wallet_address_request=create_destination_wallet_address_request) - -Create destination wallet address - -This operation creates a destination wallet address. - -### Example - -* OAuth Authentication (OAuth2): -* Api Key Authentication (CoboAuth): - -```python -import cobo_waas2 -from cobo_waas2.models.create_destination_wallet_address_request import CreateDestinationWalletAddressRequest -from cobo_waas2.models.wallet_address import WalletAddress -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) - create_destination_wallet_address_request = cobo_waas2.CreateDestinationWalletAddressRequest() - - try: - # Create destination wallet address - api_response = api_instance.create_destination_wallet_address(create_destination_wallet_address_request=create_destination_wallet_address_request) - print("The response of PaymentApi->create_destination_wallet_address:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PaymentApi->create_destination_wallet_address: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_destination_wallet_address_request** | [**CreateDestinationWalletAddressRequest**](CreateDestinationWalletAddressRequest.md)| The request body to create a destination wallet address. | [optional] - -### Return type - -[**WalletAddress**](WalletAddress.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 | -|-------------|-------------|------------------| -**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) - # **create_forced_sweep_request** > ForcedSweep create_forced_sweep_request(forced_sweep_request=forced_sweep_request) @@ -1698,12 +1460,12 @@ 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) -# **delete_counterparty** -> DeleteCounterparty200Response delete_counterparty(counterparty_id) +# **delete_counterparty_by_id** +> DeleteCounterpartyById200Response delete_counterparty_by_id(counterparty_id) -Delete counterparty (Deprecated) +Delete counterparty -This operation deletes a counterparty. +This operation deletes a counterparty. Note that this operation will delete all entries under the counterparty. ### Example @@ -1712,7 +1474,7 @@ This operation deletes a counterparty. ```python import cobo_waas2 -from cobo_waas2.models.delete_counterparty200_response import DeleteCounterparty200Response +from cobo_waas2.models.delete_counterparty_by_id200_response import DeleteCounterpartyById200Response from cobo_waas2.rest import ApiException from pprint import pprint @@ -1730,12 +1492,12 @@ with cobo_waas2.ApiClient(configuration) as api_client: counterparty_id = '5b0ed293-f728-40b4-b1f6-86b88cd51384' try: - # Delete counterparty (Deprecated) - api_response = api_instance.delete_counterparty(counterparty_id) - print("The response of PaymentApi->delete_counterparty:\n") + # Delete counterparty + api_response = api_instance.delete_counterparty_by_id(counterparty_id) + print("The response of PaymentApi->delete_counterparty_by_id:\n") pprint(api_response) except Exception as e: - print("Exception when calling PaymentApi->delete_counterparty: %s\n" % e) + print("Exception when calling PaymentApi->delete_counterparty_by_id: %s\n" % e) ``` @@ -1749,7 +1511,7 @@ Name | Type | Description | Notes ### Return type -[**DeleteCounterparty200Response**](DeleteCounterparty200Response.md) +[**DeleteCounterpartyById200Response**](DeleteCounterpartyById200Response.md) ### Authorization @@ -1771,12 +1533,12 @@ 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) -# **delete_counterparty_by_id** -> DeleteCounterpartyById200Response delete_counterparty_by_id(counterparty_id) +# **delete_counterparty_entry** +> DeleteCounterpartyEntry200Response delete_counterparty_entry(counterparty_entry_id, counterparty_id, entry_type=entry_type) -Delete counterparty +Delete counterparty entry -This operation deletes a counterparty. Note that this operation will delete all entries under the counterparty. +This operation deletes a counterparty entry. ### Example @@ -1785,7 +1547,8 @@ This operation deletes a counterparty. Note that this operation will delete all ```python import cobo_waas2 -from cobo_waas2.models.delete_counterparty_by_id200_response import DeleteCounterpartyById200Response +from cobo_waas2.models.delete_counterparty_entry200_response import DeleteCounterpartyEntry200Response +from cobo_waas2.models.entry_type import EntryType from cobo_waas2.rest import ApiException from pprint import pprint @@ -1800,15 +1563,17 @@ 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) + counterparty_entry_id = '123e4567-e89b-12d3-a456-426614174003' counterparty_id = '5b0ed293-f728-40b4-b1f6-86b88cd51384' + entry_type = cobo_waas2.EntryType() try: - # Delete counterparty - api_response = api_instance.delete_counterparty_by_id(counterparty_id) - print("The response of PaymentApi->delete_counterparty_by_id:\n") + # Delete counterparty entry + api_response = api_instance.delete_counterparty_entry(counterparty_entry_id, counterparty_id, entry_type=entry_type) + print("The response of PaymentApi->delete_counterparty_entry:\n") pprint(api_response) except Exception as e: - print("Exception when calling PaymentApi->delete_counterparty_by_id: %s\n" % e) + print("Exception when calling PaymentApi->delete_counterparty_entry: %s\n" % e) ``` @@ -1818,11 +1583,13 @@ with cobo_waas2.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **counterparty_entry_id** | **str**| The counterparty entry ID. For example, the wallet address ID. | **counterparty_id** | **str**| The counterparty ID. | + **entry_type** | [**EntryType**](.md)| The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. | [optional] ### Return type -[**DeleteCounterpartyById200Response**](DeleteCounterpartyById200Response.md) +[**DeleteCounterpartyEntry200Response**](DeleteCounterpartyEntry200Response.md) ### Authorization @@ -1844,12 +1611,12 @@ 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) -# **delete_counterparty_entry** -> DeleteCounterpartyEntry200Response delete_counterparty_entry(counterparty_entry_id, counterparty_id, entry_type=entry_type) +# **delete_crypto_address** +> DeleteCryptoAddress201Response delete_crypto_address(crypto_address_id) -Delete counterparty entry +Delete crypto address -This operation deletes a counterparty entry. +This operation has been deprecated. This operation unregisters a crypto address from being used for crypto payouts. ### Example @@ -1858,8 +1625,7 @@ This operation deletes a counterparty entry. ```python import cobo_waas2 -from cobo_waas2.models.delete_counterparty_entry200_response import DeleteCounterpartyEntry200Response -from cobo_waas2.models.entry_type import EntryType +from cobo_waas2.models.delete_crypto_address201_response import DeleteCryptoAddress201Response from cobo_waas2.rest import ApiException from pprint import pprint @@ -1874,17 +1640,15 @@ 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) - counterparty_entry_id = '123e4567-e89b-12d3-a456-426614174003' - counterparty_id = '5b0ed293-f728-40b4-b1f6-86b88cd51384' - entry_type = cobo_waas2.EntryType() + crypto_address_id = 'addr_ethusdt_20250506T123456_ab12cd' try: - # Delete counterparty entry - api_response = api_instance.delete_counterparty_entry(counterparty_entry_id, counterparty_id, entry_type=entry_type) - print("The response of PaymentApi->delete_counterparty_entry:\n") + # Delete crypto address + api_response = api_instance.delete_crypto_address(crypto_address_id) + print("The response of PaymentApi->delete_crypto_address:\n") pprint(api_response) except Exception as e: - print("Exception when calling PaymentApi->delete_counterparty_entry: %s\n" % e) + print("Exception when calling PaymentApi->delete_crypto_address: %s\n" % e) ``` @@ -1894,13 +1658,11 @@ with cobo_waas2.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **counterparty_entry_id** | **str**| The counterparty entry ID. For example, the wallet address ID. | - **counterparty_id** | **str**| The counterparty ID. | - **entry_type** | [**EntryType**](.md)| The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. | [optional] + **crypto_address_id** | **str**| The crypto address ID. | ### Return type -[**DeleteCounterpartyEntry200Response**](DeleteCounterpartyEntry200Response.md) +[**DeleteCryptoAddress201Response**](DeleteCryptoAddress201Response.md) ### Authorization @@ -1915,19 +1677,19 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | The request was successful. | - | +**201** | The request was successful. | - | **400** | Bad request. Your request contains malformed syntax or invalid parameters. | - | **401** | Unauthorized. Please provide valid credentials. | - | **403** | Forbidden. You do not have the permission to access the requested resource. | - | [[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) -# **delete_counterparty_wallet_address** -> DeleteCounterpartyWalletAddress200Response delete_counterparty_wallet_address(wallet_address_id) +# **delete_destination_by_id** +> DeleteDestinationById200Response delete_destination_by_id(destination_id) -Delete counterparty wallet address +Delete destination -This operation deletes a counterparty wallet address. +This operation deletes a destination. Note that this operation will delete all entries under the destination, including bank accounts and addresses. ### Example @@ -1936,7 +1698,7 @@ This operation deletes a counterparty wallet address. ```python import cobo_waas2 -from cobo_waas2.models.delete_counterparty_wallet_address200_response import DeleteCounterpartyWalletAddress200Response +from cobo_waas2.models.delete_destination_by_id200_response import DeleteDestinationById200Response from cobo_waas2.rest import ApiException from pprint import pprint @@ -1951,15 +1713,15 @@ 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) - wallet_address_id = '445bac57-7428-4d25-bce1-b3cd017f47a1' + destination_id = '46beeab4-6a8e-476e-bc69-99b89aacbc6f' try: - # Delete counterparty wallet address - api_response = api_instance.delete_counterparty_wallet_address(wallet_address_id) - print("The response of PaymentApi->delete_counterparty_wallet_address:\n") + # Delete destination + api_response = api_instance.delete_destination_by_id(destination_id) + print("The response of PaymentApi->delete_destination_by_id:\n") pprint(api_response) except Exception as e: - print("Exception when calling PaymentApi->delete_counterparty_wallet_address: %s\n" % e) + print("Exception when calling PaymentApi->delete_destination_by_id: %s\n" % e) ``` @@ -1969,454 +1731,11 @@ with cobo_waas2.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **wallet_address_id** | **str**| The wallet address ID. | + **destination_id** | **str**| The destination ID. | ### Return type -[**DeleteCounterpartyWalletAddress200Response**](DeleteCounterpartyWalletAddress200Response.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. | - | -**400** | Bad request. Your request contains malformed syntax or invalid parameters. | - | -**401** | Unauthorized. Please provide valid credentials. | - | -**403** | Forbidden. You do not have the permission to access the requested resource. | - | - -[[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) - -# **delete_crypto_address** -> DeleteCryptoAddress201Response delete_crypto_address(crypto_address_id) - -Delete crypto address - -This operation unregisters a crypto address from being used for crypto payouts. - -### Example - -* OAuth Authentication (OAuth2): -* Api Key Authentication (CoboAuth): - -```python -import cobo_waas2 -from cobo_waas2.models.delete_crypto_address201_response import DeleteCryptoAddress201Response -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) - crypto_address_id = 'addr_ethusdt_20250506T123456_ab12cd' - - try: - # Delete crypto address - api_response = api_instance.delete_crypto_address(crypto_address_id) - print("The response of PaymentApi->delete_crypto_address:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PaymentApi->delete_crypto_address: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **crypto_address_id** | **str**| The crypto address ID. | - -### Return type - -[**DeleteCryptoAddress201Response**](DeleteCryptoAddress201Response.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 | -|-------------|-------------|------------------| -**201** | The request was successful. | - | -**400** | Bad request. Your request contains malformed syntax or invalid parameters. | - | -**401** | Unauthorized. Please provide valid credentials. | - | -**403** | Forbidden. You do not have the permission to access the requested resource. | - | - -[[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) - -# **delete_destination** -> DeleteDestination200Response delete_destination(destination_id) - -Delete destination (Deprecated) - -This operation deletes a destination. - -### Example - -* OAuth Authentication (OAuth2): -* Api Key Authentication (CoboAuth): - -```python -import cobo_waas2 -from cobo_waas2.models.delete_destination200_response import DeleteDestination200Response -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) - destination_id = '46beeab4-6a8e-476e-bc69-99b89aacbc6f' - - try: - # Delete destination (Deprecated) - api_response = api_instance.delete_destination(destination_id) - print("The response of PaymentApi->delete_destination:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PaymentApi->delete_destination: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **destination_id** | **str**| The destination ID. | - -### Return type - -[**DeleteDestination200Response**](DeleteDestination200Response.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. | - | -**400** | Bad request. Your request contains malformed syntax or invalid parameters. | - | -**401** | Unauthorized. Please provide valid credentials. | - | -**403** | Forbidden. You do not have the permission to access the requested resource. | - | - -[[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) - -# **delete_destination_bank_account** -> DeleteDestinationBankAccount200Response delete_destination_bank_account(bank_account_id) - -Delete destination bank account - -This operation deletes a destination bank account. - -### Example - -* OAuth Authentication (OAuth2): -* Api Key Authentication (CoboAuth): - -```python -import cobo_waas2 -from cobo_waas2.models.delete_destination_bank_account200_response import DeleteDestinationBankAccount200Response -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) - bank_account_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479' - - try: - # Delete destination bank account - api_response = api_instance.delete_destination_bank_account(bank_account_id) - print("The response of PaymentApi->delete_destination_bank_account:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PaymentApi->delete_destination_bank_account: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **bank_account_id** | **str**| The bank account ID. | - -### Return type - -[**DeleteDestinationBankAccount200Response**](DeleteDestinationBankAccount200Response.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. | - | -**400** | Bad request. Your request contains malformed syntax or invalid parameters. | - | -**401** | Unauthorized. Please provide valid credentials. | - | -**403** | Forbidden. You do not have the permission to access the requested resource. | - | - -[[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) - -# **delete_destination_by_id** -> DeleteDestinationById200Response delete_destination_by_id(destination_id) - -Delete destination - -This operation deletes a destination. Note that this operation will delete all entries under the destination, including bank accounts and addresses. - -### Example - -* OAuth Authentication (OAuth2): -* Api Key Authentication (CoboAuth): - -```python -import cobo_waas2 -from cobo_waas2.models.delete_destination_by_id200_response import DeleteDestinationById200Response -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) - destination_id = '46beeab4-6a8e-476e-bc69-99b89aacbc6f' - - try: - # Delete destination - api_response = api_instance.delete_destination_by_id(destination_id) - print("The response of PaymentApi->delete_destination_by_id:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PaymentApi->delete_destination_by_id: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **destination_id** | **str**| The destination ID. | - -### Return type - -[**DeleteDestinationById200Response**](DeleteDestinationById200Response.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. | - | -**400** | Bad request. Your request contains malformed syntax or invalid parameters. | - | -**401** | Unauthorized. Please provide valid credentials. | - | -**403** | Forbidden. You do not have the permission to access the requested resource. | - | - -[[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) - -# **delete_destination_entry** -> DeleteDestinationEntry200Response delete_destination_entry(destination_entry_id, destination_id, entry_type) - -Delete destination entry - -This operation deletes a destination entry. - -### Example - -* OAuth Authentication (OAuth2): -* Api Key Authentication (CoboAuth): - -```python -import cobo_waas2 -from cobo_waas2.models.delete_destination_entry200_response import DeleteDestinationEntry200Response -from cobo_waas2.models.entry_type import EntryType -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) - destination_entry_id = '123e4567-e89b-12d3-a456-426614174003' - destination_id = '46beeab4-6a8e-476e-bc69-99b89aacbc6f' - entry_type = cobo_waas2.EntryType() - - try: - # Delete destination entry - api_response = api_instance.delete_destination_entry(destination_entry_id, destination_id, entry_type) - print("The response of PaymentApi->delete_destination_entry:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PaymentApi->delete_destination_entry: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **destination_entry_id** | **str**| The destination entry ID. For example, the wallet address ID or the bank account ID. | - **destination_id** | **str**| The destination ID. | - **entry_type** | [**EntryType**](.md)| EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. | - -### Return type - -[**DeleteDestinationEntry200Response**](DeleteDestinationEntry200Response.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. | - | -**400** | Bad request. Your request contains malformed syntax or invalid parameters. | - | -**401** | Unauthorized. Please provide valid credentials. | - | -**403** | Forbidden. You do not have the permission to access the requested resource. | - | - -[[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) - -# **delete_destination_wallet_address** -> DeleteDestinationWalletAddress200Response delete_destination_wallet_address(wallet_address_id) - -Delete destination wallet address - -This operation deletes a destination wallet address. - -### Example - -* OAuth Authentication (OAuth2): -* Api Key Authentication (CoboAuth): - -```python -import cobo_waas2 -from cobo_waas2.models.delete_destination_wallet_address200_response import DeleteDestinationWalletAddress200Response -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) - wallet_address_id = '445bac57-7428-4d25-bce1-b3cd017f47a1' - - try: - # Delete destination wallet address - api_response = api_instance.delete_destination_wallet_address(wallet_address_id) - print("The response of PaymentApi->delete_destination_wallet_address:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PaymentApi->delete_destination_wallet_address: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **wallet_address_id** | **str**| The wallet address ID. | - -### Return type - -[**DeleteDestinationWalletAddress200Response**](DeleteDestinationWalletAddress200Response.md) +[**DeleteDestinationById200Response**](DeleteDestinationById200Response.md) ### Authorization @@ -2438,12 +1757,12 @@ 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) -# **enable_destination_whitelist** -> QueryDestinationWhitelistEnabled200Response enable_destination_whitelist(enable_destination_whitelist_request=enable_destination_whitelist_request) +# **delete_destination_entry** +> DeleteDestinationEntry200Response delete_destination_entry(destination_entry_id, destination_id, entry_type) -Enable or disable destination whitelist +Delete destination entry -This operation enables or disables the whitelist for a destination. +This operation deletes a destination entry. ### Example @@ -2452,8 +1771,8 @@ This operation enables or disables the whitelist for a destination. ```python import cobo_waas2 -from cobo_waas2.models.enable_destination_whitelist_request import EnableDestinationWhitelistRequest -from cobo_waas2.models.query_destination_whitelist_enabled200_response import QueryDestinationWhitelistEnabled200Response +from cobo_waas2.models.delete_destination_entry200_response import DeleteDestinationEntry200Response +from cobo_waas2.models.entry_type import EntryType from cobo_waas2.rest import ApiException from pprint import pprint @@ -2468,15 +1787,17 @@ 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) - enable_destination_whitelist_request = cobo_waas2.EnableDestinationWhitelistRequest() + destination_entry_id = '123e4567-e89b-12d3-a456-426614174003' + destination_id = '46beeab4-6a8e-476e-bc69-99b89aacbc6f' + entry_type = cobo_waas2.EntryType() try: - # Enable or disable destination whitelist - api_response = api_instance.enable_destination_whitelist(enable_destination_whitelist_request=enable_destination_whitelist_request) - print("The response of PaymentApi->enable_destination_whitelist:\n") + # Delete destination entry + api_response = api_instance.delete_destination_entry(destination_entry_id, destination_id, entry_type) + print("The response of PaymentApi->delete_destination_entry:\n") pprint(api_response) except Exception as e: - print("Exception when calling PaymentApi->enable_destination_whitelist: %s\n" % e) + print("Exception when calling PaymentApi->delete_destination_entry: %s\n" % e) ``` @@ -2486,11 +1807,13 @@ with cobo_waas2.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **enable_destination_whitelist_request** | [**EnableDestinationWhitelistRequest**](EnableDestinationWhitelistRequest.md)| The request body to enable or disable the destination whitelist. | [optional] + **destination_entry_id** | **str**| The destination entry ID. For example, the wallet address ID or the bank account ID. | + **destination_id** | **str**| The destination ID. | + **entry_type** | [**EntryType**](.md)| EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. | ### Return type -[**QueryDestinationWhitelistEnabled200Response**](QueryDestinationWhitelistEnabled200Response.md) +[**DeleteDestinationEntry200Response**](DeleteDestinationEntry200Response.md) ### Authorization @@ -2505,9 +1828,10 @@ Name | Type | Description | Notes | 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. | - | +**200** | The request was successful. | - | +**400** | Bad request. Your request contains malformed syntax or invalid parameters. | - | +**401** | Unauthorized. Please provide valid credentials. | - | +**403** | Forbidden. You do not have the permission to access the requested resource. | - | [[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) @@ -2778,231 +2102,11 @@ with cobo_waas2.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **counterparty_id** | **str**| The counterparty ID. | - -### Return type - -[**CounterpartyDetail**](CounterpartyDetail.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) - -# **get_counterparty_detail_by_id** -> CounterpartyDetail get_counterparty_detail_by_id(counterparty_id) - -Get counterparty information (Deprecated) - -This operation retrieves the detailed information about a specified counterparty. - -### Example - -* OAuth Authentication (OAuth2): -* Api Key Authentication (CoboAuth): - -```python -import cobo_waas2 -from cobo_waas2.models.counterparty_detail import CounterpartyDetail -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) - counterparty_id = '5b0ed293-f728-40b4-b1f6-86b88cd51384' - - try: - # Get counterparty information (Deprecated) - api_response = api_instance.get_counterparty_detail_by_id(counterparty_id) - print("The response of PaymentApi->get_counterparty_detail_by_id:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PaymentApi->get_counterparty_detail_by_id: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **counterparty_id** | **str**| The counterparty ID. | - -### Return type - -[**CounterpartyDetail**](CounterpartyDetail.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) - -# **get_counterparty_entry** -> GetCounterpartyEntry200Response get_counterparty_entry(counterparty_entry_id, entry_type=entry_type) - -Get counterparty entry information - -This operation retrieves the detailed information about a specified counterparty entry. - -### Example - -* OAuth Authentication (OAuth2): -* Api Key Authentication (CoboAuth): - -```python -import cobo_waas2 -from cobo_waas2.models.entry_type import EntryType -from cobo_waas2.models.get_counterparty_entry200_response import GetCounterpartyEntry200Response -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) - counterparty_entry_id = '123e4567-e89b-12d3-a456-426614174003' - entry_type = cobo_waas2.EntryType() - - try: - # Get counterparty entry information - api_response = api_instance.get_counterparty_entry(counterparty_entry_id, entry_type=entry_type) - print("The response of PaymentApi->get_counterparty_entry:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PaymentApi->get_counterparty_entry: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **counterparty_entry_id** | **str**| The counterparty entry ID. For example, the wallet address ID. | - **entry_type** | [**EntryType**](.md)| The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. | [optional] - -### Return type - -[**GetCounterpartyEntry200Response**](GetCounterpartyEntry200Response.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. | - | -**400** | Bad request. Your request contains malformed syntax or invalid parameters. | - | -**401** | Unauthorized. Please provide valid credentials. | - | -**403** | Forbidden. You do not have the permission to access the requested resource. | - | - -[[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) - -# **get_destination** -> DestinationDetail get_destination(destination_id) - -Get destination information - -This operation retrieves the detailed information about a specified destination. - -### Example - -* OAuth Authentication (OAuth2): -* Api Key Authentication (CoboAuth): - -```python -import cobo_waas2 -from cobo_waas2.models.destination_detail import DestinationDetail -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) - destination_id = '46beeab4-6a8e-476e-bc69-99b89aacbc6f' - - try: - # Get destination information - api_response = api_instance.get_destination(destination_id) - print("The response of PaymentApi->get_destination:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PaymentApi->get_destination: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **destination_id** | **str**| The destination ID. | + **counterparty_id** | **str**| The counterparty ID. | ### Return type -[**DestinationDetail**](DestinationDetail.md) +[**CounterpartyDetail**](CounterpartyDetail.md) ### Authorization @@ -3023,12 +2127,12 @@ 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) -# **get_destination_bank_account_detail_by_id** -> DestinationBankAccountDetail get_destination_bank_account_detail_by_id(bank_account_id) +# **get_counterparty_entry** +> GetCounterpartyEntry200Response get_counterparty_entry(counterparty_entry_id, entry_type=entry_type) -Get destination bank account information +Get counterparty entry information -This operation retrieves the detailed information about a specified destination bank account. +This operation retrieves the detailed information about a specified counterparty entry. ### Example @@ -3037,7 +2141,8 @@ This operation retrieves the detailed information about a specified destination ```python import cobo_waas2 -from cobo_waas2.models.destination_bank_account_detail import DestinationBankAccountDetail +from cobo_waas2.models.entry_type import EntryType +from cobo_waas2.models.get_counterparty_entry200_response import GetCounterpartyEntry200Response from cobo_waas2.rest import ApiException from pprint import pprint @@ -3052,15 +2157,16 @@ 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) - bank_account_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479' + counterparty_entry_id = '123e4567-e89b-12d3-a456-426614174003' + entry_type = cobo_waas2.EntryType() try: - # Get destination bank account information - api_response = api_instance.get_destination_bank_account_detail_by_id(bank_account_id) - print("The response of PaymentApi->get_destination_bank_account_detail_by_id:\n") + # Get counterparty entry information + api_response = api_instance.get_counterparty_entry(counterparty_entry_id, entry_type=entry_type) + print("The response of PaymentApi->get_counterparty_entry:\n") pprint(api_response) except Exception as e: - print("Exception when calling PaymentApi->get_destination_bank_account_detail_by_id: %s\n" % e) + print("Exception when calling PaymentApi->get_counterparty_entry: %s\n" % e) ``` @@ -3070,11 +2176,12 @@ with cobo_waas2.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **bank_account_id** | **str**| The bank account ID. | + **counterparty_entry_id** | **str**| The counterparty entry ID. For example, the wallet address ID. | + **entry_type** | [**EntryType**](.md)| The type of the counterparty entry. - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. | [optional] ### Return type -[**DestinationBankAccountDetail**](DestinationBankAccountDetail.md) +[**GetCounterpartyEntry200Response**](GetCounterpartyEntry200Response.md) ### Authorization @@ -3090,15 +2197,16 @@ Name | Type | Description | Notes | 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. | - | +**400** | Bad request. Your request contains malformed syntax or invalid parameters. | - | +**401** | Unauthorized. Please provide valid credentials. | - | +**403** | Forbidden. You do not have the permission to access the requested resource. | - | [[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) -# **get_destination_detail_by_id** -> DestinationDetail get_destination_detail_by_id(destination_id) +# **get_destination** +> DestinationDetail get_destination(destination_id) -Get destination information (Deprecated) +Get destination information This operation retrieves the detailed information about a specified destination. @@ -3127,12 +2235,12 @@ with cobo_waas2.ApiClient(configuration) as api_client: destination_id = '46beeab4-6a8e-476e-bc69-99b89aacbc6f' try: - # Get destination information (Deprecated) - api_response = api_instance.get_destination_detail_by_id(destination_id) - print("The response of PaymentApi->get_destination_detail_by_id:\n") + # Get destination information + api_response = api_instance.get_destination(destination_id) + print("The response of PaymentApi->get_destination:\n") pprint(api_response) except Exception as e: - print("Exception when calling PaymentApi->get_destination_detail_by_id: %s\n" % e) + print("Exception when calling PaymentApi->get_destination: %s\n" % e) ``` @@ -4469,94 +3577,12 @@ 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_counterparty_wallet_address** -> ListCounterpartyWalletAddress200Response list_counterparty_wallet_address(limit=limit, before=before, after=after, counterparty_id=counterparty_id, chain_ids=chain_ids, wallet_address=wallet_address) - -List counterparty wallet addresses - -This operation retrieves the information of counterparty wallet addresses. - -### Example - -* OAuth Authentication (OAuth2): -* Api Key Authentication (CoboAuth): - -```python -import cobo_waas2 -from cobo_waas2.models.list_counterparty_wallet_address200_response import ListCounterpartyWalletAddress200Response -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) - limit = 10 - before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1' - after = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk' - counterparty_id = '5b0ed293-f728-40b4-b1f6-86b88cd51384' - chain_ids = 'ETH' - wallet_address = '0x1234567890abcdef...' - - try: - # List counterparty wallet addresses - api_response = api_instance.list_counterparty_wallet_address(limit=limit, before=before, after=after, counterparty_id=counterparty_id, chain_ids=chain_ids, wallet_address=wallet_address) - print("The response of PaymentApi->list_counterparty_wallet_address:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PaymentApi->list_counterparty_wallet_address: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **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] - **counterparty_id** | **str**| The counterparty ID. | [optional] - **chain_ids** | **str**| The chain ID, which is the unique identifier of a blockchain. | [optional] - **wallet_address** | **str**| The wallet address. | [optional] - -### Return type - -[**ListCounterpartyWalletAddress200Response**](ListCounterpartyWalletAddress200Response.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_crypto_addresses** > List[CryptoAddress] list_crypto_addresses(token_id=token_id) List crypto addresses -This operation retrieves a list of crypto addresses registered for crypto payouts. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new crypto address. +This operation has been deprecated. This operation retrieves a list of crypto addresses registered for crypto payouts. Contact our support team at [help@cobo.com](mailto:help@cobo.com) to register a new crypto address. ### Example @@ -4623,89 +3649,6 @@ 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_destination_bank_accounts** -> ListDestinationBankAccounts200Response list_destination_bank_accounts(limit=limit, before=before, after=after, keyword=keyword, destination_id=destination_id, bank_account_status=bank_account_status) - -List destination bank accounts - -This operation retrieves the information of destination bank accounts. - -### Example - -* OAuth Authentication (OAuth2): -* Api Key Authentication (CoboAuth): - -```python -import cobo_waas2 -from cobo_waas2.models.bank_account_status import BankAccountStatus -from cobo_waas2.models.list_destination_bank_accounts200_response import ListDestinationBankAccounts200Response -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) - limit = 10 - before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1' - after = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk' - keyword = 'keyword' - destination_id = '46beeab4-6a8e-476e-bc69-99b89aacbc6f' - bank_account_status = cobo_waas2.BankAccountStatus() - - try: - # List destination bank accounts - api_response = api_instance.list_destination_bank_accounts(limit=limit, before=before, after=after, keyword=keyword, destination_id=destination_id, bank_account_status=bank_account_status) - print("The response of PaymentApi->list_destination_bank_accounts:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PaymentApi->list_destination_bank_accounts: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **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] - **keyword** | **str**| A search term for performing fuzzy matches in the search query. | [optional] - **destination_id** | **str**| The destination ID. | [optional] - **bank_account_status** | [**BankAccountStatus**](.md)| BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. | [optional] - -### Return type - -[**ListDestinationBankAccounts200Response**](ListDestinationBankAccounts200Response.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_destination_entries** > ListDestinationEntries200Response list_destination_entries(entry_type, limit=limit, before=before, after=after, destination_id=destination_id, chain_ids=chain_ids, wallet_address=wallet_address, keyword=keyword, bank_account_status=bank_account_status) @@ -4750,95 +3693,10 @@ with cobo_waas2.ApiClient(configuration) as api_client: try: # List destination entries api_response = api_instance.list_destination_entries(entry_type, limit=limit, before=before, after=after, destination_id=destination_id, chain_ids=chain_ids, wallet_address=wallet_address, keyword=keyword, bank_account_status=bank_account_status) - print("The response of PaymentApi->list_destination_entries:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PaymentApi->list_destination_entries: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **entry_type** | [**EntryType**](.md)| EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. | - **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] - **destination_id** | **str**| The destination ID. | [optional] - **chain_ids** | **str**| The chain ID, which is the unique identifier of a blockchain. | [optional] - **wallet_address** | **str**| The wallet address. | [optional] - **keyword** | **str**| A search term for performing fuzzy matches in the search query. | [optional] - **bank_account_status** | [**BankAccountStatus**](.md)| BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. | [optional] - -### Return type - -[**ListDestinationEntries200Response**](ListDestinationEntries200Response.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_destination_wallet_addresses** -> ListDestinationWalletAddresses200Response list_destination_wallet_addresses(limit=limit, before=before, after=after, destination_id=destination_id, chain_ids=chain_ids, wallet_address=wallet_address) - -List destination wallet addresses - -This operation retrieves the information of destination wallet addresses. - -### Example - -* OAuth Authentication (OAuth2): -* Api Key Authentication (CoboAuth): - -```python -import cobo_waas2 -from cobo_waas2.models.list_destination_wallet_addresses200_response import ListDestinationWalletAddresses200Response -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) - limit = 10 - before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1' - after = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk' - destination_id = '46beeab4-6a8e-476e-bc69-99b89aacbc6f' - chain_ids = 'ETH' - wallet_address = '0x1234567890abcdef...' - - try: - # List destination wallet addresses - api_response = api_instance.list_destination_wallet_addresses(limit=limit, before=before, after=after, destination_id=destination_id, chain_ids=chain_ids, wallet_address=wallet_address) - print("The response of PaymentApi->list_destination_wallet_addresses:\n") + print("The response of PaymentApi->list_destination_entries:\n") pprint(api_response) except Exception as e: - print("Exception when calling PaymentApi->list_destination_wallet_addresses: %s\n" % e) + print("Exception when calling PaymentApi->list_destination_entries: %s\n" % e) ``` @@ -4848,16 +3706,19 @@ with cobo_waas2.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **entry_type** | [**EntryType**](.md)| EntryType defines the type of the counterparty entry: - `Address`: The counterparty entry is an address. - `BankAccount`: The counterparty entry is a bank account. | **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] **destination_id** | **str**| The destination ID. | [optional] **chain_ids** | **str**| The chain ID, which is the unique identifier of a blockchain. | [optional] **wallet_address** | **str**| The wallet address. | [optional] + **keyword** | **str**| A search term for performing fuzzy matches in the search query. | [optional] + **bank_account_status** | [**BankAccountStatus**](.md)| BankAccountStatus defines the status of the bank account: - `Pending`: The bank account is pending verification by Cobo. - `Approved`: The bank account has been approved by Cobo. - `Rejected`: The bank account has been rejected by Cobo. | [optional] ### Return type -[**ListDestinationWalletAddresses200Response**](ListDestinationWalletAddresses200Response.md) +[**ListDestinationEntries200Response**](ListDestinationEntries200Response.md) ### Authorization @@ -5286,9 +4147,9 @@ Name | Type | Description | Notes # **list_payment_supported_tokens** > List[SupportedToken] list_payment_supported_tokens() -List all supported tokens +List supported tokens -This operation retrieves the information of all supported tokens. +This operation retrieves all tokens supported by Cobo Payments. Use this operation to get token details such as token ID, symbol, decimal precision, contract address, and chain information before creating payment orders. For more information about Cobo Payments, see [Cobo Payments Overview](https://www.cobo.com/payments/en/guides/overview). ### Example @@ -5314,7 +4175,7 @@ with cobo_waas2.ApiClient(configuration) as api_client: api_instance = cobo_waas2.PaymentApi(api_client) try: - # List all supported tokens + # List supported tokens api_response = api_instance.list_payment_supported_tokens() print("The response of PaymentApi->list_payment_supported_tokens:\n") pprint(api_response) @@ -5894,80 +4755,12 @@ 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) -# **query_destination_whitelist_enabled** -> QueryDestinationWhitelistEnabled200Response query_destination_whitelist_enabled() - -Query destination whitelist enabled status - -This operation retrieves the information of whether the destination whitelist is enabled. - -### Example - -* OAuth Authentication (OAuth2): -* Api Key Authentication (CoboAuth): - -```python -import cobo_waas2 -from cobo_waas2.models.query_destination_whitelist_enabled200_response import QueryDestinationWhitelistEnabled200Response -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) - - try: - # Query destination whitelist enabled status - api_response = api_instance.query_destination_whitelist_enabled() - print("The response of PaymentApi->query_destination_whitelist_enabled:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PaymentApi->query_destination_whitelist_enabled: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**QueryDestinationWhitelistEnabled200Response**](QueryDestinationWhitelistEnabled200Response.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) - # **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) Update bank account -This operation updates the information of an existing bank account. +This operation has been deprecated. This operation updates the information of an existing bank account. ### Example @@ -6112,81 +4905,6 @@ 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) -# **update_counterparty_by_id** -> Counterparty update_counterparty_by_id(counterparty_id, update_counterparty_by_id_request=update_counterparty_by_id_request) - -Update counterparty (Deprecated) - -This operation updates the information of a specified counterparty. - -### Example - -* OAuth Authentication (OAuth2): -* Api Key Authentication (CoboAuth): - -```python -import cobo_waas2 -from cobo_waas2.models.counterparty import Counterparty -from cobo_waas2.models.update_counterparty_by_id_request import UpdateCounterpartyByIdRequest -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) - counterparty_id = '5b0ed293-f728-40b4-b1f6-86b88cd51384' - update_counterparty_by_id_request = cobo_waas2.UpdateCounterpartyByIdRequest() - - try: - # Update counterparty (Deprecated) - api_response = api_instance.update_counterparty_by_id(counterparty_id, update_counterparty_by_id_request=update_counterparty_by_id_request) - print("The response of PaymentApi->update_counterparty_by_id:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PaymentApi->update_counterparty_by_id: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **counterparty_id** | **str**| The counterparty ID. | - **update_counterparty_by_id_request** | [**UpdateCounterpartyByIdRequest**](UpdateCounterpartyByIdRequest.md)| The request body to update a counterparty. | [optional] - -### Return type - -[**Counterparty**](Counterparty.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) - # **update_destination** > Destination update_destination(destination_id, update_destination_request=update_destination_request) @@ -6262,156 +4980,6 @@ 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) -# **update_destination_bank_account_by_id** -> DestinationBankAccount update_destination_bank_account_by_id(bank_account_id, update_destination_bank_account=update_destination_bank_account) - -Update destination bank account - -This operation updates the information of a specified destination bank account. - -### Example - -* OAuth Authentication (OAuth2): -* Api Key Authentication (CoboAuth): - -```python -import cobo_waas2 -from cobo_waas2.models.destination_bank_account import DestinationBankAccount -from cobo_waas2.models.update_destination_bank_account import UpdateDestinationBankAccount -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) - bank_account_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479' - update_destination_bank_account = cobo_waas2.UpdateDestinationBankAccount() - - try: - # Update destination bank account - api_response = api_instance.update_destination_bank_account_by_id(bank_account_id, update_destination_bank_account=update_destination_bank_account) - print("The response of PaymentApi->update_destination_bank_account_by_id:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PaymentApi->update_destination_bank_account_by_id: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **bank_account_id** | **str**| The bank account ID. | - **update_destination_bank_account** | [**UpdateDestinationBankAccount**](UpdateDestinationBankAccount.md)| The request body to update a destination bank account. | [optional] - -### Return type - -[**DestinationBankAccount**](DestinationBankAccount.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) - -# **update_destination_by_id** -> Destination update_destination_by_id(destination_id, update_destination_by_id_request=update_destination_by_id_request) - -Update destination (Deprecated) - -This operation updates the information of a specified destination. - -### Example - -* OAuth Authentication (OAuth2): -* Api Key Authentication (CoboAuth): - -```python -import cobo_waas2 -from cobo_waas2.models.destination import Destination -from cobo_waas2.models.update_destination_by_id_request import UpdateDestinationByIdRequest -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) - destination_id = '46beeab4-6a8e-476e-bc69-99b89aacbc6f' - update_destination_by_id_request = cobo_waas2.UpdateDestinationByIdRequest() - - try: - # Update destination (Deprecated) - api_response = api_instance.update_destination_by_id(destination_id, update_destination_by_id_request=update_destination_by_id_request) - print("The response of PaymentApi->update_destination_by_id:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling PaymentApi->update_destination_by_id: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **destination_id** | **str**| The destination ID. | - **update_destination_by_id_request** | [**UpdateDestinationByIdRequest**](UpdateDestinationByIdRequest.md)| The request body to update a destination. | [optional] - -### Return type - -[**Destination**](Destination.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) - # **update_destination_entry** > UpdateDestinationEntry200Response update_destination_entry(destination_entry_id, update_destination_entry_request=update_destination_entry_request) diff --git a/docs/PaymentBridgeStatus.md b/docs/PaymentBridgeStatus.md new file mode 100644 index 00000000..7def4ba6 --- /dev/null +++ b/docs/PaymentBridgeStatus.md @@ -0,0 +1,12 @@ +# PaymentBridgeStatus + +The current status of the payout bridge. Possible values include: - `Completed`: The payout bridge has been completed successfully. - `Failed`: The payout bridge has failed. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/PaymentBulkSendItem.md b/docs/PaymentBulkSendItem.md index b7d0740d..d73322d6 100644 --- a/docs/PaymentBulkSendItem.md +++ b/docs/PaymentBulkSendItem.md @@ -5,11 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bulk_send_item_id** | **str** | The payout item ID. | -**token_id** | **str** | The token ID of the payout item. | -**receiving_address** | **str** | The receiving address of the payout item. | -**amount** | **str** | The amount of the payout item. | -**description** | **str** | The note of the payout item. | [optional] +**bulk_send_item_id** | **str** | The bulk send item ID. | +**token_id** | **str** | The token ID of the cryptocurrency to be sent to the recipient. | +**receiving_address** | **str** | The receiving address. | +**amount** | **str** | The amount of the cryptocurrency to be sent to the recipient. | +**description** | **str** | A note or comment about the bulk send item. | [optional] **status** | [**PaymentBulkSendItemStatus**](PaymentBulkSendItemStatus.md) | | **validation_status** | [**PaymentBulkSendItemValidationStatus**](PaymentBulkSendItemValidationStatus.md) | | diff --git a/docs/PaymentPayout.md b/docs/PaymentPayout.md index 1d74ea67..be832661 100644 --- a/docs/PaymentPayout.md +++ b/docs/PaymentPayout.md @@ -13,8 +13,9 @@ Name | Type | Description | Notes **recipient_info** | [**PaymentPayoutRecipientInfo**](PaymentPayoutRecipientInfo.md) | | [optional] **initiator** | **str** | The initiator of this payout, usually the user's API key. | [optional] **actual_payout_amount** | **str** | - For `Crypto` payouts: The amount of cryptocurrency sent to the recipient's address, denominated in the token specified in `recipient_info.token_id`. - For `OffRamp` payouts: The amount of fiat currency sent to the recipient's bank account, denominated in the currency specified in `recipient_info.currency`. (Note: The actual amount received may be lower due to additional bank transfer fees.) | [optional] -**status** | [**PaymentPayoutStatus**](PaymentPayoutStatus.md) | | +**commission_fees** | [**List[CommissionFee]**](CommissionFee.md) | The commission fees of the payout. | [optional] **remark** | **str** | A note or comment about the payout. | [optional] +**status** | [**PaymentPayoutStatus**](PaymentPayoutStatus.md) | | **created_timestamp** | **int** | The created time of the payout, represented as a UNIX timestamp in seconds. | **updated_timestamp** | **int** | The updated time of the payout, represented as a UNIX timestamp in seconds. | diff --git a/docs/PaymentPayoutDetail.md b/docs/PaymentPayoutDetail.md index 297495c8..bc788461 100644 --- a/docs/PaymentPayoutDetail.md +++ b/docs/PaymentPayoutDetail.md @@ -13,8 +13,9 @@ Name | Type | Description | Notes **recipient_info** | [**PaymentPayoutRecipientInfo**](PaymentPayoutRecipientInfo.md) | | [optional] **initiator** | **str** | The initiator of this payout, usually the user's API key. | [optional] **actual_payout_amount** | **str** | - For `Crypto` payouts: The amount of cryptocurrency sent to the recipient's address, denominated in the token specified in `recipient_info.token_id`. - For `OffRamp` payouts: The amount of fiat currency sent to the recipient's bank account, denominated in the currency specified in `recipient_info.currency`. (Note: The actual amount received may be lower due to additional bank transfer fees.) | [optional] -**status** | [**PaymentPayoutStatus**](PaymentPayoutStatus.md) | | +**commission_fees** | [**List[CommissionFee]**](CommissionFee.md) | The commission fees of the payout. | [optional] **remark** | **str** | A note or comment about the payout. | [optional] +**status** | [**PaymentPayoutStatus**](PaymentPayoutStatus.md) | | **created_timestamp** | **int** | The created time of the payout, represented as a UNIX timestamp in seconds. | **updated_timestamp** | **int** | The updated time of the payout, represented as a UNIX timestamp in seconds. | **transactions** | [**List[PaymentTransaction]**](PaymentTransaction.md) | An array of payout transactions. | [optional] diff --git a/docs/PaymentPayoutEvent.md b/docs/PaymentPayoutEvent.md index df15b59b..ad1f3ed1 100644 --- a/docs/PaymentPayoutEvent.md +++ b/docs/PaymentPayoutEvent.md @@ -14,8 +14,9 @@ Name | Type | Description | Notes **recipient_info** | [**PaymentPayoutRecipientInfo**](PaymentPayoutRecipientInfo.md) | | [optional] **initiator** | **str** | The initiator of this payout, usually the user's API key. | [optional] **actual_payout_amount** | **str** | - For `Crypto` payouts: The amount of cryptocurrency sent to the recipient's address, denominated in the token specified in `recipient_info.token_id`. - For `OffRamp` payouts: The amount of fiat currency sent to the recipient's bank account, denominated in the currency specified in `recipient_info.currency`. (Note: The actual amount received may be lower due to additional bank transfer fees.) | [optional] -**status** | [**PaymentPayoutStatus**](PaymentPayoutStatus.md) | | +**commission_fees** | [**List[CommissionFee]**](CommissionFee.md) | The commission fees of the payout. | [optional] **remark** | **str** | A note or comment about the payout. | [optional] +**status** | [**PaymentPayoutStatus**](PaymentPayoutStatus.md) | | **created_timestamp** | **int** | The created time of the payout, represented as a UNIX timestamp in seconds. | **updated_timestamp** | **int** | The updated time of the payout, represented as a UNIX timestamp in seconds. | **transactions** | [**List[PaymentTransaction]**](PaymentTransaction.md) | An array of payout transactions. | [optional] diff --git a/docs/PreCheck.md b/docs/PreCheck.md new file mode 100644 index 00000000..19ae9227 --- /dev/null +++ b/docs/PreCheck.md @@ -0,0 +1,30 @@ +# PreCheck + +Some validation settings for creating a transaction. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**skip_checks** | [**List[SkipCheckType]**](SkipCheckType.md) | Selection to skip verification. | [optional] + +## Example + +```python +from cobo_waas2.models.pre_check import PreCheck + +# TODO update the JSON string below +json = "{}" +# create an instance of PreCheck from a JSON string +pre_check_instance = PreCheck.from_json(json) +# print the JSON string representation of the object +print(PreCheck.to_json()) + +# convert the object into a dict +pre_check_dict = pre_check_instance.to_dict() +# create an instance of PreCheck from a dict +pre_check_from_dict = PreCheck.from_dict(pre_check_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/QueryDestinationWhitelistEnabled200Response.md b/docs/QueryDestinationWhitelistEnabled200Response.md deleted file mode 100644 index 104f31e4..00000000 --- a/docs/QueryDestinationWhitelistEnabled200Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# QueryDestinationWhitelistEnabled200Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enable_destination_whitelist** | **bool** | Indicates whether the destination whitelist is enabled. | - -## Example - -```python -from cobo_waas2.models.query_destination_whitelist_enabled200_response import QueryDestinationWhitelistEnabled200Response - -# TODO update the JSON string below -json = "{}" -# create an instance of QueryDestinationWhitelistEnabled200Response from a JSON string -query_destination_whitelist_enabled200_response_instance = QueryDestinationWhitelistEnabled200Response.from_json(json) -# print the JSON string representation of the object -print(QueryDestinationWhitelistEnabled200Response.to_json()) - -# convert the object into a dict -query_destination_whitelist_enabled200_response_dict = query_destination_whitelist_enabled200_response_instance.to_dict() -# create an instance of QueryDestinationWhitelistEnabled200Response from a dict -query_destination_whitelist_enabled200_response_from_dict = QueryDestinationWhitelistEnabled200Response.from_dict(query_destination_whitelist_enabled200_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/SkipCheckType.md b/docs/SkipCheckType.md new file mode 100644 index 00000000..74435c17 --- /dev/null +++ b/docs/SkipCheckType.md @@ -0,0 +1,12 @@ +# SkipCheckType + +The skip check type. Possible values include: - `OnchainFeeBalance`: The system does not verify whether the balance is sufficient to pay the on-chain transaction fees; currently, this only applies to the TRON chain for MPC and Custodial Web3 wallets. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/SupportedToken.md b/docs/SupportedToken.md index bdc3150e..4fb7dec4 100644 --- a/docs/SupportedToken.md +++ b/docs/SupportedToken.md @@ -5,16 +5,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**token_id** | **str** | Unique identifier of the token | -**name** | **str** | Full name of the token | -**symbol** | **str** | Symbol representation of the token | -**decimal** | **int** | Number of decimal places for the token | -**token_address** | **str** | Contract address of the token (may be null for native coins) | -**chain_id** | **str** | Identifier of the blockchain where the token exists | -**chain_symbol** | **str** | Symbol of the underlying blockchain | -**chain_icon_url** | **str** | URL to the blockchain's icon image | [optional] -**token_icon_url** | **str** | URL to the token's icon image | [optional] -**can_off_ramp** | **bool** | Whether the token is supported by the off-ramp service. | [optional] +**token_id** | **str** | The unique identifier of the token, in the format of `{chain_id}_{token_symbol}`. | +**name** | **str** | The full name of the token. | +**symbol** | **str** | The symbol of the token. | +**decimal** | **int** | The number of decimal places for the token. This value is used to convert between the token's smallest unit and its display value. | +**token_address** | **str** | The contract address of the token. This is `null` for native coins (e.g., ETH on Ethereum). | +**chain_id** | **str** | The ID of the chain on which the token exists. | +**chain_symbol** | **str** | The symbol of the chain on which the token exists. | +**chain_icon_url** | **str** | The URL of the chain icon image. | [optional] +**token_icon_url** | **str** | The URL of the token icon image. | [optional] +**can_off_ramp** | **bool** | Whether the token supports fiat off-ramp. - `true`: The token can be used for fiat off-ramp. - `false`: The token cannot be used for fiat off-ramp. | [optional] ## Example diff --git a/docs/TransferParams.md b/docs/TransferParams.md index b762633e..f9099b28 100644 --- a/docs/TransferParams.md +++ b/docs/TransferParams.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **fee** | [**TransactionRequestFee**](TransactionRequestFee.md) | | [optional] **transaction_process_type** | [**TransactionProcessType**](TransactionProcessType.md) | | [optional] **auto_fuel** | [**AutoFuelType**](AutoFuelType.md) | | [optional] +**pre_check** | [**PreCheck**](PreCheck.md) | | [optional] ## Example diff --git a/docs/UpdateCounterpartyByIdRequest.md b/docs/UpdateCounterpartyByIdRequest.md deleted file mode 100644 index e13e39b8..00000000 --- a/docs/UpdateCounterpartyByIdRequest.md +++ /dev/null @@ -1,33 +0,0 @@ -# UpdateCounterpartyByIdRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**counterparty_name** | **str** | The counterparty name. | -**counterparty_type** | [**CounterpartyType**](CounterpartyType.md) | | -**country** | **str** | The country of the counterparty, in ISO 3166-1 alpha-3 format. | [optional] -**email** | **str** | The email of the counterparty. | [optional] -**contact_address** | **str** | The contact address of the counterparty. | [optional] - -## Example - -```python -from cobo_waas2.models.update_counterparty_by_id_request import UpdateCounterpartyByIdRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateCounterpartyByIdRequest from a JSON string -update_counterparty_by_id_request_instance = UpdateCounterpartyByIdRequest.from_json(json) -# print the JSON string representation of the object -print(UpdateCounterpartyByIdRequest.to_json()) - -# convert the object into a dict -update_counterparty_by_id_request_dict = update_counterparty_by_id_request_instance.to_dict() -# create an instance of UpdateCounterpartyByIdRequest from a dict -update_counterparty_by_id_request_from_dict = UpdateCounterpartyByIdRequest.from_dict(update_counterparty_by_id_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/UpdateDestinationByIdRequest.md b/docs/UpdateDestinationByIdRequest.md deleted file mode 100644 index 28ecf9eb..00000000 --- a/docs/UpdateDestinationByIdRequest.md +++ /dev/null @@ -1,34 +0,0 @@ -# UpdateDestinationByIdRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**destination_name** | **str** | The destination name. | -**destination_type** | [**DestinationType**](DestinationType.md) | | -**merchant_id** | **str** | The ID of the merchant linked to the destination. | [optional] -**country** | **str** | The country of the destination, in ISO 3166-1 alpha-3 format. | [optional] -**email** | **str** | The email of the destination. | [optional] -**contact_address** | **str** | The contact address of the destination. | [optional] - -## Example - -```python -from cobo_waas2.models.update_destination_by_id_request import UpdateDestinationByIdRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateDestinationByIdRequest from a JSON string -update_destination_by_id_request_instance = UpdateDestinationByIdRequest.from_json(json) -# print the JSON string representation of the object -print(UpdateDestinationByIdRequest.to_json()) - -# convert the object into a dict -update_destination_by_id_request_dict = update_destination_by_id_request_instance.to_dict() -# create an instance of UpdateDestinationByIdRequest from a dict -update_destination_by_id_request_from_dict = UpdateDestinationByIdRequest.from_dict(update_destination_by_id_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/WebhookEventData.md b/docs/WebhookEventData.md index 63d7a6dd..9c4322c1 100644 --- a/docs/WebhookEventData.md +++ b/docs/WebhookEventData.md @@ -102,6 +102,7 @@ Name | Type | Description | Notes **payout_items** | [**List[PaymentPayoutItem]**](PaymentPayoutItem.md) | required | [optional] **recipient_info** | [**PaymentPayoutRecipientInfo**](PaymentPayoutRecipientInfo.md) | | [optional] **actual_payout_amount** | **str** | - For `Crypto` payouts: The amount of cryptocurrency sent to the recipient's address, denominated in the token specified in `recipient_info.token_id`. - For `OffRamp` payouts: The amount of fiat currency sent to the recipient's bank account, denominated in the currency specified in `recipient_info.currency`. (Note: The actual amount received may be lower due to additional bank transfer fees.) | [optional] +**commission_fees** | [**List[CommissionFee]**](CommissionFee.md) | The commission fees of the payout. | [optional] **remark** | **str** | A note or comment about the payout. | [optional] **bulk_send_id** | **str** | The bulk send ID. | **execution_mode** | [**PaymentBulkSendExecutionMode**](PaymentBulkSendExecutionMode.md) | | diff --git a/pyproject.toml b/pyproject.toml index 287992e1..1d249d46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cobo_waas2" -version = "1.30.0" +version = "1.31.0" description = "Cobo Wallet as a Service 2.0" authors = ["Cobo WaaS "] license = "Apache 2.0" diff --git a/requirements.txt b/requirements.txt index cdf6874b..b3861b68 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ setuptools >= 21.0.0 urllib3 >= 2.6.0 pydantic >= 2 typing-extensions >= 4.7.1 -PyNaCl==1.5.0 +PyNaCl>=1.5.0 fastapi >= 0.103.2 uvicorn==0.22.0 ecdsa==0.19.0 diff --git a/setup.py b/setup.py index c7948264..153f4b6d 100644 --- a/setup.py +++ b/setup.py @@ -19,14 +19,14 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "cobo-waas2" -VERSION = "1.30.0" +VERSION = "1.31.0" PYTHON_REQUIRES = ">=3.9" REQUIRES = [ "urllib3 >= 2.6.0", "python-dateutil", "pydantic >= 2", "typing-extensions >= 4.7.1", - "PyNaCl==1.5.0", + "PyNaCl>=1.5.0", "ecdsa==0.19.0", "fastapi >= 0.103.2", "uvicorn==0.22.0", diff --git a/test/test_address_balance.py b/test/test_address_balance.py index 5af4d6b7..949ff830 100644 --- a/test/test_address_balance.py +++ b/test/test_address_balance.py @@ -39,7 +39,8 @@ def make_instance(self, include_optional) -> AddressBalance: total = '100.0', available = '80.5', pending = '0', - locked = '0', ) + locked = '0', + frozen = '0', ) ) else: return AddressBalance( @@ -48,7 +49,8 @@ def make_instance(self, include_optional) -> AddressBalance: total = '100.0', available = '80.5', pending = '0', - locked = '0', ), + locked = '0', + frozen = '0', ), ) """ diff --git a/test/test_asset_balance.py b/test/test_asset_balance.py index 82dda608..cd862717 100644 --- a/test/test_asset_balance.py +++ b/test/test_asset_balance.py @@ -39,7 +39,8 @@ def make_instance(self, include_optional) -> AssetBalance: total = '100.0', available = '80.5', pending = '0', - locked = '0', ) + locked = '0', + frozen = '0', ) ) else: return AssetBalance( @@ -48,7 +49,8 @@ def make_instance(self, include_optional) -> AssetBalance: total = '100.0', available = '80.5', pending = '0', - locked = '0', ), + locked = '0', + frozen = '0', ), ) """ diff --git a/test/test_balance.py b/test/test_balance.py index 7e581afe..86e0ea95 100644 --- a/test/test_balance.py +++ b/test/test_balance.py @@ -37,7 +37,8 @@ def make_instance(self, include_optional) -> Balance: total = '100.0', available = '80.5', pending = '0', - locked = '0' + locked = '0', + frozen = '0' ) else: return Balance( diff --git a/test/test_balance_update_info.py b/test/test_balance_update_info.py index 2f172e56..9bd72d05 100644 --- a/test/test_balance_update_info.py +++ b/test/test_balance_update_info.py @@ -42,7 +42,8 @@ def make_instance(self, include_optional) -> BalanceUpdateInfo: total = '100.0', available = '80.5', pending = '0', - locked = '0', ) + locked = '0', + frozen = '0', ) ) else: return BalanceUpdateInfo( @@ -54,7 +55,8 @@ def make_instance(self, include_optional) -> BalanceUpdateInfo: total = '100.0', available = '80.5', pending = '0', - locked = '0', ), + locked = '0', + frozen = '0', ), ) """ diff --git a/test/test_balance_update_info_event_data.py b/test/test_balance_update_info_event_data.py index 6e89280b..4821a659 100644 --- a/test/test_balance_update_info_event_data.py +++ b/test/test_balance_update_info_event_data.py @@ -43,7 +43,8 @@ def make_instance(self, include_optional) -> BalanceUpdateInfoEventData: total = '100.0', available = '80.5', pending = '0', - locked = '0', ) + locked = '0', + frozen = '0', ) ) else: return BalanceUpdateInfoEventData( @@ -56,7 +57,8 @@ def make_instance(self, include_optional) -> BalanceUpdateInfoEventData: total = '100.0', available = '80.5', pending = '0', - locked = '0', ), + locked = '0', + frozen = '0', ), ) """ diff --git a/test/test_bridging_fee.py b/test/test_bridging_fee.py index 7c175f87..435bca4b 100644 --- a/test/test_bridging_fee.py +++ b/test/test_bridging_fee.py @@ -36,7 +36,8 @@ def make_instance(self, include_optional) -> BridgingFee: return BridgingFee( fee_amount = '', received_token_id = '', - received_amount = '' + received_amount = '', + bridge_status = 'Completed' ) else: return BridgingFee( diff --git a/test/test_contract_call_params.py b/test/test_contract_call_params.py index 50df69db..b42b7c85 100644 --- a/test/test_contract_call_params.py +++ b/test/test_contract_call_params.py @@ -44,7 +44,11 @@ def make_instance(self, include_optional) -> ContractCallParams: ], fee = None, transaction_process_type = 'AutoProcess', - auto_fuel = 'PassiveAutoFuel' + auto_fuel = 'PassiveAutoFuel', + pre_check = cobo_waas2.models.pre_check.PreCheck( + skip_checks = [ + 'OnchainFeeBalance' + ], ) ) else: return ContractCallParams( diff --git a/test/test_create_counterparty_wallet_address_request.py b/test/test_create_counterparty_wallet_address_request.py deleted file mode 100644 index 1e0bcb45..00000000 --- a/test/test_create_counterparty_wallet_address_request.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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.create_counterparty_wallet_address_request import CreateCounterpartyWalletAddressRequest - - -class TestCreateCounterpartyWalletAddressRequest(unittest.TestCase): - """CreateCounterpartyWalletAddressRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateCounterpartyWalletAddressRequest: - """Test CreateCounterpartyWalletAddressRequest - 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 `CreateCounterpartyWalletAddressRequest` - """ - model = CreateCounterpartyWalletAddressRequest() - if include_optional: - return CreateCounterpartyWalletAddressRequest( - counterparty_id = '123e4567-e89b-12d3-a456-426614174003', - address = '0x1234567890abcdef...', - chain_id = 'TRON' - ) - else: - return CreateCounterpartyWalletAddressRequest( - counterparty_id = '123e4567-e89b-12d3-a456-426614174003', - address = '0x1234567890abcdef...', - chain_id = 'TRON', - ) - """ - - def testCreateCounterpartyWalletAddressRequest(self): - """Test CreateCounterpartyWalletAddressRequest""" - # 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_create_destination_bank_account_request.py b/test/test_create_destination_bank_account_request.py deleted file mode 100644 index 8be17aac..00000000 --- a/test/test_create_destination_bank_account_request.py +++ /dev/null @@ -1,74 +0,0 @@ -# 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.create_destination_bank_account_request import CreateDestinationBankAccountRequest - - -class TestCreateDestinationBankAccountRequest(unittest.TestCase): - """CreateDestinationBankAccountRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateDestinationBankAccountRequest: - """Test CreateDestinationBankAccountRequest - 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 `CreateDestinationBankAccountRequest` - """ - model = CreateDestinationBankAccountRequest() - if include_optional: - return CreateDestinationBankAccountRequest( - destination_id = '123e4567-e89b-12d3-a456-426614174003', - account_alias = 'Main Payout Account', - account_number = '4111111111111111', - swift_code = 'BOFAUS33', - currency = 'USD', - beneficiary_name = 'John Doe', - beneficiary_address = '123 Main St, Anytown, USA', - bank_name = 'ABC Bank', - bank_address = '456 Bank Ave, Cityville, USA', - iban_code = '12345678901234567890', - further_credit = 'further credit sample', - 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', ) - ) - else: - return CreateDestinationBankAccountRequest( - destination_id = '123e4567-e89b-12d3-a456-426614174003', - account_alias = 'Main Payout Account', - account_number = '4111111111111111', - swift_code = 'BOFAUS33', - currency = 'USD', - beneficiary_name = 'John Doe', - beneficiary_address = '123 Main St, Anytown, USA', - bank_name = 'ABC Bank', - bank_address = '456 Bank Ave, Cityville, USA', - ) - """ - - def testCreateDestinationBankAccountRequest(self): - """Test CreateDestinationBankAccountRequest""" - # 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_create_destination_wallet_address_request.py b/test/test_create_destination_wallet_address_request.py deleted file mode 100644 index 81ba74d6..00000000 --- a/test/test_create_destination_wallet_address_request.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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.create_destination_wallet_address_request import CreateDestinationWalletAddressRequest - - -class TestCreateDestinationWalletAddressRequest(unittest.TestCase): - """CreateDestinationWalletAddressRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateDestinationWalletAddressRequest: - """Test CreateDestinationWalletAddressRequest - 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 `CreateDestinationWalletAddressRequest` - """ - model = CreateDestinationWalletAddressRequest() - if include_optional: - return CreateDestinationWalletAddressRequest( - destination_id = '123e4567-e89b-12d3-a456-426614174003', - address = '0x1234567890abcdef...', - chain_id = 'TRON' - ) - else: - return CreateDestinationWalletAddressRequest( - destination_id = '123e4567-e89b-12d3-a456-426614174003', - address = '0x1234567890abcdef...', - chain_id = 'TRON', - ) - """ - - def testCreateDestinationWalletAddressRequest(self): - """Test CreateDestinationWalletAddressRequest""" - # 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_delete_counterparty200_response.py b/test/test_delete_counterparty200_response.py deleted file mode 100644 index aaacb6ae..00000000 --- a/test/test_delete_counterparty200_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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.delete_counterparty200_response import DeleteCounterparty200Response - - -class TestDeleteCounterparty200Response(unittest.TestCase): - """DeleteCounterparty200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DeleteCounterparty200Response: - """Test DeleteCounterparty200Response - 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 `DeleteCounterparty200Response` - """ - model = DeleteCounterparty200Response() - if include_optional: - return DeleteCounterparty200Response( - counterparty_id = '5b0ed293-f728-40b4-b1f6-86b88cd51384' - ) - else: - return DeleteCounterparty200Response( - counterparty_id = '5b0ed293-f728-40b4-b1f6-86b88cd51384', - ) - """ - - def testDeleteCounterparty200Response(self): - """Test DeleteCounterparty200Response""" - # 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_delete_counterparty_wallet_address200_response.py b/test/test_delete_counterparty_wallet_address200_response.py deleted file mode 100644 index 573f84a7..00000000 --- a/test/test_delete_counterparty_wallet_address200_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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.delete_counterparty_wallet_address200_response import DeleteCounterpartyWalletAddress200Response - - -class TestDeleteCounterpartyWalletAddress200Response(unittest.TestCase): - """DeleteCounterpartyWalletAddress200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DeleteCounterpartyWalletAddress200Response: - """Test DeleteCounterpartyWalletAddress200Response - 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 `DeleteCounterpartyWalletAddress200Response` - """ - model = DeleteCounterpartyWalletAddress200Response() - if include_optional: - return DeleteCounterpartyWalletAddress200Response( - wallet_address_id = '445bac57-7428-4d25-bce1-b3cd017f47a1' - ) - else: - return DeleteCounterpartyWalletAddress200Response( - wallet_address_id = '445bac57-7428-4d25-bce1-b3cd017f47a1', - ) - """ - - def testDeleteCounterpartyWalletAddress200Response(self): - """Test DeleteCounterpartyWalletAddress200Response""" - # 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_delete_destination200_response.py b/test/test_delete_destination200_response.py deleted file mode 100644 index bbaad24c..00000000 --- a/test/test_delete_destination200_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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.delete_destination200_response import DeleteDestination200Response - - -class TestDeleteDestination200Response(unittest.TestCase): - """DeleteDestination200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DeleteDestination200Response: - """Test DeleteDestination200Response - 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 `DeleteDestination200Response` - """ - model = DeleteDestination200Response() - if include_optional: - return DeleteDestination200Response( - destination_id = '46beeab4-6a8e-476e-bc69-99b89aacbc6f' - ) - else: - return DeleteDestination200Response( - destination_id = '46beeab4-6a8e-476e-bc69-99b89aacbc6f', - ) - """ - - def testDeleteDestination200Response(self): - """Test DeleteDestination200Response""" - # 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_delete_destination_bank_account200_response.py b/test/test_delete_destination_bank_account200_response.py deleted file mode 100644 index 76bef4ef..00000000 --- a/test/test_delete_destination_bank_account200_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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.delete_destination_bank_account200_response import DeleteDestinationBankAccount200Response - - -class TestDeleteDestinationBankAccount200Response(unittest.TestCase): - """DeleteDestinationBankAccount200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DeleteDestinationBankAccount200Response: - """Test DeleteDestinationBankAccount200Response - 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 `DeleteDestinationBankAccount200Response` - """ - model = DeleteDestinationBankAccount200Response() - if include_optional: - return DeleteDestinationBankAccount200Response( - bank_account_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479' - ) - else: - return DeleteDestinationBankAccount200Response( - bank_account_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479', - ) - """ - - def testDeleteDestinationBankAccount200Response(self): - """Test DeleteDestinationBankAccount200Response""" - # 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_delete_destination_wallet_address200_response.py b/test/test_delete_destination_wallet_address200_response.py deleted file mode 100644 index 51fe9eea..00000000 --- a/test/test_delete_destination_wallet_address200_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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.delete_destination_wallet_address200_response import DeleteDestinationWalletAddress200Response - - -class TestDeleteDestinationWalletAddress200Response(unittest.TestCase): - """DeleteDestinationWalletAddress200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DeleteDestinationWalletAddress200Response: - """Test DeleteDestinationWalletAddress200Response - 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 `DeleteDestinationWalletAddress200Response` - """ - model = DeleteDestinationWalletAddress200Response() - if include_optional: - return DeleteDestinationWalletAddress200Response( - wallet_address_id = '445bac57-7428-4d25-bce1-b3cd017f47a1' - ) - else: - return DeleteDestinationWalletAddress200Response( - wallet_address_id = '445bac57-7428-4d25-bce1-b3cd017f47a1', - ) - """ - - def testDeleteDestinationWalletAddress200Response(self): - """Test DeleteDestinationWalletAddress200Response""" - # 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_enable_destination_whitelist_request.py b/test/test_enable_destination_whitelist_request.py deleted file mode 100644 index 9693e47e..00000000 --- a/test/test_enable_destination_whitelist_request.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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.enable_destination_whitelist_request import EnableDestinationWhitelistRequest - - -class TestEnableDestinationWhitelistRequest(unittest.TestCase): - """EnableDestinationWhitelistRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EnableDestinationWhitelistRequest: - """Test EnableDestinationWhitelistRequest - 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 `EnableDestinationWhitelistRequest` - """ - model = EnableDestinationWhitelistRequest() - if include_optional: - return EnableDestinationWhitelistRequest( - enable_destination_whitelist = False - ) - else: - return EnableDestinationWhitelistRequest( - enable_destination_whitelist = False, - ) - """ - - def testEnableDestinationWhitelistRequest(self): - """Test EnableDestinationWhitelistRequest""" - # 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_graph_ql_request.py b/test/test_graph_ql_request.py index d97b4f41..e5ba2c8b 100644 --- a/test/test_graph_ql_request.py +++ b/test/test_graph_ql_request.py @@ -34,33 +34,13 @@ def make_instance(self, include_optional) -> GraphQLRequest: model = GraphQLRequest() if include_optional: return GraphQLRequest( - query = 'query { - wallets { - edges { - node { - id - name - } - } - } -} -', + query = 'query { wallets { edges { node { id name } } } }', variables = { }, operation_name = 'getWallets' ) else: return GraphQLRequest( - query = 'query { - wallets { - edges { - node { - id - name - } - } - } -} -', + query = 'query { wallets { edges { node { id name } } } }', ) """ diff --git a/test/test_list_address_balances_by_token200_response.py b/test/test_list_address_balances_by_token200_response.py index ec02eda4..72274f13 100644 --- a/test/test_list_address_balances_by_token200_response.py +++ b/test/test_list_address_balances_by_token200_response.py @@ -41,7 +41,8 @@ def make_instance(self, include_optional) -> ListAddressBalancesByToken200Respon total = '100.0', available = '80.5', pending = '0', - locked = '0', ), ) + locked = '0', + frozen = '0', ), ) ], pagination = cobo_waas2.models.pagination.Pagination( before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1', diff --git a/test/test_list_asset_balances_for_exchange_wallet200_response.py b/test/test_list_asset_balances_for_exchange_wallet200_response.py index d3482aa1..0675b604 100644 --- a/test/test_list_asset_balances_for_exchange_wallet200_response.py +++ b/test/test_list_asset_balances_for_exchange_wallet200_response.py @@ -42,7 +42,8 @@ def make_instance(self, include_optional) -> ListAssetBalancesForExchangeWallet2 total = '100.0', available = '80.5', pending = '0', - locked = '0', ), ) + locked = '0', + frozen = '0', ), ) ], pagination = cobo_waas2.models.pagination.Pagination( before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1', diff --git a/test/test_list_counterparty_wallet_address200_response.py b/test/test_list_counterparty_wallet_address200_response.py deleted file mode 100644 index fff5ecc1..00000000 --- a/test/test_list_counterparty_wallet_address200_response.py +++ /dev/null @@ -1,64 +0,0 @@ -# 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.list_counterparty_wallet_address200_response import ListCounterpartyWalletAddress200Response - - -class TestListCounterpartyWalletAddress200Response(unittest.TestCase): - """ListCounterpartyWalletAddress200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListCounterpartyWalletAddress200Response: - """Test ListCounterpartyWalletAddress200Response - 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 `ListCounterpartyWalletAddress200Response` - """ - model = ListCounterpartyWalletAddress200Response() - if include_optional: - return ListCounterpartyWalletAddress200Response( - data = [ - cobo_waas2.models.counterparty_wallet_address_detail.CounterpartyWalletAddressDetail( - counterparty_id = '123e4567-e89b-12d3-a456-426614174003', - counterparty_name = 'Counterparty A', - counterparty_type = 'Individual', - wallet_address_id = '123e4567-e89b-12d3-a456-426614174003', - address = '0x1234567890abcdef...', - chain_id = 'TRON', - updated_timestamp = 1744689600, ) - ], - pagination = cobo_waas2.models.pagination.Pagination( - before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1', - after = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk', - total_count = 10000, ) - ) - else: - return ListCounterpartyWalletAddress200Response( - ) - """ - - def testListCounterpartyWalletAddress200Response(self): - """Test ListCounterpartyWalletAddress200Response""" - # 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_list_destination_bank_accounts200_response.py b/test/test_list_destination_bank_accounts200_response.py deleted file mode 100644 index e2b38447..00000000 --- a/test/test_list_destination_bank_accounts200_response.py +++ /dev/null @@ -1,82 +0,0 @@ -# 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.list_destination_bank_accounts200_response import ListDestinationBankAccounts200Response - - -class TestListDestinationBankAccounts200Response(unittest.TestCase): - """ListDestinationBankAccounts200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListDestinationBankAccounts200Response: - """Test ListDestinationBankAccounts200Response - 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 `ListDestinationBankAccounts200Response` - """ - model = ListDestinationBankAccounts200Response() - if include_optional: - return ListDestinationBankAccounts200Response( - data = [ - cobo_waas2.models.destination_bank_account_detail.DestinationBankAccountDetail( - destination_id = '123e4567-e89b-12d3-a456-426614174003', - destination_name = 'Destination A', - destination_type = 'Individual', - destination_email = 'destination@example.com', - destination_country = 'USA', - destination_contact_address = '123 Main St, Anytown, USA', - destination_merchant_id = 'M1001', - bank_account_id = '123e4567-e89b-12d3-a456-426614174003', - account_alias = 'Main Payout Account', - account_number = '4111111111111111', - swift_code = 'BOFAUS33', - currency = 'USD', - beneficiary_name = 'John Doe', - beneficiary_address = '123 Main St, Anytown, USA', - bank_name = 'ABC Bank', - bank_address = '456 Bank Ave, Cityville, USA', - iban_code = '12345678901234567890', - further_credit = 'further credit sample', - 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_account_status = 'Pending', - created_timestamp = 1744689600, - updated_timestamp = 1744689600, ) - ], - pagination = cobo_waas2.models.pagination.Pagination( - before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1', - after = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk', - total_count = 10000, ) - ) - else: - return ListDestinationBankAccounts200Response( - ) - """ - - def testListDestinationBankAccounts200Response(self): - """Test ListDestinationBankAccounts200Response""" - # 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_list_destination_wallet_addresses200_response.py b/test/test_list_destination_wallet_addresses200_response.py deleted file mode 100644 index f2ec76d5..00000000 --- a/test/test_list_destination_wallet_addresses200_response.py +++ /dev/null @@ -1,65 +0,0 @@ -# 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.list_destination_wallet_addresses200_response import ListDestinationWalletAddresses200Response - - -class TestListDestinationWalletAddresses200Response(unittest.TestCase): - """ListDestinationWalletAddresses200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListDestinationWalletAddresses200Response: - """Test ListDestinationWalletAddresses200Response - 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 `ListDestinationWalletAddresses200Response` - """ - model = ListDestinationWalletAddresses200Response() - if include_optional: - return ListDestinationWalletAddresses200Response( - data = [ - cobo_waas2.models.destination_wallet_address_detail.DestinationWalletAddressDetail( - destination_id = '123e4567-e89b-12d3-a456-426614174003', - destination_name = 'Destination A', - destination_type = 'Individual', - merchant_id = 'M1001', - wallet_address_id = '123e4567-e89b-12d3-a456-426614174003', - address = '0x1234567890abcdef...', - chain_id = 'TRON', - updated_timestamp = 1744689600, ) - ], - pagination = cobo_waas2.models.pagination.Pagination( - before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1', - after = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk', - total_count = 10000, ) - ) - else: - return ListDestinationWalletAddresses200Response( - ) - """ - - def testListDestinationWalletAddresses200Response(self): - """Test ListDestinationWalletAddresses200Response""" - # 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_list_payouts200_response.py b/test/test_list_payouts200_response.py index 5366c835..a85be4f9 100644 --- a/test/test_list_payouts200_response.py +++ b/test/test_list_payouts200_response.py @@ -47,7 +47,8 @@ def make_instance(self, include_optional) -> ListPayouts200Response: bridging_fee = cobo_waas2.models.bridging_fee.BridgingFee( fee_amount = '', received_token_id = '', - received_amount = '', ), ) + received_amount = '', + bridge_status = 'Completed', ), ) ], recipient_info = cobo_waas2.models.payment_payout_recipient_info.PaymentPayoutRecipientInfo( address = '0x9876543210abcdef1234567890abcdef12345678', @@ -56,8 +57,12 @@ def make_instance(self, include_optional) -> ListPayouts200Response: bank_account_id = '123e4567-e89b-12d3-a456-426614174003', ), initiator = 'b2ae1b5aaade686c968ef2bbd31cc75ba94e5a85fd9cb0b35b81dcc15f520e9d', actual_payout_amount = '500.00', - status = 'Pending', + commission_fees = [ + cobo_waas2.models.commission_fee.CommissionFee( + fee_amount = '', ) + ], remark = 'Payout for customer 123', + status = 'Pending', created_timestamp = 1744689600, updated_timestamp = 1744689600, ) ], diff --git a/test/test_list_settlement_details200_response.py b/test/test_list_settlement_details200_response.py index 50fda0cb..fe661784 100644 --- a/test/test_list_settlement_details200_response.py +++ b/test/test_list_settlement_details200_response.py @@ -94,7 +94,8 @@ def make_instance(self, include_optional) -> ListSettlementDetails200Response: bridging_fee = cobo_waas2.models.bridging_fee.BridgingFee( fee_amount = '', received_token_id = '', - received_amount = '', ), ) + received_amount = '', + bridge_status = 'Completed', ), ) ], pagination = cobo_waas2.models.pagination.Pagination( before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1', diff --git a/test/test_list_settlement_requests200_response.py b/test/test_list_settlement_requests200_response.py index b47b781a..550243b1 100644 --- a/test/test_list_settlement_requests200_response.py +++ b/test/test_list_settlement_requests200_response.py @@ -98,7 +98,8 @@ def make_instance(self, include_optional) -> ListSettlementRequests200Response: bridging_fee = cobo_waas2.models.bridging_fee.BridgingFee( fee_amount = '', received_token_id = '', - received_amount = '', ), ) + received_amount = '', + bridge_status = 'Completed', ), ) ], created_timestamp = 1744689600, updated_timestamp = 1744689600, diff --git a/test/test_list_token_balances_for_address200_response.py b/test/test_list_token_balances_for_address200_response.py index 9401c279..53cd7829 100644 --- a/test/test_list_token_balances_for_address200_response.py +++ b/test/test_list_token_balances_for_address200_response.py @@ -41,7 +41,8 @@ def make_instance(self, include_optional) -> ListTokenBalancesForAddress200Respo total = '100.0', available = '80.5', pending = '0', - locked = '0', ), ) + locked = '0', + frozen = '0', ), ) ], pagination = cobo_waas2.models.pagination.Pagination( before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1', diff --git a/test/test_list_token_balances_for_fee_station200_response.py b/test/test_list_token_balances_for_fee_station200_response.py index 7239a1be..f578dce8 100644 --- a/test/test_list_token_balances_for_fee_station200_response.py +++ b/test/test_list_token_balances_for_fee_station200_response.py @@ -42,7 +42,8 @@ def make_instance(self, include_optional) -> ListTokenBalancesForFeeStation200Re total = '100.0', available = '80.5', pending = '0', - locked = '0', ), ) + locked = '0', + frozen = '0', ), ) ], pagination = cobo_waas2.models.pagination.Pagination( before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1', diff --git a/test/test_list_token_balances_for_fee_station200_response_data_inner.py b/test/test_list_token_balances_for_fee_station200_response_data_inner.py index 8ec9cb4d..641c8b11 100644 --- a/test/test_list_token_balances_for_fee_station200_response_data_inner.py +++ b/test/test_list_token_balances_for_fee_station200_response_data_inner.py @@ -40,7 +40,8 @@ def make_instance(self, include_optional) -> ListTokenBalancesForFeeStation200Re total = '100.0', available = '80.5', pending = '0', - locked = '0', ) + locked = '0', + frozen = '0', ) ) else: return ListTokenBalancesForFeeStation200ResponseDataInner( @@ -49,7 +50,8 @@ def make_instance(self, include_optional) -> ListTokenBalancesForFeeStation200Re total = '100.0', available = '80.5', pending = '0', - locked = '0', ), + locked = '0', + frozen = '0', ), ) """ diff --git a/test/test_payment_api.py b/test/test_payment_api.py index 9eca2046..153bbb5c 100644 --- a/test/test_payment_api.py +++ b/test/test_payment_api.py @@ -102,18 +102,6 @@ def test_create_counterparty_entry(self) -> None: api_response = self.api.create_counterparty_entry(create_counterparty_entry_request=create_counterparty_entry_request) """ - def test_create_counterparty_wallet_address(self) -> None: - """ - Test case for create_counterparty_wallet_address - - Create counterparty wallet address - """ - """ - create_counterparty_wallet_address_request = cobo_waas2.CreateCounterpartyWalletAddressRequest() - - api_response = self.api.create_counterparty_wallet_address(create_counterparty_wallet_address_request=create_counterparty_wallet_address_request) - """ - def test_create_crypto_address(self) -> None: """ Test case for create_crypto_address @@ -138,18 +126,6 @@ def test_create_destination(self) -> None: api_response = self.api.create_destination(create_destination_request=create_destination_request) """ - def test_create_destination_bank_account(self) -> None: - """ - Test case for create_destination_bank_account - - Create destination bank account - """ - """ - create_destination_bank_account_request = cobo_waas2.CreateDestinationBankAccountRequest() - - api_response = self.api.create_destination_bank_account(create_destination_bank_account_request=create_destination_bank_account_request) - """ - def test_create_destination_entry(self) -> None: """ Test case for create_destination_entry @@ -162,18 +138,6 @@ def test_create_destination_entry(self) -> None: api_response = self.api.create_destination_entry(create_destination_entry_request=create_destination_entry_request) """ - def test_create_destination_wallet_address(self) -> None: - """ - Test case for create_destination_wallet_address - - Create destination wallet address - """ - """ - create_destination_wallet_address_request = cobo_waas2.CreateDestinationWalletAddressRequest() - - api_response = self.api.create_destination_wallet_address(create_destination_wallet_address_request=create_destination_wallet_address_request) - """ - def test_create_forced_sweep_request(self) -> None: """ Test case for create_forced_sweep_request @@ -294,18 +258,6 @@ def test_create_top_up_addresses(self) -> None: api_response = self.api.create_top_up_addresses(create_top_up_addresses=create_top_up_addresses) """ - def test_delete_counterparty(self) -> None: - """ - Test case for delete_counterparty - - Delete counterparty (Deprecated) - """ - """ - counterparty_id = '5b0ed293-f728-40b4-b1f6-86b88cd51384' - - api_response = self.api.delete_counterparty(counterparty_id) - """ - def test_delete_counterparty_by_id(self) -> None: """ Test case for delete_counterparty_by_id @@ -332,18 +284,6 @@ def test_delete_counterparty_entry(self) -> None: api_response = self.api.delete_counterparty_entry(counterparty_entry_id, counterparty_id, entry_type=entry_type) """ - def test_delete_counterparty_wallet_address(self) -> None: - """ - Test case for delete_counterparty_wallet_address - - Delete counterparty wallet address - """ - """ - wallet_address_id = '445bac57-7428-4d25-bce1-b3cd017f47a1' - - api_response = self.api.delete_counterparty_wallet_address(wallet_address_id) - """ - def test_delete_crypto_address(self) -> None: """ Test case for delete_crypto_address @@ -356,30 +296,6 @@ def test_delete_crypto_address(self) -> None: api_response = self.api.delete_crypto_address(crypto_address_id) """ - def test_delete_destination(self) -> None: - """ - Test case for delete_destination - - Delete destination (Deprecated) - """ - """ - destination_id = '46beeab4-6a8e-476e-bc69-99b89aacbc6f' - - api_response = self.api.delete_destination(destination_id) - """ - - def test_delete_destination_bank_account(self) -> None: - """ - Test case for delete_destination_bank_account - - Delete destination bank account - """ - """ - bank_account_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479' - - api_response = self.api.delete_destination_bank_account(bank_account_id) - """ - def test_delete_destination_by_id(self) -> None: """ Test case for delete_destination_by_id @@ -406,30 +322,6 @@ def test_delete_destination_entry(self) -> None: api_response = self.api.delete_destination_entry(destination_entry_id, destination_id, entry_type) """ - def test_delete_destination_wallet_address(self) -> None: - """ - Test case for delete_destination_wallet_address - - Delete destination wallet address - """ - """ - wallet_address_id = '445bac57-7428-4d25-bce1-b3cd017f47a1' - - api_response = self.api.delete_destination_wallet_address(wallet_address_id) - """ - - def test_enable_destination_whitelist(self) -> None: - """ - Test case for enable_destination_whitelist - - Enable or disable destination whitelist - """ - """ - enable_destination_whitelist_request = cobo_waas2.EnableDestinationWhitelistRequest() - - api_response = self.api.enable_destination_whitelist(enable_destination_whitelist_request=enable_destination_whitelist_request) - """ - def test_get_available_allocation_amount(self) -> None: """ Test case for get_available_allocation_amount @@ -480,18 +372,6 @@ def test_get_counterparty(self) -> None: api_response = self.api.get_counterparty(counterparty_id) """ - def test_get_counterparty_detail_by_id(self) -> None: - """ - Test case for get_counterparty_detail_by_id - - Get counterparty information (Deprecated) - """ - """ - counterparty_id = '5b0ed293-f728-40b4-b1f6-86b88cd51384' - - api_response = self.api.get_counterparty_detail_by_id(counterparty_id) - """ - def test_get_counterparty_entry(self) -> None: """ Test case for get_counterparty_entry @@ -517,30 +397,6 @@ def test_get_destination(self) -> None: api_response = self.api.get_destination(destination_id) """ - def test_get_destination_bank_account_detail_by_id(self) -> None: - """ - Test case for get_destination_bank_account_detail_by_id - - Get destination bank account information - """ - """ - bank_account_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479' - - api_response = self.api.get_destination_bank_account_detail_by_id(bank_account_id) - """ - - def test_get_destination_detail_by_id(self) -> None: - """ - Test case for get_destination_detail_by_id - - Get destination information (Deprecated) - """ - """ - destination_id = '46beeab4-6a8e-476e-bc69-99b89aacbc6f' - - api_response = self.api.get_destination_detail_by_id(destination_id) - """ - def test_get_destination_entry(self) -> None: """ Test case for get_destination_entry @@ -782,23 +638,6 @@ def test_list_counterparty_entries(self) -> None: api_response = self.api.list_counterparty_entries(limit=limit, before=before, after=after, entry_type=entry_type, counterparty_id=counterparty_id, chain_ids=chain_ids, wallet_address=wallet_address) """ - def test_list_counterparty_wallet_address(self) -> None: - """ - Test case for list_counterparty_wallet_address - - List counterparty wallet addresses - """ - """ - limit = 10 - before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1' - after = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk' - counterparty_id = '5b0ed293-f728-40b4-b1f6-86b88cd51384' - chain_ids = 'ETH' - wallet_address = '0x1234567890abcdef...' - - api_response = self.api.list_counterparty_wallet_address(limit=limit, before=before, after=after, counterparty_id=counterparty_id, chain_ids=chain_ids, wallet_address=wallet_address) - """ - def test_list_crypto_addresses(self) -> None: """ Test case for list_crypto_addresses @@ -811,23 +650,6 @@ def test_list_crypto_addresses(self) -> None: api_response = self.api.list_crypto_addresses(token_id=token_id) """ - def test_list_destination_bank_accounts(self) -> None: - """ - Test case for list_destination_bank_accounts - - List destination bank accounts - """ - """ - limit = 10 - before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1' - after = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk' - keyword = 'keyword' - destination_id = '46beeab4-6a8e-476e-bc69-99b89aacbc6f' - bank_account_status = cobo_waas2.BankAccountStatus() - - api_response = self.api.list_destination_bank_accounts(limit=limit, before=before, after=after, keyword=keyword, destination_id=destination_id, bank_account_status=bank_account_status) - """ - def test_list_destination_entries(self) -> None: """ Test case for list_destination_entries @@ -848,23 +670,6 @@ def test_list_destination_entries(self) -> None: api_response = self.api.list_destination_entries(entry_type, limit=limit, before=before, after=after, destination_id=destination_id, chain_ids=chain_ids, wallet_address=wallet_address, keyword=keyword, bank_account_status=bank_account_status) """ - def test_list_destination_wallet_addresses(self) -> None: - """ - Test case for list_destination_wallet_addresses - - List destination wallet addresses - """ - """ - limit = 10 - before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1' - after = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk' - destination_id = '46beeab4-6a8e-476e-bc69-99b89aacbc6f' - chain_ids = 'ETH' - wallet_address = '0x1234567890abcdef...' - - api_response = self.api.list_destination_wallet_addresses(limit=limit, before=before, after=after, destination_id=destination_id, chain_ids=chain_ids, wallet_address=wallet_address) - """ - def test_list_destinations(self) -> None: """ Test case for list_destinations @@ -950,7 +755,7 @@ def test_list_payment_supported_tokens(self) -> None: """ Test case for list_payment_supported_tokens - List all supported tokens + List supported tokens """ """ @@ -1060,17 +865,6 @@ def test_payment_estimate_fee(self) -> None: api_response = self.api.payment_estimate_fee(payment_estimate_fee_request=payment_estimate_fee_request) """ - def test_query_destination_whitelist_enabled(self) -> None: - """ - Test case for query_destination_whitelist_enabled - - Query destination whitelist enabled status - """ - """ - - api_response = self.api.query_destination_whitelist_enabled() - """ - def test_update_bank_account_by_id(self) -> None: """ Test case for update_bank_account_by_id @@ -1097,19 +891,6 @@ def test_update_counterparty(self) -> None: api_response = self.api.update_counterparty(counterparty_id, update_counterparty_request=update_counterparty_request) """ - def test_update_counterparty_by_id(self) -> None: - """ - Test case for update_counterparty_by_id - - Update counterparty (Deprecated) - """ - """ - counterparty_id = '5b0ed293-f728-40b4-b1f6-86b88cd51384' - update_counterparty_by_id_request = cobo_waas2.UpdateCounterpartyByIdRequest() - - api_response = self.api.update_counterparty_by_id(counterparty_id, update_counterparty_by_id_request=update_counterparty_by_id_request) - """ - def test_update_destination(self) -> None: """ Test case for update_destination @@ -1123,32 +904,6 @@ def test_update_destination(self) -> None: api_response = self.api.update_destination(destination_id, update_destination_request=update_destination_request) """ - def test_update_destination_bank_account_by_id(self) -> None: - """ - Test case for update_destination_bank_account_by_id - - Update destination bank account - """ - """ - bank_account_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479' - update_destination_bank_account = cobo_waas2.UpdateDestinationBankAccount() - - api_response = self.api.update_destination_bank_account_by_id(bank_account_id, update_destination_bank_account=update_destination_bank_account) - """ - - def test_update_destination_by_id(self) -> None: - """ - Test case for update_destination_by_id - - Update destination (Deprecated) - """ - """ - destination_id = '46beeab4-6a8e-476e-bc69-99b89aacbc6f' - update_destination_by_id_request = cobo_waas2.UpdateDestinationByIdRequest() - - api_response = self.api.update_destination_by_id(destination_id, update_destination_by_id_request=update_destination_by_id_request) - """ - def test_update_destination_entry(self) -> None: """ Test case for update_destination_entry diff --git a/test/test_payment_bridge_status.py b/test/test_payment_bridge_status.py new file mode 100644 index 00000000..69a18c57 --- /dev/null +++ b/test/test_payment_bridge_status.py @@ -0,0 +1,33 @@ +# 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.payment_bridge_status import PaymentBridgeStatus + + +class TestPaymentBridgeStatus(unittest.TestCase): + """PaymentBridgeStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPaymentBridgeStatus(self): + """Test PaymentBridgeStatus""" + # inst = PaymentBridgeStatus() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_estimate_fee201_response.py b/test/test_payment_estimate_fee201_response.py index ea811664..f04eec56 100644 --- a/test/test_payment_estimate_fee201_response.py +++ b/test/test_payment_estimate_fee201_response.py @@ -43,7 +43,8 @@ def make_instance(self, include_optional) -> PaymentEstimateFee201Response: bridging_fee = cobo_waas2.models.bridging_fee.BridgingFee( fee_amount = '', received_token_id = '', - received_amount = '', ), + received_amount = '', + bridge_status = 'Completed', ), otc_fee = cobo_waas2.models.otc_fee.OtcFee( fee_rate = '', token_id = '', ), ) diff --git a/test/test_payment_estimated_fee.py b/test/test_payment_estimated_fee.py index 5d0b2942..50ca5483 100644 --- a/test/test_payment_estimated_fee.py +++ b/test/test_payment_estimated_fee.py @@ -41,7 +41,8 @@ def make_instance(self, include_optional) -> PaymentEstimatedFee: bridging_fee = cobo_waas2.models.bridging_fee.BridgingFee( fee_amount = '', received_token_id = '', - received_amount = '', ), + received_amount = '', + bridge_status = 'Completed', ), otc_fee = cobo_waas2.models.otc_fee.OtcFee( fee_rate = '', token_id = '', ) diff --git a/test/test_payment_payout.py b/test/test_payment_payout.py index 52354c0a..24589b2a 100644 --- a/test/test_payment_payout.py +++ b/test/test_payment_payout.py @@ -45,7 +45,8 @@ def make_instance(self, include_optional) -> PaymentPayout: bridging_fee = cobo_waas2.models.bridging_fee.BridgingFee( fee_amount = '', received_token_id = '', - received_amount = '', ), ) + received_amount = '', + bridge_status = 'Completed', ), ) ], recipient_info = cobo_waas2.models.payment_payout_recipient_info.PaymentPayoutRecipientInfo( address = '0x9876543210abcdef1234567890abcdef12345678', @@ -54,8 +55,12 @@ def make_instance(self, include_optional) -> PaymentPayout: bank_account_id = '123e4567-e89b-12d3-a456-426614174003', ), initiator = 'b2ae1b5aaade686c968ef2bbd31cc75ba94e5a85fd9cb0b35b81dcc15f520e9d', actual_payout_amount = '500.00', - status = 'Pending', + commission_fees = [ + cobo_waas2.models.commission_fee.CommissionFee( + fee_amount = '', ) + ], remark = 'Payout for customer 123', + status = 'Pending', created_timestamp = 1744689600, updated_timestamp = 1744689600 ) diff --git a/test/test_payment_payout_detail.py b/test/test_payment_payout_detail.py index 1e54617e..71f75de9 100644 --- a/test/test_payment_payout_detail.py +++ b/test/test_payment_payout_detail.py @@ -45,7 +45,8 @@ def make_instance(self, include_optional) -> PaymentPayoutDetail: bridging_fee = cobo_waas2.models.bridging_fee.BridgingFee( fee_amount = '', received_token_id = '', - received_amount = '', ), ) + received_amount = '', + bridge_status = 'Completed', ), ) ], recipient_info = cobo_waas2.models.payment_payout_recipient_info.PaymentPayoutRecipientInfo( address = '0x9876543210abcdef1234567890abcdef12345678', @@ -54,8 +55,12 @@ def make_instance(self, include_optional) -> PaymentPayoutDetail: bank_account_id = '123e4567-e89b-12d3-a456-426614174003', ), initiator = 'b2ae1b5aaade686c968ef2bbd31cc75ba94e5a85fd9cb0b35b81dcc15f520e9d', actual_payout_amount = '500.00', - status = 'Pending', + commission_fees = [ + cobo_waas2.models.commission_fee.CommissionFee( + fee_amount = '', ) + ], remark = 'Payout for customer 123', + status = 'Pending', created_timestamp = 1744689600, updated_timestamp = 1744689600, transactions = [ diff --git a/test/test_payment_payout_event.py b/test/test_payment_payout_event.py index f541e74f..6ce20124 100644 --- a/test/test_payment_payout_event.py +++ b/test/test_payment_payout_event.py @@ -46,7 +46,8 @@ def make_instance(self, include_optional) -> PaymentPayoutEvent: bridging_fee = cobo_waas2.models.bridging_fee.BridgingFee( fee_amount = '', received_token_id = '', - received_amount = '', ), ) + received_amount = '', + bridge_status = 'Completed', ), ) ], recipient_info = cobo_waas2.models.payment_payout_recipient_info.PaymentPayoutRecipientInfo( address = '0x9876543210abcdef1234567890abcdef12345678', @@ -55,8 +56,12 @@ def make_instance(self, include_optional) -> PaymentPayoutEvent: bank_account_id = '123e4567-e89b-12d3-a456-426614174003', ), initiator = 'b2ae1b5aaade686c968ef2bbd31cc75ba94e5a85fd9cb0b35b81dcc15f520e9d', actual_payout_amount = '500.00', - status = 'Pending', + commission_fees = [ + cobo_waas2.models.commission_fee.CommissionFee( + fee_amount = '', ) + ], remark = 'Payout for customer 123', + status = 'Pending', created_timestamp = 1744689600, updated_timestamp = 1744689600, transactions = [ diff --git a/test/test_payment_payout_item.py b/test/test_payment_payout_item.py index ef0a2f59..d67ee5cd 100644 --- a/test/test_payment_payout_item.py +++ b/test/test_payment_payout_item.py @@ -39,7 +39,8 @@ def make_instance(self, include_optional) -> PaymentPayoutItem: bridging_fee = cobo_waas2.models.bridging_fee.BridgingFee( fee_amount = '', received_token_id = '', - received_amount = '', ) + received_amount = '', + bridge_status = 'Completed', ) ) else: return PaymentPayoutItem( diff --git a/test/test_payment_settlement_event.py b/test/test_payment_settlement_event.py index 0c490da4..33121b11 100644 --- a/test/test_payment_settlement_event.py +++ b/test/test_payment_settlement_event.py @@ -98,7 +98,8 @@ def make_instance(self, include_optional) -> PaymentSettlementEvent: bridging_fee = cobo_waas2.models.bridging_fee.BridgingFee( fee_amount = '', received_token_id = '', - received_amount = '', ), ) + received_amount = '', + bridge_status = 'Completed', ), ) ], created_timestamp = 1744689600, updated_timestamp = 1744689600, @@ -180,7 +181,8 @@ def make_instance(self, include_optional) -> PaymentSettlementEvent: bridging_fee = cobo_waas2.models.bridging_fee.BridgingFee( fee_amount = '', received_token_id = '', - received_amount = '', ), ) + received_amount = '', + bridge_status = 'Completed', ), ) ], ) """ diff --git a/test/test_pre_check.py b/test/test_pre_check.py new file mode 100644 index 00000000..e4ef5088 --- /dev/null +++ b/test/test_pre_check.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.pre_check import PreCheck + + +class TestPreCheck(unittest.TestCase): + """PreCheck unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PreCheck: + """Test PreCheck + 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 `PreCheck` + """ + model = PreCheck() + if include_optional: + return PreCheck( + skip_checks = [ + 'OnchainFeeBalance' + ] + ) + else: + return PreCheck( + ) + """ + + def testPreCheck(self): + """Test PreCheck""" + # 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_query_destination_whitelist_enabled200_response.py b/test/test_query_destination_whitelist_enabled200_response.py deleted file mode 100644 index 259f94c8..00000000 --- a/test/test_query_destination_whitelist_enabled200_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# 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.query_destination_whitelist_enabled200_response import QueryDestinationWhitelistEnabled200Response - - -class TestQueryDestinationWhitelistEnabled200Response(unittest.TestCase): - """QueryDestinationWhitelistEnabled200Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> QueryDestinationWhitelistEnabled200Response: - """Test QueryDestinationWhitelistEnabled200Response - 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 `QueryDestinationWhitelistEnabled200Response` - """ - model = QueryDestinationWhitelistEnabled200Response() - if include_optional: - return QueryDestinationWhitelistEnabled200Response( - enable_destination_whitelist = False - ) - else: - return QueryDestinationWhitelistEnabled200Response( - enable_destination_whitelist = False, - ) - """ - - def testQueryDestinationWhitelistEnabled200Response(self): - """Test QueryDestinationWhitelistEnabled200Response""" - # 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_settlement.py b/test/test_settlement.py index df834b77..3844f8e7 100644 --- a/test/test_settlement.py +++ b/test/test_settlement.py @@ -97,7 +97,8 @@ def make_instance(self, include_optional) -> Settlement: bridging_fee = cobo_waas2.models.bridging_fee.BridgingFee( fee_amount = '', received_token_id = '', - received_amount = '', ), ) + received_amount = '', + bridge_status = 'Completed', ), ) ], created_timestamp = 1744689600, updated_timestamp = 1744689600, @@ -178,7 +179,8 @@ def make_instance(self, include_optional) -> Settlement: bridging_fee = cobo_waas2.models.bridging_fee.BridgingFee( fee_amount = '', received_token_id = '', - received_amount = '', ), ) + received_amount = '', + bridge_status = 'Completed', ), ) ], ) """ diff --git a/test/test_settlement_detail.py b/test/test_settlement_detail.py index c8e21eee..a96aeb77 100644 --- a/test/test_settlement_detail.py +++ b/test/test_settlement_detail.py @@ -92,7 +92,8 @@ def make_instance(self, include_optional) -> SettlementDetail: bridging_fee = cobo_waas2.models.bridging_fee.BridgingFee( fee_amount = '', received_token_id = '', - received_amount = '', ) + received_amount = '', + bridge_status = 'Completed', ) ) else: return SettlementDetail( diff --git a/test/test_skip_check_type.py b/test/test_skip_check_type.py new file mode 100644 index 00000000..2e31a9e8 --- /dev/null +++ b/test/test_skip_check_type.py @@ -0,0 +1,33 @@ +# 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.skip_check_type import SkipCheckType + + +class TestSkipCheckType(unittest.TestCase): + """SkipCheckType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSkipCheckType(self): + """Test SkipCheckType""" + # inst = SkipCheckType() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sub_wallet_asset_balance.py b/test/test_sub_wallet_asset_balance.py index a1134f4a..751342e9 100644 --- a/test/test_sub_wallet_asset_balance.py +++ b/test/test_sub_wallet_asset_balance.py @@ -40,7 +40,8 @@ def make_instance(self, include_optional) -> SubWalletAssetBalance: total = '100.0', available = '80.5', pending = '0', - locked = '0', ) + locked = '0', + frozen = '0', ) ) else: return SubWalletAssetBalance( @@ -49,7 +50,8 @@ def make_instance(self, include_optional) -> SubWalletAssetBalance: total = '100.0', available = '80.5', pending = '0', - locked = '0', ), + locked = '0', + frozen = '0', ), ) """ diff --git a/test/test_supported_token.py b/test/test_supported_token.py index 9600e08a..634bd921 100644 --- a/test/test_supported_token.py +++ b/test/test_supported_token.py @@ -41,8 +41,8 @@ def make_instance(self, include_optional) -> SupportedToken: token_address = '0xdac17f958d2ee523a2206206994597c13d831ec7', chain_id = 'ETH', chain_symbol = 'ETH', - chain_icon_url = 'https://example.com/icons/eth.png', - token_icon_url = 'https://example.com/icons/usdt.png', + chain_icon_url = 'https://d.cobo.com/public/logos/ETH.png', + token_icon_url = 'https://d.cobo.com/public/logos/USDT.png', can_off_ramp = True ) else: diff --git a/test/test_token_balance.py b/test/test_token_balance.py index ec46bff9..61a22413 100644 --- a/test/test_token_balance.py +++ b/test/test_token_balance.py @@ -39,7 +39,8 @@ def make_instance(self, include_optional) -> TokenBalance: total = '100.0', available = '80.5', pending = '0', - locked = '0', ) + locked = '0', + frozen = '0', ) ) else: return TokenBalance( @@ -48,7 +49,8 @@ def make_instance(self, include_optional) -> TokenBalance: total = '100.0', available = '80.5', pending = '0', - locked = '0', ), + locked = '0', + frozen = '0', ), ) """ diff --git a/test/test_transfer_params.py b/test/test_transfer_params.py index 29caf0fb..ebb84a25 100644 --- a/test/test_transfer_params.py +++ b/test/test_transfer_params.py @@ -44,7 +44,11 @@ def make_instance(self, include_optional) -> TransferParams: description = 'Transfer from wallet', fee = None, transaction_process_type = 'AutoProcess', - auto_fuel = 'PassiveAutoFuel' + auto_fuel = 'PassiveAutoFuel', + pre_check = cobo_waas2.models.pre_check.PreCheck( + skip_checks = [ + 'OnchainFeeBalance' + ], ) ) else: return TransferParams( diff --git a/test/test_update_counterparty_by_id_request.py b/test/test_update_counterparty_by_id_request.py deleted file mode 100644 index cc36b2a8..00000000 --- a/test/test_update_counterparty_by_id_request.py +++ /dev/null @@ -1,57 +0,0 @@ -# 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.update_counterparty_by_id_request import UpdateCounterpartyByIdRequest - - -class TestUpdateCounterpartyByIdRequest(unittest.TestCase): - """UpdateCounterpartyByIdRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateCounterpartyByIdRequest: - """Test UpdateCounterpartyByIdRequest - 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 `UpdateCounterpartyByIdRequest` - """ - model = UpdateCounterpartyByIdRequest() - if include_optional: - return UpdateCounterpartyByIdRequest( - counterparty_name = 'Counterparty A', - counterparty_type = 'Individual', - country = 'USA', - email = 'counterparty@example.com', - contact_address = '123 Main St, Anytown, USA' - ) - else: - return UpdateCounterpartyByIdRequest( - counterparty_name = 'Counterparty A', - counterparty_type = 'Individual', - ) - """ - - def testUpdateCounterpartyByIdRequest(self): - """Test UpdateCounterpartyByIdRequest""" - # 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_update_destination_by_id_request.py b/test/test_update_destination_by_id_request.py deleted file mode 100644 index 0de043db..00000000 --- a/test/test_update_destination_by_id_request.py +++ /dev/null @@ -1,58 +0,0 @@ -# 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.update_destination_by_id_request import UpdateDestinationByIdRequest - - -class TestUpdateDestinationByIdRequest(unittest.TestCase): - """UpdateDestinationByIdRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateDestinationByIdRequest: - """Test UpdateDestinationByIdRequest - 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 `UpdateDestinationByIdRequest` - """ - model = UpdateDestinationByIdRequest() - if include_optional: - return UpdateDestinationByIdRequest( - destination_name = 'Destination A', - destination_type = 'Individual', - merchant_id = 'M1001', - country = 'USA', - email = 'destination@example.com', - contact_address = '123 Main St, Anytown, USA' - ) - else: - return UpdateDestinationByIdRequest( - destination_name = 'Destination A', - destination_type = 'Individual', - ) - """ - - def testUpdateDestinationByIdRequest(self): - """Test UpdateDestinationByIdRequest""" - # 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_webhook_event_data.py b/test/test_webhook_event_data.py index b85ea82d..a45ec78e 100644 --- a/test/test_webhook_event_data.py +++ b/test/test_webhook_event_data.py @@ -176,7 +176,8 @@ def make_instance(self, include_optional) -> WebhookEventData: total = '100.0', available = '80.5', pending = '0', - locked = '0', ), + locked = '0', + frozen = '0', ), token_ids = '', operation_type = 'Added', order_id = 'O20250304-M1001-1001', @@ -297,7 +298,8 @@ def make_instance(self, include_optional) -> WebhookEventData: bridging_fee = cobo_waas2.models.bridging_fee.BridgingFee( fee_amount = '', received_token_id = '', - received_amount = '', ), ) + received_amount = '', + bridge_status = 'Completed', ), ) ], acquiring_type = 'Order', payout_channel = 'Crypto', @@ -322,7 +324,8 @@ def make_instance(self, include_optional) -> WebhookEventData: bridging_fee = cobo_waas2.models.bridging_fee.BridgingFee( fee_amount = '', received_token_id = '', - received_amount = '', ), ) + received_amount = '', + bridge_status = 'Completed', ), ) ], recipient_info = cobo_waas2.models.payment_payout_recipient_info.PaymentPayoutRecipientInfo( address = '0x9876543210abcdef1234567890abcdef12345678', @@ -330,6 +333,10 @@ def make_instance(self, include_optional) -> WebhookEventData: currency = 'USD', bank_account_id = '123e4567-e89b-12d3-a456-426614174003', ), actual_payout_amount = '500.00', + commission_fees = [ + cobo_waas2.models.commission_fee.CommissionFee( + fee_amount = '', ) + ], remark = 'Payout for customer 123', bulk_send_id = '123e4567-e89b-12d3-a456-426614174003', execution_mode = 'Strict', @@ -394,7 +401,8 @@ def make_instance(self, include_optional) -> WebhookEventData: total = '100.0', available = '80.5', pending = '0', - locked = '0', ), + locked = '0', + frozen = '0', ), token_ids = '', operation_type = 'Added', order_id = 'O20250304-M1001-1001', @@ -468,7 +476,8 @@ def make_instance(self, include_optional) -> WebhookEventData: bridging_fee = cobo_waas2.models.bridging_fee.BridgingFee( fee_amount = '', received_token_id = '', - received_amount = '', ), ) + received_amount = '', + bridge_status = 'Completed', ), ) ], acquiring_type = 'Order', payout_channel = 'Crypto',