|
23 | 23 | import com.binance.connector.client.wallet.rest.model.BrokerWithdrawRequest; |
24 | 24 | import com.binance.connector.client.wallet.rest.model.BrokerWithdrawResponse; |
25 | 25 | import com.binance.connector.client.wallet.rest.model.DepositHistoryTravelRuleResponse; |
| 26 | +import com.binance.connector.client.wallet.rest.model.FetchAddressVerificationListResponse; |
26 | 27 | import com.binance.connector.client.wallet.rest.model.OnboardedVaspListResponse; |
27 | 28 | import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireRequest; |
28 | 29 | import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireResponse; |
@@ -55,7 +56,7 @@ public class TravelRuleApi { |
55 | 56 |
|
56 | 57 | private static final String USER_AGENT = |
57 | 58 | String.format( |
58 | | - "binance-wallet/1.1.0 (Java/%s; %s; %s)", |
| 59 | + "binance-wallet/2.0.0 (Java/%s; %s; %s)", |
59 | 60 | SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); |
60 | 61 | private static final boolean HAS_TIME_UNIT = false; |
61 | 62 |
|
@@ -574,6 +575,136 @@ public ApiResponse<DepositHistoryTravelRuleResponse> depositHistoryTravelRule( |
574 | 575 | return localVarApiClient.execute(localVarCall, localVarReturnType); |
575 | 576 | } |
576 | 577 |
|
| 578 | + /** |
| 579 | + * Build call for fetchAddressVerificationList |
| 580 | + * |
| 581 | + * @return Call to execute |
| 582 | + * @throws ApiException If fail to serialize the request body object |
| 583 | + * @http.response.details |
| 584 | + * <table border="1"> |
| 585 | + * <caption>Response Details</caption> |
| 586 | + * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 587 | + * <tr><td> 200 </td><td> Fetch address verification list </td><td> - </td></tr> |
| 588 | + * </table> |
| 589 | + * |
| 590 | + * @see <a |
| 591 | + * href="https://developers.binance.com/docs/wallet/travel-rule/address-verification-list">Fetch |
| 592 | + * address verification list (USER_DATA) Documentation</a> |
| 593 | + */ |
| 594 | + private okhttp3.Call fetchAddressVerificationListCall() throws ApiException { |
| 595 | + String basePath = null; |
| 596 | + // Operation Servers |
| 597 | + String[] localBasePaths = new String[] {}; |
| 598 | + |
| 599 | + // Determine Base Path to Use |
| 600 | + if (localCustomBaseUrl != null) { |
| 601 | + basePath = localCustomBaseUrl; |
| 602 | + } else if (localBasePaths.length > 0) { |
| 603 | + basePath = localBasePaths[localHostIndex]; |
| 604 | + } else { |
| 605 | + basePath = null; |
| 606 | + } |
| 607 | + |
| 608 | + Object localVarPostBody = null; |
| 609 | + |
| 610 | + // create path and map variables |
| 611 | + String localVarPath = "/sapi/v1/addressVerify/list"; |
| 612 | + |
| 613 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 614 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 615 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 616 | + Map<String, String> localVarCookieParams = new HashMap<String, String>(); |
| 617 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 618 | + |
| 619 | + final String[] localVarAccepts = {"application/json"}; |
| 620 | + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); |
| 621 | + if (localVarAccept != null) { |
| 622 | + localVarHeaderParams.put("Accept", localVarAccept); |
| 623 | + } |
| 624 | + |
| 625 | + final String[] localVarContentTypes = {"application/x-www-form-urlencoded"}; |
| 626 | + final String localVarContentType = |
| 627 | + localVarApiClient.selectHeaderContentType(localVarContentTypes); |
| 628 | + if (localVarContentType != null) { |
| 629 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 630 | + } |
| 631 | + List<String> localVarAuthNames = new ArrayList<>(); |
| 632 | + localVarAuthNames.addAll( |
| 633 | + Arrays.asList( |
| 634 | + new String[] { |
| 635 | + "binanceSignature", |
| 636 | + })); |
| 637 | + if (HAS_TIME_UNIT) { |
| 638 | + localVarAuthNames.add("timeUnit"); |
| 639 | + } |
| 640 | + return localVarApiClient.buildCall( |
| 641 | + basePath, |
| 642 | + localVarPath, |
| 643 | + "GET", |
| 644 | + localVarQueryParams, |
| 645 | + localVarCollectionQueryParams, |
| 646 | + localVarPostBody, |
| 647 | + localVarHeaderParams, |
| 648 | + localVarCookieParams, |
| 649 | + localVarFormParams, |
| 650 | + localVarAuthNames.toArray(new String[0])); |
| 651 | + } |
| 652 | + |
| 653 | + @SuppressWarnings("rawtypes") |
| 654 | + private okhttp3.Call fetchAddressVerificationListValidateBeforeCall() throws ApiException { |
| 655 | + try { |
| 656 | + Validator validator = |
| 657 | + Validation.byDefaultProvider() |
| 658 | + .configure() |
| 659 | + .messageInterpolator(new ParameterMessageInterpolator()) |
| 660 | + .buildValidatorFactory() |
| 661 | + .getValidator(); |
| 662 | + ExecutableValidator executableValidator = validator.forExecutables(); |
| 663 | + |
| 664 | + Object[] parameterValues = {}; |
| 665 | + Method method = this.getClass().getMethod("fetchAddressVerificationList"); |
| 666 | + Set<ConstraintViolation<TravelRuleApi>> violations = |
| 667 | + executableValidator.validateParameters(this, method, parameterValues); |
| 668 | + |
| 669 | + if (violations.size() == 0) { |
| 670 | + return fetchAddressVerificationListCall(); |
| 671 | + } else { |
| 672 | + throw new ConstraintViolationException((Set) violations); |
| 673 | + } |
| 674 | + } catch (NoSuchMethodException e) { |
| 675 | + e.printStackTrace(); |
| 676 | + throw new ApiException(e.getMessage()); |
| 677 | + } catch (SecurityException e) { |
| 678 | + e.printStackTrace(); |
| 679 | + throw new ApiException(e.getMessage()); |
| 680 | + } |
| 681 | + } |
| 682 | + |
| 683 | + /** |
| 684 | + * Fetch address verification list (USER_DATA) Fetch address verification list Weight: 10 |
| 685 | + * |
| 686 | + * @return ApiResponse<FetchAddressVerificationListResponse> |
| 687 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the |
| 688 | + * response body |
| 689 | + * @http.response.details |
| 690 | + * <table border="1"> |
| 691 | + * <caption>Response Details</caption> |
| 692 | + * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 693 | + * <tr><td> 200 </td><td> Fetch address verification list </td><td> - </td></tr> |
| 694 | + * </table> |
| 695 | + * |
| 696 | + * @see <a |
| 697 | + * href="https://developers.binance.com/docs/wallet/travel-rule/address-verification-list">Fetch |
| 698 | + * address verification list (USER_DATA) Documentation</a> |
| 699 | + */ |
| 700 | + public ApiResponse<FetchAddressVerificationListResponse> fetchAddressVerificationList() |
| 701 | + throws ApiException { |
| 702 | + okhttp3.Call localVarCall = fetchAddressVerificationListValidateBeforeCall(); |
| 703 | + java.lang.reflect.Type localVarReturnType = |
| 704 | + new TypeToken<FetchAddressVerificationListResponse>() {}.getType(); |
| 705 | + return localVarApiClient.execute(localVarCall, localVarReturnType); |
| 706 | + } |
| 707 | + |
577 | 708 | /** |
578 | 709 | * Build call for onboardedVaspList |
579 | 710 | * |
@@ -1076,7 +1207,8 @@ private okhttp3.Call submitDepositQuestionnaireTravelRuleValidateBeforeCall( |
1076 | 1207 | * |
1077 | 1208 | * @param trId Comma(,) separated list of travel rule record Ids. (optional) |
1078 | 1209 | * @param txId (optional) |
1079 | | - * @param withdrawOrderId (optional) |
| 1210 | + * @param withdrawOrderId client side id for withdrawal, if provided in POST |
| 1211 | + * `/sapi/v1/capital/withdraw/apply`, can be used here for query. (optional) |
1080 | 1212 | * @param network (optional) |
1081 | 1213 | * @param coin (optional) |
1082 | 1214 | * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) |
@@ -1309,7 +1441,8 @@ private okhttp3.Call withdrawHistoryV1ValidateBeforeCall( |
1309 | 1441 | * |
1310 | 1442 | * @param trId Comma(,) separated list of travel rule record Ids. (optional) |
1311 | 1443 | * @param txId (optional) |
1312 | | - * @param withdrawOrderId (optional) |
| 1444 | + * @param withdrawOrderId client side id for withdrawal, if provided in POST |
| 1445 | + * `/sapi/v1/capital/withdraw/apply`, can be used here for query. (optional) |
1313 | 1446 | * @param network (optional) |
1314 | 1447 | * @param coin (optional) |
1315 | 1448 | * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) |
@@ -1369,7 +1502,8 @@ public ApiResponse<WithdrawHistoryV1Response> withdrawHistoryV1( |
1369 | 1502 | * |
1370 | 1503 | * @param trId Comma(,) separated list of travel rule record Ids. (optional) |
1371 | 1504 | * @param txId (optional) |
1372 | | - * @param withdrawOrderId (optional) |
| 1505 | + * @param withdrawOrderId client side id for withdrawal, if provided in POST |
| 1506 | + * `/sapi/v1/capital/withdraw/apply`, can be used here for query. (optional) |
1373 | 1507 | * @param network (optional) |
1374 | 1508 | * @param coin (optional) |
1375 | 1509 | * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) |
@@ -1608,7 +1742,8 @@ private okhttp3.Call withdrawHistoryV2ValidateBeforeCall( |
1608 | 1742 | * |
1609 | 1743 | * @param trId Comma(,) separated list of travel rule record Ids. (optional) |
1610 | 1744 | * @param txId (optional) |
1611 | | - * @param withdrawOrderId (optional) |
| 1745 | + * @param withdrawOrderId client side id for withdrawal, if provided in POST |
| 1746 | + * `/sapi/v1/capital/withdraw/apply`, can be used here for query. (optional) |
1612 | 1747 | * @param network (optional) |
1613 | 1748 | * @param coin (optional) |
1614 | 1749 | * @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional) |
|
0 commit comments