From 1c8f5f7b793bb92b6df1944a3c9e2e187909cdc8 Mon Sep 17 00:00:00 2001 From: theo-s68 <194042188+theo-s68@users.noreply.github.com> Date: Tue, 30 Jun 2026 22:45:29 +0700 Subject: [PATCH] Release wallet v5.0.0 --- clients/wallet/CHANGELOG.md | 21 + clients/wallet/docs/BrokerWithdrawResponse.md | 2 +- clients/wallet/docs/CapitalApi.md | 2 +- clients/wallet/docs/DustConvertRequest.md | 1 + .../docs/DustConvertibleAssetsRequest.md | 1 + clients/wallet/docs/GetCountryListResponse.md | 14 + .../GetCountryListResponseCountriesInner.md | 18 + clients/wallet/docs/GetRegionListResponse.md | 15 + .../docs/GetRegionListResponseRegionsInner.md | 16 + clients/wallet/docs/TravelRuleApi.md | 126 +++++- clients/wallet/docs/VaspListResponseInner.md | 3 +- .../wallet/docs/WithdrawTravelRuleResponse.md | 2 +- .../wallet/docs/rest-api/migration-guide.md | 4 +- clients/wallet/example_rest.md | 98 ++-- clients/wallet/pom.xml | 2 +- .../connector/client/wallet/rest/JSON.java | 12 + .../client/wallet/rest/api/AccountApi.java | 2 +- .../client/wallet/rest/api/AssetApi.java | 10 +- .../client/wallet/rest/api/CapitalApi.java | 10 +- .../client/wallet/rest/api/OthersApi.java | 2 +- .../client/wallet/rest/api/TravelRuleApi.java | 268 ++++++++++- .../client/wallet/rest/api/WalletRestApi.java | 62 ++- .../rest/model/BrokerWithdrawResponse.java | 38 +- .../wallet/rest/model/DustConvertRequest.java | 47 +- .../model/DustConvertibleAssetsRequest.java | 45 +- .../rest/model/GetCountryListResponse.java | 277 ++++++++++++ .../GetCountryListResponseCountriesInner.java | 420 ++++++++++++++++++ .../rest/model/GetRegionListResponse.java | 313 +++++++++++++ .../GetRegionListResponseRegionsInner.java | 330 ++++++++++++++ .../rest/model/VaspListResponseInner.java | 88 +++- .../model/WithdrawTravelRuleResponse.java | 38 +- examples/wallet/pom.xml | 2 +- .../wallet/rest/capital/WithdrawExample.java | 8 +- .../DepositHistoryTravelRuleExample.java | 2 + .../travelrule/DepositHistoryV2Example.java | 4 +- .../travelrule/GetCountryListExample.java | 39 ++ .../rest/travelrule/GetRegionListExample.java | 40 ++ 37 files changed, 2247 insertions(+), 135 deletions(-) create mode 100644 clients/wallet/docs/GetCountryListResponse.md create mode 100644 clients/wallet/docs/GetCountryListResponseCountriesInner.md create mode 100644 clients/wallet/docs/GetRegionListResponse.md create mode 100644 clients/wallet/docs/GetRegionListResponseRegionsInner.md create mode 100644 clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponse.java create mode 100644 clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponseCountriesInner.java create mode 100644 clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetRegionListResponse.java create mode 100644 clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetRegionListResponseRegionsInner.java create mode 100644 examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetCountryListExample.java create mode 100644 examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetRegionListExample.java diff --git a/clients/wallet/CHANGELOG.md b/clients/wallet/CHANGELOG.md index 3725565e8..4c73faac7 100644 --- a/clients/wallet/CHANGELOG.md +++ b/clients/wallet/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## 5.0.0 - 2026-06-30 + +### Added (2) + +- `getCountryList()` (`GET /sapi/v1/localentity/country/list`) +- `getRegionList()` (`GET /sapi/v1/localentity/region/list`) + +### Changed (3) + +- Added parameter `accountType` + - affected methods: + - `dustConvert()` (`POST /sapi/v1/asset/dust-convert/convert`) + - `dustConvertibleAssets()` (`POST /sapi/v1/asset/dust-convert/query-convertible-assets`) +- Modified response for `brokerWithdraw()` (`POST /sapi/v1/localentity/broker/withdraw/apply`): + - property `accepted` added + - property `accpted` deleted + +- Modified response for `withdrawTravelRule()` (`POST /sapi/v1/localentity/withdraw/apply`): + - property `accepted` added + - property `accpted` deleted + ## 4.0.1 - 2026-04-30 - Update `binance/common` module to version `2.4.2`. diff --git a/clients/wallet/docs/BrokerWithdrawResponse.md b/clients/wallet/docs/BrokerWithdrawResponse.md index 56a6358b7..cff305b5d 100644 --- a/clients/wallet/docs/BrokerWithdrawResponse.md +++ b/clients/wallet/docs/BrokerWithdrawResponse.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**trId** | **Long** | | [optional] | -|**accpted** | **Boolean** | | [optional] | +|**accepted** | **Boolean** | | [optional] | |**info** | **String** | | [optional] | diff --git a/clients/wallet/docs/CapitalApi.md b/clients/wallet/docs/CapitalApi.md index 691b26ab9..89a2f35cc 100644 --- a/clients/wallet/docs/CapitalApi.md +++ b/clients/wallet/docs/CapitalApi.md @@ -471,7 +471,7 @@ No authorization required Withdraw(USER_DATA) -Submit a withdraw request. * If `network` not send, return with default network of the coin. * You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. * To check if travel rule is required, by using `GET /sapi/v1/localentity/questionnaire-requirements` and if it returns anything other than `NIL` you will need update SAPI to `POST /sapi/v1/localentity/withdraw/apply` else you can continue `POST /sapi/v1/capital/withdraw/apply`. Please note that if you are required to comply to travel rule please refer to the Travel Rule SAPI. Weight: 900 +Submit a withdraw request. * If `network` not send, return with default network of the coin. * You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. * To check if travel rule is required, by using `GET /sapi/v1/localentity/questionnaire-requirements` and if it returns anything other than `NIL` you will need update SAPI to `POST /sapi/v1/localentity/withdraw/apply` else you can continue `POST /sapi/v1/capital/withdraw/apply`. Please note that if you are required to comply to travel rule please refer to the Travel Rule SAPI. * For networks that do not support memo/tag, submitting a withdrawal request with a non-empty `addressTag` will return error `-4106 TAG_NOT_SUPPORTED_FOR_NETWORK`. Please omit the `addressTag` field for such networks. You can check whether a network requires a tag via `GET /sapi/v1/capital/config/getall`: * If `withdrawTag` = `true` → memo/tag is required. * If `withdrawTag` = `false` → memo/tag is not supported; omit `addressTag`. Weight: 900 ### Example ```java diff --git a/clients/wallet/docs/DustConvertRequest.md b/clients/wallet/docs/DustConvertRequest.md index cdfbf3737..fcdb16b39 100644 --- a/clients/wallet/docs/DustConvertRequest.md +++ b/clients/wallet/docs/DustConvertRequest.md @@ -8,6 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**asset** | **String** | | | +|**accountType** | **String** | | [optional] | |**clientId** | **String** | | [optional] | |**targetAsset** | **String** | | [optional] | |**thirdPartyClientId** | **String** | | [optional] | diff --git a/clients/wallet/docs/DustConvertibleAssetsRequest.md b/clients/wallet/docs/DustConvertibleAssetsRequest.md index 2cf0ae2a1..94c508978 100644 --- a/clients/wallet/docs/DustConvertibleAssetsRequest.md +++ b/clients/wallet/docs/DustConvertibleAssetsRequest.md @@ -7,6 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**accountType** | **String** | | [optional] | |**targetAsset** | **String** | | | |**dustQuotaAssetToTargetAssetPrice** | **Double** | | [optional] | diff --git a/clients/wallet/docs/GetCountryListResponse.md b/clients/wallet/docs/GetCountryListResponse.md new file mode 100644 index 000000000..216d048d3 --- /dev/null +++ b/clients/wallet/docs/GetCountryListResponse.md @@ -0,0 +1,14 @@ + + +# GetCountryListResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**countries** | [**List<GetCountryListResponseCountriesInner>**](GetCountryListResponseCountriesInner.md) | | [optional] | +|**lastUpdated** | **Long** | | [optional] | + + + diff --git a/clients/wallet/docs/GetCountryListResponseCountriesInner.md b/clients/wallet/docs/GetCountryListResponseCountriesInner.md new file mode 100644 index 000000000..c3c28a88d --- /dev/null +++ b/clients/wallet/docs/GetCountryListResponseCountriesInner.md @@ -0,0 +1,18 @@ + + +# GetCountryListResponseCountriesInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**countryCode** | **String** | | [optional] | +|**countryName** | **String** | | [optional] | +|**blockType** | **String** | | [optional] | +|**depositAllowed** | **Boolean** | | [optional] | +|**withdrawalAllowed** | **Boolean** | | [optional] | +|**hasRegionRestrictions** | **Boolean** | | [optional] | + + + diff --git a/clients/wallet/docs/GetRegionListResponse.md b/clients/wallet/docs/GetRegionListResponse.md new file mode 100644 index 000000000..77da5c219 --- /dev/null +++ b/clients/wallet/docs/GetRegionListResponse.md @@ -0,0 +1,15 @@ + + +# GetRegionListResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**countryCode** | **String** | | [optional] | +|**regions** | [**List<GetRegionListResponseRegionsInner>**](GetRegionListResponseRegionsInner.md) | | [optional] | +|**lastUpdated** | **Long** | | [optional] | + + + diff --git a/clients/wallet/docs/GetRegionListResponseRegionsInner.md b/clients/wallet/docs/GetRegionListResponseRegionsInner.md new file mode 100644 index 000000000..51a0993bc --- /dev/null +++ b/clients/wallet/docs/GetRegionListResponseRegionsInner.md @@ -0,0 +1,16 @@ + + +# GetRegionListResponseRegionsInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**regionName** | **String** | | [optional] | +|**blockType** | **String** | | [optional] | +|**depositAllowed** | **Boolean** | | [optional] | +|**withdrawalAllowed** | **Boolean** | | [optional] | + + + diff --git a/clients/wallet/docs/TravelRuleApi.md b/clients/wallet/docs/TravelRuleApi.md index fe83c6f18..1ed0ae87e 100644 --- a/clients/wallet/docs/TravelRuleApi.md +++ b/clients/wallet/docs/TravelRuleApi.md @@ -9,6 +9,8 @@ All URIs are relative to *https://api.binance.com* | [**depositHistoryTravelRule**](TravelRuleApi.md#depositHistoryTravelRule) | **GET** /sapi/v1/localentity/deposit/history | Deposit History (for local entities that required travel rule) (supporting network) (USER_DATA) | | [**depositHistoryV2**](TravelRuleApi.md#depositHistoryV2) | **GET** /sapi/v2/localentity/deposit/history | Deposit History V2 (for local entities that required travel rule) (supporting network) (USER_DATA) | | [**fetchAddressVerificationList**](TravelRuleApi.md#fetchAddressVerificationList) | **GET** /sapi/v1/addressVerify/list | Fetch address verification list (USER_DATA) | +| [**getCountryList**](TravelRuleApi.md#getCountryList) | **GET** /sapi/v1/localentity/country/list | Get Country List (USER_DATA) | +| [**getRegionList**](TravelRuleApi.md#getRegionList) | **GET** /sapi/v1/localentity/region/list | Get Region List (USER_DATA) | | [**submitDepositQuestionnaire**](TravelRuleApi.md#submitDepositQuestionnaire) | **PUT** /sapi/v1/localentity/broker/deposit/provide-info | Submit Deposit Questionnaire (For local entities that require travel rule) (supporting network) (USER_DATA) | | [**submitDepositQuestionnaireTravelRule**](TravelRuleApi.md#submitDepositQuestionnaireTravelRule) | **PUT** /sapi/v1/localentity/deposit/provide-info | Submit Deposit Questionnaire (For local entities that require travel rule) (supporting network) (USER_DATA) | | [**submitDepositQuestionnaireV2**](TravelRuleApi.md#submitDepositQuestionnaireV2) | **PUT** /sapi/v2/localentity/deposit/provide-info | Submit Deposit Questionnaire V2 (For local entities that require travel rule) (supporting network) (USER_DATA) | @@ -148,7 +150,7 @@ No authorization required Deposit History (for local entities that required travel rule) (supporting network) (USER_DATA) -Fetch deposit history for local entities that required travel rule. * Please notice the default `startTime` and `endTime` to make sure that time interval is within * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must Weight: 1 +Fetch deposit history for local entities that required travel rule. * Please notice the default `startTime` and `endTime` to make sure that time interval is within * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must * Please, note that due to network-specific characteristics, the returned source address may be inaccurate. If multiple source addresses are found, only the first one will be returned. Weight: 1 ### Example ```java @@ -230,7 +232,7 @@ No authorization required Deposit History V2 (for local entities that required travel rule) (supporting network) (USER_DATA) -Fetch deposit history for local entities that with required travel rule information. * Please notice the default `startTime` and `endTime` to make sure that time interval is within * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must Weight: 1 +Fetch deposit history for local entities that with required travel rule information. * Please notice the default `startTime` and `endTime` to make sure that time interval is within * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must * Please, note that due to network-specific characteristics, the returned source address may be inaccurate. If multiple source addresses are found, only the first one will be returned. Weight: 1 ### Example ```java @@ -364,6 +366,126 @@ No authorization required |-------------|-------------|------------------| | **200** | Fetch address verification list | - | + +# **getCountryList** +> GetCountryListResponse getCountryList() + +Get Country List (USER_DATA) + +Query the active country list for travel rule questionnaires. Currently, only supports AU entity. Weight: 1 + +### Example +```java +// Import classes: +import com.binance.connector.client.wallet.ApiClient; +import com.binance.connector.client.wallet.ApiException; +import com.binance.connector.client.wallet.Configuration; +import com.binance.connector.client.wallet.models.*; +import com.binance.connector.client.wallet.rest.api.TravelRuleApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + TravelRuleApi apiInstance = new TravelRuleApi(defaultClient); + try { + GetCountryListResponse result = apiInstance.getCountryList(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TravelRuleApi#getCountryList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**GetCountryListResponse**](GetCountryListResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Get Country List | - | + + +# **getRegionList** +> GetRegionListResponse getRegionList(countryCode) + +Get Region List (USER_DATA) + +Query the active region/city list for a given country. Currently, only supports AU entity. Weight: 1 + +### Example +```java +// Import classes: +import com.binance.connector.client.wallet.ApiClient; +import com.binance.connector.client.wallet.ApiException; +import com.binance.connector.client.wallet.Configuration; +import com.binance.connector.client.wallet.models.*; +import com.binance.connector.client.wallet.rest.api.TravelRuleApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.binance.com"); + + TravelRuleApi apiInstance = new TravelRuleApi(defaultClient); + String countryCode = "countryCode_example"; // String | ISO 2-digit country code (from `Country List` API). + try { + GetRegionListResponse result = apiInstance.getRegionList(countryCode); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TravelRuleApi#getRegionList"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **countryCode** | **String**| ISO 2-digit country code (from `Country List` API). | | + +### Return type + +[**GetRegionListResponse**](GetRegionListResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Get Region List | - | + # **submitDepositQuestionnaire** > SubmitDepositQuestionnaireResponse submitDepositQuestionnaire(submitDepositQuestionnaireRequest) diff --git a/clients/wallet/docs/VaspListResponseInner.md b/clients/wallet/docs/VaspListResponseInner.md index 158c95a63..6f8251cbd 100644 --- a/clients/wallet/docs/VaspListResponseInner.md +++ b/clients/wallet/docs/VaspListResponseInner.md @@ -7,8 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**vaspName** | **String** | | [optional] | |**vaspCode** | **String** | | [optional] | +|**vaspName** | **String** | | [optional] | +|**identifier** | **String** | | [optional] | diff --git a/clients/wallet/docs/WithdrawTravelRuleResponse.md b/clients/wallet/docs/WithdrawTravelRuleResponse.md index 81bf41cef..29e112e29 100644 --- a/clients/wallet/docs/WithdrawTravelRuleResponse.md +++ b/clients/wallet/docs/WithdrawTravelRuleResponse.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**trId** | **Long** | | [optional] | -|**accpted** | **Boolean** | | [optional] | +|**accepted** | **Boolean** | | [optional] | |**info** | **String** | | [optional] | diff --git a/clients/wallet/docs/rest-api/migration-guide.md b/clients/wallet/docs/rest-api/migration-guide.md index 1dc3a83c8..a7df0041d 100644 --- a/clients/wallet/docs/rest-api/migration-guide.md +++ b/clients/wallet/docs/rest-api/migration-guide.md @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s io.github.binance binance-wallet - 4.0.0 + 5.0.0 ``` @@ -91,7 +91,7 @@ by: io.github.binance binance-wallet - 4.0.0 + 5.0.0 ``` diff --git a/clients/wallet/example_rest.md b/clients/wallet/example_rest.md index 019ed5bb0..503521fe7 100644 --- a/clients/wallet/example_rest.md +++ b/clients/wallet/example_rest.md @@ -1,104 +1,108 @@ ## Account -[GET /sapi/v1/account/apiTradingStatus](https://developers.binance.com/docs/wallet/account/Account-API-Trading-Status) - accountApiTradingStatus - [AccountApiTradingStatusExample.java:46](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountApiTradingStatusExample.java#L46) +[GET /sapi/v1/account/apiTradingStatus](https://developers.binance.com/docs/wallet/account/Account-API-Trading-Status) - accountApiTradingStatus - [AccountApiTradingStatusExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountApiTradingStatusExample.java#L34) -[GET /sapi/v1/account/info](https://developers.binance.com/docs/wallet/account/Account-info) - accountInfo - [AccountInfoExample.java:46](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountInfoExample.java#L46) +[GET /sapi/v1/account/info](https://developers.binance.com/docs/wallet/account/Account-info) - accountInfo - [AccountInfoExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountInfoExample.java#L34) -[GET /sapi/v1/account/status](https://developers.binance.com/docs/wallet/account/Account-Status) - accountStatus - [AccountStatusExample.java:46](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountStatusExample.java#L46) +[GET /sapi/v1/account/status](https://developers.binance.com/docs/wallet/account/Account-Status) - accountStatus - [AccountStatusExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/AccountStatusExample.java#L34) -[GET /sapi/v1/accountSnapshot](https://developers.binance.com/docs/wallet/account/daily-account-snapshoot) - dailyAccountSnapshot - [DailyAccountSnapshotExample.java:48](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/DailyAccountSnapshotExample.java#L48) +[GET /sapi/v1/accountSnapshot](https://developers.binance.com/docs/wallet/account/daily-account-snapshoot) - dailyAccountSnapshot - [DailyAccountSnapshotExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/DailyAccountSnapshotExample.java#L36) -[POST /sapi/v1/account/disableFastWithdrawSwitch](https://developers.binance.com/docs/wallet/account/Disable-Fast-Withdraw-Switch) - disableFastWithdrawSwitch - [DisableFastWithdrawSwitchExample.java:45](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/DisableFastWithdrawSwitchExample.java#L45) +[POST /sapi/v1/account/disableFastWithdrawSwitch](https://developers.binance.com/docs/wallet/account/Disable-Fast-Withdraw-Switch) - disableFastWithdrawSwitch - [DisableFastWithdrawSwitchExample.java:33](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/DisableFastWithdrawSwitchExample.java#L33) -[POST /sapi/v1/account/enableFastWithdrawSwitch](https://developers.binance.com/docs/wallet/account/Enable-Fast-Withdraw-Switch) - enableFastWithdrawSwitch - [EnableFastWithdrawSwitchExample.java:48](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/EnableFastWithdrawSwitchExample.java#L48) +[POST /sapi/v1/account/enableFastWithdrawSwitch](https://developers.binance.com/docs/wallet/account/Enable-Fast-Withdraw-Switch) - enableFastWithdrawSwitch - [EnableFastWithdrawSwitchExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/EnableFastWithdrawSwitchExample.java#L36) -[GET /sapi/v1/account/apiRestrictions](https://developers.binance.com/docs/wallet/account/api-key-permission) - getApiKeyPermission - [GetApiKeyPermissionExample.java:46](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/GetApiKeyPermissionExample.java#L46) +[GET /sapi/v1/account/apiRestrictions](https://developers.binance.com/docs/wallet/account/api-key-permission) - getApiKeyPermission - [GetApiKeyPermissionExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/account/GetApiKeyPermissionExample.java#L34) ## Asset -[GET /sapi/v1/asset/assetDetail](https://developers.binance.com/docs/wallet/asset/Asset-Detail) - assetDetail - [AssetDetailExample.java:47](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/AssetDetailExample.java#L47) +[GET /sapi/v1/asset/assetDetail](https://developers.binance.com/docs/wallet/asset/Asset-Detail) - assetDetail - [AssetDetailExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/AssetDetailExample.java#L35) -[GET /sapi/v1/asset/assetDividend](https://developers.binance.com/docs/wallet/asset/assets-divided-record) - assetDividendRecord - [AssetDividendRecordExample.java:47](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/AssetDividendRecordExample.java#L47) +[GET /sapi/v1/asset/assetDividend](https://developers.binance.com/docs/wallet/asset/assets-divided-record) - assetDividendRecord - [AssetDividendRecordExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/AssetDividendRecordExample.java#L35) -[POST /sapi/v1/asset/dust-convert/convert](https://developers.binance.com/docs/wallet/asset/Dust-Convert) - dustConvert - [DustConvertExample.java:47](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustConvertExample.java#L47) +[POST /sapi/v1/asset/dust-convert/convert](https://developers.binance.com/docs/wallet/asset/Dust-Convert) - dustConvert - [DustConvertExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustConvertExample.java#L35) -[POST /sapi/v1/asset/dust-convert/query-convertible-assets](https://developers.binance.com/docs/wallet/asset/Dust-Convertible-Assets) - dustConvertibleAssets - [DustConvertibleAssetsExample.java:47](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustConvertibleAssetsExample.java#L47) +[POST /sapi/v1/asset/dust-convert/query-convertible-assets](https://developers.binance.com/docs/wallet/asset/Dust-Convertible-Assets) - dustConvertibleAssets - [DustConvertibleAssetsExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustConvertibleAssetsExample.java#L35) -[POST /sapi/v1/asset/dust](https://developers.binance.com/docs/wallet/asset/Dust-Transfer) - dustTransfer - [DustTransferExample.java:48](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustTransferExample.java#L48) +[POST /sapi/v1/asset/dust](https://developers.binance.com/docs/wallet/asset/Dust-Transfer) - dustTransfer - [DustTransferExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustTransferExample.java#L36) -[GET /sapi/v1/asset/dribblet](https://developers.binance.com/docs/wallet/asset/dust-log) - dustlog - [DustlogExample.java:46](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustlogExample.java#L46) +[GET /sapi/v1/asset/dribblet](https://developers.binance.com/docs/wallet/asset/dust-log) - dustlog - [DustlogExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/DustlogExample.java#L34) -[POST /sapi/v1/asset/get-funding-asset](https://developers.binance.com/docs/wallet/asset/Funding-Wallet) - fundingWallet - [FundingWalletExample.java:48](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/FundingWalletExample.java#L48) +[POST /sapi/v1/asset/get-funding-asset](https://developers.binance.com/docs/wallet/asset/Funding-Wallet) - fundingWallet - [FundingWalletExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/FundingWalletExample.java#L36) -[POST /sapi/v1/asset/dust-btc](https://developers.binance.com/docs/wallet/asset/assets-can-convert-bnb) - getAssetsThatCanBeConvertedIntoBnb - [GetAssetsThatCanBeConvertedIntoBnbExample.java:47](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetAssetsThatCanBeConvertedIntoBnbExample.java#L47) +[POST /sapi/v1/asset/dust-btc](https://developers.binance.com/docs/wallet/asset/assets-can-convert-bnb) - getAssetsThatCanBeConvertedIntoBnb - [GetAssetsThatCanBeConvertedIntoBnbExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetAssetsThatCanBeConvertedIntoBnbExample.java#L35) -[GET /sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage](https://developers.binance.com/docs/wallet/asset/cloud-mining-payment-and-refund-history) - getCloudMiningPaymentAndRefundHistory - [GetCloudMiningPaymentAndRefundHistoryExample.java:48](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetCloudMiningPaymentAndRefundHistoryExample.java#L48) +[GET /sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage](https://developers.binance.com/docs/wallet/asset/cloud-mining-payment-and-refund-history) - getCloudMiningPaymentAndRefundHistory - [GetCloudMiningPaymentAndRefundHistoryExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetCloudMiningPaymentAndRefundHistoryExample.java#L36) -[GET /sapi/v1/spot/open-symbol-list](https://developers.binance.com/docs/wallet/asset/open-symbol-list) - getOpenSymbolList - [GetOpenSymbolListExample.java:47](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetOpenSymbolListExample.java#L47) +[GET /sapi/v1/spot/open-symbol-list](https://developers.binance.com/docs/wallet/asset/open-symbol-list) - getOpenSymbolList - [GetOpenSymbolListExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/GetOpenSymbolListExample.java#L35) -[GET /sapi/v1/asset/custody/transfer-history](https://developers.binance.com/docs/wallet/asset/query-user-delegation) - queryUserDelegationHistory - [QueryUserDelegationHistoryExample.java:46](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserDelegationHistoryExample.java#L46) +[GET /sapi/v1/asset/custody/transfer-history](https://developers.binance.com/docs/wallet/asset/query-user-delegation) - queryUserDelegationHistory - [QueryUserDelegationHistoryExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserDelegationHistoryExample.java#L34) -[GET /sapi/v1/asset/transfer](https://developers.binance.com/docs/wallet/asset/query-user-universal-transfer) - queryUserUniversalTransferHistory - [QueryUserUniversalTransferHistoryExample.java:50](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserUniversalTransferHistoryExample.java#L50) +[GET /sapi/v1/asset/transfer](https://developers.binance.com/docs/wallet/asset/query-user-universal-transfer) - queryUserUniversalTransferHistory - [QueryUserUniversalTransferHistoryExample.java:38](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserUniversalTransferHistoryExample.java#L38) -[GET /sapi/v1/asset/wallet/balance](https://developers.binance.com/docs/wallet/asset/Query-User-Wallet-Balance) - queryUserWalletBalance - [QueryUserWalletBalanceExample.java:46](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserWalletBalanceExample.java#L46) +[GET /sapi/v1/asset/wallet/balance](https://developers.binance.com/docs/wallet/asset/Query-User-Wallet-Balance) - queryUserWalletBalance - [QueryUserWalletBalanceExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/QueryUserWalletBalanceExample.java#L34) -[POST /sapi/v1/bnbBurn](https://developers.binance.com/docs/wallet/asset/Toggle-BNB-Burn-On-Spot-Trade-And-Margin-Interest) - toggleBnbBurnOnSpotTradeAndMarginInterest - [ToggleBnbBurnOnSpotTradeAndMarginInterestExample.java:48](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/ToggleBnbBurnOnSpotTradeAndMarginInterestExample.java#L48) +[POST /sapi/v1/bnbBurn](https://developers.binance.com/docs/wallet/asset/Toggle-BNB-Burn-On-Spot-Trade-And-Margin-Interest) - toggleBnbBurnOnSpotTradeAndMarginInterest - [ToggleBnbBurnOnSpotTradeAndMarginInterestExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/ToggleBnbBurnOnSpotTradeAndMarginInterestExample.java#L36) -[GET /sapi/v1/asset/tradeFee](https://developers.binance.com/docs/wallet/asset/Trade-Fee) - tradeFee - [TradeFeeExample.java:46](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/TradeFeeExample.java#L46) +[GET /sapi/v1/asset/tradeFee](https://developers.binance.com/docs/wallet/asset/Trade-Fee) - tradeFee - [TradeFeeExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/TradeFeeExample.java#L34) -[POST /sapi/v3/asset/getUserAsset](https://developers.binance.com/docs/wallet/asset/user-assets) - userAsset - [UserAssetExample.java:49](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/UserAssetExample.java#L49) +[POST /sapi/v3/asset/getUserAsset](https://developers.binance.com/docs/wallet/asset/user-assets) - userAsset - [UserAssetExample.java:37](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/UserAssetExample.java#L37) -[POST /sapi/v1/asset/transfer](https://developers.binance.com/docs/wallet/asset/User-Universal-Transfer) - userUniversalTransfer - [UserUniversalTransferExample.java:72](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/UserUniversalTransferExample.java#L72) +[POST /sapi/v1/asset/transfer](https://developers.binance.com/docs/wallet/asset/User-Universal-Transfer) - userUniversalTransfer - [UserUniversalTransferExample.java:60](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/asset/UserUniversalTransferExample.java#L60) ## Capital -[GET /sapi/v1/capital/config/getall](https://developers.binance.com/docs/wallet/capital/all-coins-info) - allCoinsInformation - [AllCoinsInformationExample.java:46](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/AllCoinsInformationExample.java#L46) +[GET /sapi/v1/capital/config/getall](https://developers.binance.com/docs/wallet/capital/all-coins-info) - allCoinsInformation - [AllCoinsInformationExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/AllCoinsInformationExample.java#L34) -[GET /sapi/v1/capital/deposit/address](https://developers.binance.com/docs/wallet/capital/deposite-address) - depositAddress - [DepositAddressExample.java:49](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/DepositAddressExample.java#L49) +[GET /sapi/v1/capital/deposit/address](https://developers.binance.com/docs/wallet/capital/deposite-address) - depositAddress - [DepositAddressExample.java:37](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/DepositAddressExample.java#L37) -[GET /sapi/v1/capital/deposit/hisrec](https://developers.binance.com/docs/wallet/capital/deposite-history) - depositHistory - [DepositHistoryExample.java:50](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/DepositHistoryExample.java#L50) +[GET /sapi/v1/capital/deposit/hisrec](https://developers.binance.com/docs/wallet/capital/deposite-history) - depositHistory - [DepositHistoryExample.java:38](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/DepositHistoryExample.java#L38) -[GET /sapi/v1/capital/deposit/address/list](https://developers.binance.com/docs/wallet/capital/Fetch-deposit-address-list-with-network) - fetchDepositAddressListWithNetwork - [FetchDepositAddressListWithNetworkExample.java:48](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchDepositAddressListWithNetworkExample.java#L48) +[GET /sapi/v1/capital/deposit/address/list](https://developers.binance.com/docs/wallet/capital/Fetch-deposit-address-list-with-network) - fetchDepositAddressListWithNetwork - [FetchDepositAddressListWithNetworkExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchDepositAddressListWithNetworkExample.java#L36) -[GET /sapi/v1/capital/withdraw/address/list](https://developers.binance.com/docs/wallet/capital/fetch-withdraw-address) - fetchWithdrawAddressList - [FetchWithdrawAddressListExample.java:46](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchWithdrawAddressListExample.java#L46) +[GET /sapi/v1/capital/withdraw/address/list](https://developers.binance.com/docs/wallet/capital/fetch-withdraw-address) - fetchWithdrawAddressList - [FetchWithdrawAddressListExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchWithdrawAddressListExample.java#L34) -[GET /sapi/v1/capital/withdraw/quota](https://developers.binance.com/docs/wallet/capital/Fetch-withdraw-quota) - fetchWithdrawQuota - [FetchWithdrawQuotaExample.java:46](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchWithdrawQuotaExample.java#L46) +[GET /sapi/v1/capital/withdraw/quota](https://developers.binance.com/docs/wallet/capital/Fetch-withdraw-quota) - fetchWithdrawQuota - [FetchWithdrawQuotaExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/FetchWithdrawQuotaExample.java#L34) -[POST /sapi/v1/capital/deposit/credit-apply](https://developers.binance.com/docs/wallet/capital/one-click-arrival-deposite-apply) - oneClickArrivalDepositApply - [OneClickArrivalDepositApplyExample.java:48](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/OneClickArrivalDepositApplyExample.java#L48) +[POST /sapi/v1/capital/deposit/credit-apply](https://developers.binance.com/docs/wallet/capital/one-click-arrival-deposite-apply) - oneClickArrivalDepositApply - [OneClickArrivalDepositApplyExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/OneClickArrivalDepositApplyExample.java#L36) -[POST /sapi/v1/capital/withdraw/apply](https://developers.binance.com/docs/wallet/capital/Withdraw) - withdraw - [WithdrawExample.java:55](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawExample.java#L55) +[POST /sapi/v1/capital/withdraw/apply](https://developers.binance.com/docs/wallet/capital/Withdraw) - withdraw - [WithdrawExample.java:49](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawExample.java#L49) -[GET /sapi/v1/capital/withdraw/history](https://developers.binance.com/docs/wallet/capital/Withdraw-History) - withdrawHistory - [WithdrawHistoryExample.java:54](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawHistoryExample.java#L54) +[GET /sapi/v1/capital/withdraw/history](https://developers.binance.com/docs/wallet/capital/Withdraw-History) - withdrawHistory - [WithdrawHistoryExample.java:42](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawHistoryExample.java#L42) ## Others -[GET /sapi/v1/spot/delist-schedule](https://developers.binance.com/docs/wallet/others/delist-schedule) - getSymbolsDelistScheduleForSpot - [GetSymbolsDelistScheduleForSpotExample.java:46](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/others/GetSymbolsDelistScheduleForSpotExample.java#L46) +[GET /sapi/v1/spot/delist-schedule](https://developers.binance.com/docs/wallet/others/delist-schedule) - getSymbolsDelistScheduleForSpot - [GetSymbolsDelistScheduleForSpotExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/others/GetSymbolsDelistScheduleForSpotExample.java#L34) -[GET /sapi/v1/system/status](https://developers.binance.com/docs/wallet/others/System-Status) - systemStatus - [SystemStatusExample.java:46](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/others/SystemStatusExample.java#L46) +[GET /sapi/v1/system/status](https://developers.binance.com/docs/wallet/others/System-Status) - systemStatus - [SystemStatusExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/others/SystemStatusExample.java#L34) ## TravelRule -[POST /sapi/v1/localentity/broker/withdraw/apply](https://developers.binance.com/docs/wallet/travel-rule/Broker-Withdraw) - brokerWithdraw - [BrokerWithdrawExample.java:52](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/BrokerWithdrawExample.java#L52) +[POST /sapi/v1/localentity/broker/withdraw/apply](https://developers.binance.com/docs/wallet/travel-rule/Broker-Withdraw) - brokerWithdraw - [BrokerWithdrawExample.java:40](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/BrokerWithdrawExample.java#L40) -[GET /sapi/v1/localentity/questionnaire-requirements](https://developers.binance.com/docs/wallet/travel-rule/questionnaire-requirements) - checkQuestionnaireRequirements - [CheckQuestionnaireRequirementsExample.java:48](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/CheckQuestionnaireRequirementsExample.java#L48) +[GET /sapi/v1/localentity/questionnaire-requirements](https://developers.binance.com/docs/wallet/travel-rule/questionnaire-requirements) - checkQuestionnaireRequirements - [CheckQuestionnaireRequirementsExample.java:36](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/CheckQuestionnaireRequirementsExample.java#L36) -[GET /sapi/v1/localentity/deposit/history](https://developers.binance.com/docs/wallet/travel-rule/Deposit-History) - depositHistoryTravelRule - [DepositHistoryTravelRuleExample.java:51](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryTravelRuleExample.java#L51) +[GET /sapi/v1/localentity/deposit/history](https://developers.binance.com/docs/wallet/travel-rule/Deposit-History) - depositHistoryTravelRule - [DepositHistoryTravelRuleExample.java:41](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryTravelRuleExample.java#L41) -[GET /sapi/v2/localentity/deposit/history](https://developers.binance.com/docs/wallet/travel-rule/Deposit-History-V2) - depositHistoryV2 - [DepositHistoryV2Example.java:51](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryV2Example.java#L51) +[GET /sapi/v2/localentity/deposit/history](https://developers.binance.com/docs/wallet/travel-rule/Deposit-History-V2) - depositHistoryV2 - [DepositHistoryV2Example.java:41](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryV2Example.java#L41) -[GET /sapi/v1/addressVerify/list](https://developers.binance.com/docs/wallet/travel-rule/address-verification-list) - fetchAddressVerificationList - [FetchAddressVerificationListExample.java:47](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/FetchAddressVerificationListExample.java#L47) +[GET /sapi/v1/addressVerify/list](https://developers.binance.com/docs/wallet/travel-rule/address-verification-list) - fetchAddressVerificationList - [FetchAddressVerificationListExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/FetchAddressVerificationListExample.java#L35) -[PUT /sapi/v1/localentity/broker/deposit/provide-info](https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info) - submitDepositQuestionnaire - [SubmitDepositQuestionnaireExample.java:52](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireExample.java#L52) +[GET /sapi/v1/localentity/country/list](https://developers.binance.com/docs/wallet/travel-rule/country-list) - getCountryList - [GetCountryListExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetCountryListExample.java#L35) -[PUT /sapi/v1/localentity/deposit/provide-info](https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info) - submitDepositQuestionnaireTravelRule - [SubmitDepositQuestionnaireTravelRuleExample.java:52](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireTravelRuleExample.java#L52) +[GET /sapi/v1/localentity/region/list](https://developers.binance.com/docs/wallet/travel-rule/region-list) - getRegionList - [GetRegionListExample.java:35](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetRegionListExample.java#L35) -[PUT /sapi/v2/localentity/deposit/provide-info](https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info-v2) - submitDepositQuestionnaireV2 - [SubmitDepositQuestionnaireV2Example.java:52](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireV2Example.java#L52) +[PUT /sapi/v1/localentity/broker/deposit/provide-info](https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info) - submitDepositQuestionnaire - [SubmitDepositQuestionnaireExample.java:40](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireExample.java#L40) -[GET /sapi/v1/localentity/vasp](https://developers.binance.com/docs/wallet/travel-rule/onboarded-vasp-list) - vaspList - [VaspListExample.java:46](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/VaspListExample.java#L46) +[PUT /sapi/v1/localentity/deposit/provide-info](https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info) - submitDepositQuestionnaireTravelRule - [SubmitDepositQuestionnaireTravelRuleExample.java:40](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireTravelRuleExample.java#L40) -[GET /sapi/v1/localentity/withdraw/history](https://developers.binance.com/docs/wallet/travel-rule/Withdraw-History) - withdrawHistoryV1 - [WithdrawHistoryV1Example.java:51](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawHistoryV1Example.java#L51) +[PUT /sapi/v2/localentity/deposit/provide-info](https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info-v2) - submitDepositQuestionnaireV2 - [SubmitDepositQuestionnaireV2Example.java:40](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireV2Example.java#L40) -[GET /sapi/v2/localentity/withdraw/history](https://developers.binance.com/docs/wallet/travel-rule/Withdraw-History-V2) - withdrawHistoryV2 - [WithdrawHistoryV2Example.java:56](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawHistoryV2Example.java#L56) +[GET /sapi/v1/localentity/vasp](https://developers.binance.com/docs/wallet/travel-rule/onboarded-vasp-list) - vaspList - [VaspListExample.java:34](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/VaspListExample.java#L34) -[POST /sapi/v1/localentity/withdraw/apply](https://developers.binance.com/docs/wallet/travel-rule/Withdraw) - withdrawTravelRule - [WithdrawTravelRuleExample.java:53](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawTravelRuleExample.java#L53) +[GET /sapi/v1/localentity/withdraw/history](https://developers.binance.com/docs/wallet/travel-rule/Withdraw-History) - withdrawHistoryV1 - [WithdrawHistoryV1Example.java:39](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawHistoryV1Example.java#L39) + +[GET /sapi/v2/localentity/withdraw/history](https://developers.binance.com/docs/wallet/travel-rule/Withdraw-History-V2) - withdrawHistoryV2 - [WithdrawHistoryV2Example.java:44](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawHistoryV2Example.java#L44) + +[POST /sapi/v1/localentity/withdraw/apply](https://developers.binance.com/docs/wallet/travel-rule/Withdraw) - withdrawTravelRule - [WithdrawTravelRuleExample.java:41](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/WithdrawTravelRuleExample.java#L41) diff --git a/clients/wallet/pom.xml b/clients/wallet/pom.xml index 22dc53ee3..ed4baac25 100644 --- a/clients/wallet/pom.xml +++ b/clients/wallet/pom.xml @@ -5,7 +5,7 @@ 4.0.0 binance-wallet wallet - 4.0.1 + 5.0.0 jar diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/JSON.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/JSON.java index c00586dd1..3a2e0f29d 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/JSON.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/JSON.java @@ -306,12 +306,24 @@ private static Class getClassByDiscriminator( new com.binance.connector.client.wallet.rest.model .GetCloudMiningPaymentAndRefundHistoryResponseRowsInner .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.wallet.rest.model.GetCountryListResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.wallet.rest.model + .GetCountryListResponseCountriesInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.wallet.rest.model.GetOpenSymbolListResponse .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.wallet.rest.model.GetOpenSymbolListResponseInner .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.wallet.rest.model.GetRegionListResponse + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new com.binance.connector.client.wallet.rest.model.GetRegionListResponseRegionsInner + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new com.binance.connector.client.wallet.rest.model.GetSpotDelistScheduleResponse .CustomTypeAdapterFactory()); diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AccountApi.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AccountApi.java index d8991894f..848783fb9 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AccountApi.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AccountApi.java @@ -49,7 +49,7 @@ public class AccountApi { private static final String USER_AGENT = String.format( - "binance-wallet/4.0.0 (Java/%s; %s; %s)", + "binance-wallet/5.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AssetApi.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AssetApi.java index a75e56434..de911b71c 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AssetApi.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/AssetApi.java @@ -68,7 +68,7 @@ public class AssetApi { private static final String USER_AGENT = String.format( - "binance-wallet/4.0.0 (Java/%s; %s; %s)", + "binance-wallet/5.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -459,6 +459,10 @@ private okhttp3.Call dustConvertCall(DustConvertRequest dustConvertRequest) localVarFormParams.put("asset", dustConvertRequest.getAsset()); } + if (dustConvertRequest.getAccountType() != null) { + localVarFormParams.put("accountType", dustConvertRequest.getAccountType()); + } + if (dustConvertRequest.getClientId() != null) { localVarFormParams.put("clientId", dustConvertRequest.getClientId()); } @@ -607,6 +611,10 @@ private okhttp3.Call dustConvertibleAssetsCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (dustConvertibleAssetsRequest.getAccountType() != null) { + localVarFormParams.put("accountType", dustConvertibleAssetsRequest.getAccountType()); + } + if (dustConvertibleAssetsRequest.getTargetAsset() != null) { localVarFormParams.put("targetAsset", dustConvertibleAssetsRequest.getTargetAsset()); } diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/CapitalApi.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/CapitalApi.java index 147e648a7..5ea717d4b 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/CapitalApi.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/CapitalApi.java @@ -54,7 +54,7 @@ public class CapitalApi { private static final String USER_AGENT = String.format( - "binance-wallet/4.0.0 (Java/%s; %s; %s)", + "binance-wallet/5.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -1349,7 +1349,13 @@ private okhttp3.Call withdrawValidateBeforeCall(WithdrawRequest withdrawRequest) * `NIL` you will need update SAPI to `POST * /sapi/v1/localentity/withdraw/apply` else you can continue `POST * /sapi/v1/capital/withdraw/apply`. Please note that if you are required to comply to - * travel rule please refer to the Travel Rule SAPI. Weight: 900 + * travel rule please refer to the Travel Rule SAPI. * For networks that do not support + * memo/tag, submitting a withdrawal request with a non-empty `addressTag` will return + * error `-4106 TAG_NOT_SUPPORTED_FOR_NETWORK`. Please omit the `addressTag` + * field for such networks. You can check whether a network requires a tag via `GET + * /sapi/v1/capital/config/getall`: * If `withdrawTag` = `true` → + * memo/tag is required. * If `withdrawTag` = `false` → memo/tag is not + * supported; omit `addressTag`. Weight: 900 * * @param withdrawRequest (required) * @return ApiResponse<WithdrawResponse> diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/OthersApi.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/OthersApi.java index 250d23541..03b133fe8 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/OthersApi.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/OthersApi.java @@ -43,7 +43,7 @@ public class OthersApi { private static final String USER_AGENT = String.format( - "binance-wallet/4.0.0 (Java/%s; %s; %s)", + "binance-wallet/5.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/TravelRuleApi.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/TravelRuleApi.java index 17968be65..94bd142d4 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/TravelRuleApi.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/TravelRuleApi.java @@ -26,6 +26,8 @@ import com.binance.connector.client.wallet.rest.model.DepositHistoryTravelRuleResponse; import com.binance.connector.client.wallet.rest.model.DepositHistoryV2Response; import com.binance.connector.client.wallet.rest.model.FetchAddressVerificationListResponse; +import com.binance.connector.client.wallet.rest.model.GetCountryListResponse; +import com.binance.connector.client.wallet.rest.model.GetRegionListResponse; import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireRequest; import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireResponse; import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireTravelRuleRequest; @@ -60,7 +62,7 @@ public class TravelRuleApi { private static final String USER_AGENT = String.format( - "binance-wallet/4.0.0 (Java/%s; %s; %s)", + "binance-wallet/5.0.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -649,7 +651,9 @@ private okhttp3.Call depositHistoryTravelRuleValidateBeforeCall( * notice the default `startTime` and `endTime` to make sure that time * interval is within * If both ``startTime`` and * ``endTime`` are sent, time between ``startTime`` and - * ``endTime`` must Weight: 1 + * ``endTime`` must * Please, note that due to network-specific + * characteristics, the returned source address may be inaccurate. If multiple source addresses + * are found, only the first one will be returned. Weight: 1 * * @param trId Comma(,) separated list of travel rule record Ids. (optional) * @param txId (optional) @@ -915,7 +919,9 @@ private okhttp3.Call depositHistoryV2ValidateBeforeCall( * information. * Please notice the default `startTime` and `endTime` to * make sure that time interval is within * If both ``startTime`` and * ``endTime`` are sent, time between ``startTime`` and - * ``endTime`` must Weight: 1 + * ``endTime`` must * Please, note that due to network-specific + * characteristics, the returned source address may be inaccurate. If multiple source addresses + * are found, only the first one will be returned. Weight: 1 * * @param depositId Comma(,) separated list of wallet tran Ids. (optional) * @param txId (optional) @@ -1103,6 +1109,262 @@ public ApiResponse fetchAddressVerificatio return localVarApiClient.execute(localVarCall, localVarReturnType); } + /** + * Build call for getCountryList + * + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get Country List -
+ * + * @see Get + * Country List (USER_DATA) Documentation + */ + private okhttp3.Call getCountryListCall() throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/localentity/country/list"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getCountryListValidateBeforeCall() throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {}; + Method method = this.getClass().getMethod("getCountryList"); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return getCountryListCall(); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Get Country List (USER_DATA) Query the active country list for travel rule questionnaires. + * Currently, only supports AU entity. Weight: 1 + * + * @return ApiResponse<GetCountryListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get Country List -
+ * + * @see Get + * Country List (USER_DATA) Documentation + */ + public ApiResponse getCountryList() throws ApiException { + okhttp3.Call localVarCall = getCountryListValidateBeforeCall(); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Build call for getRegionList + * + * @param countryCode ISO 2-digit country code (from `Country List` API). (required) + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get Region List -
+ * + * @see Get Region + * List (USER_DATA) Documentation + */ + private okhttp3.Call getRegionListCall(String countryCode) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/sapi/v1/localentity/region/list"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (countryCode != null) { + localVarQueryParams.addAll( + localVarApiClient.parameterToPair("countryCode", countryCode)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (!localVarFormParams.isEmpty() && localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + Set localVarAuthNames = new HashSet<>(); + localVarAuthNames.add("binanceSignature"); + if (HAS_TIME_UNIT) { + localVarAuthNames.add("timeUnit"); + } + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getRegionListValidateBeforeCall(String countryCode) throws ApiException { + try { + Validator validator = + Validation.byDefaultProvider() + .configure() + .messageInterpolator(new ParameterMessageInterpolator()) + .buildValidatorFactory() + .getValidator(); + ExecutableValidator executableValidator = validator.forExecutables(); + + Object[] parameterValues = {countryCode}; + Method method = this.getClass().getMethod("getRegionList", String.class); + Set> violations = + executableValidator.validateParameters(this, method, parameterValues); + + if (violations.size() == 0) { + return getRegionListCall(countryCode); + } else { + throw new ConstraintViolationException((Set) violations); + } + } catch (NoSuchMethodException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } catch (SecurityException e) { + e.printStackTrace(); + throw new ApiException(e.getMessage()); + } + } + + /** + * Get Region List (USER_DATA) Query the active region/city list for a given country. Currently, + * only supports AU entity. Weight: 1 + * + * @param countryCode ISO 2-digit country code (from `Country List` API). (required) + * @return ApiResponse<GetRegionListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get Region List -
+ * + * @see Get Region + * List (USER_DATA) Documentation + */ + public ApiResponse getRegionList(@NotNull String countryCode) + throws ApiException { + okhttp3.Call localVarCall = getRegionListValidateBeforeCall(countryCode); + java.lang.reflect.Type localVarReturnType = + new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + /** * Build call for submitDepositQuestionnaire * diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/WalletRestApi.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/WalletRestApi.java index 2cd3ef574..a97a83b11 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/WalletRestApi.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/api/WalletRestApi.java @@ -38,7 +38,9 @@ import com.binance.connector.client.wallet.rest.model.GetAssetsThatCanBeConvertedIntoBnbRequest; import com.binance.connector.client.wallet.rest.model.GetAssetsThatCanBeConvertedIntoBnbResponse; import com.binance.connector.client.wallet.rest.model.GetCloudMiningPaymentAndRefundHistoryResponse; +import com.binance.connector.client.wallet.rest.model.GetCountryListResponse; import com.binance.connector.client.wallet.rest.model.GetOpenSymbolListResponse; +import com.binance.connector.client.wallet.rest.model.GetRegionListResponse; import com.binance.connector.client.wallet.rest.model.GetSymbolsDelistScheduleForSpotResponse; import com.binance.connector.client.wallet.rest.model.OneClickArrivalDepositApplyRequest; import com.binance.connector.client.wallet.rest.model.OneClickArrivalDepositApplyResponse; @@ -948,7 +950,13 @@ public ApiResponse oneClickArrivalDepositAp * `NIL` you will need update SAPI to `POST * /sapi/v1/localentity/withdraw/apply` else you can continue `POST * /sapi/v1/capital/withdraw/apply`. Please note that if you are required to comply to - * travel rule please refer to the Travel Rule SAPI. Weight: 900 + * travel rule please refer to the Travel Rule SAPI. * For networks that do not support + * memo/tag, submitting a withdrawal request with a non-empty `addressTag` will return + * error `-4106 TAG_NOT_SUPPORTED_FOR_NETWORK`. Please omit the `addressTag` + * field for such networks. You can check whether a network requires a tag via `GET + * /sapi/v1/capital/config/getall`: * If `withdrawTag` = `true` → + * memo/tag is required. * If `withdrawTag` = `false` → memo/tag is not + * supported; omit `addressTag`. Weight: 900 * * @param withdrawRequest (required) * @return ApiResponse<WithdrawResponse> @@ -1134,7 +1142,9 @@ public ApiResponse checkQuestionnaireReq * notice the default `startTime` and `endTime` to make sure that time * interval is within * If both ``startTime`` and * ``endTime`` are sent, time between ``startTime`` and - * ``endTime`` must Weight: 1 + * ``endTime`` must * Please, note that due to network-specific + * characteristics, the returned source address may be inaccurate. If multiple source addresses + * are found, only the first one will be returned. Weight: 1 * * @param trId Comma(,) separated list of travel rule record Ids. (optional) * @param txId (optional) @@ -1195,7 +1205,9 @@ public ApiResponse depositHistoryTravelRule( * information. * Please notice the default `startTime` and `endTime` to * make sure that time interval is within * If both ``startTime`` and * ``endTime`` are sent, time between ``startTime`` and - * ``endTime`` must Weight: 1 + * ``endTime`` must * Please, note that due to network-specific + * characteristics, the returned source address may be inaccurate. If multiple source addresses + * are found, only the first one will be returned. Weight: 1 * * @param depositId Comma(,) separated list of wallet tran Ids. (optional) * @param txId (optional) @@ -1269,6 +1281,50 @@ public ApiResponse fetchAddressVerificatio return travelRuleApi.fetchAddressVerificationList(recvWindow); } + /** + * Get Country List (USER_DATA) Query the active country list for travel rule questionnaires. + * Currently, only supports AU entity. Weight: 1 + * + * @return ApiResponse<GetCountryListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get Country List -
+ * + * @see Get + * Country List (USER_DATA) Documentation + */ + public ApiResponse getCountryList() throws ApiException { + return travelRuleApi.getCountryList(); + } + + /** + * Get Region List (USER_DATA) Query the active region/city list for a given country. Currently, + * only supports AU entity. Weight: 1 + * + * @param countryCode ISO 2-digit country code (from `Country List` API). (required) + * @return ApiResponse<GetRegionListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get Region List -
+ * + * @see Get Region + * List (USER_DATA) Documentation + */ + public ApiResponse getRegionList(String countryCode) + throws ApiException { + return travelRuleApi.getRegionList(countryCode); + } + /** * Submit Deposit Questionnaire (For local entities that require travel rule) (supporting * network) (USER_DATA) Submit questionnaire for brokers of local entities that require travel diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/BrokerWithdrawResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/BrokerWithdrawResponse.java index 579bddd99..5def1782d 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/BrokerWithdrawResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/BrokerWithdrawResponse.java @@ -42,11 +42,11 @@ public class BrokerWithdrawResponse { @jakarta.annotation.Nullable private Long trId; - public static final String SERIALIZED_NAME_ACCPTED = "accpted"; + public static final String SERIALIZED_NAME_ACCEPTED = "accepted"; - @SerializedName(SERIALIZED_NAME_ACCPTED) + @SerializedName(SERIALIZED_NAME_ACCEPTED) @jakarta.annotation.Nullable - private Boolean accpted; + private Boolean accepted; public static final String SERIALIZED_NAME_INFO = "info"; @@ -75,23 +75,23 @@ public void setTrId(@jakarta.annotation.Nullable Long trId) { this.trId = trId; } - public BrokerWithdrawResponse accpted(@jakarta.annotation.Nullable Boolean accpted) { - this.accpted = accpted; + public BrokerWithdrawResponse accepted(@jakarta.annotation.Nullable Boolean accepted) { + this.accepted = accepted; return this; } /** - * Get accpted + * Get accepted * - * @return accpted + * @return accepted */ @jakarta.annotation.Nullable - public Boolean getAccpted() { - return accpted; + public Boolean getAccepted() { + return accepted; } - public void setAccpted(@jakarta.annotation.Nullable Boolean accpted) { - this.accpted = accpted; + public void setAccepted(@jakarta.annotation.Nullable Boolean accepted) { + this.accepted = accepted; } public BrokerWithdrawResponse info(@jakarta.annotation.Nullable String info) { @@ -123,13 +123,13 @@ public boolean equals(Object o) { } BrokerWithdrawResponse brokerWithdrawResponse = (BrokerWithdrawResponse) o; return Objects.equals(this.trId, brokerWithdrawResponse.trId) - && Objects.equals(this.accpted, brokerWithdrawResponse.accpted) + && Objects.equals(this.accepted, brokerWithdrawResponse.accepted) && Objects.equals(this.info, brokerWithdrawResponse.info); } @Override public int hashCode() { - return Objects.hash(trId, accpted, info); + return Objects.hash(trId, accepted, info); } @Override @@ -137,7 +137,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class BrokerWithdrawResponse {\n"); sb.append(" trId: ").append(toIndentedString(trId)).append("\n"); - sb.append(" accpted: ").append(toIndentedString(accpted)).append("\n"); + sb.append(" accepted: ").append(toIndentedString(accepted)).append("\n"); sb.append(" info: ").append(toIndentedString(info)).append("\n"); sb.append("}"); return sb.toString(); @@ -150,10 +150,10 @@ public String toUrlQueryString() { String trIdValueAsString = ""; trIdValueAsString = trIdValue.toString(); sb.append("trId=").append(urlEncode(trIdValueAsString)).append(""); - Object accptedValue = getAccpted(); - String accptedValueAsString = ""; - accptedValueAsString = accptedValue.toString(); - sb.append("accpted=").append(urlEncode(accptedValueAsString)).append(""); + Object acceptedValue = getAccepted(); + String acceptedValueAsString = ""; + acceptedValueAsString = acceptedValue.toString(); + sb.append("accepted=").append(urlEncode(acceptedValueAsString)).append(""); Object infoValue = getInfo(); String infoValueAsString = ""; infoValueAsString = infoValue.toString(); @@ -187,7 +187,7 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("trId"); - openapiFields.add("accpted"); + openapiFields.add("accepted"); openapiFields.add("info"); // a set of required properties/fields (JSON key names) diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertRequest.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertRequest.java index 58e5e34f2..874ea614e 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertRequest.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertRequest.java @@ -43,6 +43,12 @@ public class DustConvertRequest { @jakarta.annotation.Nonnull private String asset; + public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "accountType"; + + @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) + @jakarta.annotation.Nullable + private String accountType; + public static final String SERIALIZED_NAME_CLIENT_ID = "clientId"; @SerializedName(SERIALIZED_NAME_CLIENT_ID) @@ -90,6 +96,25 @@ public void setAsset(@jakarta.annotation.Nonnull String asset) { this.asset = asset; } + public DustConvertRequest accountType(@jakarta.annotation.Nullable String accountType) { + this.accountType = accountType; + return this; + } + + /** + * Get accountType + * + * @return accountType + */ + @jakarta.annotation.Nullable + public String getAccountType() { + return accountType; + } + + public void setAccountType(@jakarta.annotation.Nullable String accountType) { + this.accountType = accountType; + } + public DustConvertRequest clientId(@jakarta.annotation.Nullable String clientId) { this.clientId = clientId; return this; @@ -180,6 +205,7 @@ public boolean equals(Object o) { } DustConvertRequest dustConvertRequest = (DustConvertRequest) o; return Objects.equals(this.asset, dustConvertRequest.asset) + && Objects.equals(this.accountType, dustConvertRequest.accountType) && Objects.equals(this.clientId, dustConvertRequest.clientId) && Objects.equals(this.targetAsset, dustConvertRequest.targetAsset) && Objects.equals(this.thirdPartyClientId, dustConvertRequest.thirdPartyClientId) @@ -191,7 +217,12 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - asset, clientId, targetAsset, thirdPartyClientId, dustQuotaAssetToTargetAssetPrice); + asset, + accountType, + clientId, + targetAsset, + thirdPartyClientId, + dustQuotaAssetToTargetAssetPrice); } @Override @@ -199,6 +230,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DustConvertRequest {\n"); sb.append(" asset: ").append(toIndentedString(asset)).append("\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); sb.append(" targetAsset: ").append(toIndentedString(targetAsset)).append("\n"); sb.append(" thirdPartyClientId: ") @@ -218,6 +250,10 @@ public String toUrlQueryString() { String assetValueAsString = ""; assetValueAsString = assetValue.toString(); sb.append("asset=").append(urlEncode(assetValueAsString)).append(""); + Object accountTypeValue = getAccountType(); + String accountTypeValueAsString = ""; + accountTypeValueAsString = accountTypeValue.toString(); + sb.append("accountType=").append(urlEncode(accountTypeValueAsString)).append(""); Object clientIdValue = getClientId(); String clientIdValueAsString = ""; clientIdValueAsString = clientIdValue.toString(); @@ -268,6 +304,7 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("asset"); + openapiFields.add("accountType"); openapiFields.add("clientId"); openapiFields.add("targetAsset"); openapiFields.add("thirdPartyClientId"); @@ -313,6 +350,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " but got `%s`", jsonObj.get("asset").toString())); } + if ((jsonObj.get("accountType") != null && !jsonObj.get("accountType").isJsonNull()) + && !jsonObj.get("accountType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `accountType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("accountType").toString())); + } if ((jsonObj.get("clientId") != null && !jsonObj.get("clientId").isJsonNull()) && !jsonObj.get("clientId").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertibleAssetsRequest.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertibleAssetsRequest.java index 023449858..dc602a0b1 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertibleAssetsRequest.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/DustConvertibleAssetsRequest.java @@ -37,6 +37,12 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class DustConvertibleAssetsRequest { + public static final String SERIALIZED_NAME_ACCOUNT_TYPE = "accountType"; + + @SerializedName(SERIALIZED_NAME_ACCOUNT_TYPE) + @jakarta.annotation.Nullable + private String accountType; + public static final String SERIALIZED_NAME_TARGET_ASSET = "targetAsset"; @SerializedName(SERIALIZED_NAME_TARGET_ASSET) @@ -52,6 +58,26 @@ public class DustConvertibleAssetsRequest { public DustConvertibleAssetsRequest() {} + public DustConvertibleAssetsRequest accountType( + @jakarta.annotation.Nullable String accountType) { + this.accountType = accountType; + return this; + } + + /** + * Get accountType + * + * @return accountType + */ + @jakarta.annotation.Nullable + public String getAccountType() { + return accountType; + } + + public void setAccountType(@jakarta.annotation.Nullable String accountType) { + this.accountType = accountType; + } + public DustConvertibleAssetsRequest targetAsset( @jakarta.annotation.Nonnull String targetAsset) { this.targetAsset = targetAsset; @@ -105,7 +131,8 @@ public boolean equals(Object o) { } DustConvertibleAssetsRequest dustConvertibleAssetsRequest = (DustConvertibleAssetsRequest) o; - return Objects.equals(this.targetAsset, dustConvertibleAssetsRequest.targetAsset) + return Objects.equals(this.accountType, dustConvertibleAssetsRequest.accountType) + && Objects.equals(this.targetAsset, dustConvertibleAssetsRequest.targetAsset) && Objects.equals( this.dustQuotaAssetToTargetAssetPrice, dustConvertibleAssetsRequest.dustQuotaAssetToTargetAssetPrice); @@ -113,13 +140,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(targetAsset, dustQuotaAssetToTargetAssetPrice); + return Objects.hash(accountType, targetAsset, dustQuotaAssetToTargetAssetPrice); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DustConvertibleAssetsRequest {\n"); + sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); sb.append(" targetAsset: ").append(toIndentedString(targetAsset)).append("\n"); sb.append(" dustQuotaAssetToTargetAssetPrice: ") .append(toIndentedString(dustQuotaAssetToTargetAssetPrice)) @@ -131,6 +159,10 @@ public String toString() { public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); + Object accountTypeValue = getAccountType(); + String accountTypeValueAsString = ""; + accountTypeValueAsString = accountTypeValue.toString(); + sb.append("accountType=").append(urlEncode(accountTypeValueAsString)).append(""); Object targetAssetValue = getTargetAsset(); String targetAssetValueAsString = ""; targetAssetValueAsString = targetAssetValue.toString(); @@ -170,6 +202,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("accountType"); openapiFields.add("targetAsset"); openapiFields.add("dustQuotaAssetToTargetAssetPrice"); @@ -207,6 +240,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("accountType") != null && !jsonObj.get("accountType").isJsonNull()) + && !jsonObj.get("accountType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `accountType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("accountType").toString())); + } if (!jsonObj.get("targetAsset").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponse.java new file mode 100644 index 000000000..f513d1752 --- /dev/null +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponse.java @@ -0,0 +1,277 @@ +/* + * Binance Wallet REST API + * OpenAPI Specification for the Binance Wallet REST API + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.wallet.rest.model; + +import com.binance.connector.client.wallet.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** GetCountryListResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class GetCountryListResponse { + public static final String SERIALIZED_NAME_COUNTRIES = "countries"; + + @SerializedName(SERIALIZED_NAME_COUNTRIES) + @jakarta.annotation.Nullable + private List<@Valid GetCountryListResponseCountriesInner> countries; + + public static final String SERIALIZED_NAME_LAST_UPDATED = "lastUpdated"; + + @SerializedName(SERIALIZED_NAME_LAST_UPDATED) + @jakarta.annotation.Nullable + private Long lastUpdated; + + public GetCountryListResponse() {} + + public GetCountryListResponse countries( + @jakarta.annotation.Nullable + List<@Valid GetCountryListResponseCountriesInner> countries) { + this.countries = countries; + return this; + } + + public GetCountryListResponse addCountriesItem( + GetCountryListResponseCountriesInner countriesItem) { + if (this.countries == null) { + this.countries = new ArrayList<>(); + } + this.countries.add(countriesItem); + return this; + } + + /** + * Get countries + * + * @return countries + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid GetCountryListResponseCountriesInner> getCountries() { + return countries; + } + + public void setCountries( + @jakarta.annotation.Nullable + List<@Valid GetCountryListResponseCountriesInner> countries) { + this.countries = countries; + } + + public GetCountryListResponse lastUpdated(@jakarta.annotation.Nullable Long lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } + + /** + * Get lastUpdated + * + * @return lastUpdated + */ + @jakarta.annotation.Nullable + public Long getLastUpdated() { + return lastUpdated; + } + + public void setLastUpdated(@jakarta.annotation.Nullable Long lastUpdated) { + this.lastUpdated = lastUpdated; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCountryListResponse getCountryListResponse = (GetCountryListResponse) o; + return Objects.equals(this.countries, getCountryListResponse.countries) + && Objects.equals(this.lastUpdated, getCountryListResponse.lastUpdated); + } + + @Override + public int hashCode() { + return Objects.hash(countries, lastUpdated); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetCountryListResponse {\n"); + sb.append(" countries: ").append(toIndentedString(countries)).append("\n"); + sb.append(" lastUpdated: ").append(toIndentedString(lastUpdated)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object countriesValue = getCountries(); + String countriesValueAsString = ""; + countriesValueAsString = + (String) + ((Collection) countriesValue) + .stream().map(Object::toString).collect(Collectors.joining(",")); + sb.append("countries=").append(urlEncode(countriesValueAsString)).append(""); + Object lastUpdatedValue = getLastUpdated(); + String lastUpdatedValueAsString = ""; + lastUpdatedValueAsString = lastUpdatedValue.toString(); + sb.append("lastUpdated=").append(urlEncode(lastUpdatedValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("countries"); + openapiFields.add("lastUpdated"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetCountryListResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetCountryListResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GetCountryListResponse is not found in" + + " the empty JSON string", + GetCountryListResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("countries") != null && !jsonObj.get("countries").isJsonNull()) { + JsonArray jsonArraycountries = jsonObj.getAsJsonArray("countries"); + if (jsonArraycountries != null) { + // ensure the json data is an array + if (!jsonObj.get("countries").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `countries` to be an array in the JSON" + + " string but got `%s`", + jsonObj.get("countries").toString())); + } + + // validate the optional field `countries` (array) + for (int i = 0; i < jsonArraycountries.size(); i++) { + GetCountryListResponseCountriesInner.validateJsonElement( + jsonArraycountries.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetCountryListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetCountryListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(GetCountryListResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GetCountryListResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetCountryListResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetCountryListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetCountryListResponse + * @throws IOException if the JSON string is invalid with respect to GetCountryListResponse + */ + public static GetCountryListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetCountryListResponse.class); + } + + /** + * Convert an instance of GetCountryListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponseCountriesInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponseCountriesInner.java new file mode 100644 index 000000000..bab1b044b --- /dev/null +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetCountryListResponseCountriesInner.java @@ -0,0 +1,420 @@ +/* + * Binance Wallet REST API + * OpenAPI Specification for the Binance Wallet REST API + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.wallet.rest.model; + +import com.binance.connector.client.wallet.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** GetCountryListResponseCountriesInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class GetCountryListResponseCountriesInner { + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + @jakarta.annotation.Nullable + private String countryCode; + + public static final String SERIALIZED_NAME_COUNTRY_NAME = "countryName"; + + @SerializedName(SERIALIZED_NAME_COUNTRY_NAME) + @jakarta.annotation.Nullable + private String countryName; + + public static final String SERIALIZED_NAME_BLOCK_TYPE = "blockType"; + + @SerializedName(SERIALIZED_NAME_BLOCK_TYPE) + @jakarta.annotation.Nullable + private String blockType; + + public static final String SERIALIZED_NAME_DEPOSIT_ALLOWED = "depositAllowed"; + + @SerializedName(SERIALIZED_NAME_DEPOSIT_ALLOWED) + @jakarta.annotation.Nullable + private Boolean depositAllowed; + + public static final String SERIALIZED_NAME_WITHDRAWAL_ALLOWED = "withdrawalAllowed"; + + @SerializedName(SERIALIZED_NAME_WITHDRAWAL_ALLOWED) + @jakarta.annotation.Nullable + private Boolean withdrawalAllowed; + + public static final String SERIALIZED_NAME_HAS_REGION_RESTRICTIONS = "hasRegionRestrictions"; + + @SerializedName(SERIALIZED_NAME_HAS_REGION_RESTRICTIONS) + @jakarta.annotation.Nullable + private Boolean hasRegionRestrictions; + + public GetCountryListResponseCountriesInner() {} + + public GetCountryListResponseCountriesInner countryCode( + @jakarta.annotation.Nullable String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Get countryCode + * + * @return countryCode + */ + @jakarta.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(@jakarta.annotation.Nullable String countryCode) { + this.countryCode = countryCode; + } + + public GetCountryListResponseCountriesInner countryName( + @jakarta.annotation.Nullable String countryName) { + this.countryName = countryName; + return this; + } + + /** + * Get countryName + * + * @return countryName + */ + @jakarta.annotation.Nullable + public String getCountryName() { + return countryName; + } + + public void setCountryName(@jakarta.annotation.Nullable String countryName) { + this.countryName = countryName; + } + + public GetCountryListResponseCountriesInner blockType( + @jakarta.annotation.Nullable String blockType) { + this.blockType = blockType; + return this; + } + + /** + * Get blockType + * + * @return blockType + */ + @jakarta.annotation.Nullable + public String getBlockType() { + return blockType; + } + + public void setBlockType(@jakarta.annotation.Nullable String blockType) { + this.blockType = blockType; + } + + public GetCountryListResponseCountriesInner depositAllowed( + @jakarta.annotation.Nullable Boolean depositAllowed) { + this.depositAllowed = depositAllowed; + return this; + } + + /** + * Get depositAllowed + * + * @return depositAllowed + */ + @jakarta.annotation.Nullable + public Boolean getDepositAllowed() { + return depositAllowed; + } + + public void setDepositAllowed(@jakarta.annotation.Nullable Boolean depositAllowed) { + this.depositAllowed = depositAllowed; + } + + public GetCountryListResponseCountriesInner withdrawalAllowed( + @jakarta.annotation.Nullable Boolean withdrawalAllowed) { + this.withdrawalAllowed = withdrawalAllowed; + return this; + } + + /** + * Get withdrawalAllowed + * + * @return withdrawalAllowed + */ + @jakarta.annotation.Nullable + public Boolean getWithdrawalAllowed() { + return withdrawalAllowed; + } + + public void setWithdrawalAllowed(@jakarta.annotation.Nullable Boolean withdrawalAllowed) { + this.withdrawalAllowed = withdrawalAllowed; + } + + public GetCountryListResponseCountriesInner hasRegionRestrictions( + @jakarta.annotation.Nullable Boolean hasRegionRestrictions) { + this.hasRegionRestrictions = hasRegionRestrictions; + return this; + } + + /** + * Get hasRegionRestrictions + * + * @return hasRegionRestrictions + */ + @jakarta.annotation.Nullable + public Boolean getHasRegionRestrictions() { + return hasRegionRestrictions; + } + + public void setHasRegionRestrictions( + @jakarta.annotation.Nullable Boolean hasRegionRestrictions) { + this.hasRegionRestrictions = hasRegionRestrictions; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCountryListResponseCountriesInner getCountryListResponseCountriesInner = + (GetCountryListResponseCountriesInner) o; + return Objects.equals(this.countryCode, getCountryListResponseCountriesInner.countryCode) + && Objects.equals( + this.countryName, getCountryListResponseCountriesInner.countryName) + && Objects.equals(this.blockType, getCountryListResponseCountriesInner.blockType) + && Objects.equals( + this.depositAllowed, getCountryListResponseCountriesInner.depositAllowed) + && Objects.equals( + this.withdrawalAllowed, + getCountryListResponseCountriesInner.withdrawalAllowed) + && Objects.equals( + this.hasRegionRestrictions, + getCountryListResponseCountriesInner.hasRegionRestrictions); + } + + @Override + public int hashCode() { + return Objects.hash( + countryCode, + countryName, + blockType, + depositAllowed, + withdrawalAllowed, + hasRegionRestrictions); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetCountryListResponseCountriesInner {\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" countryName: ").append(toIndentedString(countryName)).append("\n"); + sb.append(" blockType: ").append(toIndentedString(blockType)).append("\n"); + sb.append(" depositAllowed: ").append(toIndentedString(depositAllowed)).append("\n"); + sb.append(" withdrawalAllowed: ").append(toIndentedString(withdrawalAllowed)).append("\n"); + sb.append(" hasRegionRestrictions: ") + .append(toIndentedString(hasRegionRestrictions)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object countryCodeValue = getCountryCode(); + String countryCodeValueAsString = ""; + countryCodeValueAsString = countryCodeValue.toString(); + sb.append("countryCode=").append(urlEncode(countryCodeValueAsString)).append(""); + Object countryNameValue = getCountryName(); + String countryNameValueAsString = ""; + countryNameValueAsString = countryNameValue.toString(); + sb.append("countryName=").append(urlEncode(countryNameValueAsString)).append(""); + Object blockTypeValue = getBlockType(); + String blockTypeValueAsString = ""; + blockTypeValueAsString = blockTypeValue.toString(); + sb.append("blockType=").append(urlEncode(blockTypeValueAsString)).append(""); + Object depositAllowedValue = getDepositAllowed(); + String depositAllowedValueAsString = ""; + depositAllowedValueAsString = depositAllowedValue.toString(); + sb.append("depositAllowed=").append(urlEncode(depositAllowedValueAsString)).append(""); + Object withdrawalAllowedValue = getWithdrawalAllowed(); + String withdrawalAllowedValueAsString = ""; + withdrawalAllowedValueAsString = withdrawalAllowedValue.toString(); + sb.append("withdrawalAllowed=") + .append(urlEncode(withdrawalAllowedValueAsString)) + .append(""); + Object hasRegionRestrictionsValue = getHasRegionRestrictions(); + String hasRegionRestrictionsValueAsString = ""; + hasRegionRestrictionsValueAsString = hasRegionRestrictionsValue.toString(); + sb.append("hasRegionRestrictions=") + .append(urlEncode(hasRegionRestrictionsValueAsString)) + .append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("countryCode"); + openapiFields.add("countryName"); + openapiFields.add("blockType"); + openapiFields.add("depositAllowed"); + openapiFields.add("withdrawalAllowed"); + openapiFields.add("hasRegionRestrictions"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * GetCountryListResponseCountriesInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetCountryListResponseCountriesInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GetCountryListResponseCountriesInner" + + " is not found in the empty JSON string", + GetCountryListResponseCountriesInner.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) + && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `countryCode` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("countryCode").toString())); + } + if ((jsonObj.get("countryName") != null && !jsonObj.get("countryName").isJsonNull()) + && !jsonObj.get("countryName").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `countryName` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("countryName").toString())); + } + if ((jsonObj.get("blockType") != null && !jsonObj.get("blockType").isJsonNull()) + && !jsonObj.get("blockType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `blockType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("blockType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetCountryListResponseCountriesInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetCountryListResponseCountriesInner' + // and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(GetCountryListResponseCountriesInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write( + JsonWriter out, GetCountryListResponseCountriesInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetCountryListResponseCountriesInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetCountryListResponseCountriesInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetCountryListResponseCountriesInner + * @throws IOException if the JSON string is invalid with respect to + * GetCountryListResponseCountriesInner + */ + public static GetCountryListResponseCountriesInner fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, GetCountryListResponseCountriesInner.class); + } + + /** + * Convert an instance of GetCountryListResponseCountriesInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetRegionListResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetRegionListResponse.java new file mode 100644 index 000000000..4533861b7 --- /dev/null +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetRegionListResponse.java @@ -0,0 +1,313 @@ +/* + * Binance Wallet REST API + * OpenAPI Specification for the Binance Wallet REST API + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.wallet.rest.model; + +import com.binance.connector.client.wallet.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.Valid; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import org.hibernate.validator.constraints.*; + +/** GetRegionListResponse */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class GetRegionListResponse { + public static final String SERIALIZED_NAME_COUNTRY_CODE = "countryCode"; + + @SerializedName(SERIALIZED_NAME_COUNTRY_CODE) + @jakarta.annotation.Nullable + private String countryCode; + + public static final String SERIALIZED_NAME_REGIONS = "regions"; + + @SerializedName(SERIALIZED_NAME_REGIONS) + @jakarta.annotation.Nullable + private List<@Valid GetRegionListResponseRegionsInner> regions; + + public static final String SERIALIZED_NAME_LAST_UPDATED = "lastUpdated"; + + @SerializedName(SERIALIZED_NAME_LAST_UPDATED) + @jakarta.annotation.Nullable + private Long lastUpdated; + + public GetRegionListResponse() {} + + public GetRegionListResponse countryCode(@jakarta.annotation.Nullable String countryCode) { + this.countryCode = countryCode; + return this; + } + + /** + * Get countryCode + * + * @return countryCode + */ + @jakarta.annotation.Nullable + public String getCountryCode() { + return countryCode; + } + + public void setCountryCode(@jakarta.annotation.Nullable String countryCode) { + this.countryCode = countryCode; + } + + public GetRegionListResponse regions( + @jakarta.annotation.Nullable List<@Valid GetRegionListResponseRegionsInner> regions) { + this.regions = regions; + return this; + } + + public GetRegionListResponse addRegionsItem(GetRegionListResponseRegionsInner regionsItem) { + if (this.regions == null) { + this.regions = new ArrayList<>(); + } + this.regions.add(regionsItem); + return this; + } + + /** + * Get regions + * + * @return regions + */ + @jakarta.annotation.Nullable + @Valid + public List<@Valid GetRegionListResponseRegionsInner> getRegions() { + return regions; + } + + public void setRegions( + @jakarta.annotation.Nullable List<@Valid GetRegionListResponseRegionsInner> regions) { + this.regions = regions; + } + + public GetRegionListResponse lastUpdated(@jakarta.annotation.Nullable Long lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } + + /** + * Get lastUpdated + * + * @return lastUpdated + */ + @jakarta.annotation.Nullable + public Long getLastUpdated() { + return lastUpdated; + } + + public void setLastUpdated(@jakarta.annotation.Nullable Long lastUpdated) { + this.lastUpdated = lastUpdated; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRegionListResponse getRegionListResponse = (GetRegionListResponse) o; + return Objects.equals(this.countryCode, getRegionListResponse.countryCode) + && Objects.equals(this.regions, getRegionListResponse.regions) + && Objects.equals(this.lastUpdated, getRegionListResponse.lastUpdated); + } + + @Override + public int hashCode() { + return Objects.hash(countryCode, regions, lastUpdated); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetRegionListResponse {\n"); + sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n"); + sb.append(" regions: ").append(toIndentedString(regions)).append("\n"); + sb.append(" lastUpdated: ").append(toIndentedString(lastUpdated)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object countryCodeValue = getCountryCode(); + String countryCodeValueAsString = ""; + countryCodeValueAsString = countryCodeValue.toString(); + sb.append("countryCode=").append(urlEncode(countryCodeValueAsString)).append(""); + Object regionsValue = getRegions(); + String regionsValueAsString = ""; + regionsValueAsString = + (String) + ((Collection) regionsValue) + .stream().map(Object::toString).collect(Collectors.joining(",")); + sb.append("regions=").append(urlEncode(regionsValueAsString)).append(""); + Object lastUpdatedValue = getLastUpdated(); + String lastUpdatedValueAsString = ""; + lastUpdatedValueAsString = lastUpdatedValue.toString(); + sb.append("lastUpdated=").append(urlEncode(lastUpdatedValueAsString)).append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("countryCode"); + openapiFields.add("regions"); + openapiFields.add("lastUpdated"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to GetRegionListResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetRegionListResponse.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GetRegionListResponse is not found in" + + " the empty JSON string", + GetRegionListResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("countryCode") != null && !jsonObj.get("countryCode").isJsonNull()) + && !jsonObj.get("countryCode").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `countryCode` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("countryCode").toString())); + } + if (jsonObj.get("regions") != null && !jsonObj.get("regions").isJsonNull()) { + JsonArray jsonArrayregions = jsonObj.getAsJsonArray("regions"); + if (jsonArrayregions != null) { + // ensure the json data is an array + if (!jsonObj.get("regions").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `regions` to be an array in the JSON string" + + " but got `%s`", + jsonObj.get("regions").toString())); + } + + // validate the optional field `regions` (array) + for (int i = 0; i < jsonArrayregions.size(); i++) { + GetRegionListResponseRegionsInner.validateJsonElement(jsonArrayregions.get(i)); + } + ; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetRegionListResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetRegionListResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(GetRegionListResponse.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GetRegionListResponse value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetRegionListResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetRegionListResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetRegionListResponse + * @throws IOException if the JSON string is invalid with respect to GetRegionListResponse + */ + public static GetRegionListResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetRegionListResponse.class); + } + + /** + * Convert an instance of GetRegionListResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetRegionListResponseRegionsInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetRegionListResponseRegionsInner.java new file mode 100644 index 000000000..09f1b3ae0 --- /dev/null +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/GetRegionListResponseRegionsInner.java @@ -0,0 +1,330 @@ +/* + * Binance Wallet REST API + * OpenAPI Specification for the Binance Wallet REST API + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.wallet.rest.model; + +import com.binance.connector.client.wallet.rest.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.HashSet; +import java.util.Objects; +import org.hibernate.validator.constraints.*; + +/** GetRegionListResponseRegionsInner */ +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.12.0") +public class GetRegionListResponseRegionsInner { + public static final String SERIALIZED_NAME_REGION_NAME = "regionName"; + + @SerializedName(SERIALIZED_NAME_REGION_NAME) + @jakarta.annotation.Nullable + private String regionName; + + public static final String SERIALIZED_NAME_BLOCK_TYPE = "blockType"; + + @SerializedName(SERIALIZED_NAME_BLOCK_TYPE) + @jakarta.annotation.Nullable + private String blockType; + + public static final String SERIALIZED_NAME_DEPOSIT_ALLOWED = "depositAllowed"; + + @SerializedName(SERIALIZED_NAME_DEPOSIT_ALLOWED) + @jakarta.annotation.Nullable + private Boolean depositAllowed; + + public static final String SERIALIZED_NAME_WITHDRAWAL_ALLOWED = "withdrawalAllowed"; + + @SerializedName(SERIALIZED_NAME_WITHDRAWAL_ALLOWED) + @jakarta.annotation.Nullable + private Boolean withdrawalAllowed; + + public GetRegionListResponseRegionsInner() {} + + public GetRegionListResponseRegionsInner regionName( + @jakarta.annotation.Nullable String regionName) { + this.regionName = regionName; + return this; + } + + /** + * Get regionName + * + * @return regionName + */ + @jakarta.annotation.Nullable + public String getRegionName() { + return regionName; + } + + public void setRegionName(@jakarta.annotation.Nullable String regionName) { + this.regionName = regionName; + } + + public GetRegionListResponseRegionsInner blockType( + @jakarta.annotation.Nullable String blockType) { + this.blockType = blockType; + return this; + } + + /** + * Get blockType + * + * @return blockType + */ + @jakarta.annotation.Nullable + public String getBlockType() { + return blockType; + } + + public void setBlockType(@jakarta.annotation.Nullable String blockType) { + this.blockType = blockType; + } + + public GetRegionListResponseRegionsInner depositAllowed( + @jakarta.annotation.Nullable Boolean depositAllowed) { + this.depositAllowed = depositAllowed; + return this; + } + + /** + * Get depositAllowed + * + * @return depositAllowed + */ + @jakarta.annotation.Nullable + public Boolean getDepositAllowed() { + return depositAllowed; + } + + public void setDepositAllowed(@jakarta.annotation.Nullable Boolean depositAllowed) { + this.depositAllowed = depositAllowed; + } + + public GetRegionListResponseRegionsInner withdrawalAllowed( + @jakarta.annotation.Nullable Boolean withdrawalAllowed) { + this.withdrawalAllowed = withdrawalAllowed; + return this; + } + + /** + * Get withdrawalAllowed + * + * @return withdrawalAllowed + */ + @jakarta.annotation.Nullable + public Boolean getWithdrawalAllowed() { + return withdrawalAllowed; + } + + public void setWithdrawalAllowed(@jakarta.annotation.Nullable Boolean withdrawalAllowed) { + this.withdrawalAllowed = withdrawalAllowed; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetRegionListResponseRegionsInner getRegionListResponseRegionsInner = + (GetRegionListResponseRegionsInner) o; + return Objects.equals(this.regionName, getRegionListResponseRegionsInner.regionName) + && Objects.equals(this.blockType, getRegionListResponseRegionsInner.blockType) + && Objects.equals( + this.depositAllowed, getRegionListResponseRegionsInner.depositAllowed) + && Objects.equals( + this.withdrawalAllowed, + getRegionListResponseRegionsInner.withdrawalAllowed); + } + + @Override + public int hashCode() { + return Objects.hash(regionName, blockType, depositAllowed, withdrawalAllowed); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetRegionListResponseRegionsInner {\n"); + sb.append(" regionName: ").append(toIndentedString(regionName)).append("\n"); + sb.append(" blockType: ").append(toIndentedString(blockType)).append("\n"); + sb.append(" depositAllowed: ").append(toIndentedString(depositAllowed)).append("\n"); + sb.append(" withdrawalAllowed: ").append(toIndentedString(withdrawalAllowed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + public String toUrlQueryString() { + StringBuilder sb = new StringBuilder(); + + Object regionNameValue = getRegionName(); + String regionNameValueAsString = ""; + regionNameValueAsString = regionNameValue.toString(); + sb.append("regionName=").append(urlEncode(regionNameValueAsString)).append(""); + Object blockTypeValue = getBlockType(); + String blockTypeValueAsString = ""; + blockTypeValueAsString = blockTypeValue.toString(); + sb.append("blockType=").append(urlEncode(blockTypeValueAsString)).append(""); + Object depositAllowedValue = getDepositAllowed(); + String depositAllowedValueAsString = ""; + depositAllowedValueAsString = depositAllowedValue.toString(); + sb.append("depositAllowed=").append(urlEncode(depositAllowedValueAsString)).append(""); + Object withdrawalAllowedValue = getWithdrawalAllowed(); + String withdrawalAllowedValueAsString = ""; + withdrawalAllowedValueAsString = withdrawalAllowedValue.toString(); + sb.append("withdrawalAllowed=") + .append(urlEncode(withdrawalAllowedValueAsString)) + .append(""); + return sb.toString(); + } + + public static String urlEncode(String s) { + try { + return URLEncoder.encode(s, StandardCharsets.UTF_8.name()); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(StandardCharsets.UTF_8.name() + " is unsupported", e); + } + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("regionName"); + openapiFields.add("blockType"); + openapiFields.add("depositAllowed"); + openapiFields.add("withdrawalAllowed"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to + * GetRegionListResponseRegionsInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!GetRegionListResponseRegionsInner.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + "The required field(s) %s in GetRegionListResponseRegionsInner is" + + " not found in the empty JSON string", + GetRegionListResponseRegionsInner.openapiRequiredFields + .toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("regionName") != null && !jsonObj.get("regionName").isJsonNull()) + && !jsonObj.get("regionName").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `regionName` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("regionName").toString())); + } + if ((jsonObj.get("blockType") != null && !jsonObj.get("blockType").isJsonNull()) + && !jsonObj.get("blockType").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `blockType` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("blockType").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!GetRegionListResponseRegionsInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'GetRegionListResponseRegionsInner' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(GetRegionListResponseRegionsInner.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, GetRegionListResponseRegionsInner value) + throws IOException { + JsonElement obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public GetRegionListResponseRegionsInner read(JsonReader in) + throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + // validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + }.nullSafe(); + } + } + + /** + * Create an instance of GetRegionListResponseRegionsInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of GetRegionListResponseRegionsInner + * @throws IOException if the JSON string is invalid with respect to + * GetRegionListResponseRegionsInner + */ + public static GetRegionListResponseRegionsInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, GetRegionListResponseRegionsInner.class); + } + + /** + * Convert an instance of GetRegionListResponseRegionsInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/VaspListResponseInner.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/VaspListResponseInner.java index 871a8a22d..f7bc530e1 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/VaspListResponseInner.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/VaspListResponseInner.java @@ -36,20 +36,45 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.12.0") public class VaspListResponseInner { + public static final String SERIALIZED_NAME_VASP_CODE = "vaspCode"; + + @SerializedName(SERIALIZED_NAME_VASP_CODE) + @jakarta.annotation.Nullable + private String vaspCode; + public static final String SERIALIZED_NAME_VASP_NAME = "vaspName"; @SerializedName(SERIALIZED_NAME_VASP_NAME) @jakarta.annotation.Nullable private String vaspName; - public static final String SERIALIZED_NAME_VASP_CODE = "vaspCode"; + public static final String SERIALIZED_NAME_IDENTIFIER = "identifier"; - @SerializedName(SERIALIZED_NAME_VASP_CODE) + @SerializedName(SERIALIZED_NAME_IDENTIFIER) @jakarta.annotation.Nullable - private String vaspCode; + private String identifier; public VaspListResponseInner() {} + public VaspListResponseInner vaspCode(@jakarta.annotation.Nullable String vaspCode) { + this.vaspCode = vaspCode; + return this; + } + + /** + * Get vaspCode + * + * @return vaspCode + */ + @jakarta.annotation.Nullable + public String getVaspCode() { + return vaspCode; + } + + public void setVaspCode(@jakarta.annotation.Nullable String vaspCode) { + this.vaspCode = vaspCode; + } + public VaspListResponseInner vaspName(@jakarta.annotation.Nullable String vaspName) { this.vaspName = vaspName; return this; @@ -69,23 +94,23 @@ public void setVaspName(@jakarta.annotation.Nullable String vaspName) { this.vaspName = vaspName; } - public VaspListResponseInner vaspCode(@jakarta.annotation.Nullable String vaspCode) { - this.vaspCode = vaspCode; + public VaspListResponseInner identifier(@jakarta.annotation.Nullable String identifier) { + this.identifier = identifier; return this; } /** - * Get vaspCode + * Get identifier * - * @return vaspCode + * @return identifier */ @jakarta.annotation.Nullable - public String getVaspCode() { - return vaspCode; + public String getIdentifier() { + return identifier; } - public void setVaspCode(@jakarta.annotation.Nullable String vaspCode) { - this.vaspCode = vaspCode; + public void setIdentifier(@jakarta.annotation.Nullable String identifier) { + this.identifier = identifier; } @Override @@ -97,21 +122,23 @@ public boolean equals(Object o) { return false; } VaspListResponseInner vaspListResponseInner = (VaspListResponseInner) o; - return Objects.equals(this.vaspName, vaspListResponseInner.vaspName) - && Objects.equals(this.vaspCode, vaspListResponseInner.vaspCode); + return Objects.equals(this.vaspCode, vaspListResponseInner.vaspCode) + && Objects.equals(this.vaspName, vaspListResponseInner.vaspName) + && Objects.equals(this.identifier, vaspListResponseInner.identifier); } @Override public int hashCode() { - return Objects.hash(vaspName, vaspCode); + return Objects.hash(vaspCode, vaspName, identifier); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class VaspListResponseInner {\n"); - sb.append(" vaspName: ").append(toIndentedString(vaspName)).append("\n"); sb.append(" vaspCode: ").append(toIndentedString(vaspCode)).append("\n"); + sb.append(" vaspName: ").append(toIndentedString(vaspName)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); sb.append("}"); return sb.toString(); } @@ -119,14 +146,18 @@ public String toString() { public String toUrlQueryString() { StringBuilder sb = new StringBuilder(); - Object vaspNameValue = getVaspName(); - String vaspNameValueAsString = ""; - vaspNameValueAsString = vaspNameValue.toString(); - sb.append("vaspName=").append(urlEncode(vaspNameValueAsString)).append(""); Object vaspCodeValue = getVaspCode(); String vaspCodeValueAsString = ""; vaspCodeValueAsString = vaspCodeValue.toString(); sb.append("vaspCode=").append(urlEncode(vaspCodeValueAsString)).append(""); + Object vaspNameValue = getVaspName(); + String vaspNameValueAsString = ""; + vaspNameValueAsString = vaspNameValue.toString(); + sb.append("vaspName=").append(urlEncode(vaspNameValueAsString)).append(""); + Object identifierValue = getIdentifier(); + String identifierValueAsString = ""; + identifierValueAsString = identifierValue.toString(); + sb.append("identifier=").append(urlEncode(identifierValueAsString)).append(""); return sb.toString(); } @@ -155,8 +186,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("vaspName"); openapiFields.add("vaspCode"); + openapiFields.add("vaspName"); + openapiFields.add("identifier"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -180,6 +212,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("vaspCode") != null && !jsonObj.get("vaspCode").isJsonNull()) + && !jsonObj.get("vaspCode").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + "Expected the field `vaspCode` to be a primitive type in the JSON" + + " string but got `%s`", + jsonObj.get("vaspCode").toString())); + } if ((jsonObj.get("vaspName") != null && !jsonObj.get("vaspName").isJsonNull()) && !jsonObj.get("vaspName").isJsonPrimitive()) { throw new IllegalArgumentException( @@ -188,13 +228,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti + " string but got `%s`", jsonObj.get("vaspName").toString())); } - if ((jsonObj.get("vaspCode") != null && !jsonObj.get("vaspCode").isJsonNull()) - && !jsonObj.get("vaspCode").isJsonPrimitive()) { + if ((jsonObj.get("identifier") != null && !jsonObj.get("identifier").isJsonNull()) + && !jsonObj.get("identifier").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( - "Expected the field `vaspCode` to be a primitive type in the JSON" + "Expected the field `identifier` to be a primitive type in the JSON" + " string but got `%s`", - jsonObj.get("vaspCode").toString())); + jsonObj.get("identifier").toString())); } } diff --git a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawTravelRuleResponse.java b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawTravelRuleResponse.java index 274344d32..41a21b0c0 100644 --- a/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawTravelRuleResponse.java +++ b/clients/wallet/src/main/java/com/binance/connector/client/wallet/rest/model/WithdrawTravelRuleResponse.java @@ -42,11 +42,11 @@ public class WithdrawTravelRuleResponse { @jakarta.annotation.Nullable private Long trId; - public static final String SERIALIZED_NAME_ACCPTED = "accpted"; + public static final String SERIALIZED_NAME_ACCEPTED = "accepted"; - @SerializedName(SERIALIZED_NAME_ACCPTED) + @SerializedName(SERIALIZED_NAME_ACCEPTED) @jakarta.annotation.Nullable - private Boolean accpted; + private Boolean accepted; public static final String SERIALIZED_NAME_INFO = "info"; @@ -75,23 +75,23 @@ public void setTrId(@jakarta.annotation.Nullable Long trId) { this.trId = trId; } - public WithdrawTravelRuleResponse accpted(@jakarta.annotation.Nullable Boolean accpted) { - this.accpted = accpted; + public WithdrawTravelRuleResponse accepted(@jakarta.annotation.Nullable Boolean accepted) { + this.accepted = accepted; return this; } /** - * Get accpted + * Get accepted * - * @return accpted + * @return accepted */ @jakarta.annotation.Nullable - public Boolean getAccpted() { - return accpted; + public Boolean getAccepted() { + return accepted; } - public void setAccpted(@jakarta.annotation.Nullable Boolean accpted) { - this.accpted = accpted; + public void setAccepted(@jakarta.annotation.Nullable Boolean accepted) { + this.accepted = accepted; } public WithdrawTravelRuleResponse info(@jakarta.annotation.Nullable String info) { @@ -123,13 +123,13 @@ public boolean equals(Object o) { } WithdrawTravelRuleResponse withdrawTravelRuleResponse = (WithdrawTravelRuleResponse) o; return Objects.equals(this.trId, withdrawTravelRuleResponse.trId) - && Objects.equals(this.accpted, withdrawTravelRuleResponse.accpted) + && Objects.equals(this.accepted, withdrawTravelRuleResponse.accepted) && Objects.equals(this.info, withdrawTravelRuleResponse.info); } @Override public int hashCode() { - return Objects.hash(trId, accpted, info); + return Objects.hash(trId, accepted, info); } @Override @@ -137,7 +137,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class WithdrawTravelRuleResponse {\n"); sb.append(" trId: ").append(toIndentedString(trId)).append("\n"); - sb.append(" accpted: ").append(toIndentedString(accpted)).append("\n"); + sb.append(" accepted: ").append(toIndentedString(accepted)).append("\n"); sb.append(" info: ").append(toIndentedString(info)).append("\n"); sb.append("}"); return sb.toString(); @@ -150,10 +150,10 @@ public String toUrlQueryString() { String trIdValueAsString = ""; trIdValueAsString = trIdValue.toString(); sb.append("trId=").append(urlEncode(trIdValueAsString)).append(""); - Object accptedValue = getAccpted(); - String accptedValueAsString = ""; - accptedValueAsString = accptedValue.toString(); - sb.append("accpted=").append(urlEncode(accptedValueAsString)).append(""); + Object acceptedValue = getAccepted(); + String acceptedValueAsString = ""; + acceptedValueAsString = acceptedValue.toString(); + sb.append("accepted=").append(urlEncode(acceptedValueAsString)).append(""); Object infoValue = getInfo(); String infoValueAsString = ""; infoValueAsString = infoValue.toString(); @@ -187,7 +187,7 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); openapiFields.add("trId"); - openapiFields.add("accpted"); + openapiFields.add("accepted"); openapiFields.add("info"); // a set of required properties/fields (JSON key names) diff --git a/examples/wallet/pom.xml b/examples/wallet/pom.xml index 0c845691b..1c71e41dc 100644 --- a/examples/wallet/pom.xml +++ b/examples/wallet/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-wallet - 4.0.0 + 5.0.0 \ No newline at end of file diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawExample.java index 383238b74..bf5f73992 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/capital/WithdrawExample.java @@ -36,7 +36,13 @@ public WalletRestApi getApi() { * `NIL` you will need update SAPI to `POST * /sapi/v1/localentity/withdraw/apply` else you can continue `POST * /sapi/v1/capital/withdraw/apply`. Please note that if you are required to comply to - * travel rule please refer to the Travel Rule SAPI. Weight: 900 + * travel rule please refer to the Travel Rule SAPI. * For networks that do not support + * memo/tag, submitting a withdrawal request with a non-empty `addressTag` will return + * error `-4106 TAG_NOT_SUPPORTED_FOR_NETWORK`. Please omit the `addressTag` + * field for such networks. You can check whether a network requires a tag via `GET + * /sapi/v1/capital/config/getall`: * If `withdrawTag` = `true` → + * memo/tag is required. * If `withdrawTag` = `false` → memo/tag is not + * supported; omit `addressTag`. Weight: 900 * * @throws ApiException if the Api call fails */ diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryTravelRuleExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryTravelRuleExample.java index 53df81a74..e95bdac3d 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryTravelRuleExample.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryTravelRuleExample.java @@ -32,6 +32,8 @@ public WalletRestApi getApi() { * default `startTime` and `endTime` to make sure that time interval is * within * If both ``startTime`` and ``endTime`` are * sent, time between ``startTime`` and ``endTime`` must + * * Please, note that due to network-specific characteristics, the returned source address may + * be inaccurate. If multiple source addresses are found, only the first one will be returned. * Weight: 1 * * @throws ApiException if the Api call fails diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryV2Example.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryV2Example.java index 6c61ad96c..8b60c37dc 100644 --- a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryV2Example.java +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryV2Example.java @@ -32,7 +32,9 @@ public WalletRestApi getApi() { * Please notice the default `startTime` and `endTime` to make sure that * time interval is within * If both ``startTime`` and * ``endTime`` are sent, time between ``startTime`` and - * ``endTime`` must Weight: 1 + * ``endTime`` must * Please, note that due to network-specific + * characteristics, the returned source address may be inaccurate. If multiple source addresses + * are found, only the first one will be returned. Weight: 1 * * @throws ApiException if the Api call fails */ diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetCountryListExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetCountryListExample.java new file mode 100644 index 000000000..73d720f0b --- /dev/null +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetCountryListExample.java @@ -0,0 +1,39 @@ +package com.binance.connector.client.wallet.rest.travelrule; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.wallet.rest.WalletRestApiUtil; +import com.binance.connector.client.wallet.rest.api.WalletRestApi; +import com.binance.connector.client.wallet.rest.model.GetCountryListResponse; + +/** API examples for TravelRuleApi */ +public class GetCountryListExample { + private WalletRestApi api; + + public WalletRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = WalletRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new WalletRestApi(clientConfiguration); + } + return api; + } + + /** + * Get Country List (USER_DATA) + * + *

Query the active country list for travel rule questionnaires. Currently, only supports AU + * entity. Weight: 1 + * + * @throws ApiException if the Api call fails + */ + public void getCountryListExample() throws ApiException { + ApiResponse response = getApi().getCountryList(); + System.out.println(response.getData()); + } +} diff --git a/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetRegionListExample.java b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetRegionListExample.java new file mode 100644 index 000000000..515a0ba03 --- /dev/null +++ b/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/GetRegionListExample.java @@ -0,0 +1,40 @@ +package com.binance.connector.client.wallet.rest.travelrule; + +import com.binance.connector.client.common.ApiException; +import com.binance.connector.client.common.ApiResponse; +import com.binance.connector.client.common.configuration.ClientConfiguration; +import com.binance.connector.client.common.configuration.SignatureConfiguration; +import com.binance.connector.client.wallet.rest.WalletRestApiUtil; +import com.binance.connector.client.wallet.rest.api.WalletRestApi; +import com.binance.connector.client.wallet.rest.model.GetRegionListResponse; + +/** API examples for TravelRuleApi */ +public class GetRegionListExample { + private WalletRestApi api; + + public WalletRestApi getApi() { + if (api == null) { + ClientConfiguration clientConfiguration = WalletRestApiUtil.getClientConfiguration(); + SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); + signatureConfiguration.setApiKey("apiKey"); + signatureConfiguration.setPrivateKey("path/to/private.key"); + clientConfiguration.setSignatureConfiguration(signatureConfiguration); + api = new WalletRestApi(clientConfiguration); + } + return api; + } + + /** + * Get Region List (USER_DATA) + * + *

Query the active region/city list for a given country. Currently, only supports AU entity. + * Weight: 1 + * + * @throws ApiException if the Api call fails + */ + public void getRegionListExample() throws ApiException { + String countryCode = ""; + ApiResponse response = getApi().getRegionList(countryCode); + System.out.println(response.getData()); + } +}