diff --git a/.github/workflows/publish-maven.yml b/.github/workflows/publish-maven.yml index c3ebf8d4..f274b73a 100644 --- a/.github/workflows/publish-maven.yml +++ b/.github/workflows/publish-maven.yml @@ -68,7 +68,7 @@ jobs: - name: Check out repository code uses: actions/checkout@v4 with: - ref: master + ref: ${{ github.event.release.tag_name }} fetch-depth: 0 - name: Set up Java uses: actions/setup-java@v4 diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 4668b082..1f48dbc3 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -474,6 +474,7 @@ docs/GasStationConfiguration.md docs/GasStationConfigurationResponse.md docs/GasStationPropertiesResponse.md docs/GasStationsApi.md +docs/GaslessInfo.md docs/GasslessStandardConfigurations.md docs/GasslessStandardConfigurationsGaslessStandardConfigurationsValue.md docs/GenieBetaApi.md @@ -494,6 +495,7 @@ docs/GetConsoleUsersResponse.md docs/GetDeployableAddressRequest.md docs/GetExchangeAccountsCredentialsPublicKeyResponse.md docs/GetFilterParameter.md +docs/GetFindingsExternalResponse.md docs/GetLayerZeroDvnConfigResponse.md docs/GetLayerZeroPeersResponse.md docs/GetLinkedCollectionsPaginatedResponse.md @@ -849,6 +851,8 @@ docs/ScreeningVerdict.md docs/ScreeningVerdictEnum.md docs/ScreeningVerdictMatchedRule.md docs/SearchNetworkIdsResponse.md +docs/SecurityFinding.md +docs/SecurityPostureManagementApi.md docs/SepaPaymentInfo.md docs/SessionDTO.md docs/SessionMetadata.md @@ -1118,6 +1122,7 @@ docs/TravelRuleGeographicAddress.md docs/TravelRuleGetAllVASPsResponse.md docs/TravelRuleIssuer.md docs/TravelRuleIssuers.md +docs/TravelRuleLegalNameIdentifier.md docs/TravelRuleLegalPerson.md docs/TravelRuleLegalPersonNameIdentifier.md docs/TravelRuleMatchedRule.md @@ -1142,6 +1147,7 @@ docs/TravelRuleVASPExternalEntityRegistration.md docs/TravelRuleValidateDateAndPlaceOfBirth.md docs/TravelRuleValidateFullTransactionRequest.md docs/TravelRuleValidateGeographicAddress.md +docs/TravelRuleValidateLegalNameIdentifier.md docs/TravelRuleValidateLegalPerson.md docs/TravelRuleValidateLegalPersonNameIdentifier.md docs/TravelRuleValidateNationalIdentification.md @@ -1308,6 +1314,7 @@ src/main/java/com/fireblocks/sdk/api/PolicyEditorV2Api.java src/main/java/com/fireblocks/sdk/api/PolicyEditorV2BetaApi.java src/main/java/com/fireblocks/sdk/api/ReportsBetaApi.java src/main/java/com/fireblocks/sdk/api/ResetDeviceApi.java +src/main/java/com/fireblocks/sdk/api/SecurityPostureManagementApi.java src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java src/main/java/com/fireblocks/sdk/api/StakingApi.java src/main/java/com/fireblocks/sdk/api/TagsApi.java @@ -1774,6 +1781,7 @@ src/main/java/com/fireblocks/sdk/model/Funds.java src/main/java/com/fireblocks/sdk/model/GasStationConfiguration.java src/main/java/com/fireblocks/sdk/model/GasStationConfigurationResponse.java src/main/java/com/fireblocks/sdk/model/GasStationPropertiesResponse.java +src/main/java/com/fireblocks/sdk/model/GaslessInfo.java src/main/java/com/fireblocks/sdk/model/GasslessStandardConfigurations.java src/main/java/com/fireblocks/sdk/model/GasslessStandardConfigurationsGaslessStandardConfigurationsValue.java src/main/java/com/fireblocks/sdk/model/GenieChatMessage.java @@ -1793,6 +1801,7 @@ src/main/java/com/fireblocks/sdk/model/GetConsoleUsersResponse.java src/main/java/com/fireblocks/sdk/model/GetDeployableAddressRequest.java src/main/java/com/fireblocks/sdk/model/GetExchangeAccountsCredentialsPublicKeyResponse.java src/main/java/com/fireblocks/sdk/model/GetFilterParameter.java +src/main/java/com/fireblocks/sdk/model/GetFindingsExternalResponse.java src/main/java/com/fireblocks/sdk/model/GetLayerZeroDvnConfigResponse.java src/main/java/com/fireblocks/sdk/model/GetLayerZeroPeersResponse.java src/main/java/com/fireblocks/sdk/model/GetLinkedCollectionsPaginatedResponse.java @@ -2134,6 +2143,7 @@ src/main/java/com/fireblocks/sdk/model/ScreeningVerdict.java src/main/java/com/fireblocks/sdk/model/ScreeningVerdictEnum.java src/main/java/com/fireblocks/sdk/model/ScreeningVerdictMatchedRule.java src/main/java/com/fireblocks/sdk/model/SearchNetworkIdsResponse.java +src/main/java/com/fireblocks/sdk/model/SecurityFinding.java src/main/java/com/fireblocks/sdk/model/SepaPaymentInfo.java src/main/java/com/fireblocks/sdk/model/SessionDTO.java src/main/java/com/fireblocks/sdk/model/SessionMetadata.java @@ -2395,6 +2405,7 @@ src/main/java/com/fireblocks/sdk/model/TravelRuleGeographicAddress.java src/main/java/com/fireblocks/sdk/model/TravelRuleGetAllVASPsResponse.java src/main/java/com/fireblocks/sdk/model/TravelRuleIssuer.java src/main/java/com/fireblocks/sdk/model/TravelRuleIssuers.java +src/main/java/com/fireblocks/sdk/model/TravelRuleLegalNameIdentifier.java src/main/java/com/fireblocks/sdk/model/TravelRuleLegalPerson.java src/main/java/com/fireblocks/sdk/model/TravelRuleLegalPersonNameIdentifier.java src/main/java/com/fireblocks/sdk/model/TravelRuleMatchedRule.java @@ -2419,6 +2430,7 @@ src/main/java/com/fireblocks/sdk/model/TravelRuleVASPExternalEntityRegistration. src/main/java/com/fireblocks/sdk/model/TravelRuleValidateDateAndPlaceOfBirth.java src/main/java/com/fireblocks/sdk/model/TravelRuleValidateFullTransactionRequest.java src/main/java/com/fireblocks/sdk/model/TravelRuleValidateGeographicAddress.java +src/main/java/com/fireblocks/sdk/model/TravelRuleValidateLegalNameIdentifier.java src/main/java/com/fireblocks/sdk/model/TravelRuleValidateLegalPerson.java src/main/java/com/fireblocks/sdk/model/TravelRuleValidateLegalPersonNameIdentifier.java src/main/java/com/fireblocks/sdk/model/TravelRuleValidateNationalIdentification.java @@ -2554,6 +2566,7 @@ src/test/java/com/fireblocks/sdk/api/PolicyEditorV2ApiTest.java src/test/java/com/fireblocks/sdk/api/PolicyEditorV2BetaApiTest.java src/test/java/com/fireblocks/sdk/api/ReportsBetaApiTest.java src/test/java/com/fireblocks/sdk/api/ResetDeviceApiTest.java +src/test/java/com/fireblocks/sdk/api/SecurityPostureManagementApiTest.java src/test/java/com/fireblocks/sdk/api/SmartTransferApiTest.java src/test/java/com/fireblocks/sdk/api/StakingApiTest.java src/test/java/com/fireblocks/sdk/api/TagsApiTest.java @@ -3019,6 +3032,7 @@ src/test/java/com/fireblocks/sdk/model/FundsTest.java src/test/java/com/fireblocks/sdk/model/GasStationConfigurationResponseTest.java src/test/java/com/fireblocks/sdk/model/GasStationConfigurationTest.java src/test/java/com/fireblocks/sdk/model/GasStationPropertiesResponseTest.java +src/test/java/com/fireblocks/sdk/model/GaslessInfoTest.java src/test/java/com/fireblocks/sdk/model/GasslessStandardConfigurationsGaslessStandardConfigurationsValueTest.java src/test/java/com/fireblocks/sdk/model/GasslessStandardConfigurationsTest.java src/test/java/com/fireblocks/sdk/model/GenieChatMessageTest.java @@ -3038,6 +3052,7 @@ src/test/java/com/fireblocks/sdk/model/GetConsoleUsersResponseTest.java src/test/java/com/fireblocks/sdk/model/GetDeployableAddressRequestTest.java src/test/java/com/fireblocks/sdk/model/GetExchangeAccountsCredentialsPublicKeyResponseTest.java src/test/java/com/fireblocks/sdk/model/GetFilterParameterTest.java +src/test/java/com/fireblocks/sdk/model/GetFindingsExternalResponseTest.java src/test/java/com/fireblocks/sdk/model/GetLayerZeroDvnConfigResponseTest.java src/test/java/com/fireblocks/sdk/model/GetLayerZeroPeersResponseTest.java src/test/java/com/fireblocks/sdk/model/GetLinkedCollectionsPaginatedResponseTest.java @@ -3379,6 +3394,7 @@ src/test/java/com/fireblocks/sdk/model/ScreeningVerdictEnumTest.java src/test/java/com/fireblocks/sdk/model/ScreeningVerdictMatchedRuleTest.java src/test/java/com/fireblocks/sdk/model/ScreeningVerdictTest.java src/test/java/com/fireblocks/sdk/model/SearchNetworkIdsResponseTest.java +src/test/java/com/fireblocks/sdk/model/SecurityFindingTest.java src/test/java/com/fireblocks/sdk/model/SepaPaymentInfoTest.java src/test/java/com/fireblocks/sdk/model/SessionDTOTest.java src/test/java/com/fireblocks/sdk/model/SessionMetadataTest.java @@ -3640,6 +3656,7 @@ src/test/java/com/fireblocks/sdk/model/TravelRuleGeographicAddressTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleGetAllVASPsResponseTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleIssuerTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleIssuersTest.java +src/test/java/com/fireblocks/sdk/model/TravelRuleLegalNameIdentifierTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleLegalPersonNameIdentifierTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleLegalPersonTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleMatchedRuleTest.java @@ -3664,6 +3681,7 @@ src/test/java/com/fireblocks/sdk/model/TravelRuleVASPTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleValidateDateAndPlaceOfBirthTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleValidateFullTransactionRequestTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleValidateGeographicAddressTest.java +src/test/java/com/fireblocks/sdk/model/TravelRuleValidateLegalNameIdentifierTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleValidateLegalPersonNameIdentifierTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleValidateLegalPersonTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleValidateNationalIdentificationTest.java diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index bdda3753..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,239 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v26.0.0](https://github.com/fireblocks/java-sdk/compare/v15.0.0...v26.0.0) - 2026-08-10 - -### Merged - -- Generated SDK #2747190960 [`#150`](https://github.com/fireblocks/java-sdk/pull/150) - -## [v15.0.0](https://github.com/fireblocks/java-sdk/compare/v14.1.0...v15.0.0) - 2026-03-15 - -### Merged - -- Generated SDK #3733 (major) [`#128`](https://github.com/fireblocks/java-sdk/pull/128) - -## [v14.1.0](https://github.com/fireblocks/java-sdk/compare/v14.0.0...v14.1.0) - 2026-02-26 - -### Merged - -- Generated SDK #2167 [`#126`](https://github.com/fireblocks/java-sdk/pull/126) - -## [v14.0.0](https://github.com/fireblocks/java-sdk/compare/v13.0.0...v14.0.0) - 2026-02-03 - -### Merged - -- Generated SDK #4746 [`#121`](https://github.com/fireblocks/java-sdk/pull/121) - -## [v13.0.0](https://github.com/fireblocks/java-sdk/compare/v12.1.3...v13.0.0) - 2025-11-13 - -### Merged - -- Generated SDK #5834 [`#116`](https://github.com/fireblocks/java-sdk/pull/116) - -## [v12.1.3](https://github.com/fireblocks/java-sdk/compare/v12.1.2...v12.1.3) - 2025-10-22 - -### Merged - -- Generated SDK #8293 [`#115`](https://github.com/fireblocks/java-sdk/pull/115) - -## [v12.1.2](https://github.com/fireblocks/java-sdk/compare/v12.1.1...v12.1.2) - 2025-09-29 - -### Merged - -- Generated SDK #6061 [`#113`](https://github.com/fireblocks/java-sdk/pull/113) - -## [v12.1.1](https://github.com/fireblocks/java-sdk/compare/v12.1.0...v12.1.1) - 2025-09-10 - -### Merged - -- Generated SDK #1410 [`#111`](https://github.com/fireblocks/java-sdk/pull/111) - -## [v12.1.0](https://github.com/fireblocks/java-sdk/compare/v12.0.0...v12.1.0) - 2025-09-09 - -### Merged - -- Generated SDK #4521 [`#109`](https://github.com/fireblocks/java-sdk/pull/109) - -## [v12.0.0](https://github.com/fireblocks/java-sdk/compare/v11.2.0...v12.0.0) - 2025-09-01 - -### Merged - -- Generated SDK #7741 [`#108`](https://github.com/fireblocks/java-sdk/pull/108) - -## [v11.2.0](https://github.com/fireblocks/java-sdk/compare/v11.1.0...v11.2.0) - 2025-08-21 - -### Merged - -- Generated SDK #3302 [`#107`](https://github.com/fireblocks/java-sdk/pull/107) - -## [v11.1.0](https://github.com/fireblocks/java-sdk/compare/v11.0.0...v11.1.0) - 2025-08-11 - -### Merged - -- Generated SDK #1782 [`#105`](https://github.com/fireblocks/java-sdk/pull/105) - -## [v11.0.0](https://github.com/fireblocks/java-sdk/compare/v10.4.0...v11.0.0) - 2025-07-15 - -### Merged - -- Generated SDK #5610 [`#103`](https://github.com/fireblocks/java-sdk/pull/103) - -## [v10.4.0](https://github.com/fireblocks/java-sdk/compare/v10.3.0...v10.4.0) - 2025-06-29 - -### Merged - -- Generated SDK #1492 [`#101`](https://github.com/fireblocks/java-sdk/pull/101) - -## [v10.3.0](https://github.com/fireblocks/java-sdk/compare/v10.2.0...v10.3.0) - 2025-06-18 - -### Merged - -- Generated SDK #4009 [`#99`](https://github.com/fireblocks/java-sdk/pull/99) - -## [v10.2.0](https://github.com/fireblocks/java-sdk/compare/v10.1.1...v10.2.0) - 2025-06-04 - -### Merged - -- Generated SDK #8912 [`#98`](https://github.com/fireblocks/java-sdk/pull/98) - -## [v10.1.1](https://github.com/fireblocks/java-sdk/compare/v10.1.0...v10.1.1) - 2025-05-18 - -### Merged - -- Generated SDK #5019 [`#97`](https://github.com/fireblocks/java-sdk/pull/97) - -## [v10.1.0](https://github.com/fireblocks/java-sdk/compare/v10.0.2...v10.1.0) - 2025-05-07 - -### Merged - -- Generated SDK #7076 [`#95`](https://github.com/fireblocks/java-sdk/pull/95) - -## [v10.0.2](https://github.com/fireblocks/java-sdk/compare/v10.0.1...v10.0.2) - 2025-04-20 - -### Merged - -- Generated SDK #4794 [`#94`](https://github.com/fireblocks/java-sdk/pull/94) - -## [v10.0.1](https://github.com/fireblocks/java-sdk/compare/v10.0.0...v10.0.1) - 2025-04-07 - -### Merged - -- Generated SDK #3065 [`#93`](https://github.com/fireblocks/java-sdk/pull/93) - -## [v10.0.0](https://github.com/fireblocks/java-sdk/compare/v9.0.0...v10.0.0) - 2025-03-30 - -### Merged - -- Generated SDK #619 [`#90`](https://github.com/fireblocks/java-sdk/pull/90) - -## [v9.0.0](https://github.com/fireblocks/java-sdk/compare/v8.1.0...v9.0.0) - 2025-03-17 - -### Merged - -- Generated SDK #645 [`#89`](https://github.com/fireblocks/java-sdk/pull/89) - -## [v8.1.0](https://github.com/fireblocks/java-sdk/compare/v8.0.1...v8.1.0) - 2025-02-24 - -### Merged - -- Generated SDK #9833 [`#84`](https://github.com/fireblocks/java-sdk/pull/84) - -## [v8.0.1](https://github.com/fireblocks/java-sdk/compare/v8.0.0...v8.0.1) - 2025-02-12 - -### Merged - -- Generated SDK #4262 [`#82`](https://github.com/fireblocks/java-sdk/pull/82) - -## [v8.0.0](https://github.com/fireblocks/java-sdk/compare/v7.0.0...v8.0.0) - 2025-02-02 - -### Merged - -- Generated SDK #538 [`#80`](https://github.com/fireblocks/java-sdk/pull/80) - -## [v7.0.0](https://github.com/fireblocks/java-sdk/compare/v6.0.0...v7.0.0) - 2025-01-08 - -### Merged - -- Generated SDK #8699 [`#77`](https://github.com/fireblocks/java-sdk/pull/77) - -## [v6.0.0](https://github.com/fireblocks/java-sdk/compare/v5.0.0...v6.0.0) - 2024-12-05 - -### Merged - -- Generated SDK #1430 [`#73`](https://github.com/fireblocks/java-sdk/pull/73) - -## [v5.0.0](https://github.com/fireblocks/java-sdk/compare/v4.0.0...v5.0.0) - 2024-10-31 - -### Merged - -- Generated SDK #5184 [`#71`](https://github.com/fireblocks/java-sdk/pull/71) - -## [v4.0.0](https://github.com/fireblocks/java-sdk/compare/v3.1.0...v4.0.0) - 2024-09-17 - -### Merged - -- Generated SDK #237 [`#70`](https://github.com/fireblocks/java-sdk/pull/70) - -## [v3.1.0](https://github.com/fireblocks/java-sdk/compare/v3.0.0...v3.1.0) - 2024-07-25 - -### Merged - -- Generated SDK #6749 [`#67`](https://github.com/fireblocks/java-sdk/pull/67) - -## [v3.0.0](https://github.com/fireblocks/java-sdk/compare/v2.1.0...v3.0.0) - 2024-07-17 - -### Merged - -- Generated SDK #6152 [`#65`](https://github.com/fireblocks/java-sdk/pull/65) -- Generated SDK #7984 [`#62`](https://github.com/fireblocks/java-sdk/pull/62) -- Generated SDK #2873 [`#61`](https://github.com/fireblocks/java-sdk/pull/61) - -## [v2.1.0](https://github.com/fireblocks/java-sdk/compare/v2.0.1...v2.1.0) - 2024-06-04 - -### Merged - -- Generated SDK for version COR-46191/fix_pipelines [`#24`](https://github.com/fireblocks/java-sdk/pull/24) -- Generated SDK for version COR-46191/fix_pipelines [`#23`](https://github.com/fireblocks/java-sdk/pull/23) -- Generated SDK for version COR-46191/fix_pipelines [`#22`](https://github.com/fireblocks/java-sdk/pull/22) -- Generated SDK for version COR-46191/fix_pipelines [`#21`](https://github.com/fireblocks/java-sdk/pull/21) - -## [v2.0.1](https://github.com/fireblocks/java-sdk/compare/v2.0.0...v2.0.1) - 2024-06-04 - -### Merged - -- Generated SDK for version COR-46191/fix_pipelines [`#20`](https://github.com/fireblocks/java-sdk/pull/20) - -## [v2.0.0](https://github.com/fireblocks/java-sdk/compare/v1.1.0...v2.0.0) - 2024-05-08 - -### Merged - -- feat: add tokenization api [`#12`](https://github.com/fireblocks/java-sdk/pull/12) - -## [v1.1.0](https://github.com/fireblocks/java-sdk/compare/v1.0.1...v1.1.0) - 2024-04-17 - -### Merged - -- feat: add cosigners beta api [`#11`](https://github.com/fireblocks/java-sdk/pull/11) -- fix: fix readme doc headline [`#10`](https://github.com/fireblocks/java-sdk/pull/10) - -## [v1.0.1](https://github.com/fireblocks/java-sdk/compare/v1.0.0...v1.0.1) - 2024-04-07 - -### Merged - -- Generated SDK for version v1.0.1 [`#9`](https://github.com/fireblocks/java-sdk/pull/9) - -## v1.0.0 - 2024-04-07 - -### Merged - -- Generated SDK for version v1.0.0 GA [`#8`](https://github.com/fireblocks/java-sdk/pull/8) -- v0.0.1-beta [`#6`](https://github.com/fireblocks/java-sdk/pull/6) -- Update GitHub Actions workflows [`#5`](https://github.com/fireblocks/java-sdk/pull/5) -- Generated #1189972817 [`#3`](https://github.com/fireblocks/java-sdk/pull/3) -- Add installation instructions [`#2`](https://github.com/fireblocks/java-sdk/pull/2) -- Added Idempotency & NCW headers support #6 [`#1`](https://github.com/fireblocks/java-sdk/pull/1) diff --git a/README.md b/README.md index ca36e06a..cff0f4fd 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 26.0.0 + 0.0.0 compile ``` @@ -42,7 +42,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.fireblocks.sdk:fireblocks-sdk:26.0.0" +compile "com.fireblocks.sdk:fireblocks-sdk:0.0.0" ``` ### Others @@ -55,7 +55,7 @@ mvn clean package Then manually install the following JARs: -- `target/fireblocks-sdk-26.0.0.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` @@ -385,6 +385,7 @@ Class | Method | HTTP request | Description *ReportsBetaApi* | [**getReport**](docs/ReportsBetaApi.md#getReport) | **GET** /reports/{reportId} | Get report status *ReportsBetaApi* | [**listReports**](docs/ReportsBetaApi.md#listReports) | **GET** /reports | List reports *ResetDeviceApi* | [**resetDevice**](docs/ResetDeviceApi.md#resetDevice) | **POST** /management/users/{id}/reset_device | Resets device +*SecurityPostureManagementApi* | [**getSecurityFindings**](docs/SecurityPostureManagementApi.md#getSecurityFindings) | **GET** /security/fspm/findings | Get FSPM security findings *SmartTransferApi* | [**approveDvPTicketTerm**](docs/SmartTransferApi.md#approveDvPTicketTerm) | **PUT** /smart_transfers/{ticketId}/terms/{termId}/dvp/approve | Set funding source and approval *SmartTransferApi* | [**cancelTicket**](docs/SmartTransferApi.md#cancelTicket) | **PUT** /smart-transfers/{ticketId}/cancel | Cancel Ticket *SmartTransferApi* | [**createTicket**](docs/SmartTransferApi.md#createTicket) | **POST** /smart-transfers | Create Ticket @@ -1043,6 +1044,7 @@ Class | Method | HTTP request | Description - [GasStationConfiguration](docs/GasStationConfiguration.md) - [GasStationConfigurationResponse](docs/GasStationConfigurationResponse.md) - [GasStationPropertiesResponse](docs/GasStationPropertiesResponse.md) + - [GaslessInfo](docs/GaslessInfo.md) - [GasslessStandardConfigurations](docs/GasslessStandardConfigurations.md) - [GasslessStandardConfigurationsGaslessStandardConfigurationsValue](docs/GasslessStandardConfigurationsGaslessStandardConfigurationsValue.md) - [GenieChatMessage](docs/GenieChatMessage.md) @@ -1062,6 +1064,7 @@ Class | Method | HTTP request | Description - [GetDeployableAddressRequest](docs/GetDeployableAddressRequest.md) - [GetExchangeAccountsCredentialsPublicKeyResponse](docs/GetExchangeAccountsCredentialsPublicKeyResponse.md) - [GetFilterParameter](docs/GetFilterParameter.md) + - [GetFindingsExternalResponse](docs/GetFindingsExternalResponse.md) - [GetLayerZeroDvnConfigResponse](docs/GetLayerZeroDvnConfigResponse.md) - [GetLayerZeroPeersResponse](docs/GetLayerZeroPeersResponse.md) - [GetLinkedCollectionsPaginatedResponse](docs/GetLinkedCollectionsPaginatedResponse.md) @@ -1403,6 +1406,7 @@ Class | Method | HTTP request | Description - [ScreeningVerdictEnum](docs/ScreeningVerdictEnum.md) - [ScreeningVerdictMatchedRule](docs/ScreeningVerdictMatchedRule.md) - [SearchNetworkIdsResponse](docs/SearchNetworkIdsResponse.md) + - [SecurityFinding](docs/SecurityFinding.md) - [SepaPaymentInfo](docs/SepaPaymentInfo.md) - [SessionDTO](docs/SessionDTO.md) - [SessionMetadata](docs/SessionMetadata.md) @@ -1664,6 +1668,7 @@ Class | Method | HTTP request | Description - [TravelRuleGetAllVASPsResponse](docs/TravelRuleGetAllVASPsResponse.md) - [TravelRuleIssuer](docs/TravelRuleIssuer.md) - [TravelRuleIssuers](docs/TravelRuleIssuers.md) + - [TravelRuleLegalNameIdentifier](docs/TravelRuleLegalNameIdentifier.md) - [TravelRuleLegalPerson](docs/TravelRuleLegalPerson.md) - [TravelRuleLegalPersonNameIdentifier](docs/TravelRuleLegalPersonNameIdentifier.md) - [TravelRuleMatchedRule](docs/TravelRuleMatchedRule.md) @@ -1688,6 +1693,7 @@ Class | Method | HTTP request | Description - [TravelRuleValidateDateAndPlaceOfBirth](docs/TravelRuleValidateDateAndPlaceOfBirth.md) - [TravelRuleValidateFullTransactionRequest](docs/TravelRuleValidateFullTransactionRequest.md) - [TravelRuleValidateGeographicAddress](docs/TravelRuleValidateGeographicAddress.md) + - [TravelRuleValidateLegalNameIdentifier](docs/TravelRuleValidateLegalNameIdentifier.md) - [TravelRuleValidateLegalPerson](docs/TravelRuleValidateLegalPerson.md) - [TravelRuleValidateLegalPersonNameIdentifier](docs/TravelRuleValidateLegalPersonNameIdentifier.md) - [TravelRuleValidateNationalIdentification](docs/TravelRuleValidateNationalIdentification.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 44eeccca..53e24a94 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -19299,6 +19299,171 @@ paths: source: "response = fireblocks.reset_device.reset_device(id, idempotency_key);" x-accepts: - application/json + /security/fspm/findings: + get: + description: | + Returns a paginated list of FSPM security findings for the workspace. + Endpoint Permissions: Security Admin, Security Auditor. + operationId: getSecurityFindings + parameters: + - description: Cursor indicating the page position. Omit to fetch the first + page. + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + - description: Number of results per page + example: 10 + explode: true + in: query + name: pageSize + required: false + schema: + default: 10 + maximum: 100 + minimum: 1 + type: integer + style: form + - description: Filter by severity level + example: HIGH + explode: true + in: query + name: severity + required: false + schema: + enum: + - INFO + - LOW + - MEDIUM + - HIGH + type: string + style: form + - description: Filter by finding category + example: USER_MANAGEMENT + explode: true + in: query + name: category + required: false + schema: + enum: + - USER_MANAGEMENT + - ACCESS_CONTROL + - ADMIN_MANAGEMENT + - SECURITY + - CONFIGURATION + - APPROVAL_GROUP_MANAGEMENT + - POLICY_ENGINE_UTILIZATION + - WORKSPACE_CONFIGURATION + - DEFI_ACCESS + - FLEET_MANAGEMENT + type: string + style: form + - description: Filter by finding status + example: OPEN + explode: true + in: query + name: status + required: false + schema: + enum: + - OPEN + - ACCEPTED + - RESOLVED + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/GetFindingsExternalResponse" + description: A paginated list of FSPM findings + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: Bad request — invalid or malformed query parameters. + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: Unauthorized — missing or invalid authentication token. + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: Forbidden — insufficient permissions or feature is disabled. + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: "Too many requests — rate limit exceeded, slow down and retry\ + \ later." + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "5XX": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: Internal error. + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Get FSPM security findings + tags: + - Security Posture Management + x-rate-limit-category: query + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.securityPostureManagement.getSecurityFindings(securityPostureManagementApiGetSecurityFindingsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.securityPostureManagement().getSecurityFindings(pageCursor,\ + \ pageSize, severity, category, status);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.security_posture_management.get_security_findings(page_cursor,\ + \ page_size, severity, category, status);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.securityPostureManagement.getSecurityFindings(securityPostureManagementApiGetSecurityFindingsRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.securityPostureManagement().getSecurityFindings(pageCursor,\ + \ pageSize, severity, category, status);" + - lang: Python + source: "response = fireblocks.security_posture_management.get_security_findings(page_cursor,\ + \ page_size, severity, category, status);" + x-accepts: + - application/json /smart_transfers/{ticketId}/dvp/fund: put: description: Create or fulfill dvp ticket order @@ -21956,7 +22121,7 @@ paths: get: description: |- Returns all staking positions with core details: amounts, rewards, status, chain, and vault. - Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. + Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. operationId: getAllDelegations parameters: - description: "Protocol identifier to filter positions (e.g., ATOM_COS/AXL/CELESTIA).\ @@ -22073,7 +22238,7 @@ paths: get: description: |- Returns staking positions with core details: amounts, rewards, status, chain, and vault. It supports cursor-based pagination for efficient data retrieval. This endpoint always returns a paginated response with {data, next} structure. - Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. + Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. operationId: getPositions parameters: - description: "Protocol identifier to filter positions (e.g., ATOM_COS/AXL/CELESTIA).\ @@ -22694,7 +22859,7 @@ paths: get: description: |- Returns all available staking providers with metadata such as name, ID, and supported chains. - Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. + Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. operationId: getProviders responses: "200": @@ -47202,6 +47367,36 @@ components: example: "123" type: string type: object + GaslessInfo: + description: Relay (meta-transaction) details. Returned only for meta-transactions + (`isMetaTx` is `true`). For meta-transactions the deprecated top-level `fee` + field is omitted; use `feeInfo` instead. + example: + relayVaultAccountId: "19" + isMetaTx: true + relayTenantId: 97cc731c-f920-5e82-bb56-ba76f292c874 + relayTenantName: Or Manzur - Crypto Journey + properties: + isMetaTx: + description: Indicates the transaction is a meta-transaction (gas paid by + a relay tenant). + example: true + type: boolean + relayTenantId: + description: The tenant ID of the relay that sponsors the gas for the meta-transaction. + example: 97cc731c-f920-5e82-bb56-ba76f292c874 + type: string + relayTenantName: + description: The tenant name of the relay that sponsors the gas for the + meta-transaction. + example: Or Manzur - Crypto Journey + type: string + relayVaultAccountId: + description: The vault account ID of the relay that sponsors the gas for + the meta-transaction. + example: "19" + type: string + type: object SystemMessageInfo: example: type: WARN @@ -47567,6 +47762,11 @@ components: isDropped: true blockchainIndex: 1.1.1 assetId: assetId + gaslessInfo: + relayVaultAccountId: "19" + isMetaTx: true + relayTenantId: 97cc731c-f920-5e82-bb56-ba76f292c874 + relayTenantName: Or Manzur - Crypto Journey amount: 2.027123023002322 sourceAddress: sourceAddress netAmount: 4.145608029883936 @@ -48400,6 +48600,8 @@ components: $ref: "#/components/schemas/RewardInfo" feePayerInfo: $ref: "#/components/schemas/FeePayerInfo" + gaslessInfo: + $ref: "#/components/schemas/GaslessInfo" systemMessages: items: $ref: "#/components/schemas/SystemMessageInfo" @@ -49122,10 +49324,7 @@ components: example: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj type: string type: object - TravelRuleLegalPersonNameIdentifier: - example: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + TravelRuleLegalNameIdentifier: properties: legalPersonName: description: Name by which the legal person is known. The value must be @@ -49133,18 +49332,66 @@ components: example: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q type: string legalPersonNameIdentifierType: - description: "Specifies the type of name for a legal person. Acceptable\ - \ values are: - 'REGISTERED': The official registered name. - 'TRADE':\ - \ A trading name or DBA (Doing Business As) name. - 'OTHER': Any other\ - \ type of name. The value must be encrypted." + description: "Specifies the type of name for a legal person (IVMS101 LegalPersonNameTypeCode).\ + \ Acceptable values are: - 'LEGL': Legal name - official name under which\ + \ the organisation is registered. - 'SHRT': Short name of the organisation.\ + \ - 'TRAD': Trading name - name used by the business for commercial purposes.\ + \ The value must be encrypted." example: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e type: string + required: + - legalPersonName + - legalPersonNameIdentifierType + type: object + TravelRuleLegalPersonNameIdentifier: + example: + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + properties: + nameIdentifier: + description: An array of name identifiers of the legal person. + example: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + items: + $ref: "#/components/schemas/TravelRuleLegalNameIdentifier" + type: array + localNameIdentifier: + description: An array of local name identifiers of the legal person. + example: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + items: + $ref: "#/components/schemas/TravelRuleLegalNameIdentifier" + type: array + phoneticNameIdentifier: + description: An array of phonetic name identifiers of the legal person. + example: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + items: + $ref: "#/components/schemas/TravelRuleLegalNameIdentifier" + type: array type: object TravelRuleLegalPerson: example: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -49219,8 +49466,15 @@ components: example: legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -49366,8 +49620,15 @@ components: originatorPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -49503,8 +49764,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -49641,8 +49909,15 @@ components: beneficiaryPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -49778,8 +50053,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -50019,8 +50301,15 @@ components: originatorPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -50156,8 +50445,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -50294,8 +50590,15 @@ components: beneficiaryPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -50431,8 +50734,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -50578,8 +50888,15 @@ components: originatorPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -50715,8 +51032,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -50853,8 +51177,15 @@ components: beneficiaryPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -50990,8 +51321,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -51360,8 +51698,15 @@ components: originatorPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -51497,8 +51842,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -51635,8 +51987,15 @@ components: beneficiaryPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -51772,8 +52131,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -51919,8 +52285,15 @@ components: originatorPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -52056,8 +52429,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -52194,8 +52574,15 @@ components: beneficiaryPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -52331,8 +52718,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -54582,8 +54976,15 @@ components: originatorPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -54719,8 +55120,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -54857,8 +55265,15 @@ components: beneficiaryPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -54994,8 +55409,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -55141,8 +55563,15 @@ components: originatorPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -55278,8 +55707,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -55416,8 +55852,15 @@ components: beneficiaryPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -55553,8 +55996,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -55847,8 +56297,15 @@ components: originatorPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -55984,8 +56441,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -56122,8 +56586,15 @@ components: beneficiaryPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -56259,8 +56730,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -56406,8 +56884,15 @@ components: originatorPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -56543,8 +57028,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -56681,8 +57173,15 @@ components: beneficiaryPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -56818,8 +57317,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -63362,6 +63868,28 @@ components: \ omitted once active." example: 2024-01-15T14:30:00.000Z type: string + estimatedSourceExitTime: + description: "Estimated time the source validator will exit the active set\ + \ and stop earning rewards, derived from the beacon-chain consolidation\ + \ queue. Present only while a consolidation is in progress." + example: 2024-01-15T14:30:00Z + format: date-time + type: string + estimatedConsolidationTime: + description: "Estimated time the consolidation will complete, i.e. when\ + \ the source balance is swept to the destination validator, derived from\ + \ the beacon-chain consolidation queue. Present only while a consolidation\ + \ is in progress." + example: 2024-01-15T17:45:00Z + format: date-time + type: string + estimatedWithdrawalTime: + description: "Estimated time the in-flight withdrawal will complete, derived\ + \ from the beacon-chain exit queue for a full exit or the manual withdrawal\ + \ queue for a partial one. Present only while a withdrawal is in progress." + example: 2024-01-15T14:30:00Z + format: date-time + type: string required: - isCompoundingValidator type: object @@ -67128,6 +67656,9 @@ components: - ADVANCE_GOODS_PAYMENT - MERCHANT_SETTLEMENT - REPATRIATION_FUND_SETTLEMENT + - CORPORATE_INVESTMENT + - INTER_COMPANY_TRANSFER + - OFFICE_OPERATING_EXPENSES type: string SourceOfFunds: description: | @@ -70427,10 +70958,7 @@ components: example: "123456789" type: string type: object - TravelRuleValidateLegalPersonNameIdentifier: - example: - legalPersonNameIdentifierType: REGISTERED - legalPersonName: Acme Corporation + TravelRuleValidateLegalNameIdentifier: properties: legalPersonName: description: Name by which the legal person is known. @@ -70438,22 +70966,72 @@ components: maxLength: 100 type: string legalPersonNameIdentifierType: - description: "Specifies the type of name for a legal person. Acceptable\ - \ values are: - 'REGISTERED': The official registered name. - 'TRADE':\ - \ A trading name or DBA (Doing Business As) name. - 'OTHER': Any other\ - \ type of name." + description: "Specifies the type of name for a legal person (IVMS101 LegalPersonNameTypeCode).\ + \ Acceptable values are: - 'LEGL': Legal name - official name under which\ + \ the organisation is registered. - 'SHRT': Short name of the organisation.\ + \ - 'TRAD': Trading name - name used by the business for commercial purposes." enum: - - REGISTERED - - TRADE - - OTHER - example: REGISTERED + - LEGL + - SHRT + - TRAD + example: LEGL type: string + required: + - legalPersonName + - legalPersonNameIdentifierType + type: object + TravelRuleValidateLegalPersonNameIdentifier: + example: + localNameIdentifier: + - legalPersonName: アクメ株式会社 + legalPersonNameIdentifierType: LEGL + phoneticNameIdentifier: + - legalPersonName: Akume Kabushiki Gaisha + legalPersonNameIdentifierType: LEGL + nameIdentifier: + - legalPersonName: Acme Corporation + legalPersonNameIdentifierType: LEGL + properties: + nameIdentifier: + description: An array of name identifiers of the legal person. + example: + - legalPersonName: Acme Corporation + legalPersonNameIdentifierType: LEGL + items: + $ref: "#/components/schemas/TravelRuleValidateLegalNameIdentifier" + minItems: 1 + type: array + localNameIdentifier: + description: An array of local name identifiers of the legal person. + example: + - legalPersonName: アクメ株式会社 + legalPersonNameIdentifierType: LEGL + items: + $ref: "#/components/schemas/TravelRuleValidateLegalNameIdentifier" + type: array + phoneticNameIdentifier: + description: An array of phonetic name identifiers of the legal person. + example: + - legalPersonName: Akume Kabushiki Gaisha + legalPersonNameIdentifierType: LEGL + items: + $ref: "#/components/schemas/TravelRuleValidateLegalNameIdentifier" + type: array + required: + - nameIdentifier type: object TravelRuleValidateLegalPerson: example: name: - legalPersonNameIdentifierType: REGISTERED - legalPersonName: Acme Corporation + localNameIdentifier: + - legalPersonName: アクメ株式会社 + legalPersonNameIdentifierType: LEGL + phoneticNameIdentifier: + - legalPersonName: Akume Kabushiki Gaisha + legalPersonNameIdentifierType: LEGL + nameIdentifier: + - legalPersonName: Acme Corporation + legalPersonNameIdentifierType: LEGL nationalIdentification: nationalIdentifierType: NATIONAL_ID countryOfIssue: US @@ -70527,13 +71105,22 @@ components: registered. example: US type: string + required: + - name type: object TravelRuleValidatePerson: example: legalPerson: name: - legalPersonNameIdentifierType: REGISTERED - legalPersonName: Acme Corporation + localNameIdentifier: + - legalPersonName: アクメ株式会社 + legalPersonNameIdentifierType: LEGL + phoneticNameIdentifier: + - legalPersonName: Akume Kabushiki Gaisha + legalPersonNameIdentifierType: LEGL + nameIdentifier: + - legalPersonName: Acme Corporation + legalPersonNameIdentifierType: LEGL nationalIdentification: nationalIdentifierType: NATIONAL_ID countryOfIssue: US @@ -70687,8 +71274,15 @@ components: originatorPersons: - legalPerson: name: - legalPersonNameIdentifierType: REGISTERED - legalPersonName: Acme Corporation + localNameIdentifier: + - legalPersonName: アクメ株式会社 + legalPersonNameIdentifierType: LEGL + phoneticNameIdentifier: + - legalPersonName: Akume Kabushiki Gaisha + legalPersonNameIdentifierType: LEGL + nameIdentifier: + - legalPersonName: Acme Corporation + legalPersonNameIdentifierType: LEGL nationalIdentification: nationalIdentifierType: NATIONAL_ID countryOfIssue: US @@ -70832,8 +71426,15 @@ components: customerIdentification: CUST123456 - legalPerson: name: - legalPersonNameIdentifierType: REGISTERED - legalPersonName: Acme Corporation + localNameIdentifier: + - legalPersonName: アクメ株式会社 + legalPersonNameIdentifierType: LEGL + phoneticNameIdentifier: + - legalPersonName: Akume Kabushiki Gaisha + legalPersonNameIdentifierType: LEGL + nameIdentifier: + - legalPersonName: Acme Corporation + legalPersonNameIdentifierType: LEGL nationalIdentification: nationalIdentifierType: NATIONAL_ID countryOfIssue: US @@ -70978,8 +71579,15 @@ components: beneficiaryPersons: - legalPerson: name: - legalPersonNameIdentifierType: REGISTERED - legalPersonName: Acme Corporation + localNameIdentifier: + - legalPersonName: アクメ株式会社 + legalPersonNameIdentifierType: LEGL + phoneticNameIdentifier: + - legalPersonName: Akume Kabushiki Gaisha + legalPersonNameIdentifierType: LEGL + nameIdentifier: + - legalPersonName: Acme Corporation + legalPersonNameIdentifierType: LEGL nationalIdentification: nationalIdentifierType: NATIONAL_ID countryOfIssue: US @@ -71123,8 +71731,15 @@ components: customerIdentification: CUST123456 - legalPerson: name: - legalPersonNameIdentifierType: REGISTERED - legalPersonName: Acme Corporation + localNameIdentifier: + - legalPersonName: アクメ株式会社 + legalPersonNameIdentifierType: LEGL + phoneticNameIdentifier: + - legalPersonName: Akume Kabushiki Gaisha + legalPersonNameIdentifierType: LEGL + nameIdentifier: + - legalPersonName: Acme Corporation + legalPersonNameIdentifierType: LEGL nationalIdentification: nationalIdentifierType: NATIONAL_ID countryOfIssue: US @@ -71307,8 +71922,15 @@ components: originatorPersons: - legalPerson: name: - legalPersonNameIdentifierType: REGISTERED - legalPersonName: Acme Corporation + localNameIdentifier: + - legalPersonName: アクメ株式会社 + legalPersonNameIdentifierType: LEGL + phoneticNameIdentifier: + - legalPersonName: Akume Kabushiki Gaisha + legalPersonNameIdentifierType: LEGL + nameIdentifier: + - legalPersonName: Acme Corporation + legalPersonNameIdentifierType: LEGL nationalIdentification: nationalIdentifierType: NATIONAL_ID countryOfIssue: US @@ -71452,8 +72074,15 @@ components: customerIdentification: CUST123456 - legalPerson: name: - legalPersonNameIdentifierType: REGISTERED - legalPersonName: Acme Corporation + localNameIdentifier: + - legalPersonName: アクメ株式会社 + legalPersonNameIdentifierType: LEGL + phoneticNameIdentifier: + - legalPersonName: Akume Kabushiki Gaisha + legalPersonNameIdentifierType: LEGL + nameIdentifier: + - legalPersonName: Acme Corporation + legalPersonNameIdentifierType: LEGL nationalIdentification: nationalIdentifierType: NATIONAL_ID countryOfIssue: US @@ -71598,8 +72227,15 @@ components: beneficiaryPersons: - legalPerson: name: - legalPersonNameIdentifierType: REGISTERED - legalPersonName: Acme Corporation + localNameIdentifier: + - legalPersonName: アクメ株式会社 + legalPersonNameIdentifierType: LEGL + phoneticNameIdentifier: + - legalPersonName: Akume Kabushiki Gaisha + legalPersonNameIdentifierType: LEGL + nameIdentifier: + - legalPersonName: Acme Corporation + legalPersonNameIdentifierType: LEGL nationalIdentification: nationalIdentifierType: NATIONAL_ID countryOfIssue: US @@ -71743,8 +72379,15 @@ components: customerIdentification: CUST123456 - legalPerson: name: - legalPersonNameIdentifierType: REGISTERED - legalPersonName: Acme Corporation + localNameIdentifier: + - legalPersonName: アクメ株式会社 + legalPersonNameIdentifierType: LEGL + phoneticNameIdentifier: + - legalPersonName: Akume Kabushiki Gaisha + legalPersonNameIdentifierType: LEGL + nameIdentifier: + - legalPersonName: Acme Corporation + legalPersonNameIdentifierType: LEGL nationalIdentification: nationalIdentifierType: NATIONAL_ID countryOfIssue: US @@ -71896,8 +72539,15 @@ components: originatorPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -72033,8 +72683,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -72171,8 +72828,15 @@ components: beneficiaryPersons: - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -72308,8 +72972,15 @@ components: customerIdentification: QmTJsK3sc3fPEVwvAp97UUiVoFhjzQhYX3sCda1JxuCnXj - legalPerson: name: - legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + localNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + phoneticNameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e + nameIdentifier: + - legalPersonName: QmVXXj5BJchhqQTU27uEkeghYMnxR6aVjZxJP9jS6uCg9Q + legalPersonNameIdentifierType: QmPevsa5xdkxf6Lgt7f9YweRBdgseeAkWVaYyssKF3Q86e nationalIdentification: nationalIdentifierType: QmUKTg3aFJFhMz1o9gPqA3MgTRwd2LvDLwWTPHYUoMEYVi countryOfIssue: QmRGHdoxQfSi6tevyvaYGzs8BVStfqJqEyrMYqUfzXxkmm @@ -72452,8 +73123,15 @@ components: originatorPersons: - legalPerson: name: - legalPersonNameIdentifierType: REGISTERED - legalPersonName: Acme Corporation + localNameIdentifier: + - legalPersonName: アクメ株式会社 + legalPersonNameIdentifierType: LEGL + phoneticNameIdentifier: + - legalPersonName: Akume Kabushiki Gaisha + legalPersonNameIdentifierType: LEGL + nameIdentifier: + - legalPersonName: Acme Corporation + legalPersonNameIdentifierType: LEGL nationalIdentification: nationalIdentifierType: NATIONAL_ID countryOfIssue: US @@ -72597,8 +73275,15 @@ components: customerIdentification: CUST123456 - legalPerson: name: - legalPersonNameIdentifierType: REGISTERED - legalPersonName: Acme Corporation + localNameIdentifier: + - legalPersonName: アクメ株式会社 + legalPersonNameIdentifierType: LEGL + phoneticNameIdentifier: + - legalPersonName: Akume Kabushiki Gaisha + legalPersonNameIdentifierType: LEGL + nameIdentifier: + - legalPersonName: Acme Corporation + legalPersonNameIdentifierType: LEGL nationalIdentification: nationalIdentifierType: NATIONAL_ID countryOfIssue: US @@ -72743,8 +73428,15 @@ components: beneficiaryPersons: - legalPerson: name: - legalPersonNameIdentifierType: REGISTERED - legalPersonName: Acme Corporation + localNameIdentifier: + - legalPersonName: アクメ株式会社 + legalPersonNameIdentifierType: LEGL + phoneticNameIdentifier: + - legalPersonName: Akume Kabushiki Gaisha + legalPersonNameIdentifierType: LEGL + nameIdentifier: + - legalPersonName: Acme Corporation + legalPersonNameIdentifierType: LEGL nationalIdentification: nationalIdentifierType: NATIONAL_ID countryOfIssue: US @@ -72888,8 +73580,15 @@ components: customerIdentification: CUST123456 - legalPerson: name: - legalPersonNameIdentifierType: REGISTERED - legalPersonName: Acme Corporation + localNameIdentifier: + - legalPersonName: アクメ株式会社 + legalPersonNameIdentifierType: LEGL + phoneticNameIdentifier: + - legalPersonName: Akume Kabushiki Gaisha + legalPersonNameIdentifierType: LEGL + nameIdentifier: + - legalPersonName: Acme Corporation + legalPersonNameIdentifierType: LEGL nationalIdentification: nationalIdentifierType: NATIONAL_ID countryOfIssue: US @@ -81320,6 +82019,109 @@ components: - rules - status type: object + SecurityFinding: + description: A single FSPM finding + properties: + id: + description: Unique identifier of the finding + example: d7ca6101-a65e-4a9c-b6c1-b8bd697e0cd2 + format: uuid + type: string + type: + description: The finding type identifier + enum: + - API_USER_NOT_WHITELISTED + - CONSOLE_IP_ALLOWLIST_DEACTIVATED + - ADMIN_TH_SET_TO_ALL_AND_MORE_THAN_2_ADMINS + - API_USERS_COUNT_PASSES_TH_AND_OWNER_NOT_MANDATORY + - API_COSIGNER_WITH_NO_CALLBACK + - API_USER_DIDNT_APPROVE_CCR_IN_X_DAYS + - NON_VIEWER_DIDNT_INITIATE_APPROVE_OR_SIGN_TX_OR_CCR_LAST_X_DAYS + - TH_SET_TO_1_AND_MORE_THAN_3_APPROVERS + - ADMIN_TH_SET_TO_1_AND_MORE_THAN_3_ADMINS + - NON_EVM_DAPP_CONNECTIONS_ENABLED_BUT_UNUSED + - OTA_ENABLED_BUT_UNUSED + - POLICY_NOT_UPDATED_RECENTLY + - RAW_SIGNING_ENABLED_BUT_UNUSED + - API_USER_UNUSED_FOR_90_DAYS + - UNUSED_UNLIMITED_TOKEN_ALLOWANCES + - UNUSED_WHITELISTED_ADDRESS + - TRANSACTION_REPETITION_ATTACK + - USER_EMAIL_DOMAIN_NON_BUSINESS + - OUTDATED_MOBILE_APP_VERSION + - SINGLE_HOP_DRAIN_ATTACK + - LATERAL_MOVEMENT_DRAIN_ATTACK + - WORKSPACE_USER_DORMANT_FOR_X_DAYS + example: API_COSIGNER_WITH_NO_CALLBACK + type: string + status: + description: Current status of the finding + enum: + - OPEN + - ACCEPTED + - RESOLVED + example: OPEN + type: string + severity: + description: Severity level of the finding + enum: + - INFO + - LOW + - MEDIUM + - HIGH + example: HIGH + type: string + category: + description: Category of the finding + enum: + - USER_MANAGEMENT + - ACCESS_CONTROL + - ADMIN_MANAGEMENT + - SECURITY + - CONFIGURATION + - APPROVAL_GROUP_MANAGEMENT + - POLICY_ENGINE_UTILIZATION + - WORKSPACE_CONFIGURATION + - DEFI_ACCESS + - FLEET_MANAGEMENT + example: USER_MANAGEMENT + type: string + createdAt: + description: When the finding was first detected + example: 2026-07-28T11:37:05Z + format: date-time + type: string + title: + description: Human-readable title of the finding + example: API co-signer configured without a callback URL + type: string + type: object + GetFindingsExternalResponse: + description: A paginated list of FSPM findings + example: + next: eyJzZXZlcml0eVJhbmsiOjMsImNyZWF0ZWRBdCI6IjIwMjYtMDctMTRUMTA6MDU6NTYuMDAwWiIsImlkIjoiYjJmZTkwYjItMWZlMy00ZTczLTg1YTItNjZlMTlmN2RhYzY2In0= + total: 42 + data: [] + properties: + data: + description: List of FSPM findings for the current page. + example: [] + items: + $ref: "#/components/schemas/SecurityFinding" + type: array + total: + description: Total number of findings matching the query. + example: 42 + type: integer + next: + description: "Cursor for the next page of results, omitted when there are\ + \ no more results." + example: eyJzZXZlcml0eVJhbmsiOjMsImNyZWF0ZWRBdCI6IjIwMjYtMDctMTRUMTA6MDU6NTYuMDAwWiIsImlkIjoiYjJmZTkwYjItMWZlMy00ZTczLTg1YTItNjZlMTlmN2RhYzY2In0= + type: string + required: + - data + - total + type: object PolicyType: description: Policy type enumeration enum: diff --git a/build.gradle b/build.gradle index 3fa7a029..d43e483e 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'eclipse' apply plugin: 'com.diffplug.spotless' group = 'com.fireblocks.sdk' -version = '26.0.0' +version = '0.0.0' buildscript { repositories { diff --git a/docs/ApiUserApi.md b/docs/ApiUserApi.md index 0c93dbbb..c051e45a 100644 --- a/docs/ApiUserApi.md +++ b/docs/ApiUserApi.md @@ -54,12 +54,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ApiUserApi#createApiUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -141,12 +135,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ApiUserApi#getApiUsers"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -225,12 +213,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ApiUserApi#issueApiUserPairingToken"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/AuditLogsApi.md b/docs/AuditLogsApi.md index 190dbea4..89951fff 100644 --- a/docs/AuditLogsApi.md +++ b/docs/AuditLogsApi.md @@ -63,12 +63,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling AuditLogsApi#getAuditLogs"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/BlockchainLinkBetaApi.md b/docs/BlockchainLinkBetaApi.md index 1d7a8742..3a47daf4 100644 --- a/docs/BlockchainLinkBetaApi.md +++ b/docs/BlockchainLinkBetaApi.md @@ -61,12 +61,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainLinkBetaApi#activateBlockchainLinkChain"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -146,12 +140,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainLinkBetaApi#createBlockchainLinkChain"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -229,12 +217,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainLinkBetaApi#deleteBlockchainLinkChain"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -311,12 +293,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainLinkBetaApi#getBlockchainLinkBillingInfo"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -391,12 +367,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainLinkBetaApi#getBlockchainLinkChain"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -473,12 +443,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainLinkBetaApi#getBlockchainLinkTestWalletAddress"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -560,12 +524,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainLinkBetaApi#listBlockchainLinkChains"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -651,12 +609,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainLinkBetaApi#triggerBlockchainLinkValidation"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -737,12 +689,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainLinkBetaApi#updateBlockchainLinkChain"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/BlockchainsAssetsApi.md b/docs/BlockchainsAssetsApi.md index 8a3830fd..f71315a8 100644 --- a/docs/BlockchainsAssetsApi.md +++ b/docs/BlockchainsAssetsApi.md @@ -60,12 +60,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainsAssetsApi#getAsset"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -146,12 +140,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainsAssetsApi#getBlockchain"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -230,12 +218,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainsAssetsApi#getSupportedAssets"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -318,12 +300,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainsAssetsApi#listAssets"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -415,12 +391,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainsAssetsApi#listBlockchains"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -505,12 +475,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainsAssetsApi#registerNewAsset"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -596,12 +560,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainsAssetsApi#setAssetPrice"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -685,12 +643,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainsAssetsApi#updateAssetUserMetadata"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/ComplianceApi.md b/docs/ComplianceApi.md index bf731a2c..5352fe39 100644 --- a/docs/ComplianceApi.md +++ b/docs/ComplianceApi.md @@ -91,12 +91,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#activateArsConfig"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -175,12 +169,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#activateByorkConfig"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -260,12 +248,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#addAddressRegistryVaultOptOuts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -347,12 +329,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#assignVaultsToLegalEntity"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -434,12 +410,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#createCounterpartyGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -518,12 +488,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#deactivateArsConfig"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -602,12 +566,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#deactivateByorkConfig"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -685,12 +643,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#deleteCounterpartyGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -768,12 +720,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#deleteLegalEntity"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -852,12 +798,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#getAddressRegistryTenantParticipationStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -932,12 +872,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#getAddressRegistryVaultOptOut"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1015,12 +949,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#getAmlPostScreeningPolicy"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1093,12 +1021,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#getAmlScreeningPolicy"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1171,12 +1093,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#getByorkConfig"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1252,12 +1168,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#getByorkVerdict"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1338,12 +1248,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#getCounterpartyGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1422,12 +1326,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#getLegalEntity"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1506,12 +1404,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#getLegalEntityForAddress"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1590,12 +1482,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#getPostScreeningPolicy"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1669,12 +1555,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#getScreeningFullDetails"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1751,12 +1631,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#getScreeningPolicy"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1832,12 +1706,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#listAddressRegistryVaultOptOuts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1919,12 +1787,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#listCounterpartyGroups"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2005,12 +1867,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#listLegalEntities"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2092,12 +1948,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#listVaultsForLegalEntity"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2178,12 +2028,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#optInAddressRegistryTenant"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2260,12 +2104,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#optOutAddressRegistryTenant"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2341,12 +2179,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#registerLegalEntity"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2429,12 +2261,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#removeAddressRegistryVaultOptOut"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2512,12 +2338,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#removeAllAddressRegistryVaultOptOuts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2594,12 +2414,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#rescreenRejectedTransaction"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2680,12 +2494,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#retryRejectedTransactionBypassScreeningChecks"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2765,12 +2573,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#setAmlVerdict"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2853,12 +2655,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#setByorkTimeouts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2939,12 +2735,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#setByorkVerdict"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -3027,12 +2817,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#updateAmlScreeningConfiguration"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -3111,12 +2895,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#updateCounterpartyGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -3199,12 +2977,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#updateLegalEntity"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -3287,12 +3059,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#updateScreeningConfiguration"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -3370,12 +3136,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceApi#updateTravelRuleConfig"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/ComplianceScreeningConfigurationApi.md b/docs/ComplianceScreeningConfigurationApi.md index a3c29081..e33bc5e3 100644 --- a/docs/ComplianceScreeningConfigurationApi.md +++ b/docs/ComplianceScreeningConfigurationApi.md @@ -52,12 +52,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceScreeningConfigurationApi#getAmlScreeningConfiguration"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -130,12 +124,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ComplianceScreeningConfigurationApi#getScreeningConfiguration"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/ConnectedAccountsBetaApi.md b/docs/ConnectedAccountsBetaApi.md index bdc7dea3..86ad7d5f 100644 --- a/docs/ConnectedAccountsBetaApi.md +++ b/docs/ConnectedAccountsBetaApi.md @@ -64,12 +64,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ConnectedAccountsBetaApi#addConnectedAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -152,12 +146,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ConnectedAccountsBetaApi#disconnectConnectedAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -235,12 +223,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ConnectedAccountsBetaApi#getConnectedAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -325,12 +307,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ConnectedAccountsBetaApi#getConnectedAccountAllowlist"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -417,12 +393,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ConnectedAccountsBetaApi#getConnectedAccountAllowlistEntry"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -504,12 +474,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ConnectedAccountsBetaApi#getConnectedAccountBalances"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -591,12 +555,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ConnectedAccountsBetaApi#getConnectedAccountRates"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -678,12 +636,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ConnectedAccountsBetaApi#getConnectedAccountTradingPairs"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -765,12 +717,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ConnectedAccountsBetaApi#getConnectedAccounts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -849,12 +795,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ConnectedAccountsBetaApi#getConnectedAccountsCredentialsPublicKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -931,12 +871,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ConnectedAccountsBetaApi#renameConnectedAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1021,12 +955,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ConnectedAccountsBetaApi#syncConnectedAccountAllowlist"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/ConsoleUserApi.md b/docs/ConsoleUserApi.md index abd002ad..ca9b0087 100644 --- a/docs/ConsoleUserApi.md +++ b/docs/ConsoleUserApi.md @@ -53,12 +53,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ConsoleUserApi#createConsoleUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -140,12 +134,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ConsoleUserApi#getConsoleUsers"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/ContractInteractionsApi.md b/docs/ContractInteractionsApi.md index 4d140f8e..463a824b 100644 --- a/docs/ContractInteractionsApi.md +++ b/docs/ContractInteractionsApi.md @@ -60,12 +60,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractInteractionsApi#decodeContractData"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -149,12 +143,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractInteractionsApi#getContractAddress"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -236,12 +224,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractInteractionsApi#getDeployedContractAbi"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -322,12 +304,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractInteractionsApi#getTransactionReceipt"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -409,12 +385,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractInteractionsApi#readCallFunction"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -498,12 +468,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractInteractionsApi#writeCallFunction"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/ContractTemplatesApi.md b/docs/ContractTemplatesApi.md index 5b7ff8d1..c6fa8a27 100644 --- a/docs/ContractTemplatesApi.md +++ b/docs/ContractTemplatesApi.md @@ -58,12 +58,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractTemplatesApi#deleteContractTemplateById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -144,12 +138,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractTemplatesApi#deployContract"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -231,12 +219,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractTemplatesApi#getConstructorByContractTemplateId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -316,12 +298,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractTemplatesApi#getContractTemplateById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -405,12 +381,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractTemplatesApi#getContractTemplates"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -494,12 +464,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractTemplatesApi#getFunctionAbiByContractTemplateId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -579,12 +543,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractTemplatesApi#getSupportedBlockchainsByTemplateId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -664,12 +622,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractTemplatesApi#uploadContractTemplate"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/ContractsApi.md b/docs/ContractsApi.md index 5d40c5d9..28361896 100644 --- a/docs/ContractsApi.md +++ b/docs/ContractsApi.md @@ -61,12 +61,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractsApi#addContractAsset"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -148,12 +142,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractsApi#createContract"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -231,12 +219,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractsApi#deleteContract"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -314,12 +296,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractsApi#deleteContractAsset"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -398,12 +374,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractsApi#getContract"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -482,12 +452,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractsApi#getContractAsset"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -565,12 +529,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ContractsApi#getContracts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/CosignersBetaApi.md b/docs/CosignersBetaApi.md index bb3efd64..eb44150e 100644 --- a/docs/CosignersBetaApi.md +++ b/docs/CosignersBetaApi.md @@ -62,12 +62,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling CosignersBetaApi#addCosigner"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -147,12 +141,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling CosignersBetaApi#getApiKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -234,12 +222,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling CosignersBetaApi#getApiKeys"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -320,12 +302,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling CosignersBetaApi#getCosigner"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -405,12 +381,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling CosignersBetaApi#getCosigners"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -492,12 +462,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling CosignersBetaApi#getRequestStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -580,12 +544,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling CosignersBetaApi#pairApiKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -667,12 +625,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling CosignersBetaApi#renameCosigner"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -752,12 +704,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling CosignersBetaApi#unpairApiKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -838,12 +784,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling CosignersBetaApi#updateCallbackHandler"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/DeployedContractsApi.md b/docs/DeployedContractsApi.md index 47edae5a..33387eb9 100644 --- a/docs/DeployedContractsApi.md +++ b/docs/DeployedContractsApi.md @@ -57,12 +57,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling DeployedContractsApi#addContractABI"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -143,12 +137,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling DeployedContractsApi#fetchContractAbi"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -229,12 +217,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling DeployedContractsApi#getDeployedContractByAddress"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -313,12 +295,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling DeployedContractsApi#getDeployedContractById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -400,12 +376,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling DeployedContractsApi#getDeployedContracts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/EarnApi.md b/docs/EarnApi.md index 3a8bad29..107c9df0 100644 --- a/docs/EarnApi.md +++ b/docs/EarnApi.md @@ -57,12 +57,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EarnApi#approveTermsOfService"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -146,12 +140,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EarnApi#createEarnAction"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -235,12 +223,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EarnApi#getEarnAction"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -325,12 +307,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EarnApi#getEarnActions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -418,12 +394,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EarnApi#getEarnOpportunities"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -513,12 +483,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EarnApi#getEarnPositions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -608,12 +572,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EarnApi#getEarnProviders"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/EmbeddedWalletsApi.md b/docs/EmbeddedWalletsApi.md index 07f72729..2f4ad92f 100644 --- a/docs/EmbeddedWalletsApi.md +++ b/docs/EmbeddedWalletsApi.md @@ -76,12 +76,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#addEmbeddedWalletAsset"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -163,12 +157,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#assignEmbeddedWallet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -247,12 +235,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#createEmbeddedWallet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -331,12 +313,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#createEmbeddedWalletAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -415,12 +391,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#getEmbeddedWallet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -499,12 +469,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#getEmbeddedWalletAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -590,12 +554,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#getEmbeddedWalletAddresses"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -682,12 +640,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#getEmbeddedWalletAsset"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -769,12 +721,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#getEmbeddedWalletAssetBalance"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -859,12 +805,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#getEmbeddedWalletAssets"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -948,12 +888,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#getEmbeddedWalletDevice"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1033,12 +967,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#getEmbeddedWalletDeviceSetupState"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1121,12 +1049,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#getEmbeddedWalletDevicesPaginated"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1209,12 +1131,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#getEmbeddedWalletLatestBackup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1298,12 +1214,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#getEmbeddedWalletPublicKeyInfoForAddress"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1387,12 +1297,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#getEmbeddedWalletSetupStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1472,12 +1376,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#getEmbeddedWalletSupportedAssets"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1561,12 +1459,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#getEmbeddedWallets"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1652,12 +1544,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#getPublicKeyInfoNcw"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1742,12 +1628,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#refreshEmbeddedWalletAssetBalance"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1830,12 +1710,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#updateEmbeddedWalletDeviceStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1917,12 +1791,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling EmbeddedWalletsApi#updateEmbeddedWalletStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/EthereumBlockchainData.md b/docs/EthereumBlockchainData.md index 0401f767..239369d0 100644 --- a/docs/EthereumBlockchainData.md +++ b/docs/EthereumBlockchainData.md @@ -10,6 +10,9 @@ Additional fields per blockchain for Ethereum (ETH) - can be empty or missing if |------------ | ------------- | ------------- | -------------| |**isCompoundingValidator** | **Boolean** | Is the validator compounding (i.e it was created with compounding validator type). | | |**estimatedActivationTime** | **String** | Estimated time the staked ETH will activate, derived from the beacon-chain deposit queue. Present only while the position is pending/activating; omitted once active. | [optional] | +|**estimatedSourceExitTime** | **OffsetDateTime** | Estimated time the source validator will exit the active set and stop earning rewards, derived from the beacon-chain consolidation queue. Present only while a consolidation is in progress. | [optional] | +|**estimatedConsolidationTime** | **OffsetDateTime** | Estimated time the consolidation will complete, i.e. when the source balance is swept to the destination validator, derived from the beacon-chain consolidation queue. Present only while a consolidation is in progress. | [optional] | +|**estimatedWithdrawalTime** | **OffsetDateTime** | Estimated time the in-flight withdrawal will complete, derived from the beacon-chain exit queue for a full exit or the manual withdrawal queue for a partial one. Present only while a withdrawal is in progress. | [optional] | diff --git a/docs/ExchangeAccountsApi.md b/docs/ExchangeAccountsApi.md index 29229b47..4cc8a67c 100644 --- a/docs/ExchangeAccountsApi.md +++ b/docs/ExchangeAccountsApi.md @@ -59,12 +59,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ExchangeAccountsApi#addExchangeAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -145,12 +139,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ExchangeAccountsApi#convertAssets"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -230,12 +218,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ExchangeAccountsApi#getExchangeAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -314,12 +296,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ExchangeAccountsApi#getExchangeAccountAsset"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -397,12 +373,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ExchangeAccountsApi#getExchangeAccountsCredentialsPublicKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -479,12 +449,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ExchangeAccountsApi#getPagedExchangeAccounts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -566,12 +530,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ExchangeAccountsApi#internalTransfer"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/ExternalWalletsApi.md b/docs/ExternalWalletsApi.md index 6fd948c5..61f68b1b 100644 --- a/docs/ExternalWalletsApi.md +++ b/docs/ExternalWalletsApi.md @@ -62,12 +62,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ExternalWalletsApi#addAssetToExternalWallet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -149,12 +143,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ExternalWalletsApi#createExternalWallet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -232,12 +220,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ExternalWalletsApi#deleteExternalWallet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -315,12 +297,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ExternalWalletsApi#getExternalWallet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -399,12 +375,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ExternalWalletsApi#getExternalWalletAsset"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -482,12 +452,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ExternalWalletsApi#getExternalWallets"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -562,12 +526,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ExternalWalletsApi#removeAssetFromExternalWallet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -647,12 +605,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ExternalWalletsApi#setExternalWalletCustomerRefId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/FiatAccountsApi.md b/docs/FiatAccountsApi.md index 8fa3a979..ddaf8701 100644 --- a/docs/FiatAccountsApi.md +++ b/docs/FiatAccountsApi.md @@ -57,12 +57,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling FiatAccountsApi#depositFundsFromLinkedDDA"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -142,12 +136,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling FiatAccountsApi#getFiatAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -224,12 +212,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling FiatAccountsApi#getFiatAccounts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -306,12 +288,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling FiatAccountsApi#redeemFundsToLinkedDDA"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/GasStationsApi.md b/docs/GasStationsApi.md index 0702a6bf..b8d76714 100644 --- a/docs/GasStationsApi.md +++ b/docs/GasStationsApi.md @@ -55,12 +55,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling GasStationsApi#getGasStationByAssetId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -137,12 +131,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling GasStationsApi#getGasStationInfo"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -218,12 +206,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling GasStationsApi#updateGasStationConfiguration"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -304,12 +286,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling GasStationsApi#updateGasStationConfigurationByAssetId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/GaslessInfo.md b/docs/GaslessInfo.md new file mode 100644 index 00000000..bab0c64e --- /dev/null +++ b/docs/GaslessInfo.md @@ -0,0 +1,17 @@ + + +# GaslessInfo + +Relay (meta-transaction) details. Returned only for meta-transactions (`isMetaTx` is `true`). For meta-transactions the deprecated top-level `fee` field is omitted; use `feeInfo` instead. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**isMetaTx** | **Boolean** | Indicates the transaction is a meta-transaction (gas paid by a relay tenant). | [optional] | +|**relayTenantId** | **String** | The tenant ID of the relay that sponsors the gas for the meta-transaction. | [optional] | +|**relayTenantName** | **String** | The tenant name of the relay that sponsors the gas for the meta-transaction. | [optional] | +|**relayVaultAccountId** | **String** | The vault account ID of the relay that sponsors the gas for the meta-transaction. | [optional] | + + + diff --git a/docs/GenieBetaApi.md b/docs/GenieBetaApi.md index 54fdee52..a20ec917 100644 --- a/docs/GenieBetaApi.md +++ b/docs/GenieBetaApi.md @@ -53,12 +53,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling GenieBetaApi#createGenieSession"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -138,12 +132,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling GenieBetaApi#sendGenieMessage"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/GetFindingsExternalResponse.md b/docs/GetFindingsExternalResponse.md new file mode 100644 index 00000000..d0fa3eb5 --- /dev/null +++ b/docs/GetFindingsExternalResponse.md @@ -0,0 +1,16 @@ + + +# GetFindingsExternalResponse + +A paginated list of FSPM findings + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<SecurityFinding>**](SecurityFinding.md) | List of FSPM findings for the current page. | | +|**total** | **Integer** | Total number of findings matching the query. | | +|**next** | **String** | Cursor for the next page of results, omitted when there are no more results. | [optional] | + + + diff --git a/docs/InternalWalletsApi.md b/docs/InternalWalletsApi.md index 5659d549..5f5c9e03 100644 --- a/docs/InternalWalletsApi.md +++ b/docs/InternalWalletsApi.md @@ -61,12 +61,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling InternalWalletsApi#createInternalWallet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -148,12 +142,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling InternalWalletsApi#createInternalWalletAsset"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -233,12 +221,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling InternalWalletsApi#deleteInternalWallet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -316,12 +298,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling InternalWalletsApi#deleteInternalWalletAsset"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -400,12 +376,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling InternalWalletsApi#getInternalWallet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -484,12 +454,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling InternalWalletsApi#getInternalWalletAsset"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -570,12 +534,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling InternalWalletsApi#getInternalWalletAssetsPaginated"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -654,12 +612,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling InternalWalletsApi#getInternalWallets"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -735,12 +687,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling InternalWalletsApi#setCustomerRefIdForInternalWallet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/KeyLinkBetaApi.md b/docs/KeyLinkBetaApi.md index 24abd601..dba90fd3 100644 --- a/docs/KeyLinkBetaApi.md +++ b/docs/KeyLinkBetaApi.md @@ -61,12 +61,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling KeyLinkBetaApi#createSigningKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -146,12 +140,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling KeyLinkBetaApi#createValidationKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -231,12 +219,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling KeyLinkBetaApi#disableValidationKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -315,12 +297,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling KeyLinkBetaApi#getSigningKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -408,12 +384,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling KeyLinkBetaApi#getSigningKeysList"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -501,12 +471,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling KeyLinkBetaApi#getValidationKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -587,12 +551,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling KeyLinkBetaApi#getValidationKeysList"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -673,12 +631,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling KeyLinkBetaApi#setAgentId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -758,12 +710,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling KeyLinkBetaApi#updateSigningKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/KeysBetaApi.md b/docs/KeysBetaApi.md index 7e8c7938..4bc63fd6 100644 --- a/docs/KeysBetaApi.md +++ b/docs/KeysBetaApi.md @@ -52,12 +52,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling KeysBetaApi#getMpcKeysList"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -132,12 +126,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling KeysBetaApi#getMpcKeysListByUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/NetworkConnectionsApi.md b/docs/NetworkConnectionsApi.md index 8d0db942..9faa0fb8 100644 --- a/docs/NetworkConnectionsApi.md +++ b/docs/NetworkConnectionsApi.md @@ -67,12 +67,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NetworkConnectionsApi#checkThirdPartyRouting"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -152,12 +146,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NetworkConnectionsApi#createNetworkConnection"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -237,12 +225,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NetworkConnectionsApi#createNetworkId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -321,12 +303,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NetworkConnectionsApi#deleteNetworkConnection"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -404,12 +380,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NetworkConnectionsApi#deleteNetworkId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -487,12 +457,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NetworkConnectionsApi#getNetwork"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -569,12 +533,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NetworkConnectionsApi#getNetworkConnections"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -649,12 +607,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NetworkConnectionsApi#getNetworkId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -731,12 +683,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NetworkConnectionsApi#getNetworkIds"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -810,12 +756,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NetworkConnectionsApi#getRoutingPolicyAssetGroups"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -895,12 +835,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NetworkConnectionsApi#searchNetworkIds"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -984,12 +918,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NetworkConnectionsApi#setNetworkIdDiscoverability"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1069,12 +997,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NetworkConnectionsApi#setNetworkIdName"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1154,12 +1076,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NetworkConnectionsApi#setNetworkIdRoutingPolicy"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1239,12 +1155,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NetworkConnectionsApi#setRoutingPolicy"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/NftsApi.md b/docs/NftsApi.md index ccaab387..10686e3c 100644 --- a/docs/NftsApi.md +++ b/docs/NftsApi.md @@ -61,12 +61,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NftsApi#getNFT"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -147,12 +141,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NftsApi#getNFTs"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -246,12 +234,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NftsApi#getOwnershipTokens"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -348,12 +330,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NftsApi#listOwnedCollections"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -445,12 +421,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NftsApi#listOwnedTokens"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -536,12 +506,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NftsApi#refreshNFTMetadata"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -621,12 +585,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NftsApi#updateOwnershipTokens"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -707,12 +665,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NftsApi#updateTokenOwnershipStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -793,12 +745,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NftsApi#updateTokensOwnershipSpam"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -880,12 +826,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling NftsApi#updateTokensOwnershipStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/OffExchangesApi.md b/docs/OffExchangesApi.md index 5b82aba8..b5bd4623 100644 --- a/docs/OffExchangesApi.md +++ b/docs/OffExchangesApi.md @@ -57,12 +57,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling OffExchangesApi#addOffExchange"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -141,12 +135,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling OffExchangesApi#getOffExchangeCollateralAccounts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -224,12 +212,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling OffExchangesApi#getOffExchangeSettlementTransactions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -308,12 +290,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling OffExchangesApi#removeOffExchange"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -393,12 +369,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling OffExchangesApi#settleOffExchangeTrades"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/OnchainDataApi.md b/docs/OnchainDataApi.md index 57e356fe..47bc401e 100644 --- a/docs/OnchainDataApi.md +++ b/docs/OnchainDataApi.md @@ -64,12 +64,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling OnchainDataApi#getAccessRegistryCurrentState"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -153,12 +147,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling OnchainDataApi#getAccessRegistrySummary"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -238,12 +226,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling OnchainDataApi#getActiveRolesForContract"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -331,12 +313,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling OnchainDataApi#getContractBalanceHistory"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -424,12 +400,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling OnchainDataApi#getContractBalancesSummary"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -516,12 +486,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling OnchainDataApi#getContractTotalSupply"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -613,12 +577,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling OnchainDataApi#getLatestBalancesForContract"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -709,12 +667,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling OnchainDataApi#getOnchainTransactions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/OtaBetaApi.md b/docs/OtaBetaApi.md index d0c77eae..a4b4262e 100644 --- a/docs/OtaBetaApi.md +++ b/docs/OtaBetaApi.md @@ -52,12 +52,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling OtaBetaApi#getOtaStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -133,12 +127,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling OtaBetaApi#setOtaStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/PaymentsPayoutApi.md b/docs/PaymentsPayoutApi.md index 1336a883..9f3ac281 100644 --- a/docs/PaymentsPayoutApi.md +++ b/docs/PaymentsPayoutApi.md @@ -55,12 +55,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling PaymentsPayoutApi#createPayout"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -142,12 +136,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling PaymentsPayoutApi#executePayoutAction"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -228,12 +216,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling PaymentsPayoutApi#getPayout"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/PolicyEditorBetaApi.md b/docs/PolicyEditorBetaApi.md index dfb37a82..13283232 100644 --- a/docs/PolicyEditorBetaApi.md +++ b/docs/PolicyEditorBetaApi.md @@ -55,12 +55,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling PolicyEditorBetaApi#getActivePolicyLegacy"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -134,12 +128,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling PolicyEditorBetaApi#getDraftLegacy"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -215,12 +203,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling PolicyEditorBetaApi#publishDraftLegacy"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -300,12 +282,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling PolicyEditorBetaApi#publishPolicyRules"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -385,12 +361,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling PolicyEditorBetaApi#updateDraftLegacy"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/PolicyEditorV2Api.md b/docs/PolicyEditorV2Api.md index 91b2d02f..01d8f4f8 100644 --- a/docs/PolicyEditorV2Api.md +++ b/docs/PolicyEditorV2Api.md @@ -55,12 +55,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling PolicyEditorV2Api#getActivePolicy"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -138,12 +132,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling PolicyEditorV2Api#getDraft"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -222,12 +210,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling PolicyEditorV2Api#publishDraft"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -307,12 +289,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling PolicyEditorV2Api#updateDraft"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/PolicyEditorV2BetaApi.md b/docs/PolicyEditorV2BetaApi.md index 41c397ba..f3420556 100644 --- a/docs/PolicyEditorV2BetaApi.md +++ b/docs/PolicyEditorV2BetaApi.md @@ -53,12 +53,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling PolicyEditorV2BetaApi#getPolicyRuleQuota"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/ReasonForPaymentEnum.md b/docs/ReasonForPaymentEnum.md index a08031db..4c28d680 100644 --- a/docs/ReasonForPaymentEnum.md +++ b/docs/ReasonForPaymentEnum.md @@ -65,5 +65,11 @@ * `REPATRIATION_FUND_SETTLEMENT` (value: `"REPATRIATION_FUND_SETTLEMENT"`) +* `CORPORATE_INVESTMENT` (value: `"CORPORATE_INVESTMENT"`) + +* `INTER_COMPANY_TRANSFER` (value: `"INTER_COMPANY_TRANSFER"`) + +* `OFFICE_OPERATING_EXPENSES` (value: `"OFFICE_OPERATING_EXPENSES"`) + diff --git a/docs/ReportsBetaApi.md b/docs/ReportsBetaApi.md index d8d46dc5..b8883709 100644 --- a/docs/ReportsBetaApi.md +++ b/docs/ReportsBetaApi.md @@ -55,12 +55,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ReportsBetaApi#createReport"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -140,12 +134,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ReportsBetaApi#getReport"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -228,12 +216,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ReportsBetaApi#listReports"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/ResetDeviceApi.md b/docs/ResetDeviceApi.md index 58c6191a..ac3a7feb 100644 --- a/docs/ResetDeviceApi.md +++ b/docs/ResetDeviceApi.md @@ -52,12 +52,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling ResetDeviceApi#resetDevice"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/SecurityFinding.md b/docs/SecurityFinding.md new file mode 100644 index 00000000..46c413e0 --- /dev/null +++ b/docs/SecurityFinding.md @@ -0,0 +1,87 @@ + + +# SecurityFinding + +A single FSPM finding + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **UUID** | Unique identifier of the finding | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | The finding type identifier | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | Current status of the finding | [optional] | +|**severity** | [**SeverityEnum**](#SeverityEnum) | Severity level of the finding | [optional] | +|**category** | [**CategoryEnum**](#CategoryEnum) | Category of the finding | [optional] | +|**createdAt** | **OffsetDateTime** | When the finding was first detected | [optional] | +|**title** | **String** | Human-readable title of the finding | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| API_USER_NOT_WHITELISTED | "API_USER_NOT_WHITELISTED" | +| CONSOLE_IP_ALLOWLIST_DEACTIVATED | "CONSOLE_IP_ALLOWLIST_DEACTIVATED" | +| ADMIN_TH_SET_TO_ALL_AND_MORE_THAN_2_ADMINS | "ADMIN_TH_SET_TO_ALL_AND_MORE_THAN_2_ADMINS" | +| API_USERS_COUNT_PASSES_TH_AND_OWNER_NOT_MANDATORY | "API_USERS_COUNT_PASSES_TH_AND_OWNER_NOT_MANDATORY" | +| API_COSIGNER_WITH_NO_CALLBACK | "API_COSIGNER_WITH_NO_CALLBACK" | +| API_USER_DIDNT_APPROVE_CCR_IN_X_DAYS | "API_USER_DIDNT_APPROVE_CCR_IN_X_DAYS" | +| NON_VIEWER_DIDNT_INITIATE_APPROVE_OR_SIGN_TX_OR_CCR_LAST_X_DAYS | "NON_VIEWER_DIDNT_INITIATE_APPROVE_OR_SIGN_TX_OR_CCR_LAST_X_DAYS" | +| TH_SET_TO_1_AND_MORE_THAN_3_APPROVERS | "TH_SET_TO_1_AND_MORE_THAN_3_APPROVERS" | +| ADMIN_TH_SET_TO_1_AND_MORE_THAN_3_ADMINS | "ADMIN_TH_SET_TO_1_AND_MORE_THAN_3_ADMINS" | +| NON_EVM_DAPP_CONNECTIONS_ENABLED_BUT_UNUSED | "NON_EVM_DAPP_CONNECTIONS_ENABLED_BUT_UNUSED" | +| OTA_ENABLED_BUT_UNUSED | "OTA_ENABLED_BUT_UNUSED" | +| POLICY_NOT_UPDATED_RECENTLY | "POLICY_NOT_UPDATED_RECENTLY" | +| RAW_SIGNING_ENABLED_BUT_UNUSED | "RAW_SIGNING_ENABLED_BUT_UNUSED" | +| API_USER_UNUSED_FOR_90_DAYS | "API_USER_UNUSED_FOR_90_DAYS" | +| UNUSED_UNLIMITED_TOKEN_ALLOWANCES | "UNUSED_UNLIMITED_TOKEN_ALLOWANCES" | +| UNUSED_WHITELISTED_ADDRESS | "UNUSED_WHITELISTED_ADDRESS" | +| TRANSACTION_REPETITION_ATTACK | "TRANSACTION_REPETITION_ATTACK" | +| USER_EMAIL_DOMAIN_NON_BUSINESS | "USER_EMAIL_DOMAIN_NON_BUSINESS" | +| OUTDATED_MOBILE_APP_VERSION | "OUTDATED_MOBILE_APP_VERSION" | +| SINGLE_HOP_DRAIN_ATTACK | "SINGLE_HOP_DRAIN_ATTACK" | +| LATERAL_MOVEMENT_DRAIN_ATTACK | "LATERAL_MOVEMENT_DRAIN_ATTACK" | +| WORKSPACE_USER_DORMANT_FOR_X_DAYS | "WORKSPACE_USER_DORMANT_FOR_X_DAYS" | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| OPEN | "OPEN" | +| ACCEPTED | "ACCEPTED" | +| RESOLVED | "RESOLVED" | + + + +## Enum: SeverityEnum + +| Name | Value | +|---- | -----| +| INFO | "INFO" | +| LOW | "LOW" | +| MEDIUM | "MEDIUM" | +| HIGH | "HIGH" | + + + +## Enum: CategoryEnum + +| Name | Value | +|---- | -----| +| USER_MANAGEMENT | "USER_MANAGEMENT" | +| ACCESS_CONTROL | "ACCESS_CONTROL" | +| ADMIN_MANAGEMENT | "ADMIN_MANAGEMENT" | +| SECURITY | "SECURITY" | +| CONFIGURATION | "CONFIGURATION" | +| APPROVAL_GROUP_MANAGEMENT | "APPROVAL_GROUP_MANAGEMENT" | +| POLICY_ENGINE_UTILIZATION | "POLICY_ENGINE_UTILIZATION" | +| WORKSPACE_CONFIGURATION | "WORKSPACE_CONFIGURATION" | +| DEFI_ACCESS | "DEFI_ACCESS" | +| FLEET_MANAGEMENT | "FLEET_MANAGEMENT" | + + + diff --git a/docs/SecurityPostureManagementApi.md b/docs/SecurityPostureManagementApi.md new file mode 100644 index 00000000..f6582915 --- /dev/null +++ b/docs/SecurityPostureManagementApi.md @@ -0,0 +1,99 @@ +# SecurityPostureManagementApi + +All URIs are relative to https://developers.fireblocks.com/reference/ + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getSecurityFindings**](SecurityPostureManagementApi.md#getSecurityFindings) | **GET** /security/fspm/findings | Get FSPM security findings | + + + +## getSecurityFindings + +> CompletableFuture> getSecurityFindings getSecurityFindings(pageCursor, pageSize, severity, category, status) + +Get FSPM security findings + +Returns a paginated list of FSPM security findings for the workspace. Endpoint Permissions: Security Admin, Security Auditor. + +### Example + +```java +// Import classes: +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.BasePath; +import com.fireblocks.sdk.Fireblocks; +import com.fireblocks.sdk.ConfigurationOptions; +import com.fireblocks.sdk.model.*; +import com.fireblocks.sdk.api.SecurityPostureManagementApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String pageCursor = "pageCursor_example"; // String | Cursor indicating the page position. Omit to fetch the first page. + Integer pageSize = 10; // Integer | Number of results per page + String severity = "INFO"; // String | Filter by severity level + String category = "USER_MANAGEMENT"; // String | Filter by finding category + String status = "OPEN"; // String | Filter by finding status + try { + CompletableFuture> response = fireblocks.securityPostureManagement().getSecurityFindings(pageCursor, pageSize, severity, category, status); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling SecurityPostureManagementApi#getSecurityFindings"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pageCursor** | **String**| Cursor indicating the page position. Omit to fetch the first page. | [optional] | +| **pageSize** | **Integer**| Number of results per page | [optional] [default to 10] | +| **severity** | **String**| Filter by severity level | [optional] [enum: INFO, LOW, MEDIUM, HIGH] | +| **category** | **String**| Filter by finding category | [optional] [enum: USER_MANAGEMENT, ACCESS_CONTROL, ADMIN_MANAGEMENT, SECURITY, CONFIGURATION, APPROVAL_GROUP_MANAGEMENT, POLICY_ENGINE_UTILIZATION, WORKSPACE_CONFIGURATION, DEFI_ACCESS, FLEET_MANAGEMENT] | +| **status** | **String**| Filter by finding status | [optional] [enum: OPEN, ACCEPTED, RESOLVED] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | A paginated list of FSPM findings | * X-Request-ID -
| +| **400** | Bad request — invalid or malformed query parameters. | * X-Request-ID -
| +| **401** | Unauthorized — missing or invalid authentication token. | * X-Request-ID -
| +| **403** | Forbidden — insufficient permissions or feature is disabled. | * X-Request-ID -
| +| **429** | Too many requests — rate limit exceeded, slow down and retry later. | * X-Request-ID -
| +| **5XX** | Internal error. | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + diff --git a/docs/SmartTransferApi.md b/docs/SmartTransferApi.md index 37071039..91f5eb89 100644 --- a/docs/SmartTransferApi.md +++ b/docs/SmartTransferApi.md @@ -73,12 +73,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling SmartTransferApi#approveDvPTicketTerm"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -162,12 +156,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling SmartTransferApi#cancelTicket"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -249,12 +237,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling SmartTransferApi#createTicket"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -336,12 +318,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling SmartTransferApi#createTicketTerm"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -422,12 +398,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling SmartTransferApi#findTicketById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -507,12 +477,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling SmartTransferApi#findTicketTermById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -593,12 +557,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling SmartTransferApi#fulfillTicket"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -681,12 +639,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling SmartTransferApi#fundDvpTicket"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -771,12 +723,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling SmartTransferApi#fundTicketTerm"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -858,12 +804,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling SmartTransferApi#getSmartTransferStatistic"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -938,12 +878,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling SmartTransferApi#getSmartTransferUserGroups"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1022,12 +956,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling SmartTransferApi#manuallyFundTicketTerm"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1110,12 +1038,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling SmartTransferApi#removeTicketTerm"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1206,12 +1128,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling SmartTransferApi#searchTickets"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1302,12 +1218,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling SmartTransferApi#setExternalRefId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1391,12 +1301,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling SmartTransferApi#setTicketExpiration"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1479,12 +1383,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling SmartTransferApi#setUserGroups"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1566,12 +1464,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling SmartTransferApi#submitTicket"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1656,12 +1548,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling SmartTransferApi#updateTicketTerm"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/StakingApi.md b/docs/StakingApi.md index 49235471..31c5a16c 100644 --- a/docs/StakingApi.md +++ b/docs/StakingApi.md @@ -68,12 +68,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling StakingApi#approveTermsOfServiceByProviderId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -158,12 +152,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling StakingApi#claimRewards"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -250,12 +238,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling StakingApi#consolidate"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -302,7 +284,7 @@ No authorization required List staking positions -Returns all staking positions with core details: amounts, rewards, status, chain, and vault. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. +Returns all staking positions with core details: amounts, rewards, status, chain, and vault. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. ### Example @@ -341,12 +323,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling StakingApi#getAllDelegations"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -430,12 +406,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling StakingApi#getChainInfo"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -517,12 +487,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling StakingApi#getChains"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -601,12 +565,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling StakingApi#getDelegationById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -692,12 +650,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling StakingApi#getPositionRelatedTransactions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -745,7 +697,7 @@ No authorization required List staking positions (Paginated) -Returns staking positions with core details: amounts, rewards, status, chain, and vault. It supports cursor-based pagination for efficient data retrieval. This endpoint always returns a paginated response with {data, next} structure. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. +Returns staking positions with core details: amounts, rewards, status, chain, and vault. It supports cursor-based pagination for efficient data retrieval. This endpoint always returns a paginated response with {data, next} structure. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. ### Example @@ -787,12 +739,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling StakingApi#getPositions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -841,7 +787,7 @@ No authorization required List staking providers -Returns all available staking providers with metadata such as name, ID, and supported chains. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. +Returns all available staking providers with metadata such as name, ID, and supported chains. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. ### Example @@ -878,12 +824,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling StakingApi#getProviders"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -961,12 +901,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling StakingApi#getSummary"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1044,12 +978,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling StakingApi#getSummaryByVault"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1130,12 +1058,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling StakingApi#mergeStakeAccounts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1222,12 +1144,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling StakingApi#split"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1314,12 +1230,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling StakingApi#stake"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1405,12 +1315,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling StakingApi#unstake"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1496,12 +1400,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling StakingApi#withdraw"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/TagsApi.md b/docs/TagsApi.md index 124ada40..f6d8e979 100644 --- a/docs/TagsApi.md +++ b/docs/TagsApi.md @@ -58,12 +58,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TagsApi#createTag"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -140,12 +134,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TagsApi#deleteTag"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -222,12 +210,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TagsApi#getApprovalRequest"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -307,12 +289,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TagsApi#getTag"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -396,12 +372,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TagsApi#getTags"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -487,12 +457,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TagsApi#updateTag"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/TokenizationApi.md b/docs/TokenizationApi.md index 35034af9..01618dec 100644 --- a/docs/TokenizationApi.md +++ b/docs/TokenizationApi.md @@ -87,12 +87,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#burnCollectionToken"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -173,12 +167,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#createNewCollection"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -258,12 +246,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#deactivateAndUnlinkAdapters"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -346,12 +328,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#deployAndLinkAdapters"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -435,12 +411,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#fetchCollectionTokenDetails"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -519,12 +489,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#getCollectionById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -603,12 +567,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#getDeployableAddress"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -690,12 +648,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#getLayerZeroDvnConfig"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -776,12 +728,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#getLayerZeroPeers"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -863,12 +809,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#getLinkedCollections"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -948,12 +888,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#getLinkedToken"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1033,12 +967,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#getLinkedTokens"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1117,12 +1045,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#getLinkedTokensCount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1201,12 +1123,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#getTokenAccessRegistryAddresses"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1288,12 +1204,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#getTokenAccessRegistrySummary"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1372,12 +1282,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#getTokenBalanceForAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1465,12 +1369,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#getTokenBalanceHistory"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1561,12 +1459,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#getTokenBalances"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1649,12 +1541,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#getTokenContractSummary"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1733,12 +1619,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#getTokenRbac"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1824,12 +1704,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#getTokenTotalSupply"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1921,12 +1795,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#getTokenTransactions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2019,12 +1887,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#getTokenTransfers"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2112,12 +1974,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#issueNewToken"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2197,12 +2053,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#issueTokenMultiChain"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2283,12 +2133,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#link"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2372,12 +2216,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#mintCollectionToken"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2459,12 +2297,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#reIssueTokenMultiChain"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2548,12 +2380,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#removeLayerZeroPeers"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2636,12 +2462,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#setLayerZeroDvnConfig"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2725,12 +2545,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#setLayerZeroPeers"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2812,12 +2626,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#unlink"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2896,12 +2704,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#unlinkCollection"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2981,12 +2783,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TokenizationApi#validateLayerZeroChannelConfig"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/TrLinkApi.md b/docs/TrLinkApi.md index a7dcb2f2..3aa927e1 100644 --- a/docs/TrLinkApi.md +++ b/docs/TrLinkApi.md @@ -81,12 +81,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#assessTRLinkTravelRuleRequirement"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -169,12 +163,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#cancelTRLinkTrm"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -257,12 +245,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#connectTRLinkIntegration"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -343,12 +325,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#createTRLinkCustomer"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -428,12 +404,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#createTRLinkIntegration"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -515,12 +485,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#createTRLinkManualDecision"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -603,12 +567,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#createTRLinkTrm"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -687,12 +645,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#deleteTRLinkCustomer"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -769,12 +721,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#disconnectTRLinkIntegration"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -852,12 +798,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#getTRLinkCustomerById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -936,12 +876,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#getTRLinkCustomerIntegrationById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1020,12 +954,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#getTRLinkCustomerIntegrations"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1102,12 +1030,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#getTRLinkCustomers"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1182,12 +1104,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#getTRLinkIntegrationPublicKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1264,12 +1180,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#getTRLinkPartners"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1343,12 +1253,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#getTRLinkPolicy"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1424,12 +1328,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#getTRLinkSupportedAsset"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1509,12 +1407,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#getTRLinkTrmById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1594,12 +1486,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#getTRLinkTrmRequiredActions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1679,12 +1565,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#getTRLinkVaspById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1765,12 +1645,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#listTRLinkSupportedAssets"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1852,12 +1726,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#listTRLinkVasps"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1940,12 +1808,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#redirectTRLinkTrm"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2029,12 +1891,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#resolveActionTRLinkTrm"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2117,12 +1973,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#setTRLinkDestinationTravelRuleMessageId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2204,12 +2054,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#setTRLinkTransactionTravelRuleMessageId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2290,12 +2134,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#testTRLinkIntegrationConnection"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2376,12 +2214,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TrLinkApi#updateTRLinkCustomer"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/TradingBetaApi.md b/docs/TradingBetaApi.md index 1316ef35..73bba491 100644 --- a/docs/TradingBetaApi.md +++ b/docs/TradingBetaApi.md @@ -63,12 +63,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TradingBetaApi#createOrder"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -153,12 +147,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TradingBetaApi#createQuote"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -243,12 +231,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TradingBetaApi#fetchAllOffers"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -333,12 +315,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TradingBetaApi#fetchRates"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -422,12 +398,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TradingBetaApi#getOrder"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -510,12 +480,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TradingBetaApi#getOrderRequirements"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -607,12 +571,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TradingBetaApi#getOrders"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -702,12 +660,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TradingBetaApi#getTradingProviderById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -791,12 +743,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TradingBetaApi#getTradingProviders"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -880,12 +826,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TradingBetaApi#submitOrderRequirements"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -974,12 +914,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TradingBetaApi#uploadOrderRequirementFile"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/TransactionResponse.md b/docs/TransactionResponse.md index d9c30c60..b2cd9f6f 100644 --- a/docs/TransactionResponse.md +++ b/docs/TransactionResponse.md @@ -55,6 +55,7 @@ |**index** | **BigDecimal** | For UTXO based assets this is the vOut, for Ethereum based, this is the index of the event of the contract call. **Note:** This field is not returned if a transaction uses the `destinations` object with more than one value. | [optional] | |**rewardInfo** | [**RewardInfo**](RewardInfo.md) | | [optional] | |**feePayerInfo** | [**FeePayerInfo**](FeePayerInfo.md) | | [optional] | +|**gaslessInfo** | [**GaslessInfo**](GaslessInfo.md) | | [optional] | |**systemMessages** | [**List<SystemMessageInfo>**](SystemMessageInfo.md) | | [optional] | |**addressType** | [**AddressTypeEnum**](#AddressTypeEnum) | | [optional] | |**requestedAmount** | **BigDecimal** | The amount requested by the user. Deprecated - please use the `amountInfo` field for accuracy. | [optional] | diff --git a/docs/TransactionsApi.md b/docs/TransactionsApi.md index fe3d21dc..cde36217 100644 --- a/docs/TransactionsApi.md +++ b/docs/TransactionsApi.md @@ -66,12 +66,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TransactionsApi#cancelTransaction"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -153,12 +147,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TransactionsApi#createTransaction"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -241,12 +229,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TransactionsApi#dropTransaction"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -327,12 +309,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TransactionsApi#estimateNetworkFee"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -411,12 +387,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TransactionsApi#estimateTransactionFee"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -497,12 +467,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TransactionsApi#freezeTransaction"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -581,12 +545,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TransactionsApi#getTransaction"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -665,12 +623,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TransactionsApi#getTransactionByExternalId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -763,12 +715,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TransactionsApi#getTransactions"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -863,12 +809,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TransactionsApi#setConfirmationThresholdByTransactionHash"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -950,12 +890,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TransactionsApi#setTransactionConfirmationThreshold"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1037,12 +971,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TransactionsApi#unfreezeTransaction"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1122,12 +1050,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TransactionsApi#validateAddress"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/TravelRuleApi.md b/docs/TravelRuleApi.md index ffc95d31..9e117c58 100644 --- a/docs/TravelRuleApi.md +++ b/docs/TravelRuleApi.md @@ -60,12 +60,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TravelRuleApi#createTrustProofOfAddress"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -144,12 +138,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TravelRuleApi#getTrustProofOfAddress"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -228,12 +216,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TravelRuleApi#getVASPByDID"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -318,12 +300,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TravelRuleApi#getVASPs"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -406,12 +382,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TravelRuleApi#getVaspForVault"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -491,12 +461,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TravelRuleApi#setVaspForVault"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -577,12 +541,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TravelRuleApi#updateVasp"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -664,12 +622,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling TravelRuleApi#validateFullTravelRuleTransaction"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/TravelRuleLegalNameIdentifier.md b/docs/TravelRuleLegalNameIdentifier.md new file mode 100644 index 00000000..de13dec9 --- /dev/null +++ b/docs/TravelRuleLegalNameIdentifier.md @@ -0,0 +1,14 @@ + + +# TravelRuleLegalNameIdentifier + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**legalPersonName** | **String** | Name by which the legal person is known. The value must be encrypted. | | +|**legalPersonNameIdentifierType** | **String** | Specifies the type of name for a legal person (IVMS101 LegalPersonNameTypeCode). Acceptable values are: - 'LEGL': Legal name - official name under which the organisation is registered. - 'SHRT': Short name of the organisation. - 'TRAD': Trading name - name used by the business for commercial purposes. The value must be encrypted. | | + + + diff --git a/docs/TravelRuleLegalPersonNameIdentifier.md b/docs/TravelRuleLegalPersonNameIdentifier.md index 36a4c8cf..f3ab21b2 100644 --- a/docs/TravelRuleLegalPersonNameIdentifier.md +++ b/docs/TravelRuleLegalPersonNameIdentifier.md @@ -7,8 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**legalPersonName** | **String** | Name by which the legal person is known. The value must be encrypted. | [optional] | -|**legalPersonNameIdentifierType** | **String** | Specifies the type of name for a legal person. Acceptable values are: - 'REGISTERED': The official registered name. - 'TRADE': A trading name or DBA (Doing Business As) name. - 'OTHER': Any other type of name. The value must be encrypted. | [optional] | +|**nameIdentifier** | [**List<TravelRuleLegalNameIdentifier>**](TravelRuleLegalNameIdentifier.md) | An array of name identifiers of the legal person. | [optional] | +|**localNameIdentifier** | [**List<TravelRuleLegalNameIdentifier>**](TravelRuleLegalNameIdentifier.md) | An array of local name identifiers of the legal person. | [optional] | +|**phoneticNameIdentifier** | [**List<TravelRuleLegalNameIdentifier>**](TravelRuleLegalNameIdentifier.md) | An array of phonetic name identifiers of the legal person. | [optional] | diff --git a/docs/TravelRuleValidateLegalNameIdentifier.md b/docs/TravelRuleValidateLegalNameIdentifier.md new file mode 100644 index 00000000..49848344 --- /dev/null +++ b/docs/TravelRuleValidateLegalNameIdentifier.md @@ -0,0 +1,24 @@ + + +# TravelRuleValidateLegalNameIdentifier + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**legalPersonName** | **String** | Name by which the legal person is known. | | +|**legalPersonNameIdentifierType** | [**LegalPersonNameIdentifierTypeEnum**](#LegalPersonNameIdentifierTypeEnum) | Specifies the type of name for a legal person (IVMS101 LegalPersonNameTypeCode). Acceptable values are: - 'LEGL': Legal name - official name under which the organisation is registered. - 'SHRT': Short name of the organisation. - 'TRAD': Trading name - name used by the business for commercial purposes. | | + + + +## Enum: LegalPersonNameIdentifierTypeEnum + +| Name | Value | +|---- | -----| +| LEGL | "LEGL" | +| SHRT | "SHRT" | +| TRAD | "TRAD" | + + + diff --git a/docs/TravelRuleValidateLegalPerson.md b/docs/TravelRuleValidateLegalPerson.md index d494b2dc..9a556b11 100644 --- a/docs/TravelRuleValidateLegalPerson.md +++ b/docs/TravelRuleValidateLegalPerson.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | [**TravelRuleValidateLegalPersonNameIdentifier**](TravelRuleValidateLegalPersonNameIdentifier.md) | | [optional] | +|**name** | [**TravelRuleValidateLegalPersonNameIdentifier**](TravelRuleValidateLegalPersonNameIdentifier.md) | | | |**geographicAddress** | [**List<TravelRuleValidateGeographicAddress>**](TravelRuleValidateGeographicAddress.md) | The array of geographic addresses associated with the legal person. | [optional] | |**nationalIdentification** | [**TravelRuleValidateNationalIdentification**](TravelRuleValidateNationalIdentification.md) | | [optional] | |**customerIdentification** | **String** | A unique identifier that identifies the customer in the organization's context. | [optional] | diff --git a/docs/TravelRuleValidateLegalPersonNameIdentifier.md b/docs/TravelRuleValidateLegalPersonNameIdentifier.md index 7e551118..b39a8a2d 100644 --- a/docs/TravelRuleValidateLegalPersonNameIdentifier.md +++ b/docs/TravelRuleValidateLegalPersonNameIdentifier.md @@ -7,18 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**legalPersonName** | **String** | Name by which the legal person is known. | [optional] | -|**legalPersonNameIdentifierType** | [**LegalPersonNameIdentifierTypeEnum**](#LegalPersonNameIdentifierTypeEnum) | Specifies the type of name for a legal person. Acceptable values are: - 'REGISTERED': The official registered name. - 'TRADE': A trading name or DBA (Doing Business As) name. - 'OTHER': Any other type of name. | [optional] | - - - -## Enum: LegalPersonNameIdentifierTypeEnum - -| Name | Value | -|---- | -----| -| REGISTERED | "REGISTERED" | -| TRADE | "TRADE" | -| OTHER | "OTHER" | +|**nameIdentifier** | [**List<TravelRuleValidateLegalNameIdentifier>**](TravelRuleValidateLegalNameIdentifier.md) | An array of name identifiers of the legal person. | | +|**localNameIdentifier** | [**List<TravelRuleValidateLegalNameIdentifier>**](TravelRuleValidateLegalNameIdentifier.md) | An array of local name identifiers of the legal person. | [optional] | +|**phoneticNameIdentifier** | [**List<TravelRuleValidateLegalNameIdentifier>**](TravelRuleValidateLegalNameIdentifier.md) | An array of phonetic name identifiers of the legal person. | [optional] | diff --git a/docs/UserGroupsBetaApi.md b/docs/UserGroupsBetaApi.md index c5be4e4a..edc9bd92 100644 --- a/docs/UserGroupsBetaApi.md +++ b/docs/UserGroupsBetaApi.md @@ -57,12 +57,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling UserGroupsBetaApi#createUserGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -140,12 +134,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling UserGroupsBetaApi#deleteUserGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -223,12 +211,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling UserGroupsBetaApi#getUserGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -305,12 +287,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling UserGroupsBetaApi#getUserGroups"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -387,12 +363,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling UserGroupsBetaApi#updateUserGroup"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/UsersApi.md b/docs/UsersApi.md index a24791a9..a4a283f0 100644 --- a/docs/UsersApi.md +++ b/docs/UsersApi.md @@ -51,12 +51,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling UsersApi#getUsers"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/UtxoManagementBetaApi.md b/docs/UtxoManagementBetaApi.md index 8f44508a..90b48b55 100644 --- a/docs/UtxoManagementBetaApi.md +++ b/docs/UtxoManagementBetaApi.md @@ -67,12 +67,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling UtxoManagementBetaApi#getUtxos"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -167,12 +161,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling UtxoManagementBetaApi#updateUtxoLabels"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/VaultsApi.md b/docs/VaultsApi.md index 2b9f8973..5f54081d 100644 --- a/docs/VaultsApi.md +++ b/docs/VaultsApi.md @@ -92,12 +92,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#activateAssetForVaultAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -179,12 +173,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#activateUsdcGatewayWalletBeta"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -264,12 +252,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#attachOrDetachTagsFromVaultAccounts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -352,12 +334,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#createLegacyAddress"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -439,12 +415,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#createMultipleAccounts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -524,12 +494,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#createMultipleDepositAddresses"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -609,12 +573,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#createVaultAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -697,12 +655,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#createVaultAccountAsset"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -787,12 +739,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#createVaultAccountAssetAddress"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -874,12 +820,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#deactivateUsdcGatewayWalletBeta"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -958,12 +898,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#disableUsdcGatewayDepositAutomationScheduleBeta"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1047,12 +981,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#getAssetWallets"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1134,12 +1062,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#getCreateMultipleDepositAddressesJobStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1217,12 +1139,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#getCreateMultipleVaultAccountsJobStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1301,12 +1217,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#getMaxBipIndexUsed"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1393,12 +1303,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#getMaxSpendableAmount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1494,12 +1398,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#getPagedVaultAccounts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1588,12 +1486,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#getPublicKeyInfo"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1677,12 +1569,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#getPublicKeyInfoForAddress"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1765,12 +1651,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#getUnspentInputs"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1849,12 +1729,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#getUsdcGatewayDepositAutomationBeta"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1932,12 +1806,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#getUsdcGatewayWalletInfoBeta"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2015,12 +1883,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#getVaultAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2099,12 +1961,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#getVaultAccountAsset"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2187,12 +2043,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#getVaultAccountAssetAddressesPaginated"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2275,12 +2125,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#getVaultAssets"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2359,12 +2203,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#getVaultBalanceByAsset"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2443,12 +2281,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#hideVaultAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2527,12 +2359,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#lookupVaultByAddress"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2617,12 +2443,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#setCustomerRefIdForAddress"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2706,12 +2526,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#setUsdcGatewayDepositAutomationBeta"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2793,12 +2607,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#setVaultAccountAutoFuel"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2880,12 +2688,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#setVaultAccountCustomerRefId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -2966,12 +2768,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#unhideVaultAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -3053,12 +2849,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#updateUsdcGatewayDepositAutomationBeta"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -3141,12 +2931,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#updateVaultAccount"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -3230,12 +3014,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#updateVaultAccountAssetAddress"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -3319,12 +3097,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling VaultsApi#updateVaultAccountAssetBalance"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/Web3ConnectionsApi.md b/docs/Web3ConnectionsApi.md index 234e8a28..9592e122 100644 --- a/docs/Web3ConnectionsApi.md +++ b/docs/Web3ConnectionsApi.md @@ -57,12 +57,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling Web3ConnectionsApi#create"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -148,12 +142,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling Web3ConnectionsApi#get"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -237,12 +225,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling Web3ConnectionsApi#remove"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -324,12 +306,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling Web3ConnectionsApi#submit"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/WebhooksApi.md b/docs/WebhooksApi.md index b5e355ee..0b8fa86c 100644 --- a/docs/WebhooksApi.md +++ b/docs/WebhooksApi.md @@ -55,12 +55,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksApi#resendTransactionWebhooks"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -140,12 +134,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksApi#resendWebhooks"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/WebhooksV2Api.md b/docs/WebhooksV2Api.md index a3bf6163..f3a74f7f 100644 --- a/docs/WebhooksV2Api.md +++ b/docs/WebhooksV2Api.md @@ -68,12 +68,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksV2Api#createWebhook"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -152,12 +146,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksV2Api#deleteWebhook"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -236,12 +224,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksV2Api#getMetrics"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -319,12 +301,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksV2Api#getMtlsCsr"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -401,12 +377,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksV2Api#getNotification"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -489,12 +459,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksV2Api#getNotificationAttempts"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -584,12 +548,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksV2Api#getNotifications"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -677,12 +635,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksV2Api#getResendByQueryJobStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -762,12 +714,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksV2Api#getResendJobStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -846,12 +792,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksV2Api#getWebhook"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -931,12 +871,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksV2Api#getWebhooks"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1018,12 +952,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksV2Api#resendFailedNotifications"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1105,12 +1033,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksV2Api#resendNotificationById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1192,12 +1114,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksV2Api#resendNotificationsByQuery"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1279,12 +1195,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksV2Api#resendNotificationsByResourceId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } @@ -1365,12 +1275,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WebhooksV2Api#updateWebhook"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/WhitelistIpAddressesApi.md b/docs/WhitelistIpAddressesApi.md index 38d269d0..c7872811 100644 --- a/docs/WhitelistIpAddressesApi.md +++ b/docs/WhitelistIpAddressesApi.md @@ -52,12 +52,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WhitelistIpAddressesApi#getWhitelistIpAddresses"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/WorkspaceApi.md b/docs/WorkspaceApi.md index 3de835fd..0718ef73 100644 --- a/docs/WorkspaceApi.md +++ b/docs/WorkspaceApi.md @@ -51,12 +51,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WorkspaceApi#getWorkspace"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/docs/WorkspaceStatusBetaApi.md b/docs/WorkspaceStatusBetaApi.md index fac98d29..67462a68 100644 --- a/docs/WorkspaceStatusBetaApi.md +++ b/docs/WorkspaceStatusBetaApi.md @@ -51,12 +51,6 @@ public class Example { System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling WorkspaceStatusBetaApi#getWorkspaceStatus"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); } } } diff --git a/pom.xml b/pom.xml index 3b5fa037..5c58d835 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 26.0.0 + 0.0.0 https://github.com/fireblocks/java-sdk The Fireblocks Official SDK is a comprehensive software development kit that enables seamless integration and interaction with the Fireblocks platform. Fireblocks is a cutting-edge blockchain infrastructure platform that provides secure and scalable solutions for managing digital assets and transactions. This SDK empowers developers to build robust applications that can interact with the Fireblocks platform's features, including creating and managing vault accounts, initiating secure transactions, managing assets, and more. It abstracts complex interactions with the Fireblocks API, making it easier for developers to leverage the platform's capabilities while adhering to best practices in security and efficiency. diff --git a/src/main/java/com/fireblocks/sdk/Configuration.java b/src/main/java/com/fireblocks/sdk/Configuration.java index 7737d1c1..aa53bae8 100644 --- a/src/main/java/com/fireblocks/sdk/Configuration.java +++ b/src/main/java/com/fireblocks/sdk/Configuration.java @@ -21,7 +21,7 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") public class Configuration { - public static final String VERSION = "26.0.0"; + public static final String VERSION = "0.0.0"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/src/main/java/com/fireblocks/sdk/Fireblocks.java b/src/main/java/com/fireblocks/sdk/Fireblocks.java index 3931bbf9..de0a1786 100644 --- a/src/main/java/com/fireblocks/sdk/Fireblocks.java +++ b/src/main/java/com/fireblocks/sdk/Fireblocks.java @@ -70,6 +70,7 @@ public class Fireblocks { private PolicyEditorV2BetaApi policyEditorV2Beta; private ReportsBetaApi reportsBeta; private ResetDeviceApi resetDevice; + private SecurityPostureManagementApi securityPostureManagement; private SmartTransferApi smartTransfer; private StakingApi staking; private TagsApi tags; @@ -465,6 +466,13 @@ public ResetDeviceApi resetDevice() { return resetDevice; } + public SecurityPostureManagementApi securityPostureManagement() { + if (securityPostureManagement == null) { + securityPostureManagement = new SecurityPostureManagementApi(apiClient); + } + return securityPostureManagement; + } + public SmartTransferApi smartTransfer() { if (smartTransfer == null) { smartTransfer = new SmartTransferApi(apiClient); diff --git a/src/main/java/com/fireblocks/sdk/api/ApiUserApi.java b/src/main/java/com/fireblocks/sdk/api/ApiUserApi.java index 64e798a9..693f68f2 100644 --- a/src/main/java/com/fireblocks/sdk/api/ApiUserApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ApiUserApi.java @@ -29,7 +29,10 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -65,6 +68,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -81,11 +106,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> createApiUser( - CreateAPIUser createAPIUser, String idempotencyKey) throws ApiException { + CreateAPIUser createAPIUser, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createApiUserRequestBuilder(createAPIUser, idempotencyKey); @@ -105,7 +130,14 @@ public CompletableFuture> createApiUser( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -146,10 +178,10 @@ private HttpRequest.Builder createApiUserRequestBuilder( * available only for API keys with Admin/Non Signing Admin permissions. Endpoint Permission: * Admin, Non-Signing Admin. * - * @return CompletableFuture<ApiResponse<GetAPIUsersResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetAPIUsersResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getApiUsers() throws ApiException { + public CompletableFuture> getApiUsers() { try { HttpRequest.Builder localVarRequestBuilder = getApiUsersRequestBuilder(); return memberVarHttpClient @@ -178,7 +210,15 @@ public CompletableFuture> getApiUsers() throws } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -214,11 +254,11 @@ private HttpRequest.Builder getApiUsersRequestBuilder() throws ApiException { * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<IssueApiUserPairingTokenResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<IssueApiUserPairingTokenResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - issueApiUserPairingToken(String userId, String idempotencyKey) throws ApiException { + issueApiUserPairingToken(String userId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = issueApiUserPairingTokenRequestBuilder(userId, idempotencyKey); @@ -249,7 +289,17 @@ private HttpRequest.Builder getApiUsersRequestBuilder() throws ApiException { } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java b/src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java index b162af49..06fa1dcc 100644 --- a/src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java @@ -30,7 +30,10 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -66,6 +69,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -101,8 +126,8 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param pageCursor Cursor returned from the previous response to fetch the next page. * (optional) * @param cursor Deprecated. Use pageCursor instead. (optional) - * @return CompletableFuture<ApiResponse<GetAuditLogsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetAuditLogsResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getAuditLogs( Integer startTime, @@ -116,8 +141,7 @@ public CompletableFuture> getAuditLogs( String order, Integer pageSize, String pageCursor, - String cursor) - throws ApiException { + String cursor) { try { HttpRequest.Builder localVarRequestBuilder = getAuditLogsRequestBuilder( @@ -159,7 +183,17 @@ public CompletableFuture> getAuditLogs( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/BlockchainLinkBetaApi.java b/src/main/java/com/fireblocks/sdk/api/BlockchainLinkBetaApi.java index 819ac2a0..21c9fd8a 100644 --- a/src/main/java/com/fireblocks/sdk/api/BlockchainLinkBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/BlockchainLinkBetaApi.java @@ -45,7 +45,10 @@ import java.util.List; import java.util.StringJoiner; import java.util.UUID; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -81,6 +84,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -97,11 +122,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ActivateBlockchainResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ActivateBlockchainResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> activateBlockchainLinkChain( - String blockchainId, String idempotencyKey) throws ApiException { + String blockchainId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = activateBlockchainLinkChainRequestBuilder(blockchainId, idempotencyKey); @@ -133,7 +158,17 @@ public CompletableFuture> activateBlockc } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -175,12 +210,11 @@ private HttpRequest.Builder activateBlockchainLinkChainRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<CreateBlockchainResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CreateBlockchainResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createBlockchainLinkChain( - CreateBlockchainRequest createBlockchainRequest, String idempotencyKey) - throws ApiException { + CreateBlockchainRequest createBlockchainRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createBlockchainLinkChainRequestBuilder( @@ -212,7 +246,17 @@ public CompletableFuture> createBlockchain } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -257,11 +301,10 @@ private HttpRequest.Builder createBlockchainLinkChainRequestBuilder( * must not be in an active lifecycle state. * * @param blockchainId tenant_id is extracted from JWT token context (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ - public CompletableFuture> deleteBlockchainLinkChain(String blockchainId) - throws ApiException { + public CompletableFuture> deleteBlockchainLinkChain(String blockchainId) { try { HttpRequest.Builder localVarRequestBuilder = deleteBlockchainLinkChainRequestBuilder(blockchainId); @@ -282,7 +325,14 @@ public CompletableFuture> deleteBlockchainLinkChain(String blo localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -316,11 +366,10 @@ private HttpRequest.Builder deleteBlockchainLinkChainRequestBuilder(String block * Get tenant billing info Returns the tenant's blockchain activation limit and current * usage. tenant_id is derived from the JWT token context. * - * @return CompletableFuture<ApiResponse<GetBillingInfoResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetBillingInfoResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getBlockchainLinkBillingInfo() - throws ApiException { + public CompletableFuture> getBlockchainLinkBillingInfo() { try { HttpRequest.Builder localVarRequestBuilder = getBlockchainLinkBillingInfoRequestBuilder(); @@ -352,7 +401,17 @@ public CompletableFuture> getBlockchainLinkB } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -382,11 +441,11 @@ private HttpRequest.Builder getBlockchainLinkBillingInfoRequestBuilder() throws * * @param blockchainId ID of the blockchain to retrieve (supplied as a path parameter). * (required) - * @return CompletableFuture<ApiResponse<GetBlockchainByIdResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetBlockchainByIdResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getBlockchainLinkChain( - String blockchainId) throws ApiException { + String blockchainId) { try { HttpRequest.Builder localVarRequestBuilder = getBlockchainLinkChainRequestBuilder(blockchainId); @@ -417,7 +476,17 @@ public CompletableFuture> getBlockchainLi } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -452,11 +521,11 @@ private HttpRequest.Builder getBlockchainLinkChainRequestBuilder(String blockcha * wallet private key, used by the UI for test transfers. tenant_id is derived from the JWT * token context. * - * @return CompletableFuture<ApiResponse<GetTestWalletAddressResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetTestWalletAddressResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getBlockchainLinkTestWalletAddress() throws ApiException { + getBlockchainLinkTestWalletAddress() { try { HttpRequest.Builder localVarRequestBuilder = getBlockchainLinkTestWalletAddressRequestBuilder(); @@ -488,7 +557,17 @@ private HttpRequest.Builder getBlockchainLinkChainRequestBuilder(String blockcha } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -531,8 +610,8 @@ private HttpRequest.Builder getBlockchainLinkTestWalletAddressRequestBuilder() * @param sortBy Sort field. Default: createdAt. (optional) * @param order Sort order. Default: DESC. (optional, default to DESC) * @param statusExclude Exclude filter (repeated query params). (optional - * @return CompletableFuture<ApiResponse<ListBlockchainsResponse2>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ListBlockchainsResponse2>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> listBlockchainLinkChains( String pageCursor, @@ -542,8 +621,7 @@ public CompletableFuture> listBlockchainLi BlockchainEnvironment blockchainEnv, BlockchainSortField sortBy, String order, - List statusExclude) - throws ApiException { + List statusExclude) { try { HttpRequest.Builder localVarRequestBuilder = listBlockchainLinkChainsRequestBuilder( @@ -582,7 +660,17 @@ public CompletableFuture> listBlockchainLi } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -655,12 +743,11 @@ private HttpRequest.Builder listBlockchainLinkChainsRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<TriggerValidationFlowResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TriggerValidationFlowResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - triggerBlockchainLinkValidation(UUID blockchainId, String idempotencyKey) - throws ApiException { + triggerBlockchainLinkValidation(UUID blockchainId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = triggerBlockchainLinkValidationRequestBuilder(blockchainId, idempotencyKey); @@ -692,7 +779,17 @@ private HttpRequest.Builder listBlockchainLinkChainsRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -734,14 +831,13 @@ private HttpRequest.Builder triggerBlockchainLinkValidationRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<UpdateBlockchainResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<UpdateBlockchainResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> updateBlockchainLinkChain( BlockchainDeclaredProperties blockchainDeclaredProperties, String blockchainId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateBlockchainLinkChainRequestBuilder( @@ -773,7 +869,17 @@ public CompletableFuture> updateBlockchain } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java b/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java index 347d4e75..19345fcc 100644 --- a/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java @@ -43,7 +43,10 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -79,6 +82,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -95,11 +120,10 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Asset>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Asset>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ - public CompletableFuture> getAsset(String id, String idempotencyKey) - throws ApiException { + public CompletableFuture> getAsset(String id, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = getAssetRequestBuilder(id, idempotencyKey); return memberVarHttpClient @@ -128,7 +152,14 @@ public CompletableFuture> getAsset(String id, String idempote } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -162,11 +193,10 @@ private HttpRequest.Builder getAssetRequestBuilder(String id, String idempotency * Get a Blockchain by ID Returns a blockchain by ID or legacyID. * * @param id The ID or legacyId of the blockchain (required) - * @return CompletableFuture<ApiResponse<BlockchainResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<BlockchainResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getBlockchain(String id) - throws ApiException { + public CompletableFuture> getBlockchain(String id) { try { HttpRequest.Builder localVarRequestBuilder = getBlockchainRequestBuilder(id); return memberVarHttpClient @@ -195,7 +225,15 @@ public CompletableFuture> getBlockchain(String i } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -230,11 +268,10 @@ private HttpRequest.Builder getBlockchainRequestBuilder(String id) throws ApiExc * by Fireblocks in your workspace. **Endpoint Permissions:** Admin, Non-Signing Admin, Signer, * Approver, Editor. * - * @return CompletableFuture<ApiResponse<List<AssetTypeResponse>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<AssetTypeResponse>>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture>> getSupportedAssets() - throws ApiException { + public CompletableFuture>> getSupportedAssets() { try { HttpRequest.Builder localVarRequestBuilder = getSupportedAssetsRequestBuilder(); return memberVarHttpClient @@ -265,7 +302,17 @@ public CompletableFuture>> getSupportedAsset } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -307,8 +354,8 @@ private HttpRequest.Builder getSupportedAssetsRequestBuilder() throws ApiExcepti * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ListAssetsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ListAssetsResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> listAssets( String blockchainId, @@ -319,8 +366,7 @@ public CompletableFuture> listAssets( List ids, String pageCursor, BigDecimal pageSize, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = listAssetsRequestBuilder( @@ -359,7 +405,15 @@ public CompletableFuture> listAssets( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -436,8 +490,8 @@ private HttpRequest.Builder listAssetsRequestBuilder( * @param ids A list of blockchain IDs (max 100) (optional * @param pageCursor Page cursor to fetch (optional) * @param pageSize Items per page (max 500) (optional, default to 500) - * @return CompletableFuture<ApiResponse<ListBlockchainsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ListBlockchainsResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> listBlockchains( String protocol, @@ -445,8 +499,7 @@ public CompletableFuture> listBlockchains( Boolean test, List ids, String pageCursor, - BigDecimal pageSize) - throws ApiException { + BigDecimal pageSize) { try { HttpRequest.Builder localVarRequestBuilder = listBlockchainsRequestBuilder( @@ -477,7 +530,17 @@ public CompletableFuture> listBlockchains( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -544,12 +607,11 @@ private HttpRequest.Builder listBlockchainsRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<AssetResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AssetResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> registerNewAsset( - RegisterNewAssetRequest registerNewAssetRequest, String idempotencyKey) - throws ApiException { + RegisterNewAssetRequest registerNewAssetRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = registerNewAssetRequestBuilder(registerNewAssetRequest, idempotencyKey); @@ -579,7 +641,15 @@ public CompletableFuture> registerNewAsset( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -625,12 +695,11 @@ private HttpRequest.Builder registerNewAssetRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<AssetPriceResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AssetPriceResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setAssetPrice( - String id, SetAssetPriceRequest setAssetPriceRequest, String idempotencyKey) - throws ApiException { + String id, SetAssetPriceRequest setAssetPriceRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setAssetPriceRequestBuilder(id, setAssetPriceRequest, idempotencyKey); @@ -660,7 +729,15 @@ public CompletableFuture> setAssetPrice( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -708,14 +785,13 @@ private HttpRequest.Builder setAssetPriceRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Asset>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Asset>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> updateAssetUserMetadata( String id, UpdateAssetUserMetadataRequest updateAssetUserMetadataRequest, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateAssetUserMetadataRequestBuilder( @@ -747,7 +823,14 @@ public CompletableFuture> updateAssetUserMetadata( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/ComplianceApi.java b/src/main/java/com/fireblocks/sdk/api/ComplianceApi.java index 3ed43f73..79d9efe9 100644 --- a/src/main/java/com/fireblocks/sdk/api/ComplianceApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ComplianceApi.java @@ -67,7 +67,10 @@ import java.util.List; import java.util.StringJoiner; import java.util.UUID; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -103,6 +106,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -118,11 +143,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ArsConfigResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ArsConfigResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> activateArsConfig( - String idempotencyKey) throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = activateArsConfigRequestBuilder(idempotencyKey); @@ -152,7 +177,15 @@ public CompletableFuture> activateArsConfig( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -189,11 +222,11 @@ private HttpRequest.Builder activateArsConfigRequestBuilder(String idempotencyKe * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ByorkConfigResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ByorkConfigResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> activateByorkConfig( - String idempotencyKey) throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = activateByorkConfigRequestBuilder(idempotencyKey); @@ -224,7 +257,15 @@ public CompletableFuture> activateByorkConfig( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -261,14 +302,13 @@ private HttpRequest.Builder activateByorkConfigRequestBuilder(String idempotency * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<AddressRegistryAddVaultOptOutsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AddressRegistryAddVaultOptOutsResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> addAddressRegistryVaultOptOuts( AddressRegistryAddVaultOptOutsRequest addressRegistryAddVaultOptOutsRequest, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = addAddressRegistryVaultOptOutsRequestBuilder( @@ -301,7 +341,18 @@ private HttpRequest.Builder activateByorkConfigRequestBuilder(String idempotency } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -354,15 +405,14 @@ private HttpRequest.Builder addAddressRegistryVaultOptOutsRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<AssignVaultsToLegalEntityResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AssignVaultsToLegalEntityResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> assignVaultsToLegalEntity( AssignVaultsToLegalEntityRequest assignVaultsToLegalEntityRequest, UUID legalEntityId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = assignVaultsToLegalEntityRequestBuilder( @@ -394,7 +444,18 @@ private HttpRequest.Builder addAddressRegistryVaultOptOutsRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -450,12 +511,11 @@ private HttpRequest.Builder assignVaultsToLegalEntityRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<CounterpartyGroup>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CounterpartyGroup>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createCounterpartyGroup( - CreateCounterpartyGroupRequest createCounterpartyGroupRequest, String idempotencyKey) - throws ApiException { + CreateCounterpartyGroupRequest createCounterpartyGroupRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createCounterpartyGroupRequestBuilder( @@ -487,7 +547,15 @@ public CompletableFuture> createCounterpartyGroup } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -537,11 +605,11 @@ private HttpRequest.Builder createCounterpartyGroupRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ArsConfigResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ArsConfigResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> deactivateArsConfig( - String idempotencyKey) throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = deactivateArsConfigRequestBuilder(idempotencyKey); @@ -572,7 +640,15 @@ public CompletableFuture> deactivateArsConfig( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -609,11 +685,11 @@ private HttpRequest.Builder deactivateArsConfigRequestBuilder(String idempotency * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ByorkConfigResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ByorkConfigResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> deactivateByorkConfig( - String idempotencyKey) throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = deactivateByorkConfigRequestBuilder(idempotencyKey); @@ -644,7 +720,15 @@ public CompletableFuture> deactivateByorkConfig } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -678,11 +762,10 @@ private HttpRequest.Builder deactivateByorkConfigRequestBuilder(String idempoten * Permissions:** Admin, Non-Signing Admin. * * @param groupId The unique identifier of the counterparty group (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ - public CompletableFuture> deleteCounterpartyGroup(UUID groupId) - throws ApiException { + public CompletableFuture> deleteCounterpartyGroup(UUID groupId) { try { HttpRequest.Builder localVarRequestBuilder = deleteCounterpartyGroupRequestBuilder(groupId); @@ -703,7 +786,14 @@ public CompletableFuture> deleteCounterpartyGroup(UUID groupId localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -738,11 +828,10 @@ private HttpRequest.Builder deleteCounterpartyGroupRequestBuilder(UUID groupId) * registration to REVOKED. Endpoint Permission: Admin, Non-Signing Admin. * * @param legalEntityId The unique ID of the legal entity registration to delete (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ - public CompletableFuture> deleteLegalEntity(UUID legalEntityId) - throws ApiException { + public CompletableFuture> deleteLegalEntity(UUID legalEntityId) { try { HttpRequest.Builder localVarRequestBuilder = deleteLegalEntityRequestBuilder(legalEntityId); @@ -762,7 +851,14 @@ public CompletableFuture> deleteLegalEntity(UUID legalEntityId localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -796,11 +892,11 @@ private HttpRequest.Builder deleteLegalEntityRequestBuilder(UUID legalEntityId) * Get address registry participation status for the authenticated workspace Returns whether the * workspace is `OPTED_IN` or `OPTED_OUT` of the address registry. * - * @return CompletableFuture<ApiResponse<AddressRegistryTenantRegistryResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AddressRegistryTenantRegistryResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getAddressRegistryTenantParticipationStatus() throws ApiException { + getAddressRegistryTenantParticipationStatus() { try { HttpRequest.Builder localVarRequestBuilder = getAddressRegistryTenantParticipationStatusRequestBuilder(); @@ -832,7 +928,18 @@ private HttpRequest.Builder deleteLegalEntityRequestBuilder(UUID legalEntityId) } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -865,11 +972,11 @@ private HttpRequest.Builder getAddressRegistryTenantParticipationStatusRequestBu * removes one vault. * * @param vaultAccountId Vault account id (non-negative integer). (required) - * @return CompletableFuture<ApiResponse<AddressRegistryGetVaultOptOutResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AddressRegistryGetVaultOptOutResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getAddressRegistryVaultOptOut(Integer vaultAccountId) throws ApiException { + getAddressRegistryVaultOptOut(Integer vaultAccountId) { try { HttpRequest.Builder localVarRequestBuilder = getAddressRegistryVaultOptOutRequestBuilder(vaultAccountId); @@ -901,7 +1008,18 @@ private HttpRequest.Builder getAddressRegistryTenantParticipationStatusRequestBu } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -935,11 +1053,10 @@ private HttpRequest.Builder getAddressRegistryVaultOptOutRequestBuilder(Integer /** * AML - View Post-Screening Policy Get the post-screening policy for AML. * - * @return CompletableFuture<ApiResponse<ScreeningPolicyResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ScreeningPolicyResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getAmlPostScreeningPolicy() - throws ApiException { + public CompletableFuture> getAmlPostScreeningPolicy() { try { HttpRequest.Builder localVarRequestBuilder = getAmlPostScreeningPolicyRequestBuilder(); return memberVarHttpClient @@ -969,7 +1086,17 @@ public CompletableFuture> getAmlPostScreeni } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -998,11 +1125,11 @@ private HttpRequest.Builder getAmlPostScreeningPolicyRequestBuilder() throws Api * AML - View Screening Policy Get the screening policy for AML. * * @return - * CompletableFuture<ApiResponse<ScreeningProviderRulesConfigurationResponse>> - * @throws ApiException if fails to make API call + * CompletableFuture<ApiResponse<ScreeningProviderRulesConfigurationResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getAmlScreeningPolicy() throws ApiException { + getAmlScreeningPolicy() { try { HttpRequest.Builder localVarRequestBuilder = getAmlScreeningPolicyRequestBuilder(); return memberVarHttpClient @@ -1033,7 +1160,18 @@ private HttpRequest.Builder getAmlPostScreeningPolicyRequestBuilder() throws Api } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1063,11 +1201,10 @@ private HttpRequest.Builder getAmlScreeningPolicyRequestBuilder() throws ApiExce * tenant (timeouts, active flag, allowed timeout ranges). Returns default config when none * exists. Requires BYORK Light to be enabled for the tenant. * - * @return CompletableFuture<ApiResponse<ByorkConfigResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ByorkConfigResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getByorkConfig() - throws ApiException { + public CompletableFuture> getByorkConfig() { try { HttpRequest.Builder localVarRequestBuilder = getByorkConfigRequestBuilder(); return memberVarHttpClient @@ -1096,7 +1233,15 @@ public CompletableFuture> getByorkConfig() } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1128,11 +1273,10 @@ private HttpRequest.Builder getByorkConfigRequestBuilder() throws ApiException { * BYORK verdict is found for the transaction. * * @param txId Transaction ID (required) - * @return CompletableFuture<ApiResponse<GetByorkVerdictResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetByorkVerdictResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getByorkVerdict(String txId) - throws ApiException { + public CompletableFuture> getByorkVerdict(String txId) { try { HttpRequest.Builder localVarRequestBuilder = getByorkVerdictRequestBuilder(txId); return memberVarHttpClient @@ -1161,7 +1305,17 @@ public CompletableFuture> getByorkVerdict(S } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1208,11 +1362,10 @@ private HttpRequest.Builder getByorkVerdictRequestBuilder(String txId) throws Ap * Permissions:** Admin, Non-Signing Admin, Viewer. * * @param groupId The unique identifier of the counterparty group (required) - * @return CompletableFuture<ApiResponse<CounterpartyGroup>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CounterpartyGroup>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getCounterpartyGroup(UUID groupId) - throws ApiException { + public CompletableFuture> getCounterpartyGroup(UUID groupId) { try { HttpRequest.Builder localVarRequestBuilder = getCounterpartyGroupRequestBuilder(groupId); @@ -1243,7 +1396,15 @@ public CompletableFuture> getCounterpartyGroup(UU } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1279,11 +1440,11 @@ private HttpRequest.Builder getCounterpartyGroupRequestBuilder(UUID groupId) * Viewer. * * @param legalEntityId The unique ID of the legal entity registration (required) - * @return CompletableFuture<ApiResponse<LegalEntityRegistration>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<LegalEntityRegistration>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getLegalEntity( - UUID legalEntityId) throws ApiException { + UUID legalEntityId) { try { HttpRequest.Builder localVarRequestBuilder = getLegalEntityRequestBuilder(legalEntityId); @@ -1313,7 +1474,17 @@ public CompletableFuture> getLegalEntity( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1350,11 +1521,11 @@ private HttpRequest.Builder getLegalEntityRequestBuilder(UUID legalEntityId) * required. * * @param address Blockchain address to look up (required) - * @return CompletableFuture<ApiResponse<AddressRegistryLegalEntity>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AddressRegistryLegalEntity>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getLegalEntityForAddress( - String address) throws ApiException { + String address) { try { HttpRequest.Builder localVarRequestBuilder = getLegalEntityForAddressRequestBuilder(address); @@ -1385,7 +1556,17 @@ public CompletableFuture> getLegalEntity } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1418,11 +1599,10 @@ private HttpRequest.Builder getLegalEntityForAddressRequestBuilder(String addres /** * Travel Rule - View Post-Screening Policy Get the post-screening policy for Travel Rule. * - * @return CompletableFuture<ApiResponse<ScreeningPolicyResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ScreeningPolicyResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getPostScreeningPolicy() - throws ApiException { + public CompletableFuture> getPostScreeningPolicy() { try { HttpRequest.Builder localVarRequestBuilder = getPostScreeningPolicyRequestBuilder(); return memberVarHttpClient @@ -1452,7 +1632,17 @@ public CompletableFuture> getPostScreeningP } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1482,11 +1672,11 @@ private HttpRequest.Builder getPostScreeningPolicyRequestBuilder() throws ApiExc * compliance details for the given screened transaction. * * @param txId Fireblocks transaction ID of the screened transaction (required) - * @return CompletableFuture<ApiResponse<ComplianceResultFullPayload>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ComplianceResultFullPayload>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getScreeningFullDetails( - String txId) throws ApiException { + String txId) { try { HttpRequest.Builder localVarRequestBuilder = getScreeningFullDetailsRequestBuilder(txId); @@ -1517,7 +1707,17 @@ public CompletableFuture> getScreeningF } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1550,11 +1750,11 @@ private HttpRequest.Builder getScreeningFullDetailsRequestBuilder(String txId) * Travel Rule - View Screening Policy Get the screening policy for Travel Rule. * * @return - * CompletableFuture<ApiResponse<ScreeningProviderRulesConfigurationResponse>> - * @throws ApiException if fails to make API call + * CompletableFuture<ApiResponse<ScreeningProviderRulesConfigurationResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getScreeningPolicy() throws ApiException { + getScreeningPolicy() { try { HttpRequest.Builder localVarRequestBuilder = getScreeningPolicyRequestBuilder(); return memberVarHttpClient @@ -1585,7 +1785,18 @@ private HttpRequest.Builder getScreeningFullDetailsRequestBuilder(String txId) } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1622,13 +1833,12 @@ private HttpRequest.Builder getScreeningPolicyRequestBuilder() throws ApiExcepti * (optional, default to 50) * @param order Sort direction by vault account id. Omit for ascending; use the enum value for * descending. (optional, default to VAULT_OPT_OUT_LIST_ORDER_ASC) - * @return CompletableFuture<ApiResponse<AddressRegistryListVaultOptOutsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AddressRegistryListVaultOptOutsResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> listAddressRegistryVaultOptOuts( - String pageCursor, Integer pageSize, AddressRegistryVaultListOrder order) - throws ApiException { + String pageCursor, Integer pageSize, AddressRegistryVaultListOrder order) { try { HttpRequest.Builder localVarRequestBuilder = listAddressRegistryVaultOptOutsRequestBuilder(pageCursor, pageSize, order); @@ -1661,7 +1871,18 @@ private HttpRequest.Builder getScreeningPolicyRequestBuilder() throws ApiExcepti } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1714,11 +1935,11 @@ private HttpRequest.Builder listAddressRegistryVaultOptOutsRequestBuilder( * * @param pageCursor Cursor of the required page (optional) * @param pageSize Maximum number of items in the page (optional, default to 50) - * @return CompletableFuture<ApiResponse<CounterpartyGroupsPaginatedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CounterpartyGroupsPaginatedResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - listCounterpartyGroups(String pageCursor, Integer pageSize) throws ApiException { + listCounterpartyGroups(String pageCursor, Integer pageSize) { try { HttpRequest.Builder localVarRequestBuilder = listCounterpartyGroupsRequestBuilder(pageCursor, pageSize); @@ -1749,7 +1970,18 @@ private HttpRequest.Builder listAddressRegistryVaultOptOutsRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1807,11 +2039,11 @@ private HttpRequest.Builder listCounterpartyGroupsRequestBuilder( * previous response. Ignored when `vaultAccountId` is provided. (optional) * @param pageSize Maximum number of registrations to return. Ignored when * `vaultAccountId` is provided. (optional, default to 50) - * @return CompletableFuture<ApiResponse<ListLegalEntitiesResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ListLegalEntitiesResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> listLegalEntities( - String vaultAccountId, String pageCursor, Integer pageSize) throws ApiException { + String vaultAccountId, String pageCursor, Integer pageSize) { try { HttpRequest.Builder localVarRequestBuilder = listLegalEntitiesRequestBuilder(vaultAccountId, pageCursor, pageSize); @@ -1841,7 +2073,17 @@ public CompletableFuture> listLegalEntiti } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1896,12 +2138,11 @@ private HttpRequest.Builder listLegalEntitiesRequestBuilder( * @param pageCursor Cursor string returned in `next` or `prev` of a * previous response (optional) * @param pageSize Maximum number of registrations to return (optional, default to 50) - * @return CompletableFuture<ApiResponse<ListVaultsForRegistrationResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ListVaultsForRegistrationResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - listVaultsForLegalEntity(UUID legalEntityId, String pageCursor, Integer pageSize) - throws ApiException { + listVaultsForLegalEntity(UUID legalEntityId, String pageCursor, Integer pageSize) { try { HttpRequest.Builder localVarRequestBuilder = listVaultsForLegalEntityRequestBuilder(legalEntityId, pageCursor, pageSize); @@ -1932,7 +2173,18 @@ private HttpRequest.Builder listLegalEntitiesRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1987,11 +2239,11 @@ private HttpRequest.Builder listVaultsForLegalEntityRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<AddressRegistryTenantRegistryResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AddressRegistryTenantRegistryResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - optInAddressRegistryTenant(String idempotencyKey) throws ApiException { + optInAddressRegistryTenant(String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = optInAddressRegistryTenantRequestBuilder(idempotencyKey); @@ -2023,7 +2275,18 @@ private HttpRequest.Builder listVaultsForLegalEntityRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2056,11 +2319,11 @@ private HttpRequest.Builder optInAddressRegistryTenantRequestBuilder(String idem * Opt the workspace out of the address registry Opts the workspace out. No request body. * Response uses the same JSON shape as GET; status is OPTED_OUT. * - * @return CompletableFuture<ApiResponse<AddressRegistryTenantRegistryResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AddressRegistryTenantRegistryResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - optOutAddressRegistryTenant() throws ApiException { + optOutAddressRegistryTenant() { try { HttpRequest.Builder localVarRequestBuilder = optOutAddressRegistryTenantRequestBuilder(); @@ -2092,7 +2355,18 @@ private HttpRequest.Builder optInAddressRegistryTenantRequestBuilder(String idem } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2127,12 +2401,11 @@ private HttpRequest.Builder optOutAddressRegistryTenantRequestBuilder() throws A * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<LegalEntityRegistration>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<LegalEntityRegistration>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> registerLegalEntity( - RegisterLegalEntityRequest registerLegalEntityRequest, String idempotencyKey) - throws ApiException { + RegisterLegalEntityRequest registerLegalEntityRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = registerLegalEntityRequestBuilder(registerLegalEntityRequest, idempotencyKey); @@ -2163,7 +2436,17 @@ public CompletableFuture> registerLegalEnti } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2210,11 +2493,11 @@ private HttpRequest.Builder registerLegalEntityRequestBuilder( * success). To clear the whole list, use `DELETE /v1/address_registry/vaults`. * * @param vaultAccountId Vault account id (non-negative integer). (required) - * @return CompletableFuture<ApiResponse<AddressRegistryRemoveVaultOptOutResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AddressRegistryRemoveVaultOptOutResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - removeAddressRegistryVaultOptOut(Integer vaultAccountId) throws ApiException { + removeAddressRegistryVaultOptOut(Integer vaultAccountId) { try { HttpRequest.Builder localVarRequestBuilder = removeAddressRegistryVaultOptOutRequestBuilder(vaultAccountId); @@ -2247,7 +2530,18 @@ private HttpRequest.Builder registerLegalEntityRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2283,11 +2577,11 @@ private HttpRequest.Builder removeAddressRegistryVaultOptOutRequestBuilder( * from the workspace opt-out list. * * @return - * CompletableFuture<ApiResponse<AddressRegistryRemoveAllVaultOptOutsResponse>> - * @throws ApiException if fails to make API call + * CompletableFuture<ApiResponse<AddressRegistryRemoveAllVaultOptOutsResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - removeAllAddressRegistryVaultOptOuts() throws ApiException { + removeAllAddressRegistryVaultOptOuts() { try { HttpRequest.Builder localVarRequestBuilder = removeAllAddressRegistryVaultOptOutsRequestBuilder(); @@ -2320,7 +2614,18 @@ private HttpRequest.Builder removeAddressRegistryVaultOptOutRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2357,14 +2662,13 @@ private HttpRequest.Builder removeAllAddressRegistryVaultOptOutsRequestBuilder() * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<RescreenTransactionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<RescreenTransactionResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> rescreenRejectedTransaction( String txId, RescreenTransactionRequest rescreenTransactionRequest, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = rescreenRejectedTransactionRequestBuilder( @@ -2397,7 +2701,17 @@ public CompletableFuture> rescreenRejec } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2449,12 +2763,11 @@ private HttpRequest.Builder rescreenRejectedTransactionRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<CreateTransactionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CreateTransactionResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - retryRejectedTransactionBypassScreeningChecks(String txId, String idempotencyKey) - throws ApiException { + retryRejectedTransactionBypassScreeningChecks(String txId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = retryRejectedTransactionBypassScreeningChecksRequestBuilder( @@ -2487,7 +2800,17 @@ private HttpRequest.Builder rescreenRejectedTransactionRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2530,12 +2853,11 @@ private HttpRequest.Builder retryRejectedTransactionBypassScreeningChecksRequest * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<AmlVerdictManualResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AmlVerdictManualResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setAmlVerdict( - AmlVerdictManualRequest amlVerdictManualRequest, String idempotencyKey) - throws ApiException { + AmlVerdictManualRequest amlVerdictManualRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setAmlVerdictRequestBuilder(amlVerdictManualRequest, idempotencyKey); @@ -2565,7 +2887,17 @@ public CompletableFuture> setAmlVerdict( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2616,12 +2948,11 @@ private HttpRequest.Builder setAmlVerdictRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ByorkConfigResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ByorkConfigResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setByorkTimeouts( - ByorkSetTimeoutsRequest byorkSetTimeoutsRequest, String idempotencyKey) - throws ApiException { + ByorkSetTimeoutsRequest byorkSetTimeoutsRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setByorkTimeoutsRequestBuilder(byorkSetTimeoutsRequest, idempotencyKey); @@ -2651,7 +2982,15 @@ public CompletableFuture> setByorkTimeouts( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2702,11 +3041,11 @@ private HttpRequest.Builder setByorkTimeoutsRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ByorkVerdictResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ByorkVerdictResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setByorkVerdict( - ByorkVerdictRequest byorkVerdictRequest, String idempotencyKey) throws ApiException { + ByorkVerdictRequest byorkVerdictRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setByorkVerdictRequestBuilder(byorkVerdictRequest, idempotencyKey); @@ -2736,7 +3075,17 @@ public CompletableFuture> setByorkVerdict( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2781,11 +3130,11 @@ private HttpRequest.Builder setByorkVerdictRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ScreeningConfigurationsRequest>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ScreeningConfigurationsRequest>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - updateAmlScreeningConfiguration(String idempotencyKey) throws ApiException { + updateAmlScreeningConfiguration(String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateAmlScreeningConfigurationRequestBuilder(idempotencyKey); @@ -2817,7 +3166,17 @@ private HttpRequest.Builder setByorkVerdictRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2855,14 +3214,13 @@ private HttpRequest.Builder updateAmlScreeningConfigurationRequestBuilder(String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<CounterpartyGroup>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CounterpartyGroup>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> updateCounterpartyGroup( UpdateCounterpartyGroupRequest updateCounterpartyGroupRequest, UUID groupId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateCounterpartyGroupRequestBuilder( @@ -2894,7 +3252,15 @@ public CompletableFuture> updateCounterpartyGroup } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2952,14 +3318,13 @@ private HttpRequest.Builder updateCounterpartyGroupRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<LegalEntityRegistration>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<LegalEntityRegistration>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> updateLegalEntity( UpdateLegalEntityRequest updateLegalEntityRequest, UUID legalEntityId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateLegalEntityRequestBuilder( @@ -2990,7 +3355,17 @@ public CompletableFuture> updateLegalEntity } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -3043,14 +3418,13 @@ private HttpRequest.Builder updateLegalEntityRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ScreeningUpdateConfigurations>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ScreeningUpdateConfigurations>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> updateScreeningConfiguration( ScreeningUpdateConfigurations screeningUpdateConfigurations, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateScreeningConfigurationRequestBuilder( @@ -3083,7 +3457,17 @@ private HttpRequest.Builder updateLegalEntityRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -3132,11 +3516,11 @@ private HttpRequest.Builder updateScreeningConfigurationRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ScreeningConfigurationsRequest>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ScreeningConfigurationsRequest>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> updateTravelRuleConfig( - String idempotencyKey) throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateTravelRuleConfigRequestBuilder(idempotencyKey); @@ -3167,7 +3551,17 @@ public CompletableFuture> updateTrav } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/ComplianceScreeningConfigurationApi.java b/src/main/java/com/fireblocks/sdk/api/ComplianceScreeningConfigurationApi.java index 528e896c..03653868 100644 --- a/src/main/java/com/fireblocks/sdk/api/ComplianceScreeningConfigurationApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ComplianceScreeningConfigurationApi.java @@ -26,7 +26,10 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -62,6 +65,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -73,11 +98,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * Get AML Screening Policy Configuration Retrieves the configuration for Travel Rule screening * policy. * - * @return CompletableFuture<ApiResponse<ScreeningConfigurationsRequest>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ScreeningConfigurationsRequest>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getAmlScreeningConfiguration() throws ApiException { + getAmlScreeningConfiguration() { try { HttpRequest.Builder localVarRequestBuilder = getAmlScreeningConfigurationRequestBuilder(); @@ -109,7 +134,17 @@ private String formatExceptionMessage(String operationId, int statusCode, String } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -138,11 +173,11 @@ private HttpRequest.Builder getAmlScreeningConfigurationRequestBuilder() throws * Get Travel Rule Screening Policy Configuration Retrieves the configuration for Travel Rule * screening policy. * - * @return CompletableFuture<ApiResponse<ScreeningConfigurationsRequest>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ScreeningConfigurationsRequest>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getScreeningConfiguration() throws ApiException { + getScreeningConfiguration() { try { HttpRequest.Builder localVarRequestBuilder = getScreeningConfigurationRequestBuilder(); return memberVarHttpClient @@ -172,7 +207,17 @@ private HttpRequest.Builder getAmlScreeningConfigurationRequestBuilder() throws } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApi.java b/src/main/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApi.java index b59bb90f..122010d9 100644 --- a/src/main/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApi.java @@ -43,7 +43,10 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -79,6 +82,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -98,12 +123,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<AddConnectedAccountResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AddConnectedAccountResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> addConnectedAccount( - AddConnectedAccountRequest addConnectedAccountRequest, String idempotencyKey) - throws ApiException { + AddConnectedAccountRequest addConnectedAccountRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = addConnectedAccountRequestBuilder(addConnectedAccountRequest, idempotencyKey); @@ -134,7 +158,17 @@ public CompletableFuture> addConnectedA } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -179,11 +213,10 @@ private HttpRequest.Builder addConnectedAccountRequestBuilder( * is currently in beta and might be subject to changes. * * @param accountId The ID of the account to disconnect. (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ - public CompletableFuture> disconnectConnectedAccount(String accountId) - throws ApiException { + public CompletableFuture> disconnectConnectedAccount(String accountId) { try { HttpRequest.Builder localVarRequestBuilder = disconnectConnectedAccountRequestBuilder(accountId); @@ -205,7 +238,14 @@ public CompletableFuture> disconnectConnectedAccount(String ac localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -240,11 +280,11 @@ private HttpRequest.Builder disconnectConnectedAccountRequestBuilder(String acco * **Note:** This endpoint is currently in beta and might be subject to changes. * * @param accountId The ID of the account to fetch. (required) - * @return CompletableFuture<ApiResponse<ConnectedSingleAccountResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ConnectedSingleAccountResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getConnectedAccount( - String accountId) throws ApiException { + String accountId) { try { HttpRequest.Builder localVarRequestBuilder = getConnectedAccountRequestBuilder(accountId); @@ -275,7 +315,17 @@ public CompletableFuture> getConnect } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -321,8 +371,8 @@ private HttpRequest.Builder getConnectedAccountRequestBuilder(String accountId) * @param pageCursor Pagination cursor for next page (optional) * @param pageSize Maximum number of entries to return (optional) * @param order Sort order (ASC or DESC). (optional, default to DESC) - * @return CompletableFuture<ApiResponse<AllowlistResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AllowlistResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getConnectedAccountAllowlist( String accountId, @@ -332,8 +382,7 @@ public CompletableFuture> getConnectedAccountAllo String address, String pageCursor, Integer pageSize, - String order) - throws ApiException { + String order) { try { HttpRequest.Builder localVarRequestBuilder = getConnectedAccountAllowlistRequestBuilder( @@ -373,7 +422,15 @@ public CompletableFuture> getConnectedAccountAllo } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -447,11 +504,11 @@ private HttpRequest.Builder getConnectedAccountAllowlistRequestBuilder( * * @param accountId The connected account identifier (required) * @param allowlistId The Fireblocks allowlist entry identifier (required) - * @return CompletableFuture<ApiResponse<AllowlistEntryResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AllowlistEntryResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getConnectedAccountAllowlistEntry( - String accountId, String allowlistId) throws ApiException { + String accountId, String allowlistId) { try { HttpRequest.Builder localVarRequestBuilder = getConnectedAccountAllowlistEntryRequestBuilder(accountId, allowlistId); @@ -483,7 +540,17 @@ public CompletableFuture> getConnectedAccoun } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -524,12 +591,11 @@ private HttpRequest.Builder getConnectedAccountAllowlistEntryRequestBuilder( * @param accountId The ID of the account to fetch balances for. (required) * @param pageSize Page size for pagination. (optional) * @param pageCursor Page cursor for pagination. (optional) - * @return CompletableFuture<ApiResponse<ConnectedAccountBalancesResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ConnectedAccountBalancesResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getConnectedAccountBalances(String accountId, Integer pageSize, String pageCursor) - throws ApiException { + getConnectedAccountBalances(String accountId, Integer pageSize, String pageCursor) { try { HttpRequest.Builder localVarRequestBuilder = getConnectedAccountBalancesRequestBuilder(accountId, pageSize, pageCursor); @@ -561,7 +627,17 @@ private HttpRequest.Builder getConnectedAccountAllowlistEntryRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -617,11 +693,11 @@ private HttpRequest.Builder getConnectedAccountBalancesRequestBuilder( * @param accountId The ID of the account to fetch rates for. (required) * @param baseAssetId The ID of the asset to fetch rates for. (required) * @param quoteAssetId The ID of the asset to get the rates nominally. (required) - * @return CompletableFuture<ApiResponse<ConnectedAccountRateResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ConnectedAccountRateResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getConnectedAccountRates( - String accountId, String baseAssetId, String quoteAssetId) throws ApiException { + String accountId, String baseAssetId, String quoteAssetId) { try { HttpRequest.Builder localVarRequestBuilder = getConnectedAccountRatesRequestBuilder(accountId, baseAssetId, quoteAssetId); @@ -652,7 +728,17 @@ public CompletableFuture> getConnected } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -713,12 +799,11 @@ private HttpRequest.Builder getConnectedAccountRatesRequestBuilder( * @param accountId The ID of the account to fetch supported pairs for. (required) * @param pageSize Page size for pagination. (optional, default to 100) * @param pageCursor Page cursor for pagination. (optional) - * @return CompletableFuture<ApiResponse<ConnectedAccountTradingPairsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ConnectedAccountTradingPairsResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getConnectedAccountTradingPairs(String accountId, Integer pageSize, String pageCursor) - throws ApiException { + getConnectedAccountTradingPairs(String accountId, Integer pageSize, String pageCursor) { try { HttpRequest.Builder localVarRequestBuilder = getConnectedAccountTradingPairsRequestBuilder(accountId, pageSize, pageCursor); @@ -750,7 +835,18 @@ private HttpRequest.Builder getConnectedAccountRatesRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -806,11 +902,11 @@ private HttpRequest.Builder getConnectedAccountTradingPairsRequestBuilder( * to false) * @param pageSize Page size for pagination. (optional) * @param pageCursor Page cursor for pagination. (optional) - * @return CompletableFuture<ApiResponse<ConnectedAccountsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ConnectedAccountsResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getConnectedAccounts( - Boolean mainAccounts, Integer pageSize, String pageCursor) throws ApiException { + Boolean mainAccounts, Integer pageSize, String pageCursor) { try { HttpRequest.Builder localVarRequestBuilder = getConnectedAccountsRequestBuilder(mainAccounts, pageSize, pageCursor); @@ -841,7 +937,17 @@ public CompletableFuture> getConnectedAcc } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -895,11 +1001,11 @@ private HttpRequest.Builder getConnectedAccountsRequestBuilder( * changes. * * @return - * CompletableFuture<ApiResponse<GetConnectedAccountsCredentialsPublicKeyResponse>> - * @throws ApiException if fails to make API call + * CompletableFuture<ApiResponse<GetConnectedAccountsCredentialsPublicKeyResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getConnectedAccountsCredentialsPublicKey() throws ApiException { + getConnectedAccountsCredentialsPublicKey() { try { HttpRequest.Builder localVarRequestBuilder = getConnectedAccountsCredentialsPublicKeyRequestBuilder(); @@ -932,7 +1038,18 @@ private HttpRequest.Builder getConnectedAccountsRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -967,14 +1084,13 @@ private HttpRequest.Builder getConnectedAccountsCredentialsPublicKeyRequestBuild * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<RenameConnectedAccountResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<RenameConnectedAccountResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> renameConnectedAccount( RenameConnectedAccountRequest renameConnectedAccountRequest, String accountId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = renameConnectedAccountRequestBuilder( @@ -1006,7 +1122,17 @@ public CompletableFuture> renameConn } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1064,11 +1190,11 @@ private HttpRequest.Builder renameConnectedAccountRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> syncConnectedAccountAllowlist( - String accountId, String idempotencyKey) throws ApiException { + String accountId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = syncConnectedAccountAllowlistRequestBuilder(accountId, idempotencyKey); @@ -1090,7 +1216,14 @@ public CompletableFuture> syncConnectedAccountAllowlist( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/ConsoleUserApi.java b/src/main/java/com/fireblocks/sdk/api/ConsoleUserApi.java index 28e5bb3f..45e0918d 100644 --- a/src/main/java/com/fireblocks/sdk/api/ConsoleUserApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ConsoleUserApi.java @@ -27,7 +27,10 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -63,6 +66,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -81,11 +106,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> createConsoleUser( - CreateConsoleUser createConsoleUser, String idempotencyKey) throws ApiException { + CreateConsoleUser createConsoleUser, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createConsoleUserRequestBuilder(createConsoleUser, idempotencyKey); @@ -105,7 +130,14 @@ public CompletableFuture> createConsoleUser( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -146,11 +178,10 @@ private HttpRequest.Builder createConsoleUserRequestBuilder( * available only for API keys with Admin/Non Signing Admin permissions. Endpoint Permission: * Admin, Non-Signing Admin. * - * @return CompletableFuture<ApiResponse<GetConsoleUsersResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetConsoleUsersResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getConsoleUsers() - throws ApiException { + public CompletableFuture> getConsoleUsers() { try { HttpRequest.Builder localVarRequestBuilder = getConsoleUsersRequestBuilder(); return memberVarHttpClient @@ -179,7 +210,17 @@ public CompletableFuture> getConsoleUsers() } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java b/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java index 53c4d4c1..52810114 100644 --- a/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java @@ -36,7 +36,10 @@ import java.net.http.HttpResponse; import java.time.Duration; import java.util.List; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -72,6 +75,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -89,15 +114,14 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ContractDataDecodedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ContractDataDecodedResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> decodeContractData( ContractDataDecodeRequest contractDataDecodeRequest, String contractAddress, String baseAssetId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = decodeContractDataRequestBuilder( @@ -132,7 +156,17 @@ public CompletableFuture> decodeContrac } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -193,11 +227,11 @@ private HttpRequest.Builder decodeContractDataRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ContractAddressResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ContractAddressResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getContractAddress( - String baseAssetId, String txHash, String idempotencyKey) throws ApiException { + String baseAssetId, String txHash, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = getContractAddressRequestBuilder(baseAssetId, txHash, idempotencyKey); @@ -228,7 +262,17 @@ public CompletableFuture> getContractAddres } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -273,11 +317,11 @@ private HttpRequest.Builder getContractAddressRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ContractAbiResponseDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ContractAbiResponseDto>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getDeployedContractAbi( - String contractAddress, String baseAssetId, String idempotencyKey) throws ApiException { + String contractAddress, String baseAssetId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = getDeployedContractAbiRequestBuilder( @@ -309,7 +353,17 @@ public CompletableFuture> getDeployedContrac } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -355,11 +409,11 @@ private HttpRequest.Builder getDeployedContractAbiRequestBuilder( * * @param baseAssetId The blockchain base assetId (required) * @param txHash The transaction hash (required) - * @return CompletableFuture<ApiResponse<TransactionReceiptResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TransactionReceiptResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getTransactionReceipt( - String baseAssetId, String txHash) throws ApiException { + String baseAssetId, String txHash) { try { HttpRequest.Builder localVarRequestBuilder = getTransactionReceiptRequestBuilder(baseAssetId, txHash); @@ -390,7 +444,17 @@ public CompletableFuture> getTransaction } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -432,15 +496,14 @@ private HttpRequest.Builder getTransactionReceiptRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<List<ParameterWithValue>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<ParameterWithValue>>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture>> readCallFunction( ReadCallFunctionDto readCallFunctionDto, String contractAddress, String baseAssetId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = readCallFunctionRequestBuilder( @@ -472,7 +535,17 @@ public CompletableFuture>> readCallFunction } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -534,15 +607,14 @@ private HttpRequest.Builder readCallFunctionRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<WriteCallFunctionResponseDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<WriteCallFunctionResponseDto>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> writeCallFunction( WriteCallFunctionDto writeCallFunctionDto, String contractAddress, String baseAssetId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = writeCallFunctionRequestBuilder( @@ -573,7 +645,17 @@ public CompletableFuture> writeCallFun } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/ContractTemplatesApi.java b/src/main/java/com/fireblocks/sdk/api/ContractTemplatesApi.java index dd6dc0a6..27ce01cf 100644 --- a/src/main/java/com/fireblocks/sdk/api/ContractTemplatesApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ContractTemplatesApi.java @@ -38,7 +38,10 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -74,6 +77,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -86,11 +111,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * templates. Notice: it is irreversible! * * @param contractTemplateId The Contract Template identifier (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> deleteContractTemplateById( - String contractTemplateId) throws ApiException { + String contractTemplateId) { try { HttpRequest.Builder localVarRequestBuilder = deleteContractTemplateByIdRequestBuilder(contractTemplateId); @@ -112,7 +137,14 @@ public CompletableFuture> deleteContractTemplateById( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -153,14 +185,13 @@ private HttpRequest.Builder deleteContractTemplateByIdRequestBuilder(String cont * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ContractDeployResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ContractDeployResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> deployContract( ContractDeployRequest contractDeployRequest, String contractTemplateId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = deployContractRequestBuilder( @@ -191,7 +222,17 @@ public CompletableFuture> deployContract( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -244,11 +285,11 @@ private HttpRequest.Builder deployContractRequestBuilder( * * @param contractTemplateId The Contract Template identifier (required) * @param withDocs true if you want to get the abi with its docs (optional, default to false) - * @return CompletableFuture<ApiResponse<AbiFunction>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AbiFunction>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getConstructorByContractTemplateId( - String contractTemplateId, Boolean withDocs) throws ApiException { + String contractTemplateId, Boolean withDocs) { try { HttpRequest.Builder localVarRequestBuilder = getConstructorByContractTemplateIdRequestBuilder(contractTemplateId, withDocs); @@ -280,7 +321,15 @@ public CompletableFuture> getConstructorByContractTempl } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -332,11 +381,11 @@ private HttpRequest.Builder getConstructorByContractTemplateIdRequestBuilder( * Return contract template by id Return detailed information about the contract template * * @param contractTemplateId The Contract Template identifier (required) - * @return CompletableFuture<ApiResponse<ContractTemplateDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ContractTemplateDto>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getContractTemplateById( - String contractTemplateId) throws ApiException { + String contractTemplateId) { try { HttpRequest.Builder localVarRequestBuilder = getContractTemplateByIdRequestBuilder(contractTemplateId); @@ -367,7 +416,15 @@ public CompletableFuture> getContractTemplateBy } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -413,8 +470,8 @@ private HttpRequest.Builder getContractTemplateByIdRequestBuilder(String contrac * more or none (optional) * @param initializationPhase For standalone contracts use ON_DEPLOYMENT and for contracts that * are behind proxies use POST_DEPLOYMENT (optional) - * @return CompletableFuture<ApiResponse<TemplatesPaginatedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TemplatesPaginatedResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getContractTemplates( BigDecimal limit, @@ -422,8 +479,7 @@ public CompletableFuture> getContractTem String pageCursor, BigDecimal pageSize, String type, - String initializationPhase) - throws ApiException { + String initializationPhase) { try { HttpRequest.Builder localVarRequestBuilder = getContractTemplatesRequestBuilder( @@ -455,7 +511,17 @@ public CompletableFuture> getContractTem } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -520,11 +586,11 @@ private HttpRequest.Builder getContractTemplatesRequestBuilder( * * @param contractTemplateId The Contract Template identifier (required) * @param functionSignature (required) - * @return CompletableFuture<ApiResponse<AbiFunction>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AbiFunction>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getFunctionAbiByContractTemplateId( - String contractTemplateId, String functionSignature) throws ApiException { + String contractTemplateId, String functionSignature) { try { HttpRequest.Builder localVarRequestBuilder = getFunctionAbiByContractTemplateIdRequestBuilder( @@ -557,7 +623,15 @@ public CompletableFuture> getFunctionAbiByContractTempl } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -612,11 +686,11 @@ private HttpRequest.Builder getFunctionAbiByContractTemplateIdRequestBuilder( * Get supported blockchains for the template Get supported blockchains for the template * * @param contractTemplateId The Contract Template identifier (required) - * @return CompletableFuture<ApiResponse<SupportedBlockChainsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SupportedBlockChainsResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getSupportedBlockchainsByTemplateId(String contractTemplateId) throws ApiException { + getSupportedBlockchainsByTemplateId(String contractTemplateId) { try { HttpRequest.Builder localVarRequestBuilder = getSupportedBlockchainsByTemplateIdRequestBuilder(contractTemplateId); @@ -648,7 +722,17 @@ private HttpRequest.Builder getFunctionAbiByContractTemplateIdRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -688,12 +772,11 @@ private HttpRequest.Builder getSupportedBlockchainsByTemplateIdRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ContractTemplateDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ContractTemplateDto>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> uploadContractTemplate( - ContractUploadRequest contractUploadRequest, String idempotencyKey) - throws ApiException { + ContractUploadRequest contractUploadRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = uploadContractTemplateRequestBuilder(contractUploadRequest, idempotencyKey); @@ -724,7 +807,15 @@ public CompletableFuture> uploadContractTemplat } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/ContractsApi.java b/src/main/java/com/fireblocks/sdk/api/ContractsApi.java index 46932fa5..38e4fb25 100644 --- a/src/main/java/com/fireblocks/sdk/api/ContractsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ContractsApi.java @@ -31,7 +31,10 @@ import java.net.http.HttpResponse; import java.time.Duration; import java.util.List; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -67,6 +70,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -84,15 +109,14 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ExternalWalletAsset>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ExternalWalletAsset>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> addContractAsset( String contractId, String assetId, AddContractAssetRequest addContractAssetRequest, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = addContractAssetRequestBuilder( @@ -123,7 +147,15 @@ public CompletableFuture> addContractAsset( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -177,12 +209,11 @@ private HttpRequest.Builder addContractAssetRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<UnmanagedWallet>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<UnmanagedWallet>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createContract( - CreateContractRequest createContractRequest, String idempotencyKey) - throws ApiException { + CreateContractRequest createContractRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createContractRequestBuilder(createContractRequest, idempotencyKey); @@ -212,7 +243,15 @@ public CompletableFuture> createContract( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -255,11 +294,10 @@ private HttpRequest.Builder createContractRequestBuilder( * Signer, Approver, Editor. * * @param contractId The ID of the contract to delete (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ - public CompletableFuture> deleteContract(String contractId) - throws ApiException { + public CompletableFuture> deleteContract(String contractId) { try { HttpRequest.Builder localVarRequestBuilder = deleteContractRequestBuilder(contractId); return memberVarHttpClient @@ -278,7 +316,14 @@ public CompletableFuture> deleteContract(String contractId) localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -313,11 +358,11 @@ private HttpRequest.Builder deleteContractRequestBuilder(String contractId) * * @param contractId The ID of the contract (required) * @param assetId The ID of the asset to delete (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> deleteContractAsset( - String contractId, String assetId) throws ApiException { + String contractId, String assetId) { try { HttpRequest.Builder localVarRequestBuilder = deleteContractAssetRequestBuilder(contractId, assetId); @@ -338,7 +383,14 @@ public CompletableFuture> deleteContractAsset( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -375,11 +427,10 @@ private HttpRequest.Builder deleteContractAssetRequestBuilder(String contractId, * ID. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. * * @param contractId The ID of the contract to return (required) - * @return CompletableFuture<ApiResponse<UnmanagedWallet>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<UnmanagedWallet>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getContract(String contractId) - throws ApiException { + public CompletableFuture> getContract(String contractId) { try { HttpRequest.Builder localVarRequestBuilder = getContractRequestBuilder(contractId); return memberVarHttpClient @@ -408,7 +459,15 @@ public CompletableFuture> getContract(String contra } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -442,11 +501,11 @@ private HttpRequest.Builder getContractRequestBuilder(String contractId) throws * * @param contractId The ID of the contract (required) * @param assetId The ID of the asset to return (required) - * @return CompletableFuture<ApiResponse<ExternalWalletAsset>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ExternalWalletAsset>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getContractAsset( - String contractId, String assetId) throws ApiException { + String contractId, String assetId) { try { HttpRequest.Builder localVarRequestBuilder = getContractAssetRequestBuilder(contractId, assetId); @@ -476,7 +535,15 @@ public CompletableFuture> getContractAsset( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -511,11 +578,10 @@ private HttpRequest.Builder getContractAssetRequestBuilder(String contractId, St * List Whitelisted Contracts Gets a list of whitelisted contracts. Endpoint Permission: Admin, * Non-Signing Admin, Signer, Approver, Editor, Viewer. * - * @return CompletableFuture<ApiResponse<List<UnmanagedWallet>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<UnmanagedWallet>>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture>> getContracts() - throws ApiException { + public CompletableFuture>> getContracts() { try { HttpRequest.Builder localVarRequestBuilder = getContractsRequestBuilder(); return memberVarHttpClient @@ -545,7 +611,17 @@ public CompletableFuture>> getContracts() } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/CosignersBetaApi.java b/src/main/java/com/fireblocks/sdk/api/CosignersBetaApi.java index 37e0ec31..c8fc0140 100644 --- a/src/main/java/com/fireblocks/sdk/api/CosignersBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/CosignersBetaApi.java @@ -44,7 +44,10 @@ import java.util.List; import java.util.StringJoiner; import java.util.UUID; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -80,6 +83,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -95,11 +120,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<AddCosignerResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AddCosignerResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> addCosigner( - AddCosignerRequest addCosignerRequest, String idempotencyKey) throws ApiException { + AddCosignerRequest addCosignerRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = addCosignerRequestBuilder(addCosignerRequest, idempotencyKey); @@ -129,7 +154,15 @@ public CompletableFuture> addCosigner( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -172,11 +205,10 @@ private HttpRequest.Builder addCosignerRequestBuilder( * * @param cosignerId The unique identifier of the cosigner (required) * @param apiKeyId The unique identifier of the API key (required) - * @return CompletableFuture<ApiResponse<ApiKey>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ApiKey>>, which completes exceptionally + * with an {@link ApiException} if the API call fails */ - public CompletableFuture> getApiKey(UUID cosignerId, String apiKeyId) - throws ApiException { + public CompletableFuture> getApiKey(UUID cosignerId, String apiKeyId) { try { HttpRequest.Builder localVarRequestBuilder = getApiKeyRequestBuilder(cosignerId, apiKeyId); @@ -206,7 +238,14 @@ public CompletableFuture> getApiKey(UUID cosignerId, String } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -247,12 +286,11 @@ private HttpRequest.Builder getApiKeyRequestBuilder(UUID cosignerId, String apiK * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) * @param pageCursor Cursor of the required page (optional) * @param pageSize Maximum number of items in the page (optional, default to 10) - * @return CompletableFuture<ApiResponse<ApiKeysPaginatedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ApiKeysPaginatedResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getApiKeys( - UUID cosignerId, String order, String pageCursor, BigDecimal pageSize) - throws ApiException { + UUID cosignerId, String order, String pageCursor, BigDecimal pageSize) { try { HttpRequest.Builder localVarRequestBuilder = getApiKeysRequestBuilder(cosignerId, order, pageCursor, pageSize); @@ -282,7 +320,17 @@ public CompletableFuture> getApiKeys( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -338,11 +386,10 @@ private HttpRequest.Builder getApiKeysRequestBuilder( * be subject to changes. Endpoint Permission: Admin and Non-Signing Admin. * * @param cosignerId The unique identifier of the cosigner (required) - * @return CompletableFuture<ApiResponse<Cosigner>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Cosigner>>, which completes exceptionally + * with an {@link ApiException} if the API call fails */ - public CompletableFuture> getCosigner(UUID cosignerId) - throws ApiException { + public CompletableFuture> getCosigner(UUID cosignerId) { try { HttpRequest.Builder localVarRequestBuilder = getCosignerRequestBuilder(cosignerId); return memberVarHttpClient @@ -371,7 +418,14 @@ public CompletableFuture> getCosigner(UUID cosignerId) } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -408,11 +462,11 @@ private HttpRequest.Builder getCosignerRequestBuilder(UUID cosignerId) throws Ap * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) * @param pageCursor Cursor of the required page (optional) * @param pageSize Maximum number of items in the page (optional, default to 10) - * @return CompletableFuture<ApiResponse<CosignersPaginatedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CosignersPaginatedResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getCosigners( - String order, String pageCursor, BigDecimal pageSize) throws ApiException { + String order, String pageCursor, BigDecimal pageSize) { try { HttpRequest.Builder localVarRequestBuilder = getCosignersRequestBuilder(order, pageCursor, pageSize); @@ -442,7 +496,17 @@ public CompletableFuture> getCosigners( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -495,11 +559,11 @@ private HttpRequest.Builder getCosignersRequestBuilder( * @param cosignerId The unique identifier of the cosigner (required) * @param apiKeyId The unique identifier of the API key (required) * @param requestId (required) - * @return CompletableFuture<ApiResponse<Status>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Status>>, which completes exceptionally + * with an {@link ApiException} if the API call fails */ public CompletableFuture> getRequestStatus( - UUID cosignerId, String apiKeyId, String requestId) throws ApiException { + UUID cosignerId, String apiKeyId, String requestId) { try { HttpRequest.Builder localVarRequestBuilder = getRequestStatusRequestBuilder(cosignerId, apiKeyId, requestId); @@ -529,7 +593,14 @@ public CompletableFuture> getRequestStatus( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -572,15 +643,14 @@ private HttpRequest.Builder getRequestStatusRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<PairApiKeyResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<PairApiKeyResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> pairApiKey( PairApiKeyRequest pairApiKeyRequest, UUID cosignerId, String apiKeyId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = pairApiKeyRequestBuilder( @@ -611,7 +681,15 @@ public CompletableFuture> pairApiKey( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -664,11 +742,11 @@ private HttpRequest.Builder pairApiKeyRequestBuilder( * * @param renameCosigner (required) * @param cosignerId The unique identifier of the cosigner (required) - * @return CompletableFuture<ApiResponse<Cosigner>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Cosigner>>, which completes exceptionally + * with an {@link ApiException} if the API call fails */ public CompletableFuture> renameCosigner( - RenameCosigner renameCosigner, UUID cosignerId) throws ApiException { + RenameCosigner renameCosigner, UUID cosignerId) { try { HttpRequest.Builder localVarRequestBuilder = renameCosignerRequestBuilder(renameCosigner, cosignerId); @@ -698,7 +776,14 @@ public CompletableFuture> renameCosigner( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -742,11 +827,10 @@ private HttpRequest.Builder renameCosignerRequestBuilder( * * @param cosignerId The unique identifier of the cosigner (required) * @param apiKeyId The unique identifier of the API key (required) - * @return CompletableFuture<ApiResponse<ApiKey>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ApiKey>>, which completes exceptionally + * with an {@link ApiException} if the API call fails */ - public CompletableFuture> unpairApiKey(UUID cosignerId, String apiKeyId) - throws ApiException { + public CompletableFuture> unpairApiKey(UUID cosignerId, String apiKeyId) { try { HttpRequest.Builder localVarRequestBuilder = unpairApiKeyRequestBuilder(cosignerId, apiKeyId); @@ -776,7 +860,14 @@ public CompletableFuture> unpairApiKey(UUID cosignerId, Stri } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -815,14 +906,13 @@ private HttpRequest.Builder unpairApiKeyRequestBuilder(UUID cosignerId, String a * @param updateCallbackHandlerRequest (required) * @param cosignerId The unique identifier of the cosigner (required) * @param apiKeyId The unique identifier of the API key (required) - * @return CompletableFuture<ApiResponse<UpdateCallbackHandlerResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<UpdateCallbackHandlerResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> updateCallbackHandler( UpdateCallbackHandlerRequest updateCallbackHandlerRequest, UUID cosignerId, - String apiKeyId) - throws ApiException { + String apiKeyId) { try { HttpRequest.Builder localVarRequestBuilder = updateCallbackHandlerRequestBuilder( @@ -854,7 +944,17 @@ public CompletableFuture> updateCallb } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java b/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java index b25cfffb..504e0a6e 100644 --- a/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/DeployedContractsApi.java @@ -36,7 +36,10 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -72,6 +75,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -86,11 +111,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ContractWithAbiDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ContractWithAbiDto>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> addContractABI( - AddAbiRequestDto addAbiRequestDto, String idempotencyKey) throws ApiException { + AddAbiRequestDto addAbiRequestDto, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = addContractABIRequestBuilder(addAbiRequestDto, idempotencyKey); @@ -120,7 +145,15 @@ public CompletableFuture> addContractABI( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -164,11 +197,11 @@ private HttpRequest.Builder addContractABIRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ContractWithAbiDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ContractWithAbiDto>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> fetchContractAbi( - FetchAbiRequestDto fetchAbiRequestDto, String idempotencyKey) throws ApiException { + FetchAbiRequestDto fetchAbiRequestDto, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = fetchContractAbiRequestBuilder(fetchAbiRequestDto, idempotencyKey); @@ -198,7 +231,15 @@ public CompletableFuture> fetchContractAbi( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -242,11 +283,11 @@ private HttpRequest.Builder fetchContractAbiRequestBuilder( * * @param contractAddress The contract's onchain address (required) * @param assetId (required) - * @return CompletableFuture<ApiResponse<DeployedContractResponseDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<DeployedContractResponseDto>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getDeployedContractByAddress( - String contractAddress, String assetId) throws ApiException { + String contractAddress, String assetId) { try { HttpRequest.Builder localVarRequestBuilder = getDeployedContractByAddressRequestBuilder(contractAddress, assetId); @@ -278,7 +319,17 @@ public CompletableFuture> getDeployedCo } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -317,11 +368,11 @@ private HttpRequest.Builder getDeployedContractByAddressRequestBuilder( * Return deployed contract data by id Return deployed contract data by id * * @param id The deployed contract data identifier (required) - * @return CompletableFuture<ApiResponse<DeployedContractResponseDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<DeployedContractResponseDto>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getDeployedContractById( - String id) throws ApiException { + String id) { try { HttpRequest.Builder localVarRequestBuilder = getDeployedContractByIdRequestBuilder(id); return memberVarHttpClient @@ -351,7 +402,17 @@ public CompletableFuture> getDeployedCo } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -389,16 +450,15 @@ private HttpRequest.Builder getDeployedContractByIdRequestBuilder(String id) * @param contractAddress The contract's onchain address (optional) * @param baseAssetId (optional) * @param contractTemplateId (optional) - * @return CompletableFuture<ApiResponse<DeployedContractsPaginatedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<DeployedContractsPaginatedResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getDeployedContracts( String pageCursor, BigDecimal pageSize, String contractAddress, String baseAssetId, - String contractTemplateId) - throws ApiException { + String contractTemplateId) { try { HttpRequest.Builder localVarRequestBuilder = getDeployedContractsRequestBuilder( @@ -430,7 +490,18 @@ public CompletableFuture> getDep } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/EarnApi.java b/src/main/java/com/fireblocks/sdk/api/EarnApi.java index e7a57f0d..9965a0f3 100644 --- a/src/main/java/com/fireblocks/sdk/api/EarnApi.java +++ b/src/main/java/com/fireblocks/sdk/api/EarnApi.java @@ -37,7 +37,10 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -73,6 +76,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -90,11 +115,10 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ - public CompletableFuture> approveTermsOfService(String idempotencyKey) - throws ApiException { + public CompletableFuture> approveTermsOfService(String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = approveTermsOfServiceRequestBuilder(idempotencyKey); @@ -115,7 +139,14 @@ public CompletableFuture> approveTermsOfService(String idempot localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -154,12 +185,11 @@ private HttpRequest.Builder approveTermsOfServiceRequestBuilder(String idempoten * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<CreateEarnActionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CreateEarnActionResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createEarnAction( - CreateEarnActionRequest createEarnActionRequest, String idempotencyKey) - throws ApiException { + CreateEarnActionRequest createEarnActionRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createEarnActionRequestBuilder(createEarnActionRequest, idempotencyKey); @@ -189,7 +219,17 @@ public CompletableFuture> createEarnAction } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -234,11 +274,10 @@ private HttpRequest.Builder createEarnActionRequestBuilder( * (tenant-scoped). * * @param id Action sequence id (UUID). (required) - * @return CompletableFuture<ApiResponse<GetActionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetActionResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getEarnAction(String id) - throws ApiException { + public CompletableFuture> getEarnAction(String id) { try { HttpRequest.Builder localVarRequestBuilder = getEarnActionRequestBuilder(id); return memberVarHttpClient @@ -267,7 +306,15 @@ public CompletableFuture> getEarnAction(String id } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -302,11 +349,11 @@ private HttpRequest.Builder getEarnActionRequestBuilder(String id) throws ApiExc * @param pageSize Number of items per page (default 100, max 100). (optional, default to 100) * @param sortBy Field to sort results by. (optional) * @param order Sort order (ASC or DESC). (optional, default to DESC) - * @return CompletableFuture<ApiResponse<GetActionsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetActionsResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getEarnActions( - String pageCursor, Integer pageSize, String sortBy, String order) throws ApiException { + String pageCursor, Integer pageSize, String sortBy, String order) { try { HttpRequest.Builder localVarRequestBuilder = getEarnActionsRequestBuilder(pageCursor, pageSize, sortBy, order); @@ -336,7 +383,15 @@ public CompletableFuture> getEarnActions( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -391,11 +446,11 @@ private HttpRequest.Builder getEarnActionsRequestBuilder( * @param pageSize Number of items per page. (optional, default to 100) * @param sortBy Field to sort results by. (optional) * @param order Sort order (ASC or DESC). (optional, default to DESC) - * @return CompletableFuture<ApiResponse<GetOpportunitiesResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetOpportunitiesResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getEarnOpportunities( - String pageCursor, Integer pageSize, String sortBy, String order) throws ApiException { + String pageCursor, Integer pageSize, String sortBy, String order) { try { HttpRequest.Builder localVarRequestBuilder = getEarnOpportunitiesRequestBuilder(pageCursor, pageSize, sortBy, order); @@ -426,7 +481,17 @@ public CompletableFuture> getEarnOpportuni } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -484,8 +549,8 @@ private HttpRequest.Builder getEarnOpportunitiesRequestBuilder( * @param pageSize Number of items per page. (optional, default to 100) * @param sortBy Field to sort results by. (optional) * @param order Sort order (ASC or DESC). (optional, default to DESC) - * @return CompletableFuture<ApiResponse<GetPositionsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetPositionsResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getEarnPositions( Integer chainId, @@ -493,8 +558,7 @@ public CompletableFuture> getEarnPositions( String pageCursor, Integer pageSize, String sortBy, - String order) - throws ApiException { + String order) { try { HttpRequest.Builder localVarRequestBuilder = getEarnPositionsRequestBuilder( @@ -525,7 +589,17 @@ public CompletableFuture> getEarnPositions( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -590,11 +664,11 @@ private HttpRequest.Builder getEarnPositionsRequestBuilder( * @param pageSize Number of items per page. (optional, default to 100) * @param sortBy Field to sort results by. (optional) * @param order Sort order (ASC or DESC). (optional, default to DESC) - * @return CompletableFuture<ApiResponse<GetProvidersResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetProvidersResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getEarnProviders( - String pageCursor, Integer pageSize, String sortBy, String order) throws ApiException { + String pageCursor, Integer pageSize, String sortBy, String order) { try { HttpRequest.Builder localVarRequestBuilder = getEarnProvidersRequestBuilder(pageCursor, pageSize, sortBy, order); @@ -624,7 +698,17 @@ public CompletableFuture> getEarnProviders( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/EmbeddedWalletsApi.java b/src/main/java/com/fireblocks/sdk/api/EmbeddedWalletsApi.java index 91ec5b91..66e6c96a 100644 --- a/src/main/java/com/fireblocks/sdk/api/EmbeddedWalletsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/EmbeddedWalletsApi.java @@ -48,7 +48,10 @@ import java.util.List; import java.util.StringJoiner; import java.util.UUID; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -84,6 +87,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -101,12 +126,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<EmbeddedWalletAddressDetails>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EmbeddedWalletAddressDetails>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> addEmbeddedWalletAsset( - String walletId, String accountId, String assetId, String idempotencyKey) - throws ApiException { + String walletId, String accountId, String assetId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = addEmbeddedWalletAssetRequestBuilder( @@ -138,7 +162,17 @@ public CompletableFuture> addEmbeddedW } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -184,11 +218,11 @@ private HttpRequest.Builder addEmbeddedWalletAssetRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<EmbeddedWallet>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EmbeddedWallet>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> assignEmbeddedWallet( - String walletId, String idempotencyKey) throws ApiException { + String walletId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = assignEmbeddedWalletRequestBuilder(walletId, idempotencyKey); @@ -219,7 +253,15 @@ public CompletableFuture> assignEmbeddedWallet( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -257,11 +299,11 @@ private HttpRequest.Builder assignEmbeddedWalletRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<EmbeddedWallet>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EmbeddedWallet>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createEmbeddedWallet( - String idempotencyKey) throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createEmbeddedWalletRequestBuilder(idempotencyKey); @@ -292,7 +334,15 @@ public CompletableFuture> createEmbeddedWallet( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -328,11 +378,11 @@ private HttpRequest.Builder createEmbeddedWalletRequestBuilder(String idempotenc * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<EmbeddedWalletAccount>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EmbeddedWalletAccount>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createEmbeddedWalletAccount( - String walletId, String idempotencyKey) throws ApiException { + String walletId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createEmbeddedWalletAccountRequestBuilder(walletId, idempotencyKey); @@ -364,7 +414,17 @@ public CompletableFuture> createEmbeddedWalle } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -401,11 +461,10 @@ private HttpRequest.Builder createEmbeddedWalletAccountRequestBuilder( * Get a wallet Get a wallet * * @param walletId Wallet Id (required) - * @return CompletableFuture<ApiResponse<EmbeddedWallet>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EmbeddedWallet>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getEmbeddedWallet(String walletId) - throws ApiException { + public CompletableFuture> getEmbeddedWallet(String walletId) { try { HttpRequest.Builder localVarRequestBuilder = getEmbeddedWalletRequestBuilder(walletId); return memberVarHttpClient @@ -434,7 +493,15 @@ public CompletableFuture> getEmbeddedWallet(String w } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -468,11 +535,11 @@ private HttpRequest.Builder getEmbeddedWalletRequestBuilder(String walletId) * * @param walletId WalletId (required) * @param accountId The ID of the account (required) - * @return CompletableFuture<ApiResponse<EmbeddedWalletAccount>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EmbeddedWalletAccount>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getEmbeddedWalletAccount( - String walletId, String accountId) throws ApiException { + String walletId, String accountId) { try { HttpRequest.Builder localVarRequestBuilder = getEmbeddedWalletAccountRequestBuilder(walletId, accountId); @@ -503,7 +570,17 @@ public CompletableFuture> getEmbeddedWalletAc } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -548,8 +625,8 @@ private HttpRequest.Builder getEmbeddedWalletAccountRequestBuilder( * @param sort Sort by address (optional, default to createdAt) * @param order Is the order ascending or descending (optional, default to ASC) * @param enabled Enabled (optional) - * @return CompletableFuture<ApiResponse<EmbeddedWalletPaginatedAddressesResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EmbeddedWalletPaginatedAddressesResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getEmbeddedWalletAddresses( @@ -560,8 +637,7 @@ private HttpRequest.Builder getEmbeddedWalletAccountRequestBuilder( BigDecimal pageSize, String sort, String order, - Boolean enabled) - throws ApiException { + Boolean enabled) { try { HttpRequest.Builder localVarRequestBuilder = getEmbeddedWalletAddressesRequestBuilder( @@ -602,7 +678,18 @@ private HttpRequest.Builder getEmbeddedWalletAccountRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -676,11 +763,11 @@ private HttpRequest.Builder getEmbeddedWalletAddressesRequestBuilder( * @param walletId Wallet Id (required) * @param accountId The ID of the account (required) * @param assetId The ID of the asset (required) - * @return CompletableFuture<ApiResponse<EmbeddedWalletAssetResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EmbeddedWalletAssetResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getEmbeddedWalletAsset( - String walletId, String accountId, String assetId) throws ApiException { + String walletId, String accountId, String assetId) { try { HttpRequest.Builder localVarRequestBuilder = getEmbeddedWalletAssetRequestBuilder(walletId, accountId, assetId); @@ -711,7 +798,17 @@ public CompletableFuture> getEmbeddedWa } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -752,11 +849,11 @@ private HttpRequest.Builder getEmbeddedWalletAssetRequestBuilder( * @param walletId Wallet Id (required) * @param accountId The ID of the account (required) * @param assetId The ID of the asset (required) - * @return CompletableFuture<ApiResponse<EmbeddedWalletAssetBalance>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EmbeddedWalletAssetBalance>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getEmbeddedWalletAssetBalance( - String walletId, String accountId, String assetId) throws ApiException { + String walletId, String accountId, String assetId) { try { HttpRequest.Builder localVarRequestBuilder = getEmbeddedWalletAssetBalanceRequestBuilder(walletId, accountId, assetId); @@ -788,7 +885,17 @@ public CompletableFuture> getEmbeddedWal } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -833,8 +940,8 @@ private HttpRequest.Builder getEmbeddedWalletAssetBalanceRequestBuilder( * @param pageCursor Cursor to the next page (optional) * @param pageSize Amount of results to return in the next page (optional, default to 200) * @param order Is the order ascending or descending (optional, default to ASC) - * @return CompletableFuture<ApiResponse<EmbeddedWalletPaginatedAssetsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EmbeddedWalletPaginatedAssetsResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getEmbeddedWalletAssets( @@ -843,8 +950,7 @@ private HttpRequest.Builder getEmbeddedWalletAssetBalanceRequestBuilder( List sort, String pageCursor, BigDecimal pageSize, - String order) - throws ApiException { + String order) { try { HttpRequest.Builder localVarRequestBuilder = getEmbeddedWalletAssetsRequestBuilder( @@ -876,7 +982,18 @@ private HttpRequest.Builder getEmbeddedWalletAssetBalanceRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -942,11 +1059,11 @@ private HttpRequest.Builder getEmbeddedWalletAssetsRequestBuilder( * * @param walletId Wallet Id (required) * @param deviceId Device Id (required) - * @return CompletableFuture<ApiResponse<EmbeddedWalletDevice>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EmbeddedWalletDevice>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getEmbeddedWalletDevice( - String walletId, String deviceId) throws ApiException { + String walletId, String deviceId) { try { HttpRequest.Builder localVarRequestBuilder = getEmbeddedWalletDeviceRequestBuilder(walletId, deviceId); @@ -977,7 +1094,17 @@ public CompletableFuture> getEmbeddedWalletDev } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1016,12 +1143,11 @@ private HttpRequest.Builder getEmbeddedWalletDeviceRequestBuilder( * * @param walletId Wallet Id (required) * @param deviceId Device Id (required) - * @return CompletableFuture<ApiResponse<EmbeddedWalletDeviceKeySetupResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EmbeddedWalletDeviceKeySetupResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getEmbeddedWalletDeviceSetupState(String walletId, String deviceId) - throws ApiException { + getEmbeddedWalletDeviceSetupState(String walletId, String deviceId) { try { HttpRequest.Builder localVarRequestBuilder = getEmbeddedWalletDeviceSetupStateRequestBuilder(walletId, deviceId); @@ -1053,7 +1179,18 @@ private HttpRequest.Builder getEmbeddedWalletDeviceRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1095,8 +1232,8 @@ private HttpRequest.Builder getEmbeddedWalletDeviceSetupStateRequestBuilder( * @param pageCursor Cursor to the next page (optional) * @param pageSize Amount of results to return in the next page (optional, default to 200) * @param order Is the order ascending or descending (optional, default to ASC) - * @return CompletableFuture<ApiResponse<EmbeddedWalletPaginatedDevicesResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EmbeddedWalletPaginatedDevicesResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getEmbeddedWalletDevicesPaginated( @@ -1104,8 +1241,7 @@ private HttpRequest.Builder getEmbeddedWalletDeviceSetupStateRequestBuilder( List sort, String pageCursor, BigDecimal pageSize, - String order) - throws ApiException { + String order) { try { HttpRequest.Builder localVarRequestBuilder = getEmbeddedWalletDevicesPaginatedRequestBuilder( @@ -1138,7 +1274,18 @@ private HttpRequest.Builder getEmbeddedWalletDeviceSetupStateRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1200,11 +1347,11 @@ private HttpRequest.Builder getEmbeddedWalletDevicesPaginatedRequestBuilder( * and backup time * * @param walletId Wallet Id (required) - * @return CompletableFuture<ApiResponse<EmbeddedWalletLatestBackupResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EmbeddedWalletLatestBackupResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getEmbeddedWalletLatestBackup(String walletId) throws ApiException { + getEmbeddedWalletLatestBackup(String walletId) { try { HttpRequest.Builder localVarRequestBuilder = getEmbeddedWalletLatestBackupRequestBuilder(walletId); @@ -1236,7 +1383,18 @@ private HttpRequest.Builder getEmbeddedWalletDevicesPaginatedRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1278,8 +1436,8 @@ private HttpRequest.Builder getEmbeddedWalletLatestBackupRequestBuilder(String w * @param change BIP44 derivation path - change value (required) * @param addressIndex BIP44 derivation path - index value (required) * @param compressed Compressed/Uncompressed public key format (optional) - * @return CompletableFuture<ApiResponse<PublicKeyInformation>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<PublicKeyInformation>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getEmbeddedWalletPublicKeyInfoForAddress( @@ -1289,8 +1447,7 @@ private HttpRequest.Builder getEmbeddedWalletLatestBackupRequestBuilder(String w String assetId, BigDecimal change, BigDecimal addressIndex, - Boolean compressed) - throws ApiException { + Boolean compressed) { try { HttpRequest.Builder localVarRequestBuilder = getEmbeddedWalletPublicKeyInfoForAddressRequestBuilder( @@ -1329,7 +1486,17 @@ private HttpRequest.Builder getEmbeddedWalletLatestBackupRequestBuilder(String w } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1406,11 +1573,11 @@ private HttpRequest.Builder getEmbeddedWalletPublicKeyInfoForAddressRequestBuild * including required algorithms and device setup status * * @param walletId Wallet Id (required) - * @return CompletableFuture<ApiResponse<EmbeddedWalletSetupStatusResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EmbeddedWalletSetupStatusResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getEmbeddedWalletSetupStatus(String walletId) throws ApiException { + getEmbeddedWalletSetupStatus(String walletId) { try { HttpRequest.Builder localVarRequestBuilder = getEmbeddedWalletSetupStatusRequestBuilder(walletId); @@ -1442,7 +1609,18 @@ private HttpRequest.Builder getEmbeddedWalletPublicKeyInfoForAddressRequestBuild } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1478,13 +1656,12 @@ private HttpRequest.Builder getEmbeddedWalletSetupStatusRequestBuilder(String wa * @param pageCursor Next page cursor to fetch (optional) * @param pageSize Items per page (optional, default to 200) * @param onlyBaseAssets Only base assets (optional) - * @return CompletableFuture<ApiResponse<EmbeddedWalletPaginatedAssetsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EmbeddedWalletPaginatedAssetsResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getEmbeddedWalletSupportedAssets( - String pageCursor, BigDecimal pageSize, Boolean onlyBaseAssets) - throws ApiException { + String pageCursor, BigDecimal pageSize, Boolean onlyBaseAssets) { try { HttpRequest.Builder localVarRequestBuilder = getEmbeddedWalletSupportedAssetsRequestBuilder( @@ -1517,7 +1694,18 @@ private HttpRequest.Builder getEmbeddedWalletSetupStatusRequestBuilder(String wa } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1571,8 +1759,8 @@ private HttpRequest.Builder getEmbeddedWalletSupportedAssetsRequestBuilder( * @param sort Field(s) to use for sorting (optional, default to createdAt) * @param order Is the order ascending or descending (optional, default to ASC) * @param enabled Enabled Wallets (optional) - * @return CompletableFuture<ApiResponse<EmbeddedWalletPaginatedWalletsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EmbeddedWalletPaginatedWalletsResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getEmbeddedWallets( @@ -1580,8 +1768,7 @@ private HttpRequest.Builder getEmbeddedWalletSupportedAssetsRequestBuilder( BigDecimal pageSize, String sort, String order, - Boolean enabled) - throws ApiException { + Boolean enabled) { try { HttpRequest.Builder localVarRequestBuilder = getEmbeddedWalletsRequestBuilder(pageCursor, pageSize, sort, order, enabled); @@ -1612,7 +1799,18 @@ private HttpRequest.Builder getEmbeddedWalletSupportedAssetsRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1675,16 +1873,15 @@ private HttpRequest.Builder getEmbeddedWalletsRequestBuilder( * be 44. (required) * @param algorithm Elliptic Curve (required) * @param compressed Compressed/Uncompressed public key format (optional) - * @return CompletableFuture<ApiResponse<PublicKeyInformation>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<PublicKeyInformation>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getPublicKeyInfoNcw( UUID xEndUserWalletId, String walletId, String derivationPath, String algorithm, - Boolean compressed) - throws ApiException { + Boolean compressed) { try { HttpRequest.Builder localVarRequestBuilder = getPublicKeyInfoNcwRequestBuilder( @@ -1716,7 +1913,17 @@ public CompletableFuture> getPublicKeyInfoNcw( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1787,13 +1994,12 @@ private HttpRequest.Builder getPublicKeyInfoNcwRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<EmbeddedWalletAssetBalance>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EmbeddedWalletAssetBalance>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> refreshEmbeddedWalletAssetBalance( - String walletId, String accountId, String assetId, String idempotencyKey) - throws ApiException { + String walletId, String accountId, String assetId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = refreshEmbeddedWalletAssetBalanceRequestBuilder( @@ -1826,7 +2032,17 @@ private HttpRequest.Builder getPublicKeyInfoNcwRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1876,12 +2092,11 @@ private HttpRequest.Builder refreshEmbeddedWalletAssetBalanceRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> updateEmbeddedWalletDeviceStatus( - EnableDevice enableDevice, String walletId, String deviceId, String idempotencyKey) - throws ApiException { + EnableDevice enableDevice, String walletId, String deviceId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateEmbeddedWalletDeviceStatusRequestBuilder( @@ -1904,7 +2119,14 @@ public CompletableFuture> updateEmbeddedWalletDeviceStatus( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1958,11 +2180,11 @@ private HttpRequest.Builder updateEmbeddedWalletDeviceStatusRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> updateEmbeddedWalletStatus( - EnableWallet enableWallet, String walletId, String idempotencyKey) throws ApiException { + EnableWallet enableWallet, String walletId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateEmbeddedWalletStatusRequestBuilder( @@ -1985,7 +2207,14 @@ public CompletableFuture> updateEmbeddedWalletStatus( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/ExchangeAccountsApi.java b/src/main/java/com/fireblocks/sdk/api/ExchangeAccountsApi.java index 9284a047..bbe50de2 100644 --- a/src/main/java/com/fireblocks/sdk/api/ExchangeAccountsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ExchangeAccountsApi.java @@ -41,7 +41,10 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -77,6 +80,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -97,12 +122,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<AddExchangeAccountResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AddExchangeAccountResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> addExchangeAccount( - AddExchangeAccountRequest addExchangeAccountRequest, String idempotencyKey) - throws ApiException { + AddExchangeAccountRequest addExchangeAccountRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = addExchangeAccountRequestBuilder(addExchangeAccountRequest, idempotencyKey); @@ -133,7 +157,17 @@ public CompletableFuture> addExchangeAcc } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -187,14 +221,13 @@ private HttpRequest.Builder addExchangeAccountRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ConvertAssetsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ConvertAssetsResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> convertAssets( String exchangeAccountId, ConvertAssetsRequest convertAssetsRequest, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = convertAssetsRequestBuilder( @@ -225,7 +258,17 @@ public CompletableFuture> convertAssets( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -275,11 +318,11 @@ private HttpRequest.Builder convertAssetsRequestBuilder( * Admin, Non-Signing Admin. * * @param exchangeAccountId The ID of the exchange account to return (required) - * @return CompletableFuture<ApiResponse<ExchangeAccount>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ExchangeAccount>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getExchangeAccount( - String exchangeAccountId) throws ApiException { + String exchangeAccountId) { try { HttpRequest.Builder localVarRequestBuilder = getExchangeAccountRequestBuilder(exchangeAccountId); @@ -310,7 +353,15 @@ public CompletableFuture> getExchangeAccount( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -348,11 +399,11 @@ private HttpRequest.Builder getExchangeAccountRequestBuilder(String exchangeAcco * * @param exchangeAccountId The ID of the exchange account to return (required) * @param assetId The ID of the asset to return (required) - * @return CompletableFuture<ApiResponse<ExchangeAsset>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ExchangeAsset>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getExchangeAccountAsset( - String exchangeAccountId, String assetId) throws ApiException { + String exchangeAccountId, String assetId) { try { HttpRequest.Builder localVarRequestBuilder = getExchangeAccountAssetRequestBuilder(exchangeAccountId, assetId); @@ -383,7 +434,15 @@ public CompletableFuture> getExchangeAccountAsset( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -421,11 +480,11 @@ private HttpRequest.Builder getExchangeAccountAssetRequestBuilder( * Get public key to encrypt exchange credentials Return public key * * @return - * CompletableFuture<ApiResponse<GetExchangeAccountsCredentialsPublicKeyResponse>> - * @throws ApiException if fails to make API call + * CompletableFuture<ApiResponse<GetExchangeAccountsCredentialsPublicKeyResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getExchangeAccountsCredentialsPublicKey() throws ApiException { + getExchangeAccountsCredentialsPublicKey() { try { HttpRequest.Builder localVarRequestBuilder = getExchangeAccountsCredentialsPublicKeyRequestBuilder(); @@ -458,7 +517,18 @@ private HttpRequest.Builder getExchangeAccountAssetRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -491,12 +561,11 @@ private HttpRequest.Builder getExchangeAccountsCredentialsPublicKeyRequestBuilde * @param limit number of exchanges per page (required) * @param before (optional) * @param after (optional) - * @return CompletableFuture<ApiResponse<GetPagedExchangeAccountsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetPagedExchangeAccountsResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getPagedExchangeAccounts(BigDecimal limit, String before, String after) - throws ApiException { + getPagedExchangeAccounts(BigDecimal limit, String before, String after) { try { HttpRequest.Builder localVarRequestBuilder = getPagedExchangeAccountsRequestBuilder(limit, before, after); @@ -527,7 +596,17 @@ private HttpRequest.Builder getExchangeAccountsCredentialsPublicKeyRequestBuilde } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -585,14 +664,13 @@ private HttpRequest.Builder getPagedExchangeAccountsRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<InternalTransferResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<InternalTransferResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> internalTransfer( String exchangeAccountId, CreateInternalTransferRequest createInternalTransferRequest, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = internalTransferRequestBuilder( @@ -623,7 +701,17 @@ public CompletableFuture> internalTransfer } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/ExternalWalletsApi.java b/src/main/java/com/fireblocks/sdk/api/ExternalWalletsApi.java index 7ab6ead4..63fabaf2 100644 --- a/src/main/java/com/fireblocks/sdk/api/ExternalWalletsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ExternalWalletsApi.java @@ -32,7 +32,10 @@ import java.net.http.HttpResponse; import java.time.Duration; import java.util.List; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -68,6 +71,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -85,15 +110,14 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ExternalWalletAsset>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ExternalWalletAsset>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> addAssetToExternalWallet( String walletId, String assetId, AddAssetToExternalWalletRequest addAssetToExternalWalletRequest, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = addAssetToExternalWalletRequestBuilder( @@ -125,7 +149,15 @@ public CompletableFuture> addAssetToExternalWal } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -184,11 +216,11 @@ private HttpRequest.Builder addAssetToExternalWalletRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<UnmanagedWallet>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<UnmanagedWallet>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createExternalWallet( - CreateWalletRequest createWalletRequest, String idempotencyKey) throws ApiException { + CreateWalletRequest createWalletRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createExternalWalletRequestBuilder(createWalletRequest, idempotencyKey); @@ -219,7 +251,15 @@ public CompletableFuture> createExternalWallet( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -261,11 +301,10 @@ private HttpRequest.Builder createExternalWalletRequestBuilder( * Non-Signing Admin, Signer, Approver, Editor. * * @param walletId The ID of the wallet to delete (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ - public CompletableFuture> deleteExternalWallet(String walletId) - throws ApiException { + public CompletableFuture> deleteExternalWallet(String walletId) { try { HttpRequest.Builder localVarRequestBuilder = deleteExternalWalletRequestBuilder(walletId); @@ -286,7 +325,14 @@ public CompletableFuture> deleteExternalWallet(String walletId localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -321,11 +367,10 @@ private HttpRequest.Builder deleteExternalWalletRequestBuilder(String walletId) * Non-Signing Admin, Signer, Approver, Editor, Viewer. * * @param walletId The ID of the wallet to return (required) - * @return CompletableFuture<ApiResponse<UnmanagedWallet>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<UnmanagedWallet>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getExternalWallet(String walletId) - throws ApiException { + public CompletableFuture> getExternalWallet(String walletId) { try { HttpRequest.Builder localVarRequestBuilder = getExternalWalletRequestBuilder(walletId); return memberVarHttpClient @@ -354,7 +399,15 @@ public CompletableFuture> getExternalWallet(String } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -391,11 +444,11 @@ private HttpRequest.Builder getExternalWalletRequestBuilder(String walletId) * * @param walletId The ID of the wallet (required) * @param assetId The ID of the asset to return (required) - * @return CompletableFuture<ApiResponse<ExternalWalletAsset>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ExternalWalletAsset>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getExternalWalletAsset( - String walletId, String assetId) throws ApiException { + String walletId, String assetId) { try { HttpRequest.Builder localVarRequestBuilder = getExternalWalletAssetRequestBuilder(walletId, assetId); @@ -426,7 +479,15 @@ public CompletableFuture> getExternalWalletAsse } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -465,11 +526,10 @@ private HttpRequest.Builder getExternalWalletAssetRequestBuilder( * wallet as the source via Fireblocks. Endpoint Permission: Admin, Non-Signing Admin, Signer, * Approver, Editor, Viewer. * - * @return CompletableFuture<ApiResponse<List<UnmanagedWallet>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<UnmanagedWallet>>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture>> getExternalWallets() - throws ApiException { + public CompletableFuture>> getExternalWallets() { try { HttpRequest.Builder localVarRequestBuilder = getExternalWalletsRequestBuilder(); return memberVarHttpClient @@ -500,7 +560,17 @@ public CompletableFuture>> getExternalWallets( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -531,11 +601,11 @@ private HttpRequest.Builder getExternalWalletsRequestBuilder() throws ApiExcepti * * @param walletId The ID of the wallet (required) * @param assetId The ID of the asset to delete (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> removeAssetFromExternalWallet( - String walletId, String assetId) throws ApiException { + String walletId, String assetId) { try { HttpRequest.Builder localVarRequestBuilder = removeAssetFromExternalWalletRequestBuilder(walletId, assetId); @@ -557,7 +627,14 @@ public CompletableFuture> removeAssetFromExternalWallet( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -601,12 +678,13 @@ private HttpRequest.Builder removeAssetFromExternalWalletRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> setExternalWalletCustomerRefId( - SetCustomerRefIdRequest setCustomerRefIdRequest, String walletId, String idempotencyKey) - throws ApiException { + SetCustomerRefIdRequest setCustomerRefIdRequest, + String walletId, + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setExternalWalletCustomerRefIdRequestBuilder( @@ -629,7 +707,14 @@ public CompletableFuture> setExternalWalletCustomerRefId( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/FiatAccountsApi.java b/src/main/java/com/fireblocks/sdk/api/FiatAccountsApi.java index 64021b27..a8168606 100644 --- a/src/main/java/com/fireblocks/sdk/api/FiatAccountsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/FiatAccountsApi.java @@ -31,7 +31,10 @@ import java.net.http.HttpResponse; import java.time.Duration; import java.util.List; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -67,6 +70,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -82,12 +107,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<DepositFundsFromLinkedDDAResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<DepositFundsFromLinkedDDAResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - depositFundsFromLinkedDDA(String accountId, Funds funds, String idempotencyKey) - throws ApiException { + depositFundsFromLinkedDDA(String accountId, Funds funds, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = depositFundsFromLinkedDDARequestBuilder(accountId, funds, idempotencyKey); @@ -118,7 +142,18 @@ private String formatExceptionMessage(String operationId, int statusCode, String } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -163,11 +198,10 @@ private HttpRequest.Builder depositFundsFromLinkedDDARequestBuilder( * Non-Signing Admin. * * @param accountId The ID of the fiat account to return (required) - * @return CompletableFuture<ApiResponse<FiatAccount>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<FiatAccount>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getFiatAccount(String accountId) - throws ApiException { + public CompletableFuture> getFiatAccount(String accountId) { try { HttpRequest.Builder localVarRequestBuilder = getFiatAccountRequestBuilder(accountId); return memberVarHttpClient @@ -196,7 +230,15 @@ public CompletableFuture> getFiatAccount(String account } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -227,10 +269,10 @@ private HttpRequest.Builder getFiatAccountRequestBuilder(String accountId) throw /** * List fiat accounts Returns all fiat accounts. Endpoint Permission: Admin, Non-Signing Admin. * - * @return CompletableFuture<ApiResponse<List<FiatAccount>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<FiatAccount>>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture>> getFiatAccounts() throws ApiException { + public CompletableFuture>> getFiatAccounts() { try { HttpRequest.Builder localVarRequestBuilder = getFiatAccountsRequestBuilder(); return memberVarHttpClient @@ -260,7 +302,15 @@ public CompletableFuture>> getFiatAccounts() throw } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -293,11 +343,11 @@ private HttpRequest.Builder getFiatAccountsRequestBuilder() throws ApiException * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<RedeemFundsToLinkedDDAResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<RedeemFundsToLinkedDDAResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> redeemFundsToLinkedDDA( - String accountId, Funds funds, String idempotencyKey) throws ApiException { + String accountId, Funds funds, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = redeemFundsToLinkedDDARequestBuilder(accountId, funds, idempotencyKey); @@ -328,7 +378,17 @@ public CompletableFuture> redeemFund } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/GasStationsApi.java b/src/main/java/com/fireblocks/sdk/api/GasStationsApi.java index 7572b829..f451e75d 100644 --- a/src/main/java/com/fireblocks/sdk/api/GasStationsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/GasStationsApi.java @@ -29,7 +29,10 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -65,6 +68,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -77,11 +102,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * asset. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. * * @param assetId The ID of the asset (required) - * @return CompletableFuture<ApiResponse<GasStationPropertiesResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GasStationPropertiesResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getGasStationByAssetId( - String assetId) throws ApiException { + String assetId) { try { HttpRequest.Builder localVarRequestBuilder = getGasStationByAssetIdRequestBuilder(assetId); @@ -112,7 +137,17 @@ public CompletableFuture> getGasStatio } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -145,11 +180,10 @@ private HttpRequest.Builder getGasStationByAssetIdRequestBuilder(String assetId) * Get gas station settings Returns gas station settings and ETH balance. Endpoint Permission: * Admin, Non-Signing Admin, Signer, Approver, Editor. * - * @return CompletableFuture<ApiResponse<GasStationPropertiesResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GasStationPropertiesResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getGasStationInfo() - throws ApiException { + public CompletableFuture> getGasStationInfo() { try { HttpRequest.Builder localVarRequestBuilder = getGasStationInfoRequestBuilder(); return memberVarHttpClient @@ -178,7 +212,17 @@ public CompletableFuture> getGasStatio } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -213,13 +257,12 @@ private HttpRequest.Builder getGasStationInfoRequestBuilder() throws ApiExceptio * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<EditGasStationConfigurationResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EditGasStationConfigurationResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> updateGasStationConfiguration( - GasStationConfiguration gasStationConfiguration, String idempotencyKey) - throws ApiException { + GasStationConfiguration gasStationConfiguration, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateGasStationConfigurationRequestBuilder( @@ -252,7 +295,18 @@ private HttpRequest.Builder getGasStationInfoRequestBuilder() throws ApiExceptio } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -305,15 +359,14 @@ private HttpRequest.Builder updateGasStationConfigurationRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<EditGasStationConfigurationResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EditGasStationConfigurationResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> updateGasStationConfigurationByAssetId( GasStationConfiguration gasStationConfiguration, String assetId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateGasStationConfigurationByAssetIdRequestBuilder( @@ -346,7 +399,18 @@ private HttpRequest.Builder updateGasStationConfigurationRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/GenieBetaApi.java b/src/main/java/com/fireblocks/sdk/api/GenieBetaApi.java index 804fb619..fb22c211 100644 --- a/src/main/java/com/fireblocks/sdk/api/GenieBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/GenieBetaApi.java @@ -29,7 +29,10 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -65,6 +68,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -81,11 +106,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<GenieCreateSessionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GenieCreateSessionResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createGenieSession( - String idempotencyKey) throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createGenieSessionRequestBuilder(idempotencyKey); @@ -116,7 +141,17 @@ public CompletableFuture> createGenieSes } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -157,14 +192,13 @@ private HttpRequest.Builder createGenieSessionRequestBuilder(String idempotencyK * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<GenieChatMessage>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GenieChatMessage>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> sendGenieMessage( GenieSendMessageRequest genieSendMessageRequest, String sessionId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = sendGenieMessageRequestBuilder( @@ -195,7 +229,15 @@ public CompletableFuture> sendGenieMessage( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/InternalWalletsApi.java b/src/main/java/com/fireblocks/sdk/api/InternalWalletsApi.java index d8d7766d..e0c7013f 100644 --- a/src/main/java/com/fireblocks/sdk/api/InternalWalletsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/InternalWalletsApi.java @@ -37,7 +37,10 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -73,6 +76,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -89,11 +114,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<UnmanagedWallet>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<UnmanagedWallet>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createInternalWallet( - CreateWalletRequest createWalletRequest, String idempotencyKey) throws ApiException { + CreateWalletRequest createWalletRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createInternalWalletRequestBuilder(createWalletRequest, idempotencyKey); @@ -124,7 +149,15 @@ public CompletableFuture> createInternalWallet( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -169,15 +202,14 @@ private HttpRequest.Builder createInternalWalletRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<WalletAsset>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<WalletAsset>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createInternalWalletAsset( String walletId, String assetId, CreateInternalWalletAssetRequest createInternalWalletAssetRequest, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createInternalWalletAssetRequestBuilder( @@ -209,7 +241,15 @@ public CompletableFuture> createInternalWalletAsset( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -261,11 +301,10 @@ private HttpRequest.Builder createInternalWalletAssetRequestBuilder( * Delete an internal wallet Deletes an internal wallet by ID. * * @param walletId The ID of the wallet to delete (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ - public CompletableFuture> deleteInternalWallet(String walletId) - throws ApiException { + public CompletableFuture> deleteInternalWallet(String walletId) { try { HttpRequest.Builder localVarRequestBuilder = deleteInternalWalletRequestBuilder(walletId); @@ -286,7 +325,14 @@ public CompletableFuture> deleteInternalWallet(String walletId localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -321,11 +367,11 @@ private HttpRequest.Builder deleteInternalWalletRequestBuilder(String walletId) * * @param walletId The ID of the wallet (required) * @param assetId The ID of the asset to delete (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> deleteInternalWalletAsset( - String walletId, String assetId) throws ApiException { + String walletId, String assetId) { try { HttpRequest.Builder localVarRequestBuilder = deleteInternalWalletAssetRequestBuilder(walletId, assetId); @@ -346,7 +392,14 @@ public CompletableFuture> deleteInternalWalletAsset( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -383,11 +436,10 @@ private HttpRequest.Builder deleteInternalWalletAssetRequestBuilder( * Get assets for internal wallet Returns information for an internal wallet. * * @param walletId The ID of the wallet to return (required) - * @return CompletableFuture<ApiResponse<UnmanagedWallet>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<UnmanagedWallet>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getInternalWallet(String walletId) - throws ApiException { + public CompletableFuture> getInternalWallet(String walletId) { try { HttpRequest.Builder localVarRequestBuilder = getInternalWalletRequestBuilder(walletId); return memberVarHttpClient @@ -416,7 +468,15 @@ public CompletableFuture> getInternalWallet(String } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -450,11 +510,11 @@ private HttpRequest.Builder getInternalWalletRequestBuilder(String walletId) * * @param walletId The ID of the wallet (required) * @param assetId The ID of the asset to return (required) - * @return CompletableFuture<ApiResponse<WalletAsset>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<WalletAsset>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getInternalWalletAsset( - String walletId, String assetId) throws ApiException { + String walletId, String assetId) { try { HttpRequest.Builder localVarRequestBuilder = getInternalWalletAssetRequestBuilder(walletId, assetId); @@ -485,7 +545,15 @@ public CompletableFuture> getInternalWalletAsset( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -524,11 +592,11 @@ private HttpRequest.Builder getInternalWalletAssetRequestBuilder( * @param walletId The ID of the internal wallet to return assets for (required) * @param pageSize (optional, default to 50) * @param pageCursor (optional) - * @return CompletableFuture<ApiResponse<PaginatedAssetsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<PaginatedAssetsResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getInternalWalletAssetsPaginated( - String walletId, BigDecimal pageSize, String pageCursor) throws ApiException { + String walletId, BigDecimal pageSize, String pageCursor) { try { HttpRequest.Builder localVarRequestBuilder = getInternalWalletAssetsPaginatedRequestBuilder(walletId, pageSize, pageCursor); @@ -560,7 +628,17 @@ public CompletableFuture> getInternalWallet } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -611,11 +689,10 @@ private HttpRequest.Builder getInternalWalletAssetsPaginatedRequestBuilder( /** * List internal wallets Gets a list of internal wallets. * - * @return CompletableFuture<ApiResponse<List<UnmanagedWallet>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<UnmanagedWallet>>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture>> getInternalWallets() - throws ApiException { + public CompletableFuture>> getInternalWallets() { try { HttpRequest.Builder localVarRequestBuilder = getInternalWalletsRequestBuilder(); return memberVarHttpClient @@ -646,7 +723,17 @@ public CompletableFuture>> getInternalWallets( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -680,12 +767,13 @@ private HttpRequest.Builder getInternalWalletsRequestBuilder() throws ApiExcepti * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> setCustomerRefIdForInternalWallet( - SetCustomerRefIdRequest setCustomerRefIdRequest, String walletId, String idempotencyKey) - throws ApiException { + SetCustomerRefIdRequest setCustomerRefIdRequest, + String walletId, + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setCustomerRefIdForInternalWalletRequestBuilder( @@ -708,7 +796,14 @@ public CompletableFuture> setCustomerRefIdForInternalWallet( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/KeyLinkBetaApi.java b/src/main/java/com/fireblocks/sdk/api/KeyLinkBetaApi.java index ac8427ea..9c24c674 100644 --- a/src/main/java/com/fireblocks/sdk/api/KeyLinkBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/KeyLinkBetaApi.java @@ -41,7 +41,10 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -77,6 +80,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -93,11 +118,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SigningKeyDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SigningKeyDto>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createSigningKey( - CreateSigningKeyDto createSigningKeyDto, String idempotencyKey) throws ApiException { + CreateSigningKeyDto createSigningKeyDto, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createSigningKeyRequestBuilder(createSigningKeyDto, idempotencyKey); @@ -127,7 +152,15 @@ public CompletableFuture> createSigningKey( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -173,12 +206,11 @@ private HttpRequest.Builder createSigningKeyRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<CreateValidationKeyResponseDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CreateValidationKeyResponseDto>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createValidationKey( - CreateValidationKeyDto createValidationKeyDto, String idempotencyKey) - throws ApiException { + CreateValidationKeyDto createValidationKeyDto, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createValidationKeyRequestBuilder(createValidationKeyDto, idempotencyKey); @@ -209,7 +241,17 @@ public CompletableFuture> createVali } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -256,11 +298,11 @@ private HttpRequest.Builder createValidationKeyRequestBuilder( * * @param modifyValidationKeyDto (required) * @param keyId The unique identifier for the validation key provided by Fireblocks (required) - * @return CompletableFuture<ApiResponse<ValidationKeyDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ValidationKeyDto>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> disableValidationKey( - ModifyValidationKeyDto modifyValidationKeyDto, String keyId) throws ApiException { + ModifyValidationKeyDto modifyValidationKeyDto, String keyId) { try { HttpRequest.Builder localVarRequestBuilder = disableValidationKeyRequestBuilder(modifyValidationKeyDto, keyId); @@ -291,7 +333,15 @@ public CompletableFuture> disableValidationKey( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -335,11 +385,10 @@ private HttpRequest.Builder disableValidationKeyRequestBuilder( * specified `keyId`. * * @param keyId The unique identifier for the signing key provided by Fireblocks (required) - * @return CompletableFuture<ApiResponse<SigningKeyDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SigningKeyDto>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getSigningKey(String keyId) - throws ApiException { + public CompletableFuture> getSigningKey(String keyId) { try { HttpRequest.Builder localVarRequestBuilder = getSigningKeyRequestBuilder(keyId); return memberVarHttpClient @@ -368,7 +417,15 @@ public CompletableFuture> getSigningKey(String keyId) } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -412,8 +469,8 @@ private HttpRequest.Builder getSigningKeyRequestBuilder(String keyId) throws Api * @param isAssigned Return keys that are assigned to a vault account (optional) * @param keyPrefix A case-insensitive prefix filter that matches records where either keyId or * signingDeviceKeyID starts with the specified value. (optional) - * @return CompletableFuture<ApiResponse<GetSigningKeyResponseDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetSigningKeyResponseDto>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getSigningKeysList( String pageCursor, @@ -426,8 +483,7 @@ public CompletableFuture> getSigningKeysLi Boolean enabled, Boolean available, Boolean isAssigned, - String keyPrefix) - throws ApiException { + String keyPrefix) { try { HttpRequest.Builder localVarRequestBuilder = getSigningKeysListRequestBuilder( @@ -469,7 +525,17 @@ public CompletableFuture> getSigningKeysLi } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -547,11 +613,10 @@ private HttpRequest.Builder getSigningKeysListRequestBuilder( * by the specified `keyId`. * * @param keyId (required) - * @return CompletableFuture<ApiResponse<ValidationKeyDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ValidationKeyDto>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getValidationKey(String keyId) - throws ApiException { + public CompletableFuture> getValidationKey(String keyId) { try { HttpRequest.Builder localVarRequestBuilder = getValidationKeyRequestBuilder(keyId); return memberVarHttpClient @@ -580,7 +645,15 @@ public CompletableFuture> getValidationKey(String } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -615,12 +688,11 @@ private HttpRequest.Builder getValidationKeyRequestBuilder(String keyId) throws * @param pageSize Amount of results to return in the next page (optional, default to 10) * @param sortBy Field(s) to use for sorting (optional, default to createdAt) * @param order Is the order ascending or descending (optional, default to ASC) - * @return CompletableFuture<ApiResponse<GetValidationKeyResponseDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetValidationKeyResponseDto>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getValidationKeysList( - String pageCursor, BigDecimal pageSize, String sortBy, String order) - throws ApiException { + String pageCursor, BigDecimal pageSize, String sortBy, String order) { try { HttpRequest.Builder localVarRequestBuilder = getValidationKeysListRequestBuilder(pageCursor, pageSize, sortBy, order); @@ -651,7 +723,17 @@ public CompletableFuture> getValidation } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -707,12 +789,11 @@ private HttpRequest.Builder getValidationKeysListRequestBuilder( * * @param modifySigningKeyAgentIdDto (required) * @param keyId The unique identifier for the signing key provided by Fireblocks (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> setAgentId( - ModifySigningKeyAgentIdDto modifySigningKeyAgentIdDto, String keyId) - throws ApiException { + ModifySigningKeyAgentIdDto modifySigningKeyAgentIdDto, String keyId) { try { HttpRequest.Builder localVarRequestBuilder = setAgentIdRequestBuilder(modifySigningKeyAgentIdDto, keyId); @@ -732,7 +813,14 @@ public CompletableFuture> setAgentId( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -778,11 +866,11 @@ private HttpRequest.Builder setAgentIdRequestBuilder( * * @param modifySigningKeyDto (required) * @param keyId The unique identifier for the signing key provided by Fireblocks (required) - * @return CompletableFuture<ApiResponse<SigningKeyDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SigningKeyDto>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> updateSigningKey( - ModifySigningKeyDto modifySigningKeyDto, String keyId) throws ApiException { + ModifySigningKeyDto modifySigningKeyDto, String keyId) { try { HttpRequest.Builder localVarRequestBuilder = updateSigningKeyRequestBuilder(modifySigningKeyDto, keyId); @@ -812,7 +900,15 @@ public CompletableFuture> updateSigningKey( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/KeysBetaApi.java b/src/main/java/com/fireblocks/sdk/api/KeysBetaApi.java index 44e35a86..ff96e750 100644 --- a/src/main/java/com/fireblocks/sdk/api/KeysBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/KeysBetaApi.java @@ -27,7 +27,10 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -63,6 +66,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -75,10 +100,10 @@ private String formatExceptionMessage(String operationId, int statusCode, String * list of players associated with it is attached. **Note:** This endpoint is currently in beta * and might be subject to changes. * - * @return CompletableFuture<ApiResponse<GetMpcKeysResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetMpcKeysResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getMpcKeysList() throws ApiException { + public CompletableFuture> getMpcKeysList() { try { HttpRequest.Builder localVarRequestBuilder = getMpcKeysListRequestBuilder(); return memberVarHttpClient @@ -107,7 +132,15 @@ public CompletableFuture> getMpcKeysList() throw } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -138,11 +171,10 @@ private HttpRequest.Builder getMpcKeysListRequestBuilder() throws ApiException { * endpoint is currently in beta and might be subject to changes. * * @param userId The id for the user (required) - * @return CompletableFuture<ApiResponse<GetMpcKeysResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetMpcKeysResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getMpcKeysListByUser(String userId) - throws ApiException { + public CompletableFuture> getMpcKeysListByUser(String userId) { try { HttpRequest.Builder localVarRequestBuilder = getMpcKeysListByUserRequestBuilder(userId); return memberVarHttpClient @@ -172,7 +204,15 @@ public CompletableFuture> getMpcKeysListByUser(S } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java b/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java index 44db1677..1a3477cd 100644 --- a/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/NetworkConnectionsApi.java @@ -45,7 +45,10 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -81,6 +84,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -96,11 +121,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * * @param connectionId The ID of the network connection (required) * @param assetType The destination asset type (required) - * @return CompletableFuture<ApiResponse<ThirdPartyRouting>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ThirdPartyRouting>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> checkThirdPartyRouting( - String connectionId, String assetType) throws ApiException { + String connectionId, String assetType) { try { HttpRequest.Builder localVarRequestBuilder = checkThirdPartyRoutingRequestBuilder(connectionId, assetType); @@ -131,7 +156,15 @@ public CompletableFuture> checkThirdPartyRouting( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -184,11 +217,11 @@ private HttpRequest.Builder checkThirdPartyRoutingRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<NetworkConnectionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<NetworkConnectionResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createNetworkConnection( - NetworkConnection networkConnection, String idempotencyKey) throws ApiException { + NetworkConnection networkConnection, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createNetworkConnectionRequestBuilder(networkConnection, idempotencyKey); @@ -219,7 +252,17 @@ public CompletableFuture> createNetworkCo } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -262,12 +305,11 @@ private HttpRequest.Builder createNetworkConnectionRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<NetworkIdResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<NetworkIdResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createNetworkId( - CreateNetworkIdRequest createNetworkIdRequest, String idempotencyKey) - throws ApiException { + CreateNetworkIdRequest createNetworkIdRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createNetworkIdRequestBuilder(createNetworkIdRequest, idempotencyKey); @@ -297,7 +339,15 @@ public CompletableFuture> createNetworkId( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -340,11 +390,11 @@ private HttpRequest.Builder createNetworkIdRequestBuilder( * connection ID. * * @param connectionId The ID of the network connection to delete (required) - * @return CompletableFuture<ApiResponse<DeleteNetworkConnectionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<DeleteNetworkConnectionResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> deleteNetworkConnection( - String connectionId) throws ApiException { + String connectionId) { try { HttpRequest.Builder localVarRequestBuilder = deleteNetworkConnectionRequestBuilder(connectionId); @@ -375,7 +425,17 @@ public CompletableFuture> deleteNet } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -409,11 +469,11 @@ private HttpRequest.Builder deleteNetworkConnectionRequestBuilder(String connect * Delete specific network ID. Deletes a network by its ID. * * @param networkId The ID of the network (required) - * @return CompletableFuture<ApiResponse<DeleteNetworkIdResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<DeleteNetworkIdResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> deleteNetworkId(String networkId) - throws ApiException { + public CompletableFuture> deleteNetworkId( + String networkId) { try { HttpRequest.Builder localVarRequestBuilder = deleteNetworkIdRequestBuilder(networkId); return memberVarHttpClient @@ -442,7 +502,17 @@ public CompletableFuture> deleteNetworkId(S } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -475,11 +545,11 @@ private HttpRequest.Builder deleteNetworkIdRequestBuilder(String networkId) * Get a network connection Gets a network connection by ID. * * @param connectionId The ID of the connection (required) - * @return CompletableFuture<ApiResponse<NetworkConnectionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<NetworkConnectionResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getNetwork(String connectionId) - throws ApiException { + public CompletableFuture> getNetwork( + String connectionId) { try { HttpRequest.Builder localVarRequestBuilder = getNetworkRequestBuilder(connectionId); return memberVarHttpClient @@ -508,7 +578,17 @@ public CompletableFuture> getNetwork(Stri } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -548,11 +628,10 @@ private HttpRequest.Builder getNetworkRequestBuilder(String connectionId) throws * Workspace Presets: - Network Profile Crypto → **Custom** - Network Profile FIAT → **None** - * Network Connection Crypto → **Default** - Network Connection FIAT → **Default** * - * @return CompletableFuture<ApiResponse<List<NetworkConnectionResponse>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<NetworkConnectionResponse>>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture>> getNetworkConnections() - throws ApiException { + public CompletableFuture>> getNetworkConnections() { try { HttpRequest.Builder localVarRequestBuilder = getNetworkConnectionsRequestBuilder(); return memberVarHttpClient @@ -583,7 +662,17 @@ public CompletableFuture>> getNetwor } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -612,11 +701,10 @@ private HttpRequest.Builder getNetworkConnectionsRequestBuilder() throws ApiExce * Return specific network ID. Returns specific network ID. * * @param networkId The ID of the network (required) - * @return CompletableFuture<ApiResponse<NetworkIdResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<NetworkIdResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getNetworkId(String networkId) - throws ApiException { + public CompletableFuture> getNetworkId(String networkId) { try { HttpRequest.Builder localVarRequestBuilder = getNetworkIdRequestBuilder(networkId); return memberVarHttpClient @@ -645,7 +733,15 @@ public CompletableFuture> getNetworkId(String net } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -676,13 +772,12 @@ private HttpRequest.Builder getNetworkIdRequestBuilder(String networkId) throws /** * Get all network IDs Retrieves a list of all local and discoverable remote network IDs. * - * @return CompletableFuture<ApiResponse<List<NetworkIdResponse>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<NetworkIdResponse>>>, which + * completes exceptionally with an {@link ApiException} if the API call fails * @deprecated */ @Deprecated - public CompletableFuture>> getNetworkIds() - throws ApiException { + public CompletableFuture>> getNetworkIds() { try { HttpRequest.Builder localVarRequestBuilder = getNetworkIdsRequestBuilder(); return memberVarHttpClient @@ -712,7 +807,17 @@ public CompletableFuture>> getNetworkIds() } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -741,11 +846,10 @@ private HttpRequest.Builder getNetworkIdsRequestBuilder() throws ApiException { * Return all enabled routing policy asset groups Returns all enabled routing policy asset * groups * - * @return CompletableFuture<ApiResponse<List<String>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<String>>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture>> getRoutingPolicyAssetGroups() - throws ApiException { + public CompletableFuture>> getRoutingPolicyAssetGroups() { try { HttpRequest.Builder localVarRequestBuilder = getRoutingPolicyAssetGroupsRequestBuilder(); @@ -777,7 +881,15 @@ public CompletableFuture>> getRoutingPolicyAssetGroups( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -812,8 +924,8 @@ private HttpRequest.Builder getRoutingPolicyAssetGroupsRequestBuilder() throws A * @param excludeConnected Exclude connected networkIds. Optional, default false (optional) * @param pageCursor ID of the record after which to fetch $limit records (optional) * @param pageSize Number of records to fetch. By default, it is 50 (optional, default to 50) - * @return CompletableFuture<ApiResponse<SearchNetworkIdsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SearchNetworkIdsResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> searchNetworkIds( String search, @@ -821,8 +933,7 @@ public CompletableFuture> searchNetworkIds Boolean onlySelf, Boolean excludeConnected, String pageCursor, - BigDecimal pageSize) - throws ApiException { + BigDecimal pageSize) { try { HttpRequest.Builder localVarRequestBuilder = searchNetworkIdsRequestBuilder( @@ -853,7 +964,17 @@ public CompletableFuture> searchNetworkIds } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -918,12 +1039,12 @@ private HttpRequest.Builder searchNetworkIdsRequestBuilder( * * @param setNetworkIdDiscoverabilityRequest (required) * @param networkId The ID of the network (required) - * @return CompletableFuture<ApiResponse<SetNetworkIdResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SetNetworkIdResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setNetworkIdDiscoverability( - SetNetworkIdDiscoverabilityRequest setNetworkIdDiscoverabilityRequest, String networkId) - throws ApiException { + SetNetworkIdDiscoverabilityRequest setNetworkIdDiscoverabilityRequest, + String networkId) { try { HttpRequest.Builder localVarRequestBuilder = setNetworkIdDiscoverabilityRequestBuilder( @@ -956,7 +1077,17 @@ public CompletableFuture> setNetworkIdDiscover } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1004,11 +1135,11 @@ private HttpRequest.Builder setNetworkIdDiscoverabilityRequestBuilder( * * @param setNetworkIdNameRequest (required) * @param networkId The ID of the network (required) - * @return CompletableFuture<ApiResponse<SetNetworkIdResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SetNetworkIdResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setNetworkIdName( - SetNetworkIdNameRequest setNetworkIdNameRequest, String networkId) throws ApiException { + SetNetworkIdNameRequest setNetworkIdNameRequest, String networkId) { try { HttpRequest.Builder localVarRequestBuilder = setNetworkIdNameRequestBuilder(setNetworkIdNameRequest, networkId); @@ -1038,7 +1169,17 @@ public CompletableFuture> setNetworkIdName( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1082,12 +1223,11 @@ private HttpRequest.Builder setNetworkIdNameRequestBuilder( * * @param networkId The ID of the network (required) * @param setNetworkIdRoutingPolicyRequest (optional) - * @return CompletableFuture<ApiResponse<SetNetworkIdResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SetNetworkIdResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setNetworkIdRoutingPolicy( - String networkId, SetNetworkIdRoutingPolicyRequest setNetworkIdRoutingPolicyRequest) - throws ApiException { + String networkId, SetNetworkIdRoutingPolicyRequest setNetworkIdRoutingPolicyRequest) { try { HttpRequest.Builder localVarRequestBuilder = setNetworkIdRoutingPolicyRequestBuilder( @@ -1119,7 +1259,17 @@ public CompletableFuture> setNetworkIdRoutingP } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1164,12 +1314,11 @@ private HttpRequest.Builder setNetworkIdRoutingPolicyRequestBuilder( * * @param connectionId The ID of the network connection (required) * @param setRoutingPolicyRequest (optional) - * @return CompletableFuture<ApiResponse<SetRoutingPolicyResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SetRoutingPolicyResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setRoutingPolicy( - String connectionId, SetRoutingPolicyRequest setRoutingPolicyRequest) - throws ApiException { + String connectionId, SetRoutingPolicyRequest setRoutingPolicyRequest) { try { HttpRequest.Builder localVarRequestBuilder = setRoutingPolicyRequestBuilder(connectionId, setRoutingPolicyRequest); @@ -1199,7 +1348,17 @@ public CompletableFuture> setRoutingPolicy } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/NftsApi.java b/src/main/java/com/fireblocks/sdk/api/NftsApi.java index 06d9989b..3d35980f 100644 --- a/src/main/java/com/fireblocks/sdk/api/NftsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/NftsApi.java @@ -40,7 +40,10 @@ import java.util.List; import java.util.StringJoiner; import java.util.UUID; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -76,6 +79,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -87,10 +112,10 @@ private String formatExceptionMessage(String operationId, int statusCode, String * List token data by ID Returns the requested token data. * * @param id NFT ID (required) - * @return CompletableFuture<ApiResponse<TokenResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TokenResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getNFT(String id) throws ApiException { + public CompletableFuture> getNFT(String id) { try { HttpRequest.Builder localVarRequestBuilder = getNFTRequestBuilder(id); return memberVarHttpClient @@ -119,7 +144,15 @@ public CompletableFuture> getNFT(String id) throws Ap } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -157,12 +190,11 @@ private HttpRequest.Builder getNFTRequestBuilder(String id) throws ApiException * (optional * @param order Order direction, it can be `ASC` for ascending or `DESC` for * descending (optional, default to ASC) - * @return CompletableFuture<ApiResponse<GetNFTsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetNFTsResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getNFTs( - String ids, String pageCursor, BigDecimal pageSize, List sort, String order) - throws ApiException { + String ids, String pageCursor, BigDecimal pageSize, List sort, String order) { try { HttpRequest.Builder localVarRequestBuilder = getNFTsRequestBuilder(ids, pageCursor, pageSize, sort, order); @@ -192,7 +224,15 @@ public CompletableFuture> getNFTs( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -272,8 +312,8 @@ private HttpRequest.Builder getNFTsRequestBuilder( * name and id within the contract/collection, collection name, blockchain descriptor and * name. (optional) * @param spam Token ownership spam status. (optional) - * @return CompletableFuture<ApiResponse<GetOwnershipTokensResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetOwnershipTokensResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getOwnershipTokens( String blockchainDescriptor, @@ -289,8 +329,7 @@ public CompletableFuture> getOwnershipTo String order, String status, String search, - String spam) - throws ApiException { + String spam) { try { HttpRequest.Builder localVarRequestBuilder = getOwnershipTokensRequestBuilder( @@ -335,7 +374,17 @@ public CompletableFuture> getOwnershipTo } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -433,8 +482,8 @@ private HttpRequest.Builder getOwnershipTokensRequestBuilder( * @param order Order direction, it can be `ASC` for ascending or `DESC` for * descending (optional, default to ASC) * @param status Token ownership status (optional, default to LISTED) - * @return CompletableFuture<ApiResponse<ListOwnedCollectionsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ListOwnedCollectionsResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> listOwnedCollections( String ncwId, @@ -444,8 +493,7 @@ public CompletableFuture> listOwnedCol BigDecimal pageSize, List sort, String order, - String status) - throws ApiException { + String status) { try { HttpRequest.Builder localVarRequestBuilder = listOwnedCollectionsRequestBuilder( @@ -477,7 +525,17 @@ public CompletableFuture> listOwnedCol } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -557,8 +615,8 @@ private HttpRequest.Builder listOwnedCollectionsRequestBuilder( * @param status Token ownership status (optional, default to LISTED) * @param search Search owned tokens by token name (optional) * @param spam Token ownership spam status. (optional) - * @return CompletableFuture<ApiResponse<ListOwnedTokensResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ListOwnedTokensResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> listOwnedTokens( String ncwId, @@ -569,8 +627,7 @@ public CompletableFuture> listOwnedTokens( String order, String status, String search, - String spam) - throws ApiException { + String spam) { try { HttpRequest.Builder localVarRequestBuilder = listOwnedTokensRequestBuilder( @@ -609,7 +666,17 @@ public CompletableFuture> listOwnedTokens( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -685,11 +752,11 @@ private HttpRequest.Builder listOwnedTokensRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> refreshNFTMetadata( - String id, UUID xEndUserWalletId, String idempotencyKey) throws ApiException { + String id, UUID xEndUserWalletId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = refreshNFTMetadataRequestBuilder(id, xEndUserWalletId, idempotencyKey); @@ -710,7 +777,14 @@ public CompletableFuture> refreshNFTMetadata( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -755,12 +829,11 @@ private HttpRequest.Builder refreshNFTMetadataRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> updateOwnershipTokens( - String blockchainDescriptor, String vaultAccountId, String idempotencyKey) - throws ApiException { + String blockchainDescriptor, String vaultAccountId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateOwnershipTokensRequestBuilder( @@ -782,7 +855,14 @@ public CompletableFuture> updateOwnershipTokens( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -845,15 +925,14 @@ private HttpRequest.Builder updateOwnershipTokensRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> updateTokenOwnershipStatus( UpdateTokenOwnershipStatusDto updateTokenOwnershipStatusDto, String id, UUID xEndUserWalletId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateTokenOwnershipStatusRequestBuilder( @@ -876,7 +955,14 @@ public CompletableFuture> updateTokenOwnershipStatus( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -937,14 +1023,13 @@ private HttpRequest.Builder updateTokenOwnershipStatusRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> updateTokensOwnershipSpam( List tokenOwnershipSpamUpdatePayload, UUID xEndUserWalletId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateTokensOwnershipSpamRequestBuilder( @@ -966,7 +1051,14 @@ public CompletableFuture> updateTokensOwnershipSpam( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1022,14 +1114,13 @@ private HttpRequest.Builder updateTokensOwnershipSpamRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> updateTokensOwnershipStatus( List tokenOwnershipStatusUpdatePayload, UUID xEndUserWalletId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateTokensOwnershipStatusRequestBuilder( @@ -1052,7 +1143,14 @@ public CompletableFuture> updateTokensOwnershipStatus( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/OffExchangesApi.java b/src/main/java/com/fireblocks/sdk/api/OffExchangesApi.java index cd2c5925..774c2310 100644 --- a/src/main/java/com/fireblocks/sdk/api/OffExchangesApi.java +++ b/src/main/java/com/fireblocks/sdk/api/OffExchangesApi.java @@ -37,7 +37,10 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -73,6 +76,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -89,12 +114,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<CreateTransactionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CreateTransactionResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> addOffExchange( - AddCollateralRequestBody addCollateralRequestBody, String idempotencyKey) - throws ApiException { + AddCollateralRequestBody addCollateralRequestBody, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = addOffExchangeRequestBuilder(addCollateralRequestBody, idempotencyKey); @@ -124,7 +148,17 @@ public CompletableFuture> addOffExchange( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -170,11 +204,11 @@ private HttpRequest.Builder addOffExchangeRequestBuilder( * * @param mainExchangeAccountId The id of the main exchange account for which the requested * collateral account is associated with (required) - * @return CompletableFuture<ApiResponse<ExchangeAccount>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ExchangeAccount>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getOffExchangeCollateralAccounts( - String mainExchangeAccountId) throws ApiException { + String mainExchangeAccountId) { try { HttpRequest.Builder localVarRequestBuilder = getOffExchangeCollateralAccountsRequestBuilder(mainExchangeAccountId); @@ -206,7 +240,15 @@ public CompletableFuture> getOffExchangeCollateralA } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -245,11 +287,11 @@ private HttpRequest.Builder getOffExchangeCollateralAccountsRequestBuilder( * Non-Signing Admin, Signer, Approver, Editor. * * @param mainExchangeAccountId (required) - * @return CompletableFuture<ApiResponse<ExchangeSettlementTransactionsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ExchangeSettlementTransactionsResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getOffExchangeSettlementTransactions(String mainExchangeAccountId) throws ApiException { + getOffExchangeSettlementTransactions(String mainExchangeAccountId) { try { HttpRequest.Builder localVarRequestBuilder = getOffExchangeSettlementTransactionsRequestBuilder(mainExchangeAccountId); @@ -281,7 +323,18 @@ private HttpRequest.Builder getOffExchangeCollateralAccountsRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -337,12 +390,11 @@ private HttpRequest.Builder getOffExchangeSettlementTransactionsRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<CreateTransactionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CreateTransactionResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> removeOffExchange( - RemoveCollateralRequestBody removeCollateralRequestBody, String idempotencyKey) - throws ApiException { + RemoveCollateralRequestBody removeCollateralRequestBody, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = removeOffExchangeRequestBuilder(removeCollateralRequestBody, idempotencyKey); @@ -372,7 +424,17 @@ public CompletableFuture> removeOffExchan } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -419,12 +481,11 @@ private HttpRequest.Builder removeOffExchangeRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SettlementResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SettlementResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> settleOffExchangeTrades( - SettlementRequestBody settlementRequestBody, String idempotencyKey) - throws ApiException { + SettlementRequestBody settlementRequestBody, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = settleOffExchangeTradesRequestBuilder(settlementRequestBody, idempotencyKey); @@ -455,7 +516,15 @@ public CompletableFuture> settleOffExchangeTrade } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/OnchainDataApi.java b/src/main/java/com/fireblocks/sdk/api/OnchainDataApi.java index 4cb7c56b..a309fa2e 100644 --- a/src/main/java/com/fireblocks/sdk/api/OnchainDataApi.java +++ b/src/main/java/com/fireblocks/sdk/api/OnchainDataApi.java @@ -40,7 +40,10 @@ import java.util.List; import java.util.Map; import java.util.StringJoiner; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -76,6 +79,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -95,8 +120,8 @@ private String formatExceptionMessage(String operationId, int statusCode, String * items (optional) * @param sortBy Sorting field (enum). (optional, default to dateAdded) * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) - * @return CompletableFuture<ApiResponse<AccessRegistryCurrentStateResponse2>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AccessRegistryCurrentStateResponse2>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getAccessRegistryCurrentState( @@ -105,8 +130,7 @@ private String formatExceptionMessage(String operationId, int statusCode, String String pageCursor, Integer pageSize, String sortBy, - String order) - throws ApiException { + String order) { try { HttpRequest.Builder localVarRequestBuilder = getAccessRegistryCurrentStateRequestBuilder( @@ -144,7 +168,18 @@ private String formatExceptionMessage(String operationId, int statusCode, String } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -213,11 +248,11 @@ private HttpRequest.Builder getAccessRegistryCurrentStateRequestBuilder( * * @param baseAssetId The blockchain base assetId (required) * @param accessRegistryAddress The access registry address (required) - * @return CompletableFuture<ApiResponse<AccessRegistrySummaryResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AccessRegistrySummaryResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getAccessRegistrySummary( - String baseAssetId, String accessRegistryAddress) throws ApiException { + String baseAssetId, String accessRegistryAddress) { try { HttpRequest.Builder localVarRequestBuilder = getAccessRegistrySummaryRequestBuilder(baseAssetId, accessRegistryAddress); @@ -248,7 +283,17 @@ public CompletableFuture> getAccessRe } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -289,11 +334,11 @@ private HttpRequest.Builder getAccessRegistrySummaryRequestBuilder( * * @param baseAssetId The blockchain base assetId (required) * @param contractAddress The contract address (required) - * @return CompletableFuture<ApiResponse<Map<String, RoleDetails2>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Map<String, RoleDetails2>>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture>> getActiveRolesForContract( - String baseAssetId, String contractAddress) throws ApiException { + String baseAssetId, String contractAddress) { try { HttpRequest.Builder localVarRequestBuilder = getActiveRolesForContractRequestBuilder(baseAssetId, contractAddress); @@ -326,7 +371,17 @@ public CompletableFuture>> getActiveRolesF } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -378,8 +433,8 @@ private HttpRequest.Builder getActiveRolesForContractRequestBuilder( * @param sortBy Sorting field (enum). Sorting only supported by 'blockTimestamp' * (optional, default to blockTimestamp) * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) - * @return CompletableFuture<ApiResponse<BalanceHistoryPagedResponse2>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<BalanceHistoryPagedResponse2>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getContractBalanceHistory( String baseAssetId, @@ -391,8 +446,7 @@ public CompletableFuture> getContractB String pageCursor, Integer pageSize, String sortBy, - String order) - throws ApiException { + String order) { try { HttpRequest.Builder localVarRequestBuilder = getContractBalanceHistoryRequestBuilder( @@ -433,7 +487,17 @@ public CompletableFuture> getContractB } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -516,11 +580,11 @@ private HttpRequest.Builder getContractBalanceHistoryRequestBuilder( * * @param baseAssetId The blockchain base assetId (required) * @param contractAddress The contract address (required) - * @return CompletableFuture<ApiResponse<TokenContractSummaryResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TokenContractSummaryResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getContractBalancesSummary( - String baseAssetId, String contractAddress) throws ApiException { + String baseAssetId, String contractAddress) { try { HttpRequest.Builder localVarRequestBuilder = getContractBalancesSummaryRequestBuilder(baseAssetId, contractAddress); @@ -552,7 +616,17 @@ public CompletableFuture> getContractB } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -602,8 +676,8 @@ private HttpRequest.Builder getContractBalancesSummaryRequestBuilder( * @param sortBy Sorting field (enum). Sorting only supported by 'blockTimestamp' * (optional, default to blockTimestamp) * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) - * @return CompletableFuture<ApiResponse<TotalSupplyPagedResponse2>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TotalSupplyPagedResponse2>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getContractTotalSupply( String baseAssetId, @@ -614,8 +688,7 @@ public CompletableFuture> getContractTota String pageCursor, Integer pageSize, String sortBy, - String order) - throws ApiException { + String order) { try { HttpRequest.Builder localVarRequestBuilder = getContractTotalSupplyRequestBuilder( @@ -655,7 +728,17 @@ public CompletableFuture> getContractTota } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -741,8 +824,8 @@ private HttpRequest.Builder getContractTotalSupplyRequestBuilder( * items (optional) * @param sortBy Sorting field for balances (optional, default to blockTimestamp) * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) - * @return CompletableFuture<ApiResponse<AddressBalancePagedResponse2>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AddressBalancePagedResponse2>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getLatestBalancesForContract( @@ -752,8 +835,7 @@ private HttpRequest.Builder getContractTotalSupplyRequestBuilder( String pageCursor, Integer pageSize, String sortBy, - String order) - throws ApiException { + String order) { try { HttpRequest.Builder localVarRequestBuilder = getLatestBalancesForContractRequestBuilder( @@ -792,7 +874,17 @@ private HttpRequest.Builder getContractTotalSupplyRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -871,8 +963,8 @@ private HttpRequest.Builder getLatestBalancesForContractRequestBuilder( * items (optional) * @param sortBy Sorting field (enum). (optional, default to blockTimestamp) * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) - * @return CompletableFuture<ApiResponse<OnchainTransactionsPagedResponse2>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<OnchainTransactionsPagedResponse2>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getOnchainTransactions( String baseAssetId, @@ -882,8 +974,7 @@ public CompletableFuture> getOnch String pageCursor, Integer pageSize, String sortBy, - String order) - throws ApiException { + String order) { try { HttpRequest.Builder localVarRequestBuilder = getOnchainTransactionsRequestBuilder( @@ -922,7 +1013,18 @@ public CompletableFuture> getOnch } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/OtaBetaApi.java b/src/main/java/com/fireblocks/sdk/api/OtaBetaApi.java index f5e44f51..079e5550 100644 --- a/src/main/java/com/fireblocks/sdk/api/OtaBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/OtaBetaApi.java @@ -29,7 +29,10 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -65,6 +68,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -75,10 +100,10 @@ private String formatExceptionMessage(String operationId, int statusCode, String /** * Returns current OTA status Returns current OTA status * - * @return CompletableFuture<ApiResponse<GetOtaStatusResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetOtaStatusResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getOtaStatus() throws ApiException { + public CompletableFuture> getOtaStatus() { try { HttpRequest.Builder localVarRequestBuilder = getOtaStatusRequestBuilder(); return memberVarHttpClient @@ -107,7 +132,17 @@ public CompletableFuture> getOtaStatus() throw } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -141,11 +176,11 @@ private HttpRequest.Builder getOtaStatusRequestBuilder() throws ApiException { * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SetOtaStatusResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SetOtaStatusResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setOtaStatus( - SetOtaStatusRequest setOtaStatusRequest, String idempotencyKey) throws ApiException { + SetOtaStatusRequest setOtaStatusRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setOtaStatusRequestBuilder(setOtaStatusRequest, idempotencyKey); @@ -175,7 +210,17 @@ public CompletableFuture> setOtaStatus( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/PaymentsPayoutApi.java b/src/main/java/com/fireblocks/sdk/api/PaymentsPayoutApi.java index 1263f713..6219d95a 100644 --- a/src/main/java/com/fireblocks/sdk/api/PaymentsPayoutApi.java +++ b/src/main/java/com/fireblocks/sdk/api/PaymentsPayoutApi.java @@ -29,7 +29,10 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -65,6 +68,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -91,11 +116,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<PayoutResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<PayoutResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createPayout( - CreatePayoutRequest createPayoutRequest, String idempotencyKey) throws ApiException { + CreatePayoutRequest createPayoutRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createPayoutRequestBuilder(createPayoutRequest, idempotencyKey); @@ -125,7 +150,15 @@ public CompletableFuture> createPayout( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -177,11 +210,11 @@ private HttpRequest.Builder createPayoutRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<DispatchPayoutResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<DispatchPayoutResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> executePayoutAction( - String payoutId, String idempotencyKey) throws ApiException { + String payoutId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = executePayoutActionRequestBuilder(payoutId, idempotencyKey); @@ -212,7 +245,17 @@ public CompletableFuture> executePayoutActio } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -254,11 +297,10 @@ private HttpRequest.Builder executePayoutActionRequestBuilder( * * @param payoutId the payout id received from the creation of the payout instruction set * (required) - * @return CompletableFuture<ApiResponse<PayoutResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<PayoutResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getPayout(String payoutId) - throws ApiException { + public CompletableFuture> getPayout(String payoutId) { try { HttpRequest.Builder localVarRequestBuilder = getPayoutRequestBuilder(payoutId); return memberVarHttpClient @@ -287,7 +329,15 @@ public CompletableFuture> getPayout(String payoutId) } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/PolicyEditorBetaApi.java b/src/main/java/com/fireblocks/sdk/api/PolicyEditorBetaApi.java index 4c061e87..113c1f57 100644 --- a/src/main/java/com/fireblocks/sdk/api/PolicyEditorBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/PolicyEditorBetaApi.java @@ -31,7 +31,10 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -67,6 +70,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -83,11 +108,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * Fireblocks TAP, please contact your Fireblocks Customer Success Manager or send an email to * CSM@fireblocks.com. * - * @return CompletableFuture<ApiResponse<LegacyPolicyAndValidationResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<LegacyPolicyAndValidationResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getActivePolicyLegacy() - throws ApiException { + public CompletableFuture> + getActivePolicyLegacy() { try { HttpRequest.Builder localVarRequestBuilder = getActivePolicyLegacyRequestBuilder(); return memberVarHttpClient @@ -117,7 +142,18 @@ public CompletableFuture> getActi } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -150,11 +186,10 @@ private HttpRequest.Builder getActivePolicyLegacyRequestBuilder() throws ApiExce * changes. If you want to participate and learn more about the Fireblocks TAP, please contact * your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. * - * @return CompletableFuture<ApiResponse<LegacyDraftReviewAndValidationResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<LegacyDraftReviewAndValidationResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getDraftLegacy() - throws ApiException { + public CompletableFuture> getDraftLegacy() { try { HttpRequest.Builder localVarRequestBuilder = getDraftLegacyRequestBuilder(); return memberVarHttpClient @@ -183,7 +218,18 @@ public CompletableFuture> ge } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -221,12 +267,11 @@ private HttpRequest.Builder getDraftLegacyRequestBuilder() throws ApiException { * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<LegacyPublishResult>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<LegacyPublishResult>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> publishDraftLegacy( - LegacyPublishDraftRequest legacyPublishDraftRequest, String idempotencyKey) - throws ApiException { + LegacyPublishDraftRequest legacyPublishDraftRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = publishDraftLegacyRequestBuilder(legacyPublishDraftRequest, idempotencyKey); @@ -257,7 +302,15 @@ public CompletableFuture> publishDraftLegacy( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -308,11 +361,11 @@ private HttpRequest.Builder publishDraftLegacyRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<LegacyPublishResult>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<LegacyPublishResult>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> publishPolicyRules( - LegacyPolicyRules legacyPolicyRules, String idempotencyKey) throws ApiException { + LegacyPolicyRules legacyPolicyRules, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = publishPolicyRulesRequestBuilder(legacyPolicyRules, idempotencyKey); @@ -343,7 +396,15 @@ public CompletableFuture> publishPolicyRules( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -394,11 +455,11 @@ private HttpRequest.Builder publishPolicyRulesRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<LegacyDraftReviewAndValidationResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<LegacyDraftReviewAndValidationResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> updateDraftLegacy( - LegacyPolicyRules legacyPolicyRules, String idempotencyKey) throws ApiException { + LegacyPolicyRules legacyPolicyRules, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateDraftLegacyRequestBuilder(legacyPolicyRules, idempotencyKey); @@ -428,7 +489,18 @@ public CompletableFuture> up } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/PolicyEditorV2Api.java b/src/main/java/com/fireblocks/sdk/api/PolicyEditorV2Api.java index 34471d37..bac6dfe9 100644 --- a/src/main/java/com/fireblocks/sdk/api/PolicyEditorV2Api.java +++ b/src/main/java/com/fireblocks/sdk/api/PolicyEditorV2Api.java @@ -36,7 +36,10 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -72,6 +75,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -86,11 +111,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param policyType The policy type(s) to retrieve. Can be a single type or multiple types by * repeating the parameter (e.g., ?policyType=TRANSFER&policyType=MINT). * (required) - * @return CompletableFuture<ApiResponse<PolicyAndValidationResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<PolicyAndValidationResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getActivePolicy( - PolicyType policyType) throws ApiException { + PolicyType policyType) { try { HttpRequest.Builder localVarRequestBuilder = getActivePolicyRequestBuilder(policyType); return memberVarHttpClient @@ -119,7 +144,17 @@ public CompletableFuture> getActivePoli } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -169,11 +204,11 @@ private HttpRequest.Builder getActivePolicyRequestBuilder(PolicyType policyType) * @param policyType The policy type(s) to retrieve. Can be a single type or multiple types by * repeating the parameter (e.g., ?policyType=TRANSFER&policyType=MINT). * (required) - * @return CompletableFuture<ApiResponse<DraftReviewAndValidationResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<DraftReviewAndValidationResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getDraft( - PolicyType policyType) throws ApiException { + PolicyType policyType) { try { HttpRequest.Builder localVarRequestBuilder = getDraftRequestBuilder(policyType); return memberVarHttpClient @@ -202,7 +237,17 @@ public CompletableFuture> getDraft } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -259,11 +304,11 @@ private HttpRequest.Builder getDraftRequestBuilder(PolicyType policyType) throws * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<PublishResult>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<PublishResult>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> publishDraft( - PublishDraftRequest publishDraftRequest, String idempotencyKey) throws ApiException { + PublishDraftRequest publishDraftRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = publishDraftRequestBuilder(publishDraftRequest, idempotencyKey); @@ -293,7 +338,15 @@ public CompletableFuture> publishDraft( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -344,11 +397,11 @@ private HttpRequest.Builder publishDraftRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<DraftReviewAndValidationResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<DraftReviewAndValidationResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> updateDraft( - UpdateDraftRequest updateDraftRequest, String idempotencyKey) throws ApiException { + UpdateDraftRequest updateDraftRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateDraftRequestBuilder(updateDraftRequest, idempotencyKey); @@ -378,7 +431,17 @@ public CompletableFuture> updateDr } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/PolicyEditorV2BetaApi.java b/src/main/java/com/fireblocks/sdk/api/PolicyEditorV2BetaApi.java index eefee87b..0abdc4f9 100644 --- a/src/main/java/com/fireblocks/sdk/api/PolicyEditorV2BetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/PolicyEditorV2BetaApi.java @@ -28,7 +28,10 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -64,6 +67,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -79,12 +104,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<PolicyRuleQuotaResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<PolicyRuleQuotaResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getPolicyRuleQuota( - PolicyRuleQuotaRequest policyRuleQuotaRequest, String idempotencyKey) - throws ApiException { + PolicyRuleQuotaRequest policyRuleQuotaRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = getPolicyRuleQuotaRequestBuilder(policyRuleQuotaRequest, idempotencyKey); @@ -115,7 +139,17 @@ public CompletableFuture> getPolicyRuleQuot } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/ReportsBetaApi.java b/src/main/java/com/fireblocks/sdk/api/ReportsBetaApi.java index 072168b7..41de3fce 100644 --- a/src/main/java/com/fireblocks/sdk/api/ReportsBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ReportsBetaApi.java @@ -36,7 +36,10 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -72,6 +75,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -90,11 +115,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<CreateReportResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CreateReportResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createReport( - CreateAddressesReportRequest body, String idempotencyKey) throws ApiException { + CreateAddressesReportRequest body, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createReportRequestBuilder(body, idempotencyKey); @@ -124,7 +149,17 @@ public CompletableFuture> createReport( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -171,11 +206,10 @@ private HttpRequest.Builder createReportRequestBuilder( * Permission: Viewer and above. * * @param reportId The unique identifier of the report job (required) - * @return CompletableFuture<ApiResponse<ReportJobResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ReportJobResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getReport(String reportId) - throws ApiException { + public CompletableFuture> getReport(String reportId) { try { HttpRequest.Builder localVarRequestBuilder = getReportRequestBuilder(reportId); return memberVarHttpClient @@ -204,7 +238,15 @@ public CompletableFuture> getReport(String report } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -247,8 +289,8 @@ private HttpRequest.Builder getReportRequestBuilder(String reportId) throws ApiE * (e.g., ?status=QUEUED&status=PROCESSING). (optional * @param reportType Filter by report type. Repeat the parameter to filter on multiple types. * (optional - * @return CompletableFuture<ApiResponse<ReportListResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ReportListResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> listReports( String pageCursor, @@ -256,8 +298,7 @@ public CompletableFuture> listReports( String sortBy, String order, List status, - List reportType) - throws ApiException { + List reportType) { try { HttpRequest.Builder localVarRequestBuilder = listReportsRequestBuilder( @@ -288,7 +329,15 @@ public CompletableFuture> listReports( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/ResetDeviceApi.java b/src/main/java/com/fireblocks/sdk/api/ResetDeviceApi.java index 9cace92a..77b0456e 100644 --- a/src/main/java/com/fireblocks/sdk/api/ResetDeviceApi.java +++ b/src/main/java/com/fireblocks/sdk/api/ResetDeviceApi.java @@ -24,7 +24,10 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -60,6 +63,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -76,11 +101,10 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ - public CompletableFuture> resetDevice(String id, String idempotencyKey) - throws ApiException { + public CompletableFuture> resetDevice(String id, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = resetDeviceRequestBuilder(id, idempotencyKey); @@ -100,7 +124,14 @@ public CompletableFuture> resetDevice(String id, String idempo localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/SecurityPostureManagementApi.java b/src/main/java/com/fireblocks/sdk/api/SecurityPostureManagementApi.java new file mode 100644 index 00000000..8cb85c51 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/api/SecurityPostureManagementApi.java @@ -0,0 +1,208 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * 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.fireblocks.sdk.api; + + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.Pair; +import com.fireblocks.sdk.model.GetFindingsExternalResponse; +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.StringJoiner; +import java.util.concurrent.CancellationException; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; +import java.util.function.Consumer; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class SecurityPostureManagementApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public SecurityPostureManagementApi() { + this(new ApiClient()); + } + + public SecurityPostureManagementApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + private ApiException getApiException(String operationId, HttpResponse response) { + String message = + formatExceptionMessage(operationId, response.statusCode(), response.body()); + return new ApiException( + response.statusCode(), message, response.headers(), response.body()); + } + + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get FSPM security findings Returns a paginated list of FSPM security findings for the + * workspace. Endpoint Permissions: Security Admin, Security Auditor. + * + * @param pageCursor Cursor indicating the page position. Omit to fetch the first page. + * (optional) + * @param pageSize Number of results per page (optional, default to 10) + * @param severity Filter by severity level (optional) + * @param category Filter by finding category (optional) + * @param status Filter by finding status (optional) + * @return CompletableFuture<ApiResponse<GetFindingsExternalResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails + */ + public CompletableFuture> getSecurityFindings( + String pageCursor, Integer pageSize, String severity, String category, String status) { + try { + HttpRequest.Builder localVarRequestBuilder = + getSecurityFindingsRequestBuilder( + pageCursor, pageSize, severity, category, status); + return memberVarHttpClient + .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) + .thenComposeAsync( + localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode() / 100 != 2) { + return CompletableFuture.failedFuture( + getApiException( + "getSecurityFindings", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + GetFindingsExternalResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getSecurityFindingsRequestBuilder( + String pageCursor, Integer pageSize, String severity, String category, String status) + throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/security/fspm/findings"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "severity"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("severity", severity)); + localVarQueryParameterBaseName = "category"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("category", category)); + localVarQueryParameterBaseName = "status"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("status", status)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java b/src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java index f60e46c3..98573440 100644 --- a/src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java +++ b/src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java @@ -48,7 +48,10 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -84,6 +87,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -101,15 +126,14 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SmartTransferTicketTermResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SmartTransferTicketTermResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> approveDvPTicketTerm( SmartTransferApproveTerm smartTransferApproveTerm, String ticketId, String termId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = approveDvPTicketTermRequestBuilder( @@ -141,7 +165,17 @@ public CompletableFuture> approveDv } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -197,11 +231,11 @@ private HttpRequest.Builder approveDvPTicketTermRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SmartTransferTicketResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SmartTransferTicketResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> cancelTicket( - String ticketId, String idempotencyKey) throws ApiException { + String ticketId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = cancelTicketRequestBuilder(ticketId, idempotencyKey); @@ -231,7 +265,17 @@ public CompletableFuture> cancelTicket( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -274,12 +318,11 @@ private HttpRequest.Builder cancelTicketRequestBuilder(String ticketId, String i * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SmartTransferTicketResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SmartTransferTicketResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createTicket( - SmartTransferCreateTicket smartTransferCreateTicket, String idempotencyKey) - throws ApiException { + SmartTransferCreateTicket smartTransferCreateTicket, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createTicketRequestBuilder(smartTransferCreateTicket, idempotencyKey); @@ -309,7 +352,17 @@ public CompletableFuture> createTicket( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -360,14 +413,13 @@ private HttpRequest.Builder createTicketRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SmartTransferTicketTermResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SmartTransferTicketTermResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createTicketTerm( SmartTransferCreateTicketTerm smartTransferCreateTicketTerm, String ticketId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createTicketTermRequestBuilder( @@ -398,7 +450,17 @@ public CompletableFuture> createTic } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -448,11 +510,11 @@ private HttpRequest.Builder createTicketTermRequestBuilder( * Admin, Signer, Approver, Editor, Viewer. * * @param ticketId (required) - * @return CompletableFuture<ApiResponse<SmartTransferTicketResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SmartTransferTicketResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> findTicketById( - String ticketId) throws ApiException { + String ticketId) { try { HttpRequest.Builder localVarRequestBuilder = findTicketByIdRequestBuilder(ticketId); return memberVarHttpClient @@ -481,7 +543,17 @@ public CompletableFuture> findTicketByI } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -515,11 +587,11 @@ private HttpRequest.Builder findTicketByIdRequestBuilder(String ticketId) throws * * @param ticketId (required) * @param termId (required) - * @return CompletableFuture<ApiResponse<SmartTransferTicketTermResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SmartTransferTicketTermResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> findTicketTermById( - String ticketId, String termId) throws ApiException { + String ticketId, String termId) { try { HttpRequest.Builder localVarRequestBuilder = findTicketTermByIdRequestBuilder(ticketId, termId); @@ -550,7 +622,17 @@ public CompletableFuture> findTicke } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -589,11 +671,11 @@ private HttpRequest.Builder findTicketTermByIdRequestBuilder(String ticketId, St * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SmartTransferTicketResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SmartTransferTicketResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> fulfillTicket( - String ticketId, String idempotencyKey) throws ApiException { + String ticketId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = fulfillTicketRequestBuilder(ticketId, idempotencyKey); @@ -623,7 +705,17 @@ public CompletableFuture> fulfillTicket } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -663,14 +755,13 @@ private HttpRequest.Builder fulfillTicketRequestBuilder(String ticketId, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SmartTransferTicketResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SmartTransferTicketResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> fundDvpTicket( SmartTransferFundDvpTicket smartTransferFundDvpTicket, String ticketId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = fundDvpTicketRequestBuilder( @@ -701,7 +792,17 @@ public CompletableFuture> fundDvpTicket } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -757,15 +858,14 @@ private HttpRequest.Builder fundDvpTicketRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SmartTransferTicketTermResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SmartTransferTicketTermResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> fundTicketTerm( SmartTransferFundTerm smartTransferFundTerm, String ticketId, String termId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = fundTicketTermRequestBuilder( @@ -796,7 +896,17 @@ public CompletableFuture> fundTicke } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -847,11 +957,10 @@ private HttpRequest.Builder fundTicketTermRequestBuilder( /** * Get smart transfers statistic Get smart transfer statistic * - * @return CompletableFuture<ApiResponse<SmartTransferStatistic>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SmartTransferStatistic>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getSmartTransferStatistic() - throws ApiException { + public CompletableFuture> getSmartTransferStatistic() { try { HttpRequest.Builder localVarRequestBuilder = getSmartTransferStatisticRequestBuilder(); return memberVarHttpClient @@ -881,7 +990,17 @@ public CompletableFuture> getSmartTransferSt } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -910,11 +1029,11 @@ private HttpRequest.Builder getSmartTransferStatisticRequestBuilder() throws Api * Get user group Get Smart Transfer user groups. Endpoint Permission: Admin, Non-Signing Admin, * Signer, Approver, Editor, Viewer. * - * @return CompletableFuture<ApiResponse<SmartTransferUserGroupsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SmartTransferUserGroupsResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getSmartTransferUserGroups() throws ApiException { + getSmartTransferUserGroups() { try { HttpRequest.Builder localVarRequestBuilder = getSmartTransferUserGroupsRequestBuilder(); return memberVarHttpClient @@ -945,7 +1064,17 @@ private HttpRequest.Builder getSmartTransferStatisticRequestBuilder() throws Api } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -980,15 +1109,14 @@ private HttpRequest.Builder getSmartTransferUserGroupsRequestBuilder() throws Ap * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SmartTransferTicketTermResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SmartTransferTicketTermResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> manuallyFundTicketTerm( SmartTransferManuallyFundTerm smartTransferManuallyFundTerm, String ticketId, String termId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = manuallyFundTicketTermRequestBuilder( @@ -1020,7 +1148,17 @@ public CompletableFuture> manuallyF } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1076,11 +1214,10 @@ private HttpRequest.Builder manuallyFundTicketTermRequestBuilder( * * @param ticketId (required) * @param termId (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ - public CompletableFuture> removeTicketTerm(String ticketId, String termId) - throws ApiException { + public CompletableFuture> removeTicketTerm(String ticketId, String termId) { try { HttpRequest.Builder localVarRequestBuilder = removeTicketTermRequestBuilder(ticketId, termId); @@ -1100,7 +1237,14 @@ public CompletableFuture> removeTicketTerm(String ticketId, St localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1151,8 +1295,8 @@ private HttpRequest.Builder removeTicketTermRequestBuilder(String ticketId, Stri * @param limit Number of records to fetch. By default, it is 100 (optional) * @param sortBy Sort by field (optional, default to createdAt) * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) - * @return CompletableFuture<ApiResponse<SmartTransferTicketFilteredResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SmartTransferTicketFilteredResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> searchTickets( String q, @@ -1166,8 +1310,7 @@ public CompletableFuture> searc String after, BigDecimal limit, String sortBy, - String order) - throws ApiException { + String order) { try { HttpRequest.Builder localVarRequestBuilder = searchTicketsRequestBuilder( @@ -1209,7 +1352,18 @@ public CompletableFuture> searc } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1294,14 +1448,13 @@ private HttpRequest.Builder searchTicketsRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SmartTransferTicketResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SmartTransferTicketResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setExternalRefId( SmartTransferSetTicketExternalId smartTransferSetTicketExternalId, String ticketId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setExternalRefIdRequestBuilder( @@ -1332,7 +1485,17 @@ public CompletableFuture> setExternalRe } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1388,14 +1551,13 @@ private HttpRequest.Builder setExternalRefIdRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SmartTransferTicketResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SmartTransferTicketResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setTicketExpiration( SmartTransferSetTicketExpiration smartTransferSetTicketExpiration, String ticketId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setTicketExpirationRequestBuilder( @@ -1427,7 +1589,17 @@ public CompletableFuture> setTicketExpi } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1482,12 +1654,11 @@ private HttpRequest.Builder setTicketExpirationRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SmartTransferUserGroupsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SmartTransferUserGroupsResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setUserGroups( - SmartTransferSetUserGroups smartTransferSetUserGroups, String idempotencyKey) - throws ApiException { + SmartTransferSetUserGroups smartTransferSetUserGroups, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setUserGroupsRequestBuilder(smartTransferSetUserGroups, idempotencyKey); @@ -1517,7 +1688,17 @@ public CompletableFuture> setUserGr } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1567,14 +1748,13 @@ private HttpRequest.Builder setUserGroupsRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SmartTransferTicketResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SmartTransferTicketResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> submitTicket( SmartTransferSubmitTicket smartTransferSubmitTicket, String ticketId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = submitTicketRequestBuilder(smartTransferSubmitTicket, ticketId, idempotencyKey); @@ -1604,7 +1784,17 @@ public CompletableFuture> submitTicket( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1658,15 +1848,14 @@ private HttpRequest.Builder submitTicketRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SmartTransferTicketTermResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SmartTransferTicketTermResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> updateTicketTerm( SmartTransferUpdateTicketTerm smartTransferUpdateTicketTerm, String ticketId, String termId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateTicketTermRequestBuilder( @@ -1697,7 +1886,17 @@ public CompletableFuture> updateTic } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/StakingApi.java b/src/main/java/com/fireblocks/sdk/api/StakingApi.java index 8c63af95..7c34db75 100644 --- a/src/main/java/com/fireblocks/sdk/api/StakingApi.java +++ b/src/main/java/com/fireblocks/sdk/api/StakingApi.java @@ -48,7 +48,10 @@ import java.util.List; import java.util.Map; import java.util.StringJoiner; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -84,6 +87,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -99,11 +124,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> approveTermsOfServiceByProviderId( - StakingProvider providerId, String idempotencyKey) throws ApiException { + StakingProvider providerId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = approveTermsOfServiceByProviderIdRequestBuilder(providerId, idempotencyKey); @@ -125,7 +150,14 @@ public CompletableFuture> approveTermsOfServiceByProviderId( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -169,12 +201,13 @@ private HttpRequest.Builder approveTermsOfServiceByProviderIdRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> claimRewards( - ClaimRewardsRequest claimRewardsRequest, String chainDescriptor, String idempotencyKey) - throws ApiException { + ClaimRewardsRequest claimRewardsRequest, + String chainDescriptor, + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = claimRewardsRequestBuilder( @@ -195,7 +228,14 @@ public CompletableFuture> claimRewards( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -254,14 +294,13 @@ private HttpRequest.Builder claimRewardsRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<MergeStakeAccountsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<MergeStakeAccountsResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> consolidate( MergeStakeAccountsRequest mergeStakeAccountsRequest, String chainDescriptor, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = consolidateRequestBuilder( @@ -292,7 +331,17 @@ public CompletableFuture> consolidate( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -342,17 +391,17 @@ private HttpRequest.Builder consolidateRequestBuilder( } /** * List staking positions Returns all staking positions with core details: amounts, rewards, - * status, chain, and vault. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, - * Editor. + * status, chain, and vault. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, + * Approver, Editor, Viewer. * * @param chainDescriptor Protocol identifier to filter positions (e.g., ATOM_COS/AXL/CELESTIA). * If omitted, positions across all supported chains are returned. (optional) * @param vaultAccountId Filter positions by vault account ID. (optional) - * @return CompletableFuture<ApiResponse<List<Delegation>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<Delegation>>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture>> getAllDelegations( - ChainDescriptor chainDescriptor, String vaultAccountId) throws ApiException { + ChainDescriptor chainDescriptor, String vaultAccountId) { try { HttpRequest.Builder localVarRequestBuilder = getAllDelegationsRequestBuilder(chainDescriptor, vaultAccountId); @@ -383,7 +432,15 @@ public CompletableFuture>> getAllDelegations( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -434,11 +491,11 @@ private HttpRequest.Builder getAllDelegationsRequestBuilder( * * @param chainDescriptor Protocol identifier for the chain info staking operation (e.g., * ETH/MATIC/SOL). (required) - * @return CompletableFuture<ApiResponse<ChainInfoResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ChainInfoResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getChainInfo( - ChainDescriptor chainDescriptor) throws ApiException { + ChainDescriptor chainDescriptor) { try { HttpRequest.Builder localVarRequestBuilder = getChainInfoRequestBuilder(chainDescriptor); @@ -468,7 +525,15 @@ public CompletableFuture> getChainInfo( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -504,10 +569,10 @@ private HttpRequest.Builder getChainInfoRequestBuilder(ChainDescriptor chainDesc * staking by the current workspace context. Endpoint Permission: Admin, Non-Signing Admin, * Signer, Approver, Editor. * - * @return CompletableFuture<ApiResponse<List<ChainDescriptor>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<ChainDescriptor>>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture>> getChains() throws ApiException { + public CompletableFuture>> getChains() { try { HttpRequest.Builder localVarRequestBuilder = getChainsRequestBuilder(); return memberVarHttpClient @@ -537,7 +602,17 @@ public CompletableFuture>> getChains() throws } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -567,11 +642,10 @@ private HttpRequest.Builder getChainsRequestBuilder() throws ApiException { * status, chain, and vault. * * @param id Unique identifier of the staking position. (required) - * @return CompletableFuture<ApiResponse<Delegation>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Delegation>>, which completes exceptionally + * with an {@link ApiException} if the API call fails */ - public CompletableFuture> getDelegationById(String id) - throws ApiException { + public CompletableFuture> getDelegationById(String id) { try { HttpRequest.Builder localVarRequestBuilder = getDelegationByIdRequestBuilder(id); return memberVarHttpClient @@ -600,7 +674,15 @@ public CompletableFuture> getDelegationById(String id) } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -640,13 +722,12 @@ private HttpRequest.Builder getDelegationByIdRequestBuilder(String id) throws Ap * @param order ASC / DESC ordering for completed/failed history (default DESC). The in-flight * transaction is always returned first. (optional, default to DESC) * @return - * CompletableFuture<ApiResponse<StakingPositionRelatedTransactionsPaginatedResponse>> - * @throws ApiException if fails to make API call + * CompletableFuture<ApiResponse<StakingPositionRelatedTransactionsPaginatedResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getPositionRelatedTransactions( - String id, Integer pageSize, String pageCursor, String order) - throws ApiException { + String id, Integer pageSize, String pageCursor, String order) { try { HttpRequest.Builder localVarRequestBuilder = getPositionRelatedTransactionsRequestBuilder(id, pageSize, pageCursor, order); @@ -679,7 +760,18 @@ private HttpRequest.Builder getDelegationByIdRequestBuilder(String id) throws Ap } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -733,7 +825,7 @@ private HttpRequest.Builder getPositionRelatedTransactionsRequestBuilder( * List staking positions (Paginated) Returns staking positions with core details: amounts, * rewards, status, chain, and vault. It supports cursor-based pagination for efficient data * retrieval. This endpoint always returns a paginated response with {data, next} structure. - * Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. + * Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. * * @param pageSize Number of results per page. When provided, the response returns a paginated * object with {data, next}. If omitted, all results are returned as an array. (required) @@ -744,16 +836,15 @@ private HttpRequest.Builder getPositionRelatedTransactionsRequestBuilder( * @param pageCursor Cursor for the next page of results. Use the value from the 'next' * field in the previous response. (optional) * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) - * @return CompletableFuture<ApiResponse<StakingPositionsPaginatedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<StakingPositionsPaginatedResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getPositions( Integer pageSize, ChainDescriptor chainDescriptor, String vaultAccountId, String pageCursor, - String order) - throws ApiException { + String order) { try { HttpRequest.Builder localVarRequestBuilder = getPositionsRequestBuilder( @@ -784,7 +875,18 @@ public CompletableFuture> getPosi } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -842,13 +944,13 @@ private HttpRequest.Builder getPositionsRequestBuilder( } /** * List staking providers Returns all available staking providers with metadata such as name, - * ID, and supported chains. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, - * Editor. + * ID, and supported chains. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, + * Approver, Editor, Viewer. * - * @return CompletableFuture<ApiResponse<List<Provider>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<Provider>>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture>> getProviders() throws ApiException { + public CompletableFuture>> getProviders() { try { HttpRequest.Builder localVarRequestBuilder = getProvidersRequestBuilder(); return memberVarHttpClient @@ -877,7 +979,15 @@ public CompletableFuture>> getProviders() throws ApiE } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -906,10 +1016,10 @@ private HttpRequest.Builder getProvidersRequestBuilder() throws ApiException { * Get positions summary Returns an aggregated cross-vault summary: active/inactive counts, * total staked, and total rewards per chain. * - * @return CompletableFuture<ApiResponse<DelegationSummary>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<DelegationSummary>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getSummary() throws ApiException { + public CompletableFuture> getSummary() { try { HttpRequest.Builder localVarRequestBuilder = getSummaryRequestBuilder(); return memberVarHttpClient @@ -938,7 +1048,15 @@ public CompletableFuture> getSummary() throws Api } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -967,11 +1085,10 @@ private HttpRequest.Builder getSummaryRequestBuilder() throws ApiException { * Get positions summary by vault Returns per-vault aggregates: status breakdown, total staked, * and total rewards per chain. * - * @return CompletableFuture<ApiResponse<Map<String, DelegationSummary>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Map<String, DelegationSummary>>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture>> getSummaryByVault() - throws ApiException { + public CompletableFuture>> getSummaryByVault() { try { HttpRequest.Builder localVarRequestBuilder = getSummaryByVaultRequestBuilder(); return memberVarHttpClient @@ -1002,7 +1119,17 @@ public CompletableFuture>> getSummary } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1039,14 +1166,13 @@ private HttpRequest.Builder getSummaryByVaultRequestBuilder() throws ApiExceptio * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<MergeStakeAccountsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<MergeStakeAccountsResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> mergeStakeAccounts( MergeStakeAccountsRequest mergeStakeAccountsRequest, String chainDescriptor, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = mergeStakeAccountsRequestBuilder( @@ -1078,7 +1204,17 @@ public CompletableFuture> mergeStakeAcco } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1136,12 +1272,11 @@ private HttpRequest.Builder mergeStakeAccountsRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SplitResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SplitResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> split( - SplitRequest splitRequest, String chainDescriptor, String idempotencyKey) - throws ApiException { + SplitRequest splitRequest, String chainDescriptor, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = splitRequestBuilder(splitRequest, chainDescriptor, idempotencyKey); @@ -1171,7 +1306,15 @@ public CompletableFuture> split( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1230,12 +1373,11 @@ private HttpRequest.Builder splitRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<StakeResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<StakeResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> stake( - StakeRequest stakeRequest, ChainDescriptor chainDescriptor, String idempotencyKey) - throws ApiException { + StakeRequest stakeRequest, ChainDescriptor chainDescriptor, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = stakeRequestBuilder(stakeRequest, chainDescriptor, idempotencyKey); @@ -1265,7 +1407,15 @@ public CompletableFuture> stake( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1317,12 +1467,11 @@ private HttpRequest.Builder stakeRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> unstake( - UnstakeRequest unstakeRequest, ChainDescriptor chainDescriptor, String idempotencyKey) - throws ApiException { + UnstakeRequest unstakeRequest, ChainDescriptor chainDescriptor, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = unstakeRequestBuilder(unstakeRequest, chainDescriptor, idempotencyKey); @@ -1342,7 +1491,14 @@ public CompletableFuture> unstake( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1399,12 +1555,13 @@ private HttpRequest.Builder unstakeRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> withdraw( - WithdrawRequest withdrawRequest, ChainDescriptor chainDescriptor, String idempotencyKey) - throws ApiException { + WithdrawRequest withdrawRequest, + ChainDescriptor chainDescriptor, + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = withdrawRequestBuilder(withdrawRequest, chainDescriptor, idempotencyKey); @@ -1424,7 +1581,14 @@ public CompletableFuture> withdraw( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/TagsApi.java b/src/main/java/com/fireblocks/sdk/api/TagsApi.java index b0e5324e..1a76eb86 100644 --- a/src/main/java/com/fireblocks/sdk/api/TagsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TagsApi.java @@ -38,7 +38,10 @@ import java.util.List; import java.util.StringJoiner; import java.util.UUID; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -74,6 +77,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -90,11 +115,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Tag>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Tag>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> createTag( - CreateTagRequest createTagRequest, String idempotencyKey) throws ApiException { + CreateTagRequest createTagRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createTagRequestBuilder(createTagRequest, idempotencyKey); @@ -123,7 +148,14 @@ public CompletableFuture> createTag( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -166,10 +198,10 @@ private HttpRequest.Builder createTagRequestBuilder( * Approver. * * @param tagId The ID of the tag to retrieve (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ - public CompletableFuture> deleteTag(UUID tagId) throws ApiException { + public CompletableFuture> deleteTag(UUID tagId) { try { HttpRequest.Builder localVarRequestBuilder = deleteTagRequestBuilder(tagId); return memberVarHttpClient @@ -188,7 +220,14 @@ public CompletableFuture> deleteTag(UUID tagId) throws ApiExce localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -219,11 +258,10 @@ private HttpRequest.Builder deleteTagRequestBuilder(UUID tagId) throws ApiExcept * Get an approval request by id Get an approval request by id * * @param id (required) - * @return CompletableFuture<ApiResponse<ApprovalRequest>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ApprovalRequest>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getApprovalRequest(String id) - throws ApiException { + public CompletableFuture> getApprovalRequest(String id) { try { HttpRequest.Builder localVarRequestBuilder = getApprovalRequestRequestBuilder(id); return memberVarHttpClient @@ -253,7 +291,15 @@ public CompletableFuture> getApprovalRequest(String } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -284,10 +330,10 @@ private HttpRequest.Builder getApprovalRequestRequestBuilder(String id) throws A * Get a tag Retrieve an existing tag by ID. * * @param tagId The ID of the tag to retrieve (required) - * @return CompletableFuture<ApiResponse<Tag>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Tag>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ - public CompletableFuture> getTag(UUID tagId) throws ApiException { + public CompletableFuture> getTag(UUID tagId) { try { HttpRequest.Builder localVarRequestBuilder = getTagRequestBuilder(tagId); return memberVarHttpClient @@ -315,7 +361,14 @@ public CompletableFuture> getTag(UUID tagId) throws ApiExceptio } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -355,8 +408,8 @@ private HttpRequest.Builder getTagRequestBuilder(UUID tagId) throws ApiException * @param type Filter by tag type (optional * @param allowedEntityType Filter tags whose allow-list contains this entity type. Known * values: vault_account, contact. (optional) - * @return CompletableFuture<ApiResponse<TagsPagedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TagsPagedResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getTags( String pageCursor, @@ -366,8 +419,7 @@ public CompletableFuture> getTags( Boolean includePendingApprovalsInfo, Boolean isProtected, List type, - String allowedEntityType) - throws ApiException { + String allowedEntityType) { try { HttpRequest.Builder localVarRequestBuilder = getTagsRequestBuilder( @@ -405,7 +457,15 @@ public CompletableFuture> getTags( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -482,12 +542,11 @@ private HttpRequest.Builder getTagsRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Tag>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Tag>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> updateTag( - UpdateTagRequest updateTagRequest, UUID tagId, String idempotencyKey) - throws ApiException { + UpdateTagRequest updateTagRequest, UUID tagId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateTagRequestBuilder(updateTagRequest, tagId, idempotencyKey); @@ -516,7 +575,14 @@ public CompletableFuture> updateTag( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java b/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java index 4a8d143c..783c650b 100644 --- a/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TokenizationApi.java @@ -72,7 +72,10 @@ import java.util.List; import java.util.StringJoiner; import java.util.UUID; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -108,6 +111,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -123,12 +148,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<CollectionBurnResponseDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CollectionBurnResponseDto>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> burnCollectionToken( - CollectionBurnRequestDto collectionBurnRequestDto, String id, String idempotencyKey) - throws ApiException { + CollectionBurnRequestDto collectionBurnRequestDto, String id, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = burnCollectionTokenRequestBuilder(collectionBurnRequestDto, id, idempotencyKey); @@ -159,7 +183,17 @@ public CompletableFuture> burnCollectionT } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -210,12 +244,11 @@ private HttpRequest.Builder burnCollectionTokenRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<CollectionLinkDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CollectionLinkDto>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createNewCollection( - CollectionDeployRequestDto collectionDeployRequestDto, String idempotencyKey) - throws ApiException { + CollectionDeployRequestDto collectionDeployRequestDto, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createNewCollectionRequestBuilder(collectionDeployRequestDto, idempotencyKey); @@ -246,7 +279,15 @@ public CompletableFuture> createNewCollection( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -294,14 +335,13 @@ private HttpRequest.Builder createNewCollectionRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<RemoveLayerZeroAdaptersResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<RemoveLayerZeroAdaptersResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> deactivateAndUnlinkAdapters( RemoveLayerZeroAdaptersRequest removeLayerZeroAdaptersRequest, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = deactivateAndUnlinkAdaptersRequestBuilder( @@ -334,7 +374,17 @@ private HttpRequest.Builder createNewCollectionRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -385,12 +435,11 @@ private HttpRequest.Builder deactivateAndUnlinkAdaptersRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<List<AdapterProcessingResult>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<AdapterProcessingResult>>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture>> deployAndLinkAdapters( - DeployLayerZeroAdaptersRequest deployLayerZeroAdaptersRequest, String idempotencyKey) - throws ApiException { + DeployLayerZeroAdaptersRequest deployLayerZeroAdaptersRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = deployAndLinkAdaptersRequestBuilder( @@ -423,7 +472,17 @@ public CompletableFuture>> deployAndLi } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -470,11 +529,11 @@ private HttpRequest.Builder deployAndLinkAdaptersRequestBuilder( * * @param id The collection link id (required) * @param tokenId The tokenId as it appears on the blockchain (required) - * @return CompletableFuture<ApiResponse<CollectionLinkDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CollectionLinkDto>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> fetchCollectionTokenDetails( - String id, String tokenId) throws ApiException { + String id, String tokenId) { try { HttpRequest.Builder localVarRequestBuilder = fetchCollectionTokenDetailsRequestBuilder(id, tokenId); @@ -506,7 +565,15 @@ public CompletableFuture> fetchCollectionTokenDet } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -542,11 +609,10 @@ private HttpRequest.Builder fetchCollectionTokenDetailsRequestBuilder(String id, * Get a collection by id Get a collection by id * * @param id The token link id (required) - * @return CompletableFuture<ApiResponse<CollectionLinkDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CollectionLinkDto>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getCollectionById(String id) - throws ApiException { + public CompletableFuture> getCollectionById(String id) { try { HttpRequest.Builder localVarRequestBuilder = getCollectionByIdRequestBuilder(id); return memberVarHttpClient @@ -575,7 +641,15 @@ public CompletableFuture> getCollectionById(Strin } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -612,12 +686,11 @@ private HttpRequest.Builder getCollectionByIdRequestBuilder(String id) throws Ap * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<DeployableAddressResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<DeployableAddressResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getDeployableAddress( - GetDeployableAddressRequest getDeployableAddressRequest, String idempotencyKey) - throws ApiException { + GetDeployableAddressRequest getDeployableAddressRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = getDeployableAddressRequestBuilder(getDeployableAddressRequest, idempotencyKey); @@ -648,7 +721,17 @@ public CompletableFuture> getDeployableAd } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -696,11 +779,11 @@ private HttpRequest.Builder getDeployableAddressRequestBuilder( * @param adapterTokenLinkId The token link id of the adapter token link (required) * @param peerAdapterTokenLinkId Optional peer adapter token link ID to filter results * (optional) - * @return CompletableFuture<ApiResponse<GetLayerZeroDvnConfigResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetLayerZeroDvnConfigResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getLayerZeroDvnConfig( - UUID adapterTokenLinkId, UUID peerAdapterTokenLinkId) throws ApiException { + UUID adapterTokenLinkId, UUID peerAdapterTokenLinkId) { try { HttpRequest.Builder localVarRequestBuilder = getLayerZeroDvnConfigRequestBuilder(adapterTokenLinkId, peerAdapterTokenLinkId); @@ -731,7 +814,17 @@ public CompletableFuture> getLayerZer } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -785,11 +878,11 @@ private HttpRequest.Builder getLayerZeroDvnConfigRequestBuilder( * information about peer relationships for cross-chain communication. * * @param adapterTokenLinkId The token link id of the adapter token link (required) - * @return CompletableFuture<ApiResponse<GetLayerZeroPeersResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetLayerZeroPeersResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getLayerZeroPeers( - UUID adapterTokenLinkId) throws ApiException { + UUID adapterTokenLinkId) { try { HttpRequest.Builder localVarRequestBuilder = getLayerZeroPeersRequestBuilder(adapterTokenLinkId); @@ -819,7 +912,17 @@ public CompletableFuture> getLayerZeroPee } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -861,12 +964,11 @@ private HttpRequest.Builder getLayerZeroPeersRequestBuilder(UUID adapterTokenLin * items (optional, default to 100) * @param status A comma separated list of statuses to filter. Default is * \"COMPLETED\" (optional) - * @return CompletableFuture<ApiResponse<GetLinkedCollectionsPaginatedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetLinkedCollectionsPaginatedResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getLinkedCollections(String pageCursor, BigDecimal pageSize, Object status) - throws ApiException { + getLinkedCollections(String pageCursor, BigDecimal pageSize, Object status) { try { HttpRequest.Builder localVarRequestBuilder = getLinkedCollectionsRequestBuilder(pageCursor, pageSize, status); @@ -897,7 +999,18 @@ private HttpRequest.Builder getLayerZeroPeersRequestBuilder(UUID adapterTokenLin } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -947,11 +1060,10 @@ private HttpRequest.Builder getLinkedCollectionsRequestBuilder( * Return a linked token Return a linked token, with its status and metadata. * * @param id The token link id (required) - * @return CompletableFuture<ApiResponse<TokenLinkDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TokenLinkDto>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getLinkedToken(String id) - throws ApiException { + public CompletableFuture> getLinkedToken(String id) { try { HttpRequest.Builder localVarRequestBuilder = getLinkedTokenRequestBuilder(id); return memberVarHttpClient @@ -980,7 +1092,15 @@ public CompletableFuture> getLinkedToken(String id) } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1015,11 +1135,11 @@ private HttpRequest.Builder getLinkedTokenRequestBuilder(String id) throws ApiEx * (optional) * @param status A comma separated list of statuses to filter. Default is * \"COMPLETED\" (optional) - * @return CompletableFuture<ApiResponse<TokensPaginatedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TokensPaginatedResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getLinkedTokens( - String pageCursor, BigDecimal pageSize, Object status) throws ApiException { + String pageCursor, BigDecimal pageSize, Object status) { try { HttpRequest.Builder localVarRequestBuilder = getLinkedTokensRequestBuilder(pageCursor, pageSize, status); @@ -1049,7 +1169,17 @@ public CompletableFuture> getLinkedTokens( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1098,11 +1228,10 @@ private HttpRequest.Builder getLinkedTokensRequestBuilder( /** * Get the total count of linked tokens Get the total count of linked tokens * - * @return CompletableFuture<ApiResponse<LinkedTokensCount>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<LinkedTokensCount>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getLinkedTokensCount() - throws ApiException { + public CompletableFuture> getLinkedTokensCount() { try { HttpRequest.Builder localVarRequestBuilder = getLinkedTokensCountRequestBuilder(); return memberVarHttpClient @@ -1132,7 +1261,15 @@ public CompletableFuture> getLinkedTokensCount() } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1167,13 +1304,12 @@ private HttpRequest.Builder getLinkedTokensCountRequestBuilder() throws ApiExcep * items (optional) * @param sortBy Sorting field (enum). (optional, default to dateAdded) * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) - * @return CompletableFuture<ApiResponse<AccessRegistryCurrentStateResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AccessRegistryCurrentStateResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getTokenAccessRegistryAddresses( - String id, String pageCursor, Integer pageSize, String sortBy, String order) - throws ApiException { + String id, String pageCursor, Integer pageSize, String sortBy, String order) { try { HttpRequest.Builder localVarRequestBuilder = getTokenAccessRegistryAddressesRequestBuilder( @@ -1206,7 +1342,18 @@ private HttpRequest.Builder getLinkedTokensCountRequestBuilder() throws ApiExcep } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1263,11 +1410,11 @@ private HttpRequest.Builder getTokenAccessRegistryAddressesRequestBuilder( * registry. * * @param id The token link id (required) - * @return CompletableFuture<ApiResponse<AccessRegistrySummaryResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AccessRegistrySummaryResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getTokenAccessRegistrySummary(String id) throws ApiException { + getTokenAccessRegistrySummary(String id) { try { HttpRequest.Builder localVarRequestBuilder = getTokenAccessRegistrySummaryRequestBuilder(id); @@ -1299,7 +1446,17 @@ private HttpRequest.Builder getTokenAccessRegistryAddressesRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1334,11 +1491,11 @@ private HttpRequest.Builder getTokenAccessRegistrySummaryRequestBuilder(String i * * @param id The token link id (required) * @param accountAddress The account address to get balance history for (required) - * @return CompletableFuture<ApiResponse<AddressBalanceItemDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AddressBalanceItemDto>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getTokenBalanceForAccount( - String id, String accountAddress) throws ApiException { + String id, String accountAddress) { try { HttpRequest.Builder localVarRequestBuilder = getTokenBalanceForAccountRequestBuilder(id, accountAddress); @@ -1369,7 +1526,17 @@ public CompletableFuture> getTokenBalanceForA } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1417,8 +1584,8 @@ private HttpRequest.Builder getTokenBalanceForAccountRequestBuilder( * @param sortBy Sorting field (enum). Sorting only supported by 'blockTimestamp' * (optional, default to blockTimestamp) * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) - * @return CompletableFuture<ApiResponse<BalanceHistoryPagedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<BalanceHistoryPagedResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getTokenBalanceHistory( String id, @@ -1429,8 +1596,7 @@ public CompletableFuture> getTokenBalan String pageCursor, Integer pageSize, String sortBy, - String order) - throws ApiException { + String order) { try { HttpRequest.Builder localVarRequestBuilder = getTokenBalanceHistoryRequestBuilder( @@ -1470,7 +1636,17 @@ public CompletableFuture> getTokenBalan } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1550,12 +1726,11 @@ private HttpRequest.Builder getTokenBalanceHistoryRequestBuilder( * items (optional) * @param sortBy Sorting field for balances (optional, default to blockTimestamp) * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) - * @return CompletableFuture<ApiResponse<AddressBalancePagedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AddressBalancePagedResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getTokenBalances( - String id, String pageCursor, Integer pageSize, String sortBy, String order) - throws ApiException { + String id, String pageCursor, Integer pageSize, String sortBy, String order) { try { HttpRequest.Builder localVarRequestBuilder = getTokenBalancesRequestBuilder(id, pageCursor, pageSize, sortBy, order); @@ -1585,7 +1760,17 @@ public CompletableFuture> getTokenBalan } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1642,11 +1827,11 @@ private HttpRequest.Builder getTokenBalancesRequestBuilder( * supply for the token contract. * * @param id The token link id (required) - * @return CompletableFuture<ApiResponse<TokenContractSummaryResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TokenContractSummaryResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getTokenContractSummary( - String id) throws ApiException { + String id) { try { HttpRequest.Builder localVarRequestBuilder = getTokenContractSummaryRequestBuilder(id); return memberVarHttpClient @@ -1676,7 +1861,17 @@ public CompletableFuture> getTokenCont } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1710,11 +1905,10 @@ private HttpRequest.Builder getTokenContractSummaryRequestBuilder(String id) * contract. * * @param id The token link id (required) - * @return CompletableFuture<ApiResponse<ActiveRolesResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ActiveRolesResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getTokenRbac(String id) - throws ApiException { + public CompletableFuture> getTokenRbac(String id) { try { HttpRequest.Builder localVarRequestBuilder = getTokenRbacRequestBuilder(id); return memberVarHttpClient @@ -1743,7 +1937,15 @@ public CompletableFuture> getTokenRbac(String i } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1785,8 +1987,8 @@ private HttpRequest.Builder getTokenRbacRequestBuilder(String id) throws ApiExce * @param sortBy Sorting field (enum). Sorting only supported by 'blockTimestamp' * (optional, default to blockTimestamp) * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) - * @return CompletableFuture<ApiResponse<TotalSupplyPagedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TotalSupplyPagedResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getTokenTotalSupply( String id, @@ -1796,8 +1998,7 @@ public CompletableFuture> getTokenTotalSup String pageCursor, Integer pageSize, String sortBy, - String order) - throws ApiException { + String order) { try { HttpRequest.Builder localVarRequestBuilder = getTokenTotalSupplyRequestBuilder( @@ -1829,7 +2030,17 @@ public CompletableFuture> getTokenTotalSup } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1906,8 +2117,8 @@ private HttpRequest.Builder getTokenTotalSupplyRequestBuilder( * items (optional) * @param sortBy Sorting field (enum). (optional, default to blockTimestamp) * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) - * @return CompletableFuture<ApiResponse<OnchainTransactionsPagedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<OnchainTransactionsPagedResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getTokenTransactions( String id, @@ -1916,8 +2127,7 @@ public CompletableFuture> getToken String pageCursor, Integer pageSize, String sortBy, - String order) - throws ApiException { + String order) { try { HttpRequest.Builder localVarRequestBuilder = getTokenTransactionsRequestBuilder( @@ -1949,7 +2159,17 @@ public CompletableFuture> getToken } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2025,8 +2245,8 @@ private HttpRequest.Builder getTokenTransactionsRequestBuilder( * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) * @param sender Filter transfers by sender address (optional) * @param receiver Filter transfers by receiver address (optional) - * @return CompletableFuture<ApiResponse<OnchainTransfersPagedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<OnchainTransfersPagedResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getTokenTransfers( String id, @@ -2037,8 +2257,7 @@ public CompletableFuture> getTokenTra String sortBy, String order, String sender, - String receiver) - throws ApiException { + String receiver) { try { HttpRequest.Builder localVarRequestBuilder = getTokenTransfersRequestBuilder( @@ -2077,7 +2296,17 @@ public CompletableFuture> getTokenTra } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2158,12 +2387,11 @@ private HttpRequest.Builder getTokenTransfersRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<TokenLinkDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TokenLinkDto>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> issueNewToken( - CreateTokenRequestDto createTokenRequestDto, String idempotencyKey) - throws ApiException { + CreateTokenRequestDto createTokenRequestDto, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = issueNewTokenRequestBuilder(createTokenRequestDto, idempotencyKey); @@ -2193,7 +2421,15 @@ public CompletableFuture> issueNewToken( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2241,12 +2477,11 @@ private HttpRequest.Builder issueNewTokenRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<List<TokenLinkDto>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<TokenLinkDto>>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture>> issueTokenMultiChain( - CreateMultichainTokenRequest createMultichainTokenRequest, String idempotencyKey) - throws ApiException { + CreateMultichainTokenRequest createMultichainTokenRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = issueTokenMultiChainRequestBuilder( @@ -2279,7 +2514,15 @@ public CompletableFuture>> issueTokenMultiChain( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2328,11 +2571,11 @@ private HttpRequest.Builder issueTokenMultiChainRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<TokenLinkDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TokenLinkDto>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> link( - TokenLinkRequestDto tokenLinkRequestDto, String idempotencyKey) throws ApiException { + TokenLinkRequestDto tokenLinkRequestDto, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = linkRequestBuilder(tokenLinkRequestDto, idempotencyKey); @@ -2362,7 +2605,15 @@ public CompletableFuture> link( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2407,12 +2658,11 @@ private HttpRequest.Builder linkRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<CollectionMintResponseDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CollectionMintResponseDto>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> mintCollectionToken( - CollectionMintRequestDto collectionMintRequestDto, String id, String idempotencyKey) - throws ApiException { + CollectionMintRequestDto collectionMintRequestDto, String id, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = mintCollectionTokenRequestBuilder(collectionMintRequestDto, id, idempotencyKey); @@ -2443,7 +2693,17 @@ public CompletableFuture> mintCollectionT } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2496,14 +2756,13 @@ private HttpRequest.Builder mintCollectionTokenRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<List<TokenLinkDto>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<TokenLinkDto>>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture>> reIssueTokenMultiChain( ReissueMultichainTokenRequest reissueMultichainTokenRequest, String tokenLinkId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = reIssueTokenMultiChainRequestBuilder( @@ -2536,7 +2795,15 @@ public CompletableFuture>> reIssueTokenMultiChain } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2592,12 +2859,11 @@ private HttpRequest.Builder reIssueTokenMultiChainRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<RemoveLayerZeroPeersResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<RemoveLayerZeroPeersResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> removeLayerZeroPeers( - RemoveLayerZeroPeersRequest removeLayerZeroPeersRequest, String idempotencyKey) - throws ApiException { + RemoveLayerZeroPeersRequest removeLayerZeroPeersRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = removeLayerZeroPeersRequestBuilder(removeLayerZeroPeersRequest, idempotencyKey); @@ -2628,7 +2894,17 @@ public CompletableFuture> removeLayerZ } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2677,12 +2953,11 @@ private HttpRequest.Builder removeLayerZeroPeersRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SetLayerZeroDvnConfigResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SetLayerZeroDvnConfigResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setLayerZeroDvnConfig( - SetLayerZeroDvnConfigRequest setLayerZeroDvnConfigRequest, String idempotencyKey) - throws ApiException { + SetLayerZeroDvnConfigRequest setLayerZeroDvnConfigRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setLayerZeroDvnConfigRequestBuilder( @@ -2714,7 +2989,17 @@ public CompletableFuture> setLayerZer } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2766,12 +3051,11 @@ private HttpRequest.Builder setLayerZeroDvnConfigRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SetLayerZeroPeersResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SetLayerZeroPeersResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setLayerZeroPeers( - SetLayerZeroPeersRequest setLayerZeroPeersRequest, String idempotencyKey) - throws ApiException { + SetLayerZeroPeersRequest setLayerZeroPeersRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setLayerZeroPeersRequestBuilder(setLayerZeroPeersRequest, idempotencyKey); @@ -2801,7 +3085,17 @@ public CompletableFuture> setLayerZeroPee } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2846,10 +3140,10 @@ private HttpRequest.Builder setLayerZeroPeersRequestBuilder( * not be deleted on chain nor the refId, only the link to the workspace will be removed. * * @param id The token link id (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ - public CompletableFuture> unlink(String id) throws ApiException { + public CompletableFuture> unlink(String id) { try { HttpRequest.Builder localVarRequestBuilder = unlinkRequestBuilder(id); return memberVarHttpClient @@ -2868,7 +3162,14 @@ public CompletableFuture> unlink(String id) throws ApiExceptio localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2899,10 +3200,10 @@ private HttpRequest.Builder unlinkRequestBuilder(String id) throws ApiException * Delete a collection link Delete a collection link * * @param id The token link id (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ - public CompletableFuture> unlinkCollection(String id) throws ApiException { + public CompletableFuture> unlinkCollection(String id) { try { HttpRequest.Builder localVarRequestBuilder = unlinkCollectionRequestBuilder(id); return memberVarHttpClient @@ -2921,7 +3222,14 @@ public CompletableFuture> unlinkCollection(String id) throws A localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2956,12 +3264,11 @@ private HttpRequest.Builder unlinkCollectionRequestBuilder(String id) throws Api * * @param adapterTokenLinkId The token link ID of the adapter (required) * @param peerAdapterTokenLinkId Peer adapter token link ID to validate against (required) - * @return CompletableFuture<ApiResponse<ValidateLayerZeroChannelResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ValidateLayerZeroChannelResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - validateLayerZeroChannelConfig(UUID adapterTokenLinkId, UUID peerAdapterTokenLinkId) - throws ApiException { + validateLayerZeroChannelConfig(UUID adapterTokenLinkId, UUID peerAdapterTokenLinkId) { try { HttpRequest.Builder localVarRequestBuilder = validateLayerZeroChannelConfigRequestBuilder( @@ -2994,7 +3301,17 @@ private HttpRequest.Builder unlinkCollectionRequestBuilder(String id) throws Api } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/TrLinkApi.java b/src/main/java/com/fireblocks/sdk/api/TrLinkApi.java index 0381a056..257fb19e 100644 --- a/src/main/java/com/fireblocks/sdk/api/TrLinkApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TrLinkApi.java @@ -59,7 +59,10 @@ import java.util.List; import java.util.StringJoiner; import java.util.UUID; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -95,6 +98,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -112,15 +137,14 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<TRLinkAssessTravelRuleResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkAssessTravelRuleResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> assessTRLinkTravelRuleRequirement( TRLinkAssessTravelRuleRequest trLinkAssessTravelRuleRequest, UUID customerIntegrationId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = assessTRLinkTravelRuleRequirementRequestBuilder( @@ -153,7 +177,17 @@ private String formatExceptionMessage(String operationId, int statusCode, String } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -215,15 +249,14 @@ private HttpRequest.Builder assessTRLinkTravelRuleRequirementRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<TRLinkTrmInfoResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkTrmInfoResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> cancelTRLinkTrm( TRLinkCancelTrmRequest trLinkCancelTrmRequest, UUID customerIntegrationId, String trmId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = cancelTRLinkTrmRequestBuilder( @@ -254,7 +287,17 @@ public CompletableFuture> cancelTRLinkTrm( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -314,15 +357,14 @@ private HttpRequest.Builder cancelTRLinkTrmRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<TRLinkCustomerIntegrationResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkCustomerIntegrationResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> connectTRLinkIntegration( TRLinkConnectIntegrationRequest trLinkConnectIntegrationRequest, UUID customerIntegrationId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = connectTRLinkIntegrationRequestBuilder( @@ -354,7 +396,18 @@ private HttpRequest.Builder cancelTRLinkTrmRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -415,12 +468,11 @@ private HttpRequest.Builder connectTRLinkIntegrationRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<TRLinkCustomerResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkCustomerResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createTRLinkCustomer( - TRLinkCreateCustomerRequest trLinkCreateCustomerRequest, String idempotencyKey) - throws ApiException { + TRLinkCreateCustomerRequest trLinkCreateCustomerRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createTRLinkCustomerRequestBuilder(trLinkCreateCustomerRequest, idempotencyKey); @@ -451,7 +503,17 @@ public CompletableFuture> createTRLinkCustom } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -502,14 +564,13 @@ private HttpRequest.Builder createTRLinkCustomerRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<TRLinkCustomerIntegrationResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkCustomerIntegrationResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createTRLinkIntegration( TRLinkCreateIntegrationRequest trLinkCreateIntegrationRequest, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createTRLinkIntegrationRequestBuilder( @@ -541,7 +602,18 @@ private HttpRequest.Builder createTRLinkCustomerRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -593,15 +665,14 @@ private HttpRequest.Builder createTRLinkIntegrationRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<TRLinkManualDecisionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkManualDecisionResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createTRLinkManualDecision( TRLinkManualDecisionRequest trLinkManualDecisionRequest, UUID customerIntegrationId, UUID txId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createTRLinkManualDecisionRequestBuilder( @@ -637,7 +708,17 @@ public CompletableFuture> createTRLink } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -702,14 +783,13 @@ private HttpRequest.Builder createTRLinkManualDecisionRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<TRLinkTrmInfoResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkTrmInfoResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createTRLinkTrm( TRLinkCreateTrmRequest trLinkCreateTrmRequest, UUID customerIntegrationId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createTRLinkTrmRequestBuilder( @@ -740,7 +820,17 @@ public CompletableFuture> createTRLinkTrm( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -793,11 +883,10 @@ private HttpRequest.Builder createTRLinkTrmRequestBuilder( * undone. * * @param customerId Customer unique identifier (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ - public CompletableFuture> deleteTRLinkCustomer(UUID customerId) - throws ApiException { + public CompletableFuture> deleteTRLinkCustomer(UUID customerId) { try { HttpRequest.Builder localVarRequestBuilder = deleteTRLinkCustomerRequestBuilder(customerId); @@ -818,7 +907,14 @@ public CompletableFuture> deleteTRLinkCustomer(UUID customerId localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -856,11 +952,11 @@ private HttpRequest.Builder deleteTRLinkCustomerRequestBuilder(UUID customerId) * recovered after delete. * * @param customerIntegrationId Customer integration unique identifier (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> disconnectTRLinkIntegration( - UUID customerIntegrationId) throws ApiException { + UUID customerIntegrationId) { try { HttpRequest.Builder localVarRequestBuilder = disconnectTRLinkIntegrationRequestBuilder(customerIntegrationId); @@ -882,7 +978,14 @@ public CompletableFuture> disconnectTRLinkIntegration( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -921,11 +1024,11 @@ private HttpRequest.Builder disconnectTRLinkIntegrationRequestBuilder( * identifier. * * @param customerId Customer unique identifier (required) - * @return CompletableFuture<ApiResponse<TRLinkCustomerResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkCustomerResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getTRLinkCustomerById( - UUID customerId) throws ApiException { + UUID customerId) { try { HttpRequest.Builder localVarRequestBuilder = getTRLinkCustomerByIdRequestBuilder(customerId); @@ -956,7 +1059,17 @@ public CompletableFuture> getTRLinkCustomerB } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -992,12 +1105,11 @@ private HttpRequest.Builder getTRLinkCustomerByIdRequestBuilder(UUID customerId) * * @param customerId Customer unique identifier (required) * @param customerIntegrationId Customer integration unique identifier (required) - * @return CompletableFuture<ApiResponse<TRLinkCustomerIntegrationResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkCustomerIntegrationResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getTRLinkCustomerIntegrationById(UUID customerId, UUID customerIntegrationId) - throws ApiException { + getTRLinkCustomerIntegrationById(UUID customerId, UUID customerIntegrationId) { try { HttpRequest.Builder localVarRequestBuilder = getTRLinkCustomerIntegrationByIdRequestBuilder( @@ -1030,7 +1142,18 @@ private HttpRequest.Builder getTRLinkCustomerByIdRequestBuilder(UUID customerId) } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1073,11 +1196,11 @@ private HttpRequest.Builder getTRLinkCustomerIntegrationByIdRequestBuilder( * * @param customerId Customer unique identifier (required) * @return - * CompletableFuture<ApiResponse<List<TRLinkCustomerIntegrationResponse>>> - * @throws ApiException if fails to make API call + * CompletableFuture<ApiResponse<List<TRLinkCustomerIntegrationResponse>>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture>> - getTRLinkCustomerIntegrations(UUID customerId) throws ApiException { + getTRLinkCustomerIntegrations(UUID customerId) { try { HttpRequest.Builder localVarRequestBuilder = getTRLinkCustomerIntegrationsRequestBuilder(customerId); @@ -1111,7 +1234,19 @@ private HttpRequest.Builder getTRLinkCustomerIntegrationByIdRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1145,11 +1280,10 @@ private HttpRequest.Builder getTRLinkCustomerIntegrationsRequestBuilder(UUID cus * Get all customers Retrieves all customers associated with the authenticated tenant. Returns a * list of legal entities configured for Travel Rule compliance. * - * @return CompletableFuture<ApiResponse<List<TRLinkCustomerResponse>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<TRLinkCustomerResponse>>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture>> getTRLinkCustomers() - throws ApiException { + public CompletableFuture>> getTRLinkCustomers() { try { HttpRequest.Builder localVarRequestBuilder = getTRLinkCustomersRequestBuilder(); return memberVarHttpClient @@ -1180,7 +1314,17 @@ public CompletableFuture>> getTRLinkCus } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1211,11 +1355,11 @@ private HttpRequest.Builder getTRLinkCustomersRequestBuilder() throws ApiExcepti * beneficiary information before sending Travel Rule messages. * * @param customerIntegrationId Customer integration unique identifier (required) - * @return CompletableFuture<ApiResponse<TRLinkPublicKeyResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkPublicKeyResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getTRLinkIntegrationPublicKey( - UUID customerIntegrationId) throws ApiException { + UUID customerIntegrationId) { try { HttpRequest.Builder localVarRequestBuilder = getTRLinkIntegrationPublicKeyRequestBuilder(customerIntegrationId); @@ -1247,7 +1391,17 @@ public CompletableFuture> getTRLinkIntegrat } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1286,11 +1440,10 @@ private HttpRequest.Builder getTRLinkIntegrationPublicKeyRequestBuilder( * integration partners. Partners provide Travel Rule compliance services such as VASP * discovery, TRM exchange, and PII encryption. * - * @return CompletableFuture<ApiResponse<List<TRLinkPartnerResponse>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<TRLinkPartnerResponse>>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture>> getTRLinkPartners() - throws ApiException { + public CompletableFuture>> getTRLinkPartners() { try { HttpRequest.Builder localVarRequestBuilder = getTRLinkPartnersRequestBuilder(); return memberVarHttpClient @@ -1320,7 +1473,17 @@ public CompletableFuture>> getTRLinkPart } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1352,11 +1515,10 @@ private HttpRequest.Builder getTRLinkPartnersRequestBuilder() throws ApiExceptio * actions based on screening results. Missing TRM rules handle cases when screening data is * unavailable. * - * @return CompletableFuture<ApiResponse<TRLinkPolicyResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkPolicyResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getTRLinkPolicy() - throws ApiException { + public CompletableFuture> getTRLinkPolicy() { try { HttpRequest.Builder localVarRequestBuilder = getTRLinkPolicyRequestBuilder(); return memberVarHttpClient @@ -1385,7 +1547,17 @@ public CompletableFuture> getTRLinkPolicy() } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1417,11 +1589,11 @@ private HttpRequest.Builder getTRLinkPolicyRequestBuilder() throws ApiException * * @param customerIntegrationId Customer integration unique identifier (required) * @param assetId Fireblocks asset ID (required) - * @return CompletableFuture<ApiResponse<TRLinkGetSupportedAssetResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkGetSupportedAssetResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getTRLinkSupportedAsset( - UUID customerIntegrationId, String assetId) throws ApiException { + UUID customerIntegrationId, String assetId) { try { HttpRequest.Builder localVarRequestBuilder = getTRLinkSupportedAssetRequestBuilder(customerIntegrationId, assetId); @@ -1452,7 +1624,17 @@ public CompletableFuture> getTRLink } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1495,11 +1677,11 @@ private HttpRequest.Builder getTRLinkSupportedAssetRequestBuilder( * * @param customerIntegrationId Customer integration unique identifier (required) * @param trmId Travel Rule Message unique identifier (required) - * @return CompletableFuture<ApiResponse<TRLinkTrmInfoResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkTrmInfoResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getTRLinkTrmById( - UUID customerIntegrationId, String trmId) throws ApiException { + UUID customerIntegrationId, String trmId) { try { HttpRequest.Builder localVarRequestBuilder = getTRLinkTrmByIdRequestBuilder(customerIntegrationId, trmId); @@ -1529,7 +1711,17 @@ public CompletableFuture> getTRLinkTrmById( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1569,12 +1761,11 @@ private HttpRequest.Builder getTRLinkTrmByIdRequestBuilder( * * @param customerIntegrationId Customer integration unique identifier (required) * @param trmId Travel Rule Message unique identifier (required) - * @return CompletableFuture<ApiResponse<TRLinkGetRequiredActionsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkGetRequiredActionsResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getTRLinkTrmRequiredActions(UUID customerIntegrationId, String trmId) - throws ApiException { + getTRLinkTrmRequiredActions(UUID customerIntegrationId, String trmId) { try { HttpRequest.Builder localVarRequestBuilder = getTRLinkTrmRequiredActionsRequestBuilder(customerIntegrationId, trmId); @@ -1606,7 +1797,17 @@ private HttpRequest.Builder getTRLinkTrmByIdRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1648,11 +1849,11 @@ private HttpRequest.Builder getTRLinkTrmRequiredActionsRequestBuilder( * * @param customerIntegrationId Customer integration unique identifier (required) * @param vaspId VASP unique identifier (DID format) (required) - * @return CompletableFuture<ApiResponse<TRLinkVaspDto>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkVaspDto>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getTRLinkVaspById( - UUID customerIntegrationId, String vaspId) throws ApiException { + UUID customerIntegrationId, String vaspId) { try { HttpRequest.Builder localVarRequestBuilder = getTRLinkVaspByIdRequestBuilder(customerIntegrationId, vaspId); @@ -1682,7 +1883,15 @@ public CompletableFuture> getTRLinkVaspById( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1724,11 +1933,11 @@ private HttpRequest.Builder getTRLinkVaspByIdRequestBuilder( * @param customerIntegrationId Customer integration unique identifier (required) * @param pageSize Number of results per page (max 100) (optional, default to 100) * @param pageCursor Cursor for pagination (from previous response) (optional) - * @return CompletableFuture<ApiResponse<TRLinkAssetsListPagedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkAssetsListPagedResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> listTRLinkSupportedAssets( - UUID customerIntegrationId, Integer pageSize, String pageCursor) throws ApiException { + UUID customerIntegrationId, Integer pageSize, String pageCursor) { try { HttpRequest.Builder localVarRequestBuilder = listTRLinkSupportedAssetsRequestBuilder( @@ -1760,7 +1969,17 @@ public CompletableFuture> listTRLinkS } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1819,11 +2038,11 @@ private HttpRequest.Builder listTRLinkSupportedAssetsRequestBuilder( * @param customerIntegrationId Customer integration unique identifier (required) * @param pageSize Number of results per page (max 100) (optional, default to 100) * @param pageCursor Cursor for pagination (from previous response) (optional) - * @return CompletableFuture<ApiResponse<TRLinkAPIPagedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkAPIPagedResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> listTRLinkVasps( - UUID customerIntegrationId, Integer pageSize, String pageCursor) throws ApiException { + UUID customerIntegrationId, Integer pageSize, String pageCursor) { try { HttpRequest.Builder localVarRequestBuilder = listTRLinkVaspsRequestBuilder(customerIntegrationId, pageSize, pageCursor); @@ -1853,7 +2072,17 @@ public CompletableFuture> listTRLinkVasps( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1913,15 +2142,14 @@ private HttpRequest.Builder listTRLinkVaspsRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<TRLinkTrmInfoResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkTrmInfoResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> redirectTRLinkTrm( TRLinkRedirectTrmRequest trLinkRedirectTrmRequest, UUID customerIntegrationId, String trmId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = redirectTRLinkTrmRequestBuilder( @@ -1952,7 +2180,17 @@ public CompletableFuture> redirectTRLinkTrm( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2013,15 +2251,14 @@ private HttpRequest.Builder redirectTRLinkTrmRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<TRLinkTrmInfoResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkTrmInfoResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> resolveActionTRLinkTrm( TRLinkResolveActionRequest trLinkResolveActionRequest, UUID customerIntegrationId, String trmId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = resolveActionTRLinkTrmRequestBuilder( @@ -2056,7 +2293,17 @@ public CompletableFuture> resolveActionTRLink } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2120,16 +2367,15 @@ private HttpRequest.Builder resolveActionTRLinkTrmRequestBuilder( * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) * @return - * CompletableFuture<ApiResponse<TRLinkSetDestinationTravelRuleMessageIdResponse>> - * @throws ApiException if fails to make API call + * CompletableFuture<ApiResponse<TRLinkSetDestinationTravelRuleMessageIdResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setTRLinkDestinationTravelRuleMessageId( TRLinkSetDestinationTravelRuleMessageIdRequest trLinkSetDestinationTravelRuleMessageIdRequest, UUID txId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setTRLinkDestinationTravelRuleMessageIdRequestBuilder( @@ -2163,7 +2409,18 @@ private HttpRequest.Builder resolveActionTRLinkTrmRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2223,16 +2480,15 @@ private HttpRequest.Builder setTRLinkDestinationTravelRuleMessageIdRequestBuilde * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) * @return - * CompletableFuture<ApiResponse<TRLinkSetTransactionTravelRuleMessageIdResponse>> - * @throws ApiException if fails to make API call + * CompletableFuture<ApiResponse<TRLinkSetTransactionTravelRuleMessageIdResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setTRLinkTransactionTravelRuleMessageId( TRLinkSetTransactionTravelRuleMessageIdRequest trLinkSetTransactionTravelRuleMessageIdRequest, UUID txId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setTRLinkTransactionTravelRuleMessageIdRequestBuilder( @@ -2266,7 +2522,18 @@ private HttpRequest.Builder setTRLinkDestinationTravelRuleMessageIdRequestBuilde } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2325,12 +2592,11 @@ private HttpRequest.Builder setTRLinkTransactionTravelRuleMessageIdRequestBuilde * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<TRLinkTestConnectionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkTestConnectionResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - testTRLinkIntegrationConnection(UUID customerIntegrationId, String idempotencyKey) - throws ApiException { + testTRLinkIntegrationConnection(UUID customerIntegrationId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = testTRLinkIntegrationConnectionRequestBuilder( @@ -2363,7 +2629,17 @@ private HttpRequest.Builder setTRLinkTransactionTravelRuleMessageIdRequestBuilde } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2409,14 +2685,13 @@ private HttpRequest.Builder testTRLinkIntegrationConnectionRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<TRLinkCustomerResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TRLinkCustomerResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> updateTRLinkCustomer( TRLinkUpdateCustomerRequest trLinkUpdateCustomerRequest, UUID customerId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateTRLinkCustomerRequestBuilder( @@ -2448,7 +2723,17 @@ public CompletableFuture> updateTRLinkCustom } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/TradingBetaApi.java b/src/main/java/com/fireblocks/sdk/api/TradingBetaApi.java index bd36cb16..14d95d03 100644 --- a/src/main/java/com/fireblocks/sdk/api/TradingBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TradingBetaApi.java @@ -50,7 +50,10 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; import org.apache.http.HttpEntity; import org.apache.http.entity.mime.MultipartEntityBuilder; @@ -88,6 +91,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -108,11 +133,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<OrderDetails>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<OrderDetails>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createOrder( - CreateOrderRequest createOrderRequest, String idempotencyKey) throws ApiException { + CreateOrderRequest createOrderRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createOrderRequestBuilder(createOrderRequest, idempotencyKey); @@ -142,7 +167,15 @@ public CompletableFuture> createOrder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -192,11 +225,11 @@ private HttpRequest.Builder createOrderRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<QuotesResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<QuotesResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createQuote( - CreateQuote createQuote, String idempotencyKey) throws ApiException { + CreateQuote createQuote, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createQuoteRequestBuilder(createQuote, idempotencyKey); @@ -226,7 +259,15 @@ public CompletableFuture> createQuote( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -279,11 +320,11 @@ private HttpRequest.Builder createQuoteRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<OffersResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<OffersResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> fetchAllOffers( - CreateOffersRequest createOffersRequest, String idempotencyKey) throws ApiException { + CreateOffersRequest createOffersRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = fetchAllOffersRequestBuilder(createOffersRequest, idempotencyKey); @@ -313,7 +354,15 @@ public CompletableFuture> fetchAllOffers( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -365,11 +414,11 @@ private HttpRequest.Builder fetchAllOffersRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<RatesResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<RatesResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> fetchRates( - RatesRequest ratesRequest, String idempotencyKey) throws ApiException { + RatesRequest ratesRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = fetchRatesRequestBuilder(ratesRequest, idempotencyKey); @@ -399,7 +448,15 @@ public CompletableFuture> fetchRates( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -446,11 +503,10 @@ private HttpRequest.Builder fetchRatesRequestBuilder( * documentation](https://developers.fireblocks.com/reference/api-error-codes). * * @param orderId The ID of the order to fetch. (required) - * @return CompletableFuture<ApiResponse<OrderDetails>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<OrderDetails>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getOrder(String orderId) - throws ApiException { + public CompletableFuture> getOrder(String orderId) { try { HttpRequest.Builder localVarRequestBuilder = getOrderRequestBuilder(orderId); return memberVarHttpClient @@ -479,7 +535,15 @@ public CompletableFuture> getOrder(String orderId) } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -523,11 +587,11 @@ private HttpRequest.Builder getOrderRequestBuilder(String orderId) throws ApiExc * documentation](https://developers.fireblocks.com/reference/api-error-codes). * * @param orderId The ID of the order for which the order requirement is issued. (required) - * @return CompletableFuture<ApiResponse<OrderRequirementDetails>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<OrderRequirementDetails>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getOrderRequirements( - String orderId) throws ApiException { + String orderId) { try { HttpRequest.Builder localVarRequestBuilder = getOrderRequirementsRequestBuilder(orderId); @@ -558,7 +622,17 @@ public CompletableFuture> getOrderRequireme } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -605,8 +679,8 @@ private HttpRequest.Builder getOrderRequirementsRequestBuilder(String orderId) * @param startTime (optional) * @param endTime (optional) * @param assetConversionType (optional) - * @return CompletableFuture<ApiResponse<GetOrdersResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetOrdersResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getOrders( Integer pageSize, @@ -617,8 +691,7 @@ public CompletableFuture> getOrders( List statuses, Integer startTime, Integer endTime, - String assetConversionType) - throws ApiException { + String assetConversionType) { try { HttpRequest.Builder localVarRequestBuilder = getOrdersRequestBuilder( @@ -657,7 +730,15 @@ public CompletableFuture> getOrders( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -736,11 +817,11 @@ private HttpRequest.Builder getOrdersRequestBuilder( * documentation](https://developers.fireblocks.com/reference/api-error-codes). * * @param providerId The unique identifier of the provider. (required) - * @return CompletableFuture<ApiResponse<TradingProvider>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TradingProvider>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getTradingProviderById(String providerId) - throws ApiException { + public CompletableFuture> getTradingProviderById( + String providerId) { try { HttpRequest.Builder localVarRequestBuilder = getTradingProviderByIdRequestBuilder(providerId); @@ -771,7 +852,15 @@ public CompletableFuture> getTradingProviderById(St } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -813,11 +902,11 @@ private HttpRequest.Builder getTradingProviderByIdRequestBuilder(String provider * * @param pageSize Page size for pagination. (optional, default to 20) * @param pageCursor Page cursor for pagination. (optional) - * @return CompletableFuture<ApiResponse<ProvidersListResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ProvidersListResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getTradingProviders( - Integer pageSize, String pageCursor) throws ApiException { + Integer pageSize, String pageCursor) { try { HttpRequest.Builder localVarRequestBuilder = getTradingProvidersRequestBuilder(pageSize, pageCursor); @@ -848,7 +937,17 @@ public CompletableFuture> getTradingProviders } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -909,14 +1008,13 @@ private HttpRequest.Builder getTradingProvidersRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> submitOrderRequirements( SubmitOrderRequirementRequest submitOrderRequirementRequest, String orderId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = submitOrderRequirementsRequestBuilder( @@ -938,7 +1036,14 @@ public CompletableFuture> submitOrderRequirements( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1009,11 +1114,11 @@ private HttpRequest.Builder submitOrderRequirementsRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> uploadOrderRequirementFile( - String fileKey, File _file, String orderId, String idempotencyKey) throws ApiException { + String fileKey, File _file, String orderId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = uploadOrderRequirementFileRequestBuilder( @@ -1036,7 +1141,14 @@ public CompletableFuture> uploadOrderRequirementFile( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/TransactionsApi.java b/src/main/java/com/fireblocks/sdk/api/TransactionsApi.java index 491f931e..4ca16478 100644 --- a/src/main/java/com/fireblocks/sdk/api/TransactionsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TransactionsApi.java @@ -44,7 +44,10 @@ import java.util.List; import java.util.StringJoiner; import java.util.UUID; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -80,6 +83,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -98,11 +123,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<CancelTransactionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CancelTransactionResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> cancelTransaction( - String txId, UUID xEndUserWalletId, String idempotencyKey) throws ApiException { + String txId, UUID xEndUserWalletId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = cancelTransactionRequestBuilder(txId, xEndUserWalletId, idempotencyKey); @@ -132,7 +157,17 @@ public CompletableFuture> cancelTransacti } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -180,12 +215,11 @@ private HttpRequest.Builder cancelTransactionRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<CreateTransactionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CreateTransactionResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createTransaction( - TransactionRequest transactionRequest, UUID xEndUserWalletId, String idempotencyKey) - throws ApiException { + TransactionRequest transactionRequest, UUID xEndUserWalletId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createTransactionRequestBuilder( @@ -216,7 +250,17 @@ public CompletableFuture> createTransacti } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -268,15 +312,14 @@ private HttpRequest.Builder createTransactionRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<DropTransactionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<DropTransactionResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> dropTransaction( String txId, DropTransactionRequest dropTransactionRequest, UUID xEndUserWalletId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = dropTransactionRequestBuilder( @@ -307,7 +350,17 @@ public CompletableFuture> dropTransaction( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -372,11 +425,11 @@ private HttpRequest.Builder dropTransactionRequestBuilder( * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. * * @param assetId The asset for which to estimate the fee (required) - * @return CompletableFuture<ApiResponse<EstimatedNetworkFeeResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EstimatedNetworkFeeResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> estimateNetworkFee( - String assetId) throws ApiException { + String assetId) { try { HttpRequest.Builder localVarRequestBuilder = estimateNetworkFeeRequestBuilder(assetId); return memberVarHttpClient @@ -406,7 +459,17 @@ public CompletableFuture> estimateNetwo } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -463,11 +526,11 @@ private HttpRequest.Builder estimateNetworkFeeRequestBuilder(String assetId) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<EstimatedTransactionFeeResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<EstimatedTransactionFeeResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> estimateTransactionFee( - TransactionRequest transactionRequest, String idempotencyKey) throws ApiException { + TransactionRequest transactionRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = estimateTransactionFeeRequestBuilder(transactionRequest, idempotencyKey); @@ -498,7 +561,17 @@ public CompletableFuture> estimateT } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -546,11 +619,11 @@ private HttpRequest.Builder estimateTransactionFeeRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<FreezeTransactionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<FreezeTransactionResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> freezeTransaction( - String txId, UUID xEndUserWalletId, String idempotencyKey) throws ApiException { + String txId, UUID xEndUserWalletId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = freezeTransactionRequestBuilder(txId, xEndUserWalletId, idempotencyKey); @@ -580,7 +653,17 @@ public CompletableFuture> freezeTransacti } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -621,11 +704,10 @@ private HttpRequest.Builder freezeTransactionRequestBuilder( * Editor, Viewer. * * @param txId The ID of the transaction to return (required) - * @return CompletableFuture<ApiResponse<TransactionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TransactionResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getTransaction(String txId) - throws ApiException { + public CompletableFuture> getTransaction(String txId) { try { HttpRequest.Builder localVarRequestBuilder = getTransactionRequestBuilder(txId); return memberVarHttpClient @@ -654,7 +736,15 @@ public CompletableFuture> getTransaction(String } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -687,11 +777,11 @@ private HttpRequest.Builder getTransactionRequestBuilder(String txId) throws Api * Viewer. * * @param externalTxId The external ID of the transaction to return (required) - * @return CompletableFuture<ApiResponse<TransactionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TransactionResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getTransactionByExternalId( - String externalTxId) throws ApiException { + String externalTxId) { try { HttpRequest.Builder localVarRequestBuilder = getTransactionByExternalIdRequestBuilder(externalTxId); @@ -723,7 +813,15 @@ public CompletableFuture> getTransactionByExter } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -786,8 +884,8 @@ private HttpRequest.Builder getTransactionByExternalIdRequestBuilder(String exte * (optional) * @param destWalletId Returns only results where the destination is a specific end user wallet * (optional) - * @return CompletableFuture<ApiResponse<List<TransactionResponse>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<TransactionResponse>>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture>> getTransactions( String next, @@ -805,8 +903,7 @@ public CompletableFuture>> getTransactions String assets, String txHash, String sourceWalletId, - String destWalletId) - throws ApiException { + String destWalletId) { try { HttpRequest.Builder localVarRequestBuilder = getTransactionsRequestBuilder( @@ -853,7 +950,17 @@ public CompletableFuture>> getTransactions } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -951,15 +1058,14 @@ private HttpRequest.Builder getTransactionsRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SetConfirmationsThresholdResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SetConfirmationsThresholdResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setConfirmationThresholdByTransactionHash( String txHash, SetConfirmationsThresholdRequest setConfirmationsThresholdRequest, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setConfirmationThresholdByTransactionHashRequestBuilder( @@ -992,7 +1098,18 @@ private HttpRequest.Builder getTransactionsRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1046,15 +1163,14 @@ private HttpRequest.Builder setConfirmationThresholdByTransactionHashRequestBuil * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SetConfirmationsThresholdResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SetConfirmationsThresholdResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setTransactionConfirmationThreshold( String txId, SetConfirmationsThresholdRequest setConfirmationsThresholdRequest, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setTransactionConfirmationThresholdRequestBuilder( @@ -1087,7 +1203,18 @@ private HttpRequest.Builder setConfirmationThresholdByTransactionHashRequestBuil } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1141,11 +1268,11 @@ private HttpRequest.Builder setTransactionConfirmationThresholdRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<UnfreezeTransactionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<UnfreezeTransactionResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> unfreezeTransaction( - String txId, UUID xEndUserWalletId, String idempotencyKey) throws ApiException { + String txId, UUID xEndUserWalletId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = unfreezeTransactionRequestBuilder(txId, xEndUserWalletId, idempotencyKey); @@ -1176,7 +1303,17 @@ public CompletableFuture> unfreezeTrans } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1217,11 +1354,11 @@ private HttpRequest.Builder unfreezeTransactionRequestBuilder( * * @param assetId The asset of the address (required) * @param address The address to validate (required) - * @return CompletableFuture<ApiResponse<ValidateAddressResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ValidateAddressResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> validateAddress( - String assetId, String address) throws ApiException { + String assetId, String address) { try { HttpRequest.Builder localVarRequestBuilder = validateAddressRequestBuilder(assetId, address); @@ -1251,7 +1388,17 @@ public CompletableFuture> validateAddress( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/TravelRuleApi.java b/src/main/java/com/fireblocks/sdk/api/TravelRuleApi.java index 81fe9139..975e20fe 100644 --- a/src/main/java/com/fireblocks/sdk/api/TravelRuleApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TravelRuleApi.java @@ -41,7 +41,10 @@ import java.util.List; import java.util.StringJoiner; import java.util.UUID; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -77,6 +80,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -92,13 +117,12 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<TrustProofOfAddressCreateResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TrustProofOfAddressCreateResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createTrustProofOfAddress( - TrustProofOfAddressRequest trustProofOfAddressRequest, String idempotencyKey) - throws ApiException { + TrustProofOfAddressRequest trustProofOfAddressRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createTrustProofOfAddressRequestBuilder( @@ -130,7 +154,18 @@ private String formatExceptionMessage(String operationId, int statusCode, String } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -178,11 +213,11 @@ private HttpRequest.Builder createTrustProofOfAddressRequestBuilder( * verification. * * @param transactionId Fireblocks transaction ID (UUID format) (required) - * @return CompletableFuture<ApiResponse<TrustProofOfAddressResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TrustProofOfAddressResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getTrustProofOfAddress( - UUID transactionId) throws ApiException { + UUID transactionId) { try { HttpRequest.Builder localVarRequestBuilder = getTrustProofOfAddressRequestBuilder(transactionId); @@ -213,7 +248,17 @@ public CompletableFuture> getTrustProof } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -255,11 +300,11 @@ private HttpRequest.Builder getTrustProofOfAddressRequestBuilder(UUID transactio * differently: `documents` and `ddq` return a small default set of * identifying fields instead of the requested one, and `travelRule_EMAIL` returns * an empty object. An unrecognised field name causes an error. (optional - * @return CompletableFuture<ApiResponse<TravelRuleVASP>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TravelRuleVASP>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getVASPByDID( - String did, List fields) throws ApiException { + String did, List fields) { try { HttpRequest.Builder localVarRequestBuilder = getVASPByDIDRequestBuilder(did, fields); return memberVarHttpClient @@ -288,7 +333,15 @@ public CompletableFuture> getVASPByDID( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -355,8 +408,8 @@ private HttpRequest.Builder getVASPByDIDRequestBuilder(String did, List * be returned (i.e., VASPs that have already been reviewed to this status). (optional) * @param pageCursor Cursor for pagination. When provided, the response will include the next * page of results. (optional) - * @return CompletableFuture<ApiResponse<TravelRuleGetAllVASPsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TravelRuleGetAllVASPsResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getVASPs( String order, @@ -364,8 +417,7 @@ public CompletableFuture> getVASPs( List fields, String search, String reviewValue, - String pageCursor) - throws ApiException { + String pageCursor) { try { HttpRequest.Builder localVarRequestBuilder = getVASPsRequestBuilder( @@ -396,7 +448,17 @@ public CompletableFuture> getVASPs( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -459,11 +521,11 @@ private HttpRequest.Builder getVASPsRequestBuilder( * vaspDid value in response if none assigned. * * @param vaultAccountId The ID of the vault account (required) - * @return CompletableFuture<ApiResponse<TravelRuleVaspForVault>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TravelRuleVaspForVault>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getVaspForVault( - String vaultAccountId) throws ApiException { + String vaultAccountId) { try { HttpRequest.Builder localVarRequestBuilder = getVaspForVaultRequestBuilder(vaultAccountId); @@ -493,7 +555,17 @@ public CompletableFuture> getVaspForVault( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -533,14 +605,13 @@ private HttpRequest.Builder getVaspForVaultRequestBuilder(String vaultAccountId) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<TravelRuleVaspForVault>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TravelRuleVaspForVault>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setVaspForVault( TravelRuleVaspForVault travelRuleVaspForVault, String vaultAccountId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setVaspForVaultRequestBuilder( @@ -571,7 +642,17 @@ public CompletableFuture> setVaspForVault( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -626,12 +707,11 @@ private HttpRequest.Builder setVaspForVaultRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<TravelRuleUpdateVASPDetails>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TravelRuleUpdateVASPDetails>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> updateVasp( - TravelRuleUpdateVASPDetails travelRuleUpdateVASPDetails, String idempotencyKey) - throws ApiException { + TravelRuleUpdateVASPDetails travelRuleUpdateVASPDetails, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateVaspRequestBuilder(travelRuleUpdateVASPDetails, idempotencyKey); @@ -661,7 +741,17 @@ public CompletableFuture> updateVasp( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -716,16 +806,15 @@ private HttpRequest.Builder updateVaspRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<TravelRuleValidateTransactionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<TravelRuleValidateTransactionResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> validateFullTravelRuleTransaction( TravelRuleValidateFullTransactionRequest travelRuleValidateFullTransactionRequest, List notation, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = validateFullTravelRuleTransactionRequestBuilder( @@ -758,7 +847,18 @@ private HttpRequest.Builder updateVaspRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/UserGroupsBetaApi.java b/src/main/java/com/fireblocks/sdk/api/UserGroupsBetaApi.java index 1160e463..50a25db9 100644 --- a/src/main/java/com/fireblocks/sdk/api/UserGroupsBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/UserGroupsBetaApi.java @@ -32,7 +32,10 @@ import java.net.http.HttpResponse; import java.time.Duration; import java.util.List; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -68,6 +71,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -83,12 +108,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<CreateUserGroupResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CreateUserGroupResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createUserGroup( - UserGroupCreateRequest userGroupCreateRequest, String idempotencyKey) - throws ApiException { + UserGroupCreateRequest userGroupCreateRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createUserGroupRequestBuilder(userGroupCreateRequest, idempotencyKey); @@ -118,7 +142,17 @@ public CompletableFuture> createUserGroup( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -164,11 +198,10 @@ private HttpRequest.Builder createUserGroupRequestBuilder( * only for API keys with Admin permissions. * * @param groupId The ID of the user group (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ - public CompletableFuture> deleteUserGroup(String groupId) - throws ApiException { + public CompletableFuture> deleteUserGroup(String groupId) { try { HttpRequest.Builder localVarRequestBuilder = deleteUserGroupRequestBuilder(groupId); return memberVarHttpClient @@ -187,7 +220,14 @@ public CompletableFuture> deleteUserGroup(String groupId) localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -221,11 +261,10 @@ private HttpRequest.Builder deleteUserGroupRequestBuilder(String groupId) throws * keys with Admin permissions. * * @param groupId The ID of the user group (required) - * @return CompletableFuture<ApiResponse<UserGroupResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<UserGroupResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getUserGroup(String groupId) - throws ApiException { + public CompletableFuture> getUserGroup(String groupId) { try { HttpRequest.Builder localVarRequestBuilder = getUserGroupRequestBuilder(groupId); return memberVarHttpClient @@ -254,7 +293,15 @@ public CompletableFuture> getUserGroup(String gro } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -287,11 +334,10 @@ private HttpRequest.Builder getUserGroupRequestBuilder(String groupId) throws Ap * available only for API keys with Admin/Non Signing Admin permissions. Endpoint Permission: * Admin, Non-Signing Admin. * - * @return CompletableFuture<ApiResponse<List<UserGroupResponse>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<UserGroupResponse>>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture>> getUserGroups() - throws ApiException { + public CompletableFuture>> getUserGroups() { try { HttpRequest.Builder localVarRequestBuilder = getUserGroupsRequestBuilder(); return memberVarHttpClient @@ -321,7 +367,17 @@ public CompletableFuture>> getUserGroups() } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -356,12 +412,11 @@ private HttpRequest.Builder getUserGroupsRequestBuilder() throws ApiException { * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<UserGroupCreateResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<UserGroupCreateResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> updateUserGroup( - UserGroupUpdateRequest userGroupUpdateRequest, String groupId, String idempotencyKey) - throws ApiException { + UserGroupUpdateRequest userGroupUpdateRequest, String groupId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateUserGroupRequestBuilder(userGroupUpdateRequest, groupId, idempotencyKey); @@ -391,7 +446,17 @@ public CompletableFuture> updateUserGroup( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/UsersApi.java b/src/main/java/com/fireblocks/sdk/api/UsersApi.java index a8c03797..3833ea6f 100644 --- a/src/main/java/com/fireblocks/sdk/api/UsersApi.java +++ b/src/main/java/com/fireblocks/sdk/api/UsersApi.java @@ -27,7 +27,10 @@ import java.net.http.HttpResponse; import java.time.Duration; import java.util.List; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -63,6 +66,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -74,10 +99,10 @@ private String formatExceptionMessage(String operationId, int statusCode, String * List users List all users for the workspace. Please note that this endpoint is available only * for API keys with Admin permissions. * - * @return CompletableFuture<ApiResponse<List<UserResponse>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<UserResponse>>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture>> getUsers() throws ApiException { + public CompletableFuture>> getUsers() { try { HttpRequest.Builder localVarRequestBuilder = getUsersRequestBuilder(); return memberVarHttpClient @@ -107,7 +132,15 @@ public CompletableFuture>> getUsers() throws ApiE } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/UtxoManagementBetaApi.java b/src/main/java/com/fireblocks/sdk/api/UtxoManagementBetaApi.java index cda561e1..a9d11531 100644 --- a/src/main/java/com/fireblocks/sdk/api/UtxoManagementBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/UtxoManagementBetaApi.java @@ -34,7 +34,10 @@ import java.util.List; import java.util.StringJoiner; import java.util.UUID; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -70,6 +73,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -100,8 +125,8 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param txId Filter by the Fireblocks transaction ID that created the UTXOs. (optional) * @param minAmount Minimum amount filter (optional) * @param maxAmount Maximum amount filter (optional) - * @return CompletableFuture<ApiResponse<ListUtxosResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ListUtxosResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getUtxos( String vaultAccountId, @@ -118,8 +143,7 @@ public CompletableFuture> getUtxos( String txHash, UUID txId, String minAmount, - String maxAmount) - throws ApiException { + String maxAmount) { try { HttpRequest.Builder localVarRequestBuilder = getUtxosRequestBuilder( @@ -164,7 +188,15 @@ public CompletableFuture> getUtxos( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -268,15 +300,14 @@ private HttpRequest.Builder getUtxosRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<AttachDetachUtxoLabelsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AttachDetachUtxoLabelsResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> updateUtxoLabels( AttachDetachUtxoLabelsRequest attachDetachUtxoLabelsRequest, String vaultAccountId, String assetId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateUtxoLabelsRequestBuilder( @@ -307,7 +338,17 @@ public CompletableFuture> updateUtxo } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/VaultsApi.java b/src/main/java/com/fireblocks/sdk/api/VaultsApi.java index cee776ad..384abfe8 100644 --- a/src/main/java/com/fireblocks/sdk/api/VaultsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/VaultsApi.java @@ -68,7 +68,10 @@ import java.util.List; import java.util.StringJoiner; import java.util.UUID; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -104,6 +107,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -124,15 +149,14 @@ private String formatExceptionMessage(String operationId, int statusCode, String * first request. The idempotency key is valid for 24 hours. (optional) * @param blockchainWalletType Optional immutable blockchain wallet type to store per * tenant+vault (optional) - * @return CompletableFuture<ApiResponse<CreateVaultAssetResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CreateVaultAssetResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> activateAssetForVaultAccount( String vaultAccountId, String assetId, String idempotencyKey, - String blockchainWalletType) - throws ApiException { + String blockchainWalletType) { try { HttpRequest.Builder localVarRequestBuilder = activateAssetForVaultAccountRequestBuilder( @@ -165,7 +189,17 @@ public CompletableFuture> activateAssetFor } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -232,12 +266,11 @@ private HttpRequest.Builder activateAssetForVaultAccountRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<UsdcGatewayWalletStatusResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<UsdcGatewayWalletStatusResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - activateUsdcGatewayWalletBeta(String vaultAccountId, String idempotencyKey) - throws ApiException { + activateUsdcGatewayWalletBeta(String vaultAccountId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = activateUsdcGatewayWalletBetaRequestBuilder(vaultAccountId, idempotencyKey); @@ -269,7 +302,17 @@ private HttpRequest.Builder activateAssetForVaultAccountRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -313,15 +356,14 @@ private HttpRequest.Builder activateUsdcGatewayWalletBetaRequestBuilder( * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) * @return - * CompletableFuture<ApiResponse<VaultAccountsTagAttachmentOperationsResponse>> - * @throws ApiException if fails to make API call + * CompletableFuture<ApiResponse<VaultAccountsTagAttachmentOperationsResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> attachOrDetachTagsFromVaultAccounts( VaultAccountsTagAttachmentOperationsRequest vaultAccountsTagAttachmentOperationsRequest, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = attachOrDetachTagsFromVaultAccountsRequestBuilder( @@ -355,7 +397,18 @@ private HttpRequest.Builder activateUsdcGatewayWalletBetaRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -409,12 +462,11 @@ private HttpRequest.Builder attachOrDetachTagsFromVaultAccountsRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<CreateAddressResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CreateAddressResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createLegacyAddress( - String vaultAccountId, String assetId, String addressId, String idempotencyKey) - throws ApiException { + String vaultAccountId, String assetId, String addressId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createLegacyAddressRequestBuilder( @@ -446,7 +498,17 @@ public CompletableFuture> createLegacyAddress } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -494,12 +556,11 @@ private HttpRequest.Builder createLegacyAddressRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<JobCreated>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<JobCreated>>, which completes exceptionally + * with an {@link ApiException} if the API call fails */ public CompletableFuture> createMultipleAccounts( - CreateMultipleAccountsRequest createMultipleAccountsRequest, String idempotencyKey) - throws ApiException { + CreateMultipleAccountsRequest createMultipleAccountsRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createMultipleAccountsRequestBuilder( @@ -531,7 +592,15 @@ public CompletableFuture> createMultipleAccounts( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -584,13 +653,12 @@ private HttpRequest.Builder createMultipleAccountsRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<JobCreated>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<JobCreated>>, which completes exceptionally + * with an {@link ApiException} if the API call fails */ public CompletableFuture> createMultipleDepositAddresses( CreateMultipleDepositAddressesRequest createMultipleDepositAddressesRequest, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createMultipleDepositAddressesRequestBuilder( @@ -623,7 +691,15 @@ public CompletableFuture> createMultipleDepositAddresses } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -677,12 +753,11 @@ private HttpRequest.Builder createMultipleDepositAddressesRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<VaultAccount>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<VaultAccount>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createVaultAccount( - CreateVaultAccountRequest createVaultAccountRequest, String idempotencyKey) - throws ApiException { + CreateVaultAccountRequest createVaultAccountRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createVaultAccountRequestBuilder(createVaultAccountRequest, idempotencyKey); @@ -713,7 +788,15 @@ public CompletableFuture> createVaultAccount( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -768,16 +851,15 @@ private HttpRequest.Builder createVaultAccountRequestBuilder( * first request. The idempotency key is valid for 24 hours. (optional) * @param blockchainWalletType Optional immutable blockchain wallet type to store per * tenant+vault (optional) - * @return CompletableFuture<ApiResponse<CreateVaultAssetResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CreateVaultAssetResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createVaultAccountAsset( String vaultAccountId, String assetId, CreateAssetsRequest createAssetsRequest, String idempotencyKey, - String blockchainWalletType) - throws ApiException { + String blockchainWalletType) { try { HttpRequest.Builder localVarRequestBuilder = createVaultAccountAssetRequestBuilder( @@ -813,7 +895,17 @@ public CompletableFuture> createVaultAccou } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -888,15 +980,14 @@ private HttpRequest.Builder createVaultAccountAssetRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<CreateAddressResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CreateAddressResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> createVaultAccountAssetAddress( String vaultAccountId, String assetId, CreateAddressRequest createAddressRequest, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createVaultAccountAssetAddressRequestBuilder( @@ -929,7 +1020,17 @@ public CompletableFuture> createVaultAccountA } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -985,12 +1086,11 @@ private HttpRequest.Builder createVaultAccountAssetAddressRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<UsdcGatewayWalletStatusResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<UsdcGatewayWalletStatusResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - deactivateUsdcGatewayWalletBeta(String vaultAccountId, String idempotencyKey) - throws ApiException { + deactivateUsdcGatewayWalletBeta(String vaultAccountId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = deactivateUsdcGatewayWalletBetaRequestBuilder(vaultAccountId, idempotencyKey); @@ -1022,7 +1122,17 @@ private HttpRequest.Builder createVaultAccountAssetAddressRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1066,11 +1176,11 @@ private HttpRequest.Builder deactivateUsdcGatewayWalletBetaRequestBuilder( * @param vaultAccountId The ID of the vault account (required) * @param automationId The ID of the deposit automation, returned when it was created or read * (required) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> disableUsdcGatewayDepositAutomationScheduleBeta( - String vaultAccountId, UUID automationId) throws ApiException { + String vaultAccountId, UUID automationId) { try { HttpRequest.Builder localVarRequestBuilder = disableUsdcGatewayDepositAutomationScheduleBetaRequestBuilder( @@ -1093,7 +1203,14 @@ public CompletableFuture> disableUsdcGatewayDepositAutomationS localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1147,8 +1264,8 @@ private HttpRequest.Builder disableUsdcGatewayDepositAutomationScheduleBetaReque * and is returned at the response of the previous page. (optional) * @param limit The maximum number of vault wallets in a single response. The default is 200 and * the maximum is 1000. (optional, default to 200) - * @return CompletableFuture<ApiResponse<PaginatedAssetWalletResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<PaginatedAssetWalletResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getAssetWallets( BigDecimal totalAmountLargerThan, @@ -1156,8 +1273,7 @@ public CompletableFuture> getAssetWall String orderBy, String before, String after, - BigDecimal limit) - throws ApiException { + BigDecimal limit) { try { HttpRequest.Builder localVarRequestBuilder = getAssetWalletsRequestBuilder( @@ -1188,7 +1304,17 @@ public CompletableFuture> getAssetWall } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1253,11 +1379,11 @@ private HttpRequest.Builder getAssetWalletsRequestBuilder( * Non-Signing Admin, Signer, Approver, Editor, and Viewer. * * @param jobId The ID of the job to create addresses (required) - * @return CompletableFuture<ApiResponse<CreateMultipleDepositAddressesJobStatus>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CreateMultipleDepositAddressesJobStatus>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getCreateMultipleDepositAddressesJobStatus(String jobId) throws ApiException { + getCreateMultipleDepositAddressesJobStatus(String jobId) { try { HttpRequest.Builder localVarRequestBuilder = getCreateMultipleDepositAddressesJobStatusRequestBuilder(jobId); @@ -1290,7 +1416,18 @@ private HttpRequest.Builder getAssetWalletsRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1326,11 +1463,11 @@ private HttpRequest.Builder getCreateMultipleDepositAddressesJobStatusRequestBui * Non-Signing Admin, Signer, Approver, Editor, Viewer. * * @param jobId The ID of the job to create addresses (required) - * @return CompletableFuture<ApiResponse<CreateMultipleVaultAccountsJobStatus>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CreateMultipleVaultAccountsJobStatus>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getCreateMultipleVaultAccountsJobStatus(String jobId) throws ApiException { + getCreateMultipleVaultAccountsJobStatus(String jobId) { try { HttpRequest.Builder localVarRequestBuilder = getCreateMultipleVaultAccountsJobStatusRequestBuilder(jobId); @@ -1362,7 +1499,18 @@ private HttpRequest.Builder getCreateMultipleDepositAddressesJobStatusRequestBui } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1398,11 +1546,11 @@ private HttpRequest.Builder getCreateMultipleVaultAccountsJobStatusRequestBuilde * * @param vaultAccountId The ID of the vault account (required) * @param assetId The ID of the asset (required) - * @return CompletableFuture<ApiResponse<GetMaxBipIndexUsedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetMaxBipIndexUsedResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getMaxBipIndexUsed( - String vaultAccountId, String assetId) throws ApiException { + String vaultAccountId, String assetId) { try { HttpRequest.Builder localVarRequestBuilder = getMaxBipIndexUsedRequestBuilder(vaultAccountId, assetId); @@ -1433,7 +1581,17 @@ public CompletableFuture> getMaxBipIndex } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1491,8 +1649,8 @@ private HttpRequest.Builder getMaxBipIndexUsedRequestBuilder( * This feature is currently in beta and might be subject to changes. (optional) * @param maxAmount Maximum UTXO amount in the asset's base unit. Requires the UTXO Manager. * This feature is currently in beta and might be subject to changes. (optional) - * @return CompletableFuture<ApiResponse<GetMaxSpendableAmountResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetMaxSpendableAmountResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getMaxSpendableAmount( String vaultAccountId, @@ -1503,8 +1661,7 @@ public CompletableFuture> getMaxSpend List excludeAnyLabels, String address, String minAmount, - String maxAmount) - throws ApiException { + String maxAmount) { try { HttpRequest.Builder localVarRequestBuilder = getMaxSpendableAmountRequestBuilder( @@ -1544,7 +1701,17 @@ public CompletableFuture> getMaxSpend } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1636,8 +1803,8 @@ private HttpRequest.Builder getMaxSpendableAmountRequestBuilder( * be included (optional * @param excludeTagIds List of tag IDs to exclude. Vault accounts with any of these tags will * be filtered out (optional - * @return CompletableFuture<ApiResponse<VaultAccountsPagedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<VaultAccountsPagedResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getPagedVaultAccounts( String namePrefix, @@ -1650,8 +1817,7 @@ public CompletableFuture> getPagedVaultA BigDecimal limit, List tagIds, List includeTagIds, - List excludeTagIds) - throws ApiException { + List excludeTagIds) { try { HttpRequest.Builder localVarRequestBuilder = getPagedVaultAccountsRequestBuilder( @@ -1693,7 +1859,17 @@ public CompletableFuture> getPagedVaultA } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1776,11 +1952,11 @@ private HttpRequest.Builder getPagedVaultAccountsRequestBuilder( * @param derivationPath (required) * @param algorithm (required) * @param compressed (optional) - * @return CompletableFuture<ApiResponse<PublicKeyInformation>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<PublicKeyInformation>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getPublicKeyInfo( - String derivationPath, String algorithm, Boolean compressed) throws ApiException { + String derivationPath, String algorithm, Boolean compressed) { try { HttpRequest.Builder localVarRequestBuilder = getPublicKeyInfoRequestBuilder(derivationPath, algorithm, compressed); @@ -1810,7 +1986,17 @@ public CompletableFuture> getPublicKeyInfo( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1868,16 +2054,15 @@ private HttpRequest.Builder getPublicKeyInfoRequestBuilder( * @param change (required) * @param addressIndex (required) * @param compressed (optional) - * @return CompletableFuture<ApiResponse<PublicKeyInformation>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<PublicKeyInformation>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getPublicKeyInfoForAddress( String vaultAccountId, String assetId, BigDecimal change, BigDecimal addressIndex, - Boolean compressed) - throws ApiException { + Boolean compressed) { try { HttpRequest.Builder localVarRequestBuilder = getPublicKeyInfoForAddressRequestBuilder( @@ -1910,7 +2095,17 @@ public CompletableFuture> getPublicKeyInfoForA } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1976,11 +2171,11 @@ private HttpRequest.Builder getPublicKeyInfoForAddressRequestBuilder( * * @param vaultAccountId The ID of the vault account (required) * @param assetId The ID of the asset (required) - * @return CompletableFuture<ApiResponse<List<UnspentInputsResponse>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<UnspentInputsResponse>>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture>> getUnspentInputs( - String vaultAccountId, String assetId) throws ApiException { + String vaultAccountId, String assetId) { try { HttpRequest.Builder localVarRequestBuilder = getUnspentInputsRequestBuilder(vaultAccountId, assetId); @@ -2011,7 +2206,17 @@ public CompletableFuture>> getUnspentInp } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2050,11 +2255,11 @@ private HttpRequest.Builder getUnspentInputsRequestBuilder( * Admin, Signer, Approver, Editor, Viewer. * * @param vaultAccountId The ID of the vault account (required) - * @return CompletableFuture<ApiResponse<GetAutomationSettingsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetAutomationSettingsResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getUsdcGatewayDepositAutomationBeta(String vaultAccountId) throws ApiException { + getUsdcGatewayDepositAutomationBeta(String vaultAccountId) { try { HttpRequest.Builder localVarRequestBuilder = getUsdcGatewayDepositAutomationBetaRequestBuilder(vaultAccountId); @@ -2086,7 +2291,17 @@ private HttpRequest.Builder getUnspentInputsRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2123,11 +2338,11 @@ private HttpRequest.Builder getUsdcGatewayDepositAutomationBetaRequestBuilder( * changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. * * @param vaultAccountId The ID of the vault account (required) - * @return CompletableFuture<ApiResponse<UsdcGatewayWalletInfoResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<UsdcGatewayWalletInfoResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getUsdcGatewayWalletInfoBeta(String vaultAccountId) throws ApiException { + getUsdcGatewayWalletInfoBeta(String vaultAccountId) { try { HttpRequest.Builder localVarRequestBuilder = getUsdcGatewayWalletInfoBetaRequestBuilder(vaultAccountId); @@ -2159,7 +2374,17 @@ private HttpRequest.Builder getUsdcGatewayDepositAutomationBetaRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2195,11 +2420,10 @@ private HttpRequest.Builder getUsdcGatewayWalletInfoBetaRequestBuilder(String va * Non-Signing Admin, Signer, Approver, Editor, Viewer. * * @param vaultAccountId The ID of the vault account (required) - * @return CompletableFuture<ApiResponse<VaultAccount>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<VaultAccount>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getVaultAccount(String vaultAccountId) - throws ApiException { + public CompletableFuture> getVaultAccount(String vaultAccountId) { try { HttpRequest.Builder localVarRequestBuilder = getVaultAccountRequestBuilder(vaultAccountId); @@ -2229,7 +2453,15 @@ public CompletableFuture> getVaultAccount(String vault } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2267,11 +2499,11 @@ private HttpRequest.Builder getVaultAccountRequestBuilder(String vaultAccountId) * * @param vaultAccountId The ID of the vault account to return (required) * @param assetId The ID of the asset (required) - * @return CompletableFuture<ApiResponse<VaultAsset>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<VaultAsset>>, which completes exceptionally + * with an {@link ApiException} if the API call fails */ public CompletableFuture> getVaultAccountAsset( - String vaultAccountId, String assetId) throws ApiException { + String vaultAccountId, String assetId) { try { HttpRequest.Builder localVarRequestBuilder = getVaultAccountAssetRequestBuilder(vaultAccountId, assetId); @@ -2302,7 +2534,15 @@ public CompletableFuture> getVaultAccountAsset( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2344,8 +2584,8 @@ private HttpRequest.Builder getVaultAccountAssetRequestBuilder( * @param limit (optional) * @param before (optional) * @param after (optional) - * @return CompletableFuture<ApiResponse<PaginatedAddressResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<PaginatedAddressResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getVaultAccountAssetAddressesPaginated( @@ -2353,8 +2593,7 @@ private HttpRequest.Builder getVaultAccountAssetRequestBuilder( String assetId, BigDecimal limit, String before, - String after) - throws ApiException { + String after) { try { HttpRequest.Builder localVarRequestBuilder = getVaultAccountAssetAddressesPaginatedRequestBuilder( @@ -2387,7 +2626,17 @@ private HttpRequest.Builder getVaultAccountAssetRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2448,11 +2697,11 @@ private HttpRequest.Builder getVaultAccountAssetAddressesPaginatedRequestBuilder * * @param accountNamePrefix (optional) * @param accountNameSuffix (optional) - * @return CompletableFuture<ApiResponse<List<VaultAsset>>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<List<VaultAsset>>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture>> getVaultAssets( - String accountNamePrefix, String accountNameSuffix) throws ApiException { + String accountNamePrefix, String accountNameSuffix) { try { HttpRequest.Builder localVarRequestBuilder = getVaultAssetsRequestBuilder(accountNamePrefix, accountNameSuffix); @@ -2483,7 +2732,15 @@ public CompletableFuture>> getVaultAssets( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2534,11 +2791,10 @@ private HttpRequest.Builder getVaultAssetsRequestBuilder( * accounts. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. * * @param assetId (required) - * @return CompletableFuture<ApiResponse<VaultAsset>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<VaultAsset>>, which completes exceptionally + * with an {@link ApiException} if the API call fails */ - public CompletableFuture> getVaultBalanceByAsset(String assetId) - throws ApiException { + public CompletableFuture> getVaultBalanceByAsset(String assetId) { try { HttpRequest.Builder localVarRequestBuilder = getVaultBalanceByAssetRequestBuilder(assetId); @@ -2569,7 +2825,15 @@ public CompletableFuture> getVaultBalanceByAsset(String } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2612,11 +2876,11 @@ private HttpRequest.Builder getVaultBalanceByAssetRequestBuilder(String assetId) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<VaultActionStatus>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<VaultActionStatus>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> hideVaultAccount( - String vaultAccountId, String idempotencyKey) throws ApiException { + String vaultAccountId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = hideVaultAccountRequestBuilder(vaultAccountId, idempotencyKey); @@ -2646,7 +2910,15 @@ public CompletableFuture> hideVaultAccount( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2686,11 +2958,11 @@ private HttpRequest.Builder hideVaultAccountRequestBuilder( * address. **Note:** This endpoint is currently in beta and might be subject to changes. * * @param address The blockchain address to resolve. (required) - * @return CompletableFuture<ApiResponse<AddressReverseLookupResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AddressReverseLookupResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> lookupVaultByAddress( - String address) throws ApiException { + String address) { try { HttpRequest.Builder localVarRequestBuilder = lookupVaultByAddressRequestBuilder(address); @@ -2721,7 +2993,17 @@ public CompletableFuture> lookupVaultB } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2776,16 +3058,15 @@ private HttpRequest.Builder lookupVaultByAddressRequestBuilder(String address) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<VaultActionStatus>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<VaultActionStatus>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setCustomerRefIdForAddress( SetCustomerRefIdForAddressRequest setCustomerRefIdForAddressRequest, String vaultAccountId, String assetId, String addressId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setCustomerRefIdForAddressRequestBuilder( @@ -2822,7 +3103,15 @@ public CompletableFuture> setCustomerRefIdForAddr } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2890,15 +3179,14 @@ private HttpRequest.Builder setCustomerRefIdForAddressRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<SaveAutomationSettingsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<SaveAutomationSettingsResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setUsdcGatewayDepositAutomationBeta( AutomationSettingsRequest automationSettingsRequest, String vaultAccountId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setUsdcGatewayDepositAutomationBetaRequestBuilder( @@ -2931,7 +3219,17 @@ private HttpRequest.Builder setCustomerRefIdForAddressRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -2992,12 +3290,11 @@ private HttpRequest.Builder setUsdcGatewayDepositAutomationBetaRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<VaultActionStatus>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<VaultActionStatus>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setVaultAccountAutoFuel( - SetAutoFuelRequest setAutoFuelRequest, String vaultAccountId, String idempotencyKey) - throws ApiException { + SetAutoFuelRequest setAutoFuelRequest, String vaultAccountId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setVaultAccountAutoFuelRequestBuilder( @@ -3029,7 +3326,15 @@ public CompletableFuture> setVaultAccountAutoFuel } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -3084,14 +3389,13 @@ private HttpRequest.Builder setVaultAccountAutoFuelRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<VaultActionStatus>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<VaultActionStatus>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> setVaultAccountCustomerRefId( SetCustomerRefIdRequest setCustomerRefIdRequest, String vaultAccountId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = setVaultAccountCustomerRefIdRequestBuilder( @@ -3124,7 +3428,15 @@ public CompletableFuture> setVaultAccountCustomer } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -3179,11 +3491,11 @@ private HttpRequest.Builder setVaultAccountCustomerRefIdRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<VaultActionStatus>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<VaultActionStatus>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> unhideVaultAccount( - String vaultAccountId, String idempotencyKey) throws ApiException { + String vaultAccountId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = unhideVaultAccountRequestBuilder(vaultAccountId, idempotencyKey); @@ -3214,7 +3526,15 @@ public CompletableFuture> unhideVaultAccount( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -3260,16 +3580,15 @@ private HttpRequest.Builder unhideVaultAccountRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<AutomationSettingsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<AutomationSettingsResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> updateUsdcGatewayDepositAutomationBeta( UpdateAutomationSettingsRequest updateAutomationSettingsRequest, String vaultAccountId, UUID automationId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateUsdcGatewayDepositAutomationBetaRequestBuilder( @@ -3305,7 +3624,17 @@ private HttpRequest.Builder unhideVaultAccountRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -3366,14 +3695,13 @@ private HttpRequest.Builder updateUsdcGatewayDepositAutomationBetaRequestBuilder * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<RenameVaultAccountResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<RenameVaultAccountResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> updateVaultAccount( UpdateVaultAccountRequest updateVaultAccountRequest, String vaultAccountId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateVaultAccountRequestBuilder( @@ -3405,7 +3733,17 @@ public CompletableFuture> updateVaultAcc } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -3464,16 +3802,15 @@ private HttpRequest.Builder updateVaultAccountRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<VaultActionStatus>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<VaultActionStatus>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> updateVaultAccountAssetAddress( String vaultAccountId, String assetId, String addressId, UpdateVaultAccountAssetAddressRequest updateVaultAccountAssetAddressRequest, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateVaultAccountAssetAddressRequestBuilder( @@ -3510,7 +3847,15 @@ public CompletableFuture> updateVaultAccountAsset } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -3572,11 +3917,11 @@ private HttpRequest.Builder updateVaultAccountAssetAddressRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<VaultAsset>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<VaultAsset>>, which completes exceptionally + * with an {@link ApiException} if the API call fails */ public CompletableFuture> updateVaultAccountAssetBalance( - String vaultAccountId, String assetId, String idempotencyKey) throws ApiException { + String vaultAccountId, String assetId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = updateVaultAccountAssetBalanceRequestBuilder( @@ -3609,7 +3954,15 @@ public CompletableFuture> updateVaultAccountAssetBalance } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/Web3ConnectionsApi.java b/src/main/java/com/fireblocks/sdk/api/Web3ConnectionsApi.java index 0b1973e7..befab5ef 100644 --- a/src/main/java/com/fireblocks/sdk/api/Web3ConnectionsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/Web3ConnectionsApi.java @@ -37,7 +37,10 @@ import java.util.List; import java.util.StringJoiner; import java.util.UUID; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -73,6 +76,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -91,14 +116,13 @@ private String formatExceptionMessage(String operationId, int statusCode, String * first request. The idempotency key is valid for 24 hours. (optional) * @param xEndUserWalletId Unique ID of the End-User wallet to the API request. Required for * end-user wallet operations. (optional) - * @return CompletableFuture<ApiResponse<CreateConnectionResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<CreateConnectionResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> create( CreateConnectionRequest createConnectionRequest, String idempotencyKey, - UUID xEndUserWalletId) - throws ApiException { + UUID xEndUserWalletId) { try { HttpRequest.Builder localVarRequestBuilder = createRequestBuilder(createConnectionRequest, idempotencyKey, xEndUserWalletId); @@ -128,7 +152,17 @@ public CompletableFuture> create( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -183,8 +217,8 @@ private HttpRequest.Builder createRequestBuilder( * @param sort Property to sort Web3 connections by. (optional, default to createdAt) * @param pageSize Amount of results to return in the next page. (optional, default to 10) * @param next Cursor to the next page (optional) - * @return CompletableFuture<ApiResponse<GetConnectionsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetConnectionsResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> get( UUID xEndUserWalletId, @@ -192,8 +226,7 @@ public CompletableFuture> get( GetFilterParameter filter, String sort, BigDecimal pageSize, - String next) - throws ApiException { + String next) { try { HttpRequest.Builder localVarRequestBuilder = getRequestBuilder(xEndUserWalletId, order, filter, sort, pageSize, next); @@ -223,7 +256,17 @@ public CompletableFuture> get( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -296,11 +339,10 @@ private HttpRequest.Builder getRequestBuilder( * @param id The ID of the existing Web3 connection to remove. (required) * @param xEndUserWalletId Unique ID of the End-User wallet to the API request. Required for * end-user wallet operations. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ - public CompletableFuture> remove(String id, UUID xEndUserWalletId) - throws ApiException { + public CompletableFuture> remove(String id, UUID xEndUserWalletId) { try { HttpRequest.Builder localVarRequestBuilder = removeRequestBuilder(id, xEndUserWalletId); return memberVarHttpClient @@ -319,7 +361,14 @@ public CompletableFuture> remove(String id, UUID xEndUserWalle localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -363,15 +412,14 @@ private HttpRequest.Builder removeRequestBuilder(String id, UUID xEndUserWalletI * first request. The idempotency key is valid for 24 hours. (optional) * @param xEndUserWalletId Unique ID of the End-User wallet to the API request. Required for * end-user wallet operations. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> submit( RespondToConnectionRequest respondToConnectionRequest, String id, String idempotencyKey, - UUID xEndUserWalletId) - throws ApiException { + UUID xEndUserWalletId) { try { HttpRequest.Builder localVarRequestBuilder = submitRequestBuilder( @@ -392,7 +440,14 @@ public CompletableFuture> submit( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/WebhooksApi.java b/src/main/java/com/fireblocks/sdk/api/WebhooksApi.java index bc492808..01556f2e 100644 --- a/src/main/java/com/fireblocks/sdk/api/WebhooksApi.java +++ b/src/main/java/com/fireblocks/sdk/api/WebhooksApi.java @@ -29,7 +29,10 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -65,6 +68,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -83,15 +108,14 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ResendWebhooksByTransactionIdResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ResendWebhooksByTransactionIdResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> resendTransactionWebhooks( ResendTransactionWebhooksRequest resendTransactionWebhooksRequest, String txId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = resendTransactionWebhooksRequestBuilder( @@ -123,7 +147,18 @@ private String formatExceptionMessage(String operationId, int statusCode, String } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -177,11 +212,11 @@ private HttpRequest.Builder resendTransactionWebhooksRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ResendWebhooksResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ResendWebhooksResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> resendWebhooks( - String idempotencyKey) throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = resendWebhooksRequestBuilder(idempotencyKey); @@ -211,7 +246,17 @@ public CompletableFuture> resendWebhooks( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java b/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java index 395f905c..346133ef 100644 --- a/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java +++ b/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java @@ -49,7 +49,10 @@ import java.util.List; import java.util.StringJoiner; import java.util.UUID; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -85,6 +88,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -100,11 +125,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Webhook>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Webhook>>, which completes exceptionally + * with an {@link ApiException} if the API call fails */ public CompletableFuture> createWebhook( - CreateWebhookRequest createWebhookRequest, String idempotencyKey) throws ApiException { + CreateWebhookRequest createWebhookRequest, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = createWebhookRequestBuilder(createWebhookRequest, idempotencyKey); @@ -134,7 +159,14 @@ public CompletableFuture> createWebhook( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -177,11 +209,10 @@ private HttpRequest.Builder createWebhookRequestBuilder( * Admin. * * @param webhookId The unique identifier of the webhook (required) - * @return CompletableFuture<ApiResponse<Webhook>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Webhook>>, which completes exceptionally + * with an {@link ApiException} if the API call fails */ - public CompletableFuture> deleteWebhook(UUID webhookId) - throws ApiException { + public CompletableFuture> deleteWebhook(UUID webhookId) { try { HttpRequest.Builder localVarRequestBuilder = deleteWebhookRequestBuilder(webhookId); return memberVarHttpClient @@ -210,7 +241,14 @@ public CompletableFuture> deleteWebhook(UUID webhookId) } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -244,11 +282,11 @@ private HttpRequest.Builder deleteWebhookRequestBuilder(UUID webhookId) throws A * * @param webhookId (required) * @param metricName Name of the metric to retrieve (required) - * @return CompletableFuture<ApiResponse<WebhookMetric>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<WebhookMetric>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getMetrics( - UUID webhookId, String metricName) throws ApiException { + UUID webhookId, String metricName) { try { HttpRequest.Builder localVarRequestBuilder = getMetricsRequestBuilder(webhookId, metricName); @@ -278,7 +316,15 @@ public CompletableFuture> getMetrics( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -314,10 +360,10 @@ private HttpRequest.Builder getMetricsRequestBuilder(UUID webhookId, String metr * Get mTLS CSR Returns the Fireblocks Certificate Signing Request (CSR) PEM that customers use * to generate their signed client certificate. * - * @return CompletableFuture<ApiResponse<WebhookMtlsCsrResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<WebhookMtlsCsrResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getMtlsCsr() throws ApiException { + public CompletableFuture> getMtlsCsr() { try { HttpRequest.Builder localVarRequestBuilder = getMtlsCsrRequestBuilder(); return memberVarHttpClient @@ -346,7 +392,17 @@ public CompletableFuture> getMtlsCsr() throw } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -377,11 +433,11 @@ private HttpRequest.Builder getMtlsCsrRequestBuilder() throws ApiException { * @param webhookId The ID of the webhook to fetch (required) * @param notificationId The ID of the notification to fetch (required) * @param includeData Include the data of the notification (optional) - * @return CompletableFuture<ApiResponse<NotificationWithData>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<NotificationWithData>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getNotification( - String webhookId, String notificationId, Boolean includeData) throws ApiException { + String webhookId, String notificationId, Boolean includeData) { try { HttpRequest.Builder localVarRequestBuilder = getNotificationRequestBuilder(webhookId, notificationId, includeData); @@ -411,7 +467,17 @@ public CompletableFuture> getNotification( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -467,13 +533,15 @@ private HttpRequest.Builder getNotificationRequestBuilder( * @param notificationId The ID of the notification to fetch (required) * @param pageCursor Cursor of the required page (optional) * @param pageSize Maximum number of items in the page (optional, default to 10) - * @return CompletableFuture<ApiResponse<NotificationAttemptsPaginatedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<NotificationAttemptsPaginatedResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getNotificationAttempts( - String webhookId, String notificationId, String pageCursor, BigDecimal pageSize) - throws ApiException { + String webhookId, + String notificationId, + String pageCursor, + BigDecimal pageSize) { try { HttpRequest.Builder localVarRequestBuilder = getNotificationAttemptsRequestBuilder( @@ -505,7 +573,18 @@ private HttpRequest.Builder getNotificationRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -573,8 +652,8 @@ private HttpRequest.Builder getNotificationAttemptsRequestBuilder( * @param statuses List of notification statuses to filter by (optional * @param events List of webhook event types to filter by (optional * @param resourceId Resource ID to filter by (optional) - * @return CompletableFuture<ApiResponse<NotificationPaginatedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<NotificationPaginatedResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getNotifications( UUID webhookId, @@ -586,8 +665,7 @@ public CompletableFuture> getNotifica BigDecimal endTime, List statuses, List events, - String resourceId) - throws ApiException { + String resourceId) { try { HttpRequest.Builder localVarRequestBuilder = getNotificationsRequestBuilder( @@ -627,7 +705,17 @@ public CompletableFuture> getNotifica } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -705,11 +793,11 @@ private HttpRequest.Builder getNotificationsRequestBuilder( * @param webhookId The ID of the webhook (required) * @param jobId The ID of the resend job (required) * @return - * CompletableFuture<ApiResponse<ResendFailedNotificationsJobStatusResponse>> - * @throws ApiException if fails to make API call + * CompletableFuture<ApiResponse<ResendFailedNotificationsJobStatusResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getResendByQueryJobStatus(String webhookId, String jobId) throws ApiException { + getResendByQueryJobStatus(String webhookId, String jobId) { try { HttpRequest.Builder localVarRequestBuilder = getResendByQueryJobStatusRequestBuilder(webhookId, jobId); @@ -741,7 +829,18 @@ private HttpRequest.Builder getNotificationsRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -779,11 +878,11 @@ private HttpRequest.Builder getResendByQueryJobStatusRequestBuilder( * @param webhookId The ID of the webhook (required) * @param jobId The ID of the resend job (required) * @return - * CompletableFuture<ApiResponse<ResendFailedNotificationsJobStatusResponse>> - * @throws ApiException if fails to make API call + * CompletableFuture<ApiResponse<ResendFailedNotificationsJobStatusResponse>>, + * which completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> - getResendJobStatus(String webhookId, String jobId) throws ApiException { + getResendJobStatus(String webhookId, String jobId) { try { HttpRequest.Builder localVarRequestBuilder = getResendJobStatusRequestBuilder(webhookId, jobId); @@ -815,7 +914,18 @@ private HttpRequest.Builder getResendByQueryJobStatusRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -850,10 +960,10 @@ private HttpRequest.Builder getResendJobStatusRequestBuilder(String webhookId, S * Get webhook by id Retrieve a webhook by its id * * @param webhookId The unique identifier of the webhook (required) - * @return CompletableFuture<ApiResponse<Webhook>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Webhook>>, which completes exceptionally + * with an {@link ApiException} if the API call fails */ - public CompletableFuture> getWebhook(UUID webhookId) throws ApiException { + public CompletableFuture> getWebhook(UUID webhookId) { try { HttpRequest.Builder localVarRequestBuilder = getWebhookRequestBuilder(webhookId); return memberVarHttpClient @@ -882,7 +992,14 @@ public CompletableFuture> getWebhook(UUID webhookId) throws } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -917,11 +1034,11 @@ private HttpRequest.Builder getWebhookRequestBuilder(UUID webhookId) throws ApiE * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) * @param pageCursor Cursor of the required page (optional) * @param pageSize Maximum number of items in the page (optional, default to 10) - * @return CompletableFuture<ApiResponse<WebhookPaginatedResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<WebhookPaginatedResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getWebhooks( - String order, String pageCursor, BigDecimal pageSize) throws ApiException { + String order, String pageCursor, BigDecimal pageSize) { try { HttpRequest.Builder localVarRequestBuilder = getWebhooksRequestBuilder(order, pageCursor, pageSize); @@ -951,7 +1068,17 @@ public CompletableFuture> getWebhooks( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1006,15 +1133,14 @@ private HttpRequest.Builder getWebhooksRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ResendFailedNotificationsResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ResendFailedNotificationsResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> resendFailedNotifications( ResendFailedNotificationsRequest resendFailedNotificationsRequest, String webhookId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = resendFailedNotificationsRequestBuilder( @@ -1046,7 +1172,18 @@ private HttpRequest.Builder getWebhooksRequestBuilder( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1103,11 +1240,11 @@ private HttpRequest.Builder resendFailedNotificationsRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> resendNotificationById( - String webhookId, String notificationId, String idempotencyKey) throws ApiException { + String webhookId, String notificationId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = resendNotificationByIdRequestBuilder(webhookId, notificationId, idempotencyKey); @@ -1128,7 +1265,14 @@ public CompletableFuture> resendNotificationById( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1175,12 +1319,11 @@ private HttpRequest.Builder resendNotificationByIdRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<ResendByQueryResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<ResendByQueryResponse>>, which completes + * exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> resendNotificationsByQuery( - ResendByQueryRequest resendByQueryRequest, String webhookId, String idempotencyKey) - throws ApiException { + ResendByQueryRequest resendByQueryRequest, String webhookId, String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = resendNotificationsByQueryRequestBuilder( @@ -1213,7 +1356,17 @@ public CompletableFuture> resendNotifications } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1265,14 +1418,13 @@ private HttpRequest.Builder resendNotificationsByQueryRequestBuilder( * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) - * @return CompletableFuture<ApiResponse<Void>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Void>>, which completes exceptionally with + * an {@link ApiException} if the API call fails */ public CompletableFuture> resendNotificationsByResourceId( ResendNotificationsByResourceIdRequest resendNotificationsByResourceIdRequest, String webhookId, - String idempotencyKey) - throws ApiException { + String idempotencyKey) { try { HttpRequest.Builder localVarRequestBuilder = resendNotificationsByResourceIdRequestBuilder( @@ -1295,7 +1447,14 @@ public CompletableFuture> resendNotificationsByResourceId( localVarResponse.statusCode(), localVarResponse.headers().map(), null)); - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } @@ -1349,11 +1508,11 @@ private HttpRequest.Builder resendNotificationsByResourceIdRequestBuilder( * * @param updateWebhookRequest (required) * @param webhookId The unique identifier of the webhook (required) - * @return CompletableFuture<ApiResponse<Webhook>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Webhook>>, which completes exceptionally + * with an {@link ApiException} if the API call fails */ public CompletableFuture> updateWebhook( - UpdateWebhookRequest updateWebhookRequest, UUID webhookId) throws ApiException { + UpdateWebhookRequest updateWebhookRequest, UUID webhookId) { try { HttpRequest.Builder localVarRequestBuilder = updateWebhookRequestBuilder(updateWebhookRequest, webhookId); @@ -1383,7 +1542,14 @@ public CompletableFuture> updateWebhook( } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture.>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/WhitelistIpAddressesApi.java b/src/main/java/com/fireblocks/sdk/api/WhitelistIpAddressesApi.java index cf47fe17..76b4fae3 100644 --- a/src/main/java/com/fireblocks/sdk/api/WhitelistIpAddressesApi.java +++ b/src/main/java/com/fireblocks/sdk/api/WhitelistIpAddressesApi.java @@ -27,7 +27,10 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -63,6 +66,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -76,11 +101,11 @@ private String formatExceptionMessage(String operationId, int statusCode, String * Admin/Non Signing Admin permissions. Endpoint Permission: Admin, Non-Signing Admin. * * @param userId The ID of the api user (required) - * @return CompletableFuture<ApiResponse<GetWhitelistIpAddressesResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetWhitelistIpAddressesResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ public CompletableFuture> getWhitelistIpAddresses( - String userId) throws ApiException { + String userId) { try { HttpRequest.Builder localVarRequestBuilder = getWhitelistIpAddressesRequestBuilder(userId); @@ -111,7 +136,17 @@ public CompletableFuture> getWhitel } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/WorkspaceApi.java b/src/main/java/com/fireblocks/sdk/api/WorkspaceApi.java index 721c3593..0295b687 100644 --- a/src/main/java/com/fireblocks/sdk/api/WorkspaceApi.java +++ b/src/main/java/com/fireblocks/sdk/api/WorkspaceApi.java @@ -26,7 +26,10 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -62,6 +65,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -72,10 +97,10 @@ private String formatExceptionMessage(String operationId, int statusCode, String /** * Get workspace Returns the workspace ID and name for the authenticated user. * - * @return CompletableFuture<ApiResponse<Workspace>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<Workspace>>, which completes exceptionally + * with an {@link ApiException} if the API call fails */ - public CompletableFuture> getWorkspace() throws ApiException { + public CompletableFuture> getWorkspace() { try { HttpRequest.Builder localVarRequestBuilder = getWorkspaceRequestBuilder(); return memberVarHttpClient @@ -104,7 +129,15 @@ public CompletableFuture> getWorkspace() throws ApiExcept } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .>failedFuture( + toApiFailure(localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApi.java b/src/main/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApi.java index c8bd7687..5600dbab 100644 --- a/src/main/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApi.java @@ -26,7 +26,10 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.time.Duration; +import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import java.util.concurrent.ExecutionException; import java.util.function.Consumer; @jakarta.annotation.Generated( @@ -62,6 +65,28 @@ private ApiException getApiException(String operationId, HttpResponse re response.statusCode(), message, response.headers(), response.body()); } + /** + * Normalizes any failure raised while performing the call into the single failure type callers + * are told to expect. Transport-level errors surfaced by {@code HttpClient.sendAsync} - + * connection refused, DNS failures, TLS errors, timeouts - would otherwise reach the caller as + * a raw {@link java.io.IOException}, which makes the documented {@code (ApiException) + * e.getCause()} throw {@link ClassCastException}. + * + *

{@link CancellationException} is passed through unchanged: a cancelled call is not an API + * failure. + */ + private static Throwable toApiFailure(Throwable throwable) { + Throwable cause = throwable; + while ((cause instanceof CompletionException || cause instanceof ExecutionException) + && cause.getCause() != null) { + cause = cause.getCause(); + } + if (cause instanceof ApiException || cause instanceof CancellationException) { + return cause; + } + return new ApiException(cause); + } + private String formatExceptionMessage(String operationId, int statusCode, String body) { if (body == null || body.isEmpty()) { body = "[no body]"; @@ -75,11 +100,10 @@ private String formatExceptionMessage(String operationId, int statusCode, String * this endpoint is available only for API keys with Admin/Non Signing Admin permissions. * Endpoint Permission: Admin, Non-Signing Admin. * - * @return CompletableFuture<ApiResponse<GetWorkspaceStatusResponse>> - * @throws ApiException if fails to make API call + * @return CompletableFuture<ApiResponse<GetWorkspaceStatusResponse>>, which + * completes exceptionally with an {@link ApiException} if the API call fails */ - public CompletableFuture> getWorkspaceStatus() - throws ApiException { + public CompletableFuture> getWorkspaceStatus() { try { HttpRequest.Builder localVarRequestBuilder = getWorkspaceStatusRequestBuilder(); return memberVarHttpClient @@ -109,7 +133,17 @@ public CompletableFuture> getWorkspaceSt } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } - }); + }) + .handle( + (localVarApiResponse, localVarThrowable) -> + localVarThrowable == null + ? CompletableFuture.completedFuture(localVarApiResponse) + : CompletableFuture + .> + failedFuture( + toApiFailure( + localVarThrowable))) + .thenCompose(localVarNormalized -> localVarNormalized); } catch (ApiException e) { return CompletableFuture.failedFuture(e); } diff --git a/src/main/java/com/fireblocks/sdk/model/EthereumBlockchainData.java b/src/main/java/com/fireblocks/sdk/model/EthereumBlockchainData.java index 79eaa986..c739d695 100644 --- a/src/main/java/com/fireblocks/sdk/model/EthereumBlockchainData.java +++ b/src/main/java/com/fireblocks/sdk/model/EthereumBlockchainData.java @@ -18,6 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fireblocks.sdk.ApiClient; +import java.time.OffsetDateTime; import java.util.Objects; import java.util.StringJoiner; @@ -27,7 +28,10 @@ */ @JsonPropertyOrder({ EthereumBlockchainData.JSON_PROPERTY_IS_COMPOUNDING_VALIDATOR, - EthereumBlockchainData.JSON_PROPERTY_ESTIMATED_ACTIVATION_TIME + EthereumBlockchainData.JSON_PROPERTY_ESTIMATED_ACTIVATION_TIME, + EthereumBlockchainData.JSON_PROPERTY_ESTIMATED_SOURCE_EXIT_TIME, + EthereumBlockchainData.JSON_PROPERTY_ESTIMATED_CONSOLIDATION_TIME, + EthereumBlockchainData.JSON_PROPERTY_ESTIMATED_WITHDRAWAL_TIME }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -39,6 +43,16 @@ public class EthereumBlockchainData { public static final String JSON_PROPERTY_ESTIMATED_ACTIVATION_TIME = "estimatedActivationTime"; @jakarta.annotation.Nullable private String estimatedActivationTime; + public static final String JSON_PROPERTY_ESTIMATED_SOURCE_EXIT_TIME = "estimatedSourceExitTime"; + @jakarta.annotation.Nullable private OffsetDateTime estimatedSourceExitTime; + + public static final String JSON_PROPERTY_ESTIMATED_CONSOLIDATION_TIME = + "estimatedConsolidationTime"; + @jakarta.annotation.Nullable private OffsetDateTime estimatedConsolidationTime; + + public static final String JSON_PROPERTY_ESTIMATED_WITHDRAWAL_TIME = "estimatedWithdrawalTime"; + @jakarta.annotation.Nullable private OffsetDateTime estimatedWithdrawalTime; + public EthereumBlockchainData() {} @JsonCreator @@ -99,6 +113,87 @@ public void setEstimatedActivationTime( this.estimatedActivationTime = estimatedActivationTime; } + public EthereumBlockchainData estimatedSourceExitTime( + @jakarta.annotation.Nullable OffsetDateTime estimatedSourceExitTime) { + this.estimatedSourceExitTime = estimatedSourceExitTime; + return this; + } + + /** + * Estimated time the source validator will exit the active set and stop earning rewards, + * derived from the beacon-chain consolidation queue. Present only while a consolidation is in + * progress. + * + * @return estimatedSourceExitTime + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_SOURCE_EXIT_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getEstimatedSourceExitTime() { + return estimatedSourceExitTime; + } + + @JsonProperty(JSON_PROPERTY_ESTIMATED_SOURCE_EXIT_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEstimatedSourceExitTime( + @jakarta.annotation.Nullable OffsetDateTime estimatedSourceExitTime) { + this.estimatedSourceExitTime = estimatedSourceExitTime; + } + + public EthereumBlockchainData estimatedConsolidationTime( + @jakarta.annotation.Nullable OffsetDateTime estimatedConsolidationTime) { + this.estimatedConsolidationTime = estimatedConsolidationTime; + return this; + } + + /** + * Estimated time the consolidation will complete, i.e. when the source balance is swept to the + * destination validator, derived from the beacon-chain consolidation queue. Present only while + * a consolidation is in progress. + * + * @return estimatedConsolidationTime + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_CONSOLIDATION_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getEstimatedConsolidationTime() { + return estimatedConsolidationTime; + } + + @JsonProperty(JSON_PROPERTY_ESTIMATED_CONSOLIDATION_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEstimatedConsolidationTime( + @jakarta.annotation.Nullable OffsetDateTime estimatedConsolidationTime) { + this.estimatedConsolidationTime = estimatedConsolidationTime; + } + + public EthereumBlockchainData estimatedWithdrawalTime( + @jakarta.annotation.Nullable OffsetDateTime estimatedWithdrawalTime) { + this.estimatedWithdrawalTime = estimatedWithdrawalTime; + return this; + } + + /** + * Estimated time the in-flight withdrawal will complete, derived from the beacon-chain exit + * queue for a full exit or the manual withdrawal queue for a partial one. Present only while a + * withdrawal is in progress. + * + * @return estimatedWithdrawalTime + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_WITHDRAWAL_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getEstimatedWithdrawalTime() { + return estimatedWithdrawalTime; + } + + @JsonProperty(JSON_PROPERTY_ESTIMATED_WITHDRAWAL_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEstimatedWithdrawalTime( + @jakarta.annotation.Nullable OffsetDateTime estimatedWithdrawalTime) { + this.estimatedWithdrawalTime = estimatedWithdrawalTime; + } + /** Return true if this EthereumBlockchainData object is equal to o. */ @Override public boolean equals(Object o) { @@ -113,12 +208,26 @@ public boolean equals(Object o) { this.isCompoundingValidator, ethereumBlockchainData.isCompoundingValidator) && Objects.equals( this.estimatedActivationTime, - ethereumBlockchainData.estimatedActivationTime); + ethereumBlockchainData.estimatedActivationTime) + && Objects.equals( + this.estimatedSourceExitTime, + ethereumBlockchainData.estimatedSourceExitTime) + && Objects.equals( + this.estimatedConsolidationTime, + ethereumBlockchainData.estimatedConsolidationTime) + && Objects.equals( + this.estimatedWithdrawalTime, + ethereumBlockchainData.estimatedWithdrawalTime); } @Override public int hashCode() { - return Objects.hash(isCompoundingValidator, estimatedActivationTime); + return Objects.hash( + isCompoundingValidator, + estimatedActivationTime, + estimatedSourceExitTime, + estimatedConsolidationTime, + estimatedWithdrawalTime); } @Override @@ -131,6 +240,15 @@ public String toString() { sb.append(" estimatedActivationTime: ") .append(toIndentedString(estimatedActivationTime)) .append("\n"); + sb.append(" estimatedSourceExitTime: ") + .append(toIndentedString(estimatedSourceExitTime)) + .append("\n"); + sb.append(" estimatedConsolidationTime: ") + .append(toIndentedString(estimatedConsolidationTime)) + .append("\n"); + sb.append(" estimatedWithdrawalTime: ") + .append(toIndentedString(estimatedWithdrawalTime)) + .append("\n"); sb.append("}"); return sb.toString(); } @@ -200,6 +318,39 @@ public String toUrlQueryString(String prefix) { ApiClient.valueToString(getEstimatedActivationTime())))); } + // add `estimatedSourceExitTime` to the URL query string + if (getEstimatedSourceExitTime() != null) { + joiner.add( + String.format( + "%sestimatedSourceExitTime%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getEstimatedSourceExitTime())))); + } + + // add `estimatedConsolidationTime` to the URL query string + if (getEstimatedConsolidationTime() != null) { + joiner.add( + String.format( + "%sestimatedConsolidationTime%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getEstimatedConsolidationTime())))); + } + + // add `estimatedWithdrawalTime` to the URL query string + if (getEstimatedWithdrawalTime() != null) { + joiner.add( + String.format( + "%sestimatedWithdrawalTime%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getEstimatedWithdrawalTime())))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/GaslessInfo.java b/src/main/java/com/fireblocks/sdk/model/GaslessInfo.java new file mode 100644 index 00000000..dbf69419 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/GaslessInfo.java @@ -0,0 +1,266 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * 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.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** + * Relay (meta-transaction) details. Returned only for meta-transactions (`isMetaTx` is + * `true`). For meta-transactions the deprecated top-level `fee` field is + * omitted; use `feeInfo` instead. + */ +@JsonPropertyOrder({ + GaslessInfo.JSON_PROPERTY_IS_META_TX, + GaslessInfo.JSON_PROPERTY_RELAY_TENANT_ID, + GaslessInfo.JSON_PROPERTY_RELAY_TENANT_NAME, + GaslessInfo.JSON_PROPERTY_RELAY_VAULT_ACCOUNT_ID +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class GaslessInfo { + public static final String JSON_PROPERTY_IS_META_TX = "isMetaTx"; + @jakarta.annotation.Nullable private Boolean isMetaTx; + + public static final String JSON_PROPERTY_RELAY_TENANT_ID = "relayTenantId"; + @jakarta.annotation.Nullable private String relayTenantId; + + public static final String JSON_PROPERTY_RELAY_TENANT_NAME = "relayTenantName"; + @jakarta.annotation.Nullable private String relayTenantName; + + public static final String JSON_PROPERTY_RELAY_VAULT_ACCOUNT_ID = "relayVaultAccountId"; + @jakarta.annotation.Nullable private String relayVaultAccountId; + + public GaslessInfo() {} + + public GaslessInfo isMetaTx(@jakarta.annotation.Nullable Boolean isMetaTx) { + this.isMetaTx = isMetaTx; + return this; + } + + /** + * Indicates the transaction is a meta-transaction (gas paid by a relay tenant). + * + * @return isMetaTx + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_META_TX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsMetaTx() { + return isMetaTx; + } + + @JsonProperty(JSON_PROPERTY_IS_META_TX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setIsMetaTx(@jakarta.annotation.Nullable Boolean isMetaTx) { + this.isMetaTx = isMetaTx; + } + + public GaslessInfo relayTenantId(@jakarta.annotation.Nullable String relayTenantId) { + this.relayTenantId = relayTenantId; + return this; + } + + /** + * The tenant ID of the relay that sponsors the gas for the meta-transaction. + * + * @return relayTenantId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELAY_TENANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRelayTenantId() { + return relayTenantId; + } + + @JsonProperty(JSON_PROPERTY_RELAY_TENANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelayTenantId(@jakarta.annotation.Nullable String relayTenantId) { + this.relayTenantId = relayTenantId; + } + + public GaslessInfo relayTenantName(@jakarta.annotation.Nullable String relayTenantName) { + this.relayTenantName = relayTenantName; + return this; + } + + /** + * The tenant name of the relay that sponsors the gas for the meta-transaction. + * + * @return relayTenantName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELAY_TENANT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRelayTenantName() { + return relayTenantName; + } + + @JsonProperty(JSON_PROPERTY_RELAY_TENANT_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelayTenantName(@jakarta.annotation.Nullable String relayTenantName) { + this.relayTenantName = relayTenantName; + } + + public GaslessInfo relayVaultAccountId( + @jakarta.annotation.Nullable String relayVaultAccountId) { + this.relayVaultAccountId = relayVaultAccountId; + return this; + } + + /** + * The vault account ID of the relay that sponsors the gas for the meta-transaction. + * + * @return relayVaultAccountId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELAY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRelayVaultAccountId() { + return relayVaultAccountId; + } + + @JsonProperty(JSON_PROPERTY_RELAY_VAULT_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRelayVaultAccountId(@jakarta.annotation.Nullable String relayVaultAccountId) { + this.relayVaultAccountId = relayVaultAccountId; + } + + /** Return true if this GaslessInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GaslessInfo gaslessInfo = (GaslessInfo) o; + return Objects.equals(this.isMetaTx, gaslessInfo.isMetaTx) + && Objects.equals(this.relayTenantId, gaslessInfo.relayTenantId) + && Objects.equals(this.relayTenantName, gaslessInfo.relayTenantName) + && Objects.equals(this.relayVaultAccountId, gaslessInfo.relayVaultAccountId); + } + + @Override + public int hashCode() { + return Objects.hash(isMetaTx, relayTenantId, relayTenantName, relayVaultAccountId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GaslessInfo {\n"); + sb.append(" isMetaTx: ").append(toIndentedString(isMetaTx)).append("\n"); + sb.append(" relayTenantId: ").append(toIndentedString(relayTenantId)).append("\n"); + sb.append(" relayTenantName: ").append(toIndentedString(relayTenantName)).append("\n"); + sb.append(" relayVaultAccountId: ") + .append(toIndentedString(relayVaultAccountId)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * 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 "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `isMetaTx` to the URL query string + if (getIsMetaTx() != null) { + joiner.add( + String.format( + "%sisMetaTx%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getIsMetaTx())))); + } + + // add `relayTenantId` to the URL query string + if (getRelayTenantId() != null) { + joiner.add( + String.format( + "%srelayTenantId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRelayTenantId())))); + } + + // add `relayTenantName` to the URL query string + if (getRelayTenantName() != null) { + joiner.add( + String.format( + "%srelayTenantName%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRelayTenantName())))); + } + + // add `relayVaultAccountId` to the URL query string + if (getRelayVaultAccountId() != null) { + joiner.add( + String.format( + "%srelayVaultAccountId%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getRelayVaultAccountId())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/GetFindingsExternalResponse.java b/src/main/java/com/fireblocks/sdk/model/GetFindingsExternalResponse.java new file mode 100644 index 00000000..3bd3dca8 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/GetFindingsExternalResponse.java @@ -0,0 +1,252 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * 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.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** A paginated list of FSPM findings */ +@JsonPropertyOrder({ + GetFindingsExternalResponse.JSON_PROPERTY_DATA, + GetFindingsExternalResponse.JSON_PROPERTY_TOTAL, + GetFindingsExternalResponse.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class GetFindingsExternalResponse { + public static final String JSON_PROPERTY_DATA = "data"; + @jakarta.annotation.Nonnull private List data; + + public static final String JSON_PROPERTY_TOTAL = "total"; + @jakarta.annotation.Nonnull private Integer total; + + public static final String JSON_PROPERTY_NEXT = "next"; + @jakarta.annotation.Nullable private String next; + + public GetFindingsExternalResponse() {} + + @JsonCreator + public GetFindingsExternalResponse( + @JsonProperty(value = JSON_PROPERTY_DATA, required = true) List data, + @JsonProperty(value = JSON_PROPERTY_TOTAL, required = true) Integer total) { + this.data = data; + this.total = total; + } + + public GetFindingsExternalResponse data( + @jakarta.annotation.Nonnull List data) { + this.data = data; + return this; + } + + public GetFindingsExternalResponse addDataItem(SecurityFinding dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * List of FSPM findings for the current page. + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(@jakarta.annotation.Nonnull List data) { + this.data = data; + } + + public GetFindingsExternalResponse total(@jakarta.annotation.Nonnull Integer total) { + this.total = total; + return this; + } + + /** + * Total number of findings matching the query. + * + * @return total + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotal() { + return total; + } + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotal(@jakarta.annotation.Nonnull Integer total) { + this.total = total; + } + + public GetFindingsExternalResponse next(@jakarta.annotation.Nullable String next) { + this.next = next; + return this; + } + + /** + * Cursor for the next page of results, omitted when there are no more results. + * + * @return next + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNext(@jakarta.annotation.Nullable String next) { + this.next = next; + } + + /** Return true if this GetFindingsExternalResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetFindingsExternalResponse getFindingsExternalResponse = (GetFindingsExternalResponse) o; + return Objects.equals(this.data, getFindingsExternalResponse.data) + && Objects.equals(this.total, getFindingsExternalResponse.total) + && Objects.equals(this.next, getFindingsExternalResponse.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, total, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetFindingsExternalResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * 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 "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add( + String.format( + "%stotal%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTotal())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add( + String.format( + "%snext%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ReasonForPaymentEnum.java b/src/main/java/com/fireblocks/sdk/model/ReasonForPaymentEnum.java index a76084f1..1cf90515 100644 --- a/src/main/java/com/fireblocks/sdk/model/ReasonForPaymentEnum.java +++ b/src/main/java/com/fireblocks/sdk/model/ReasonForPaymentEnum.java @@ -80,7 +80,13 @@ public enum ReasonForPaymentEnum { MERCHANT_SETTLEMENT("MERCHANT_SETTLEMENT"), - REPATRIATION_FUND_SETTLEMENT("REPATRIATION_FUND_SETTLEMENT"); + REPATRIATION_FUND_SETTLEMENT("REPATRIATION_FUND_SETTLEMENT"), + + CORPORATE_INVESTMENT("CORPORATE_INVESTMENT"), + + INTER_COMPANY_TRANSFER("INTER_COMPANY_TRANSFER"), + + OFFICE_OPERATING_EXPENSES("OFFICE_OPERATING_EXPENSES"); private String value; diff --git a/src/main/java/com/fireblocks/sdk/model/SecurityFinding.java b/src/main/java/com/fireblocks/sdk/model/SecurityFinding.java new file mode 100644 index 00000000..5c719347 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SecurityFinding.java @@ -0,0 +1,578 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * 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.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.StringJoiner; +import java.util.UUID; + +/** A single FSPM finding */ +@JsonPropertyOrder({ + SecurityFinding.JSON_PROPERTY_ID, + SecurityFinding.JSON_PROPERTY_TYPE, + SecurityFinding.JSON_PROPERTY_STATUS, + SecurityFinding.JSON_PROPERTY_SEVERITY, + SecurityFinding.JSON_PROPERTY_CATEGORY, + SecurityFinding.JSON_PROPERTY_CREATED_AT, + SecurityFinding.JSON_PROPERTY_TITLE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class SecurityFinding { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nullable private UUID id; + + /** The finding type identifier */ + public enum TypeEnum { + API_USER_NOT_WHITELISTED(String.valueOf("API_USER_NOT_WHITELISTED")), + + CONSOLE_IP_ALLOWLIST_DEACTIVATED(String.valueOf("CONSOLE_IP_ALLOWLIST_DEACTIVATED")), + + ADMIN_TH_SET_TO_ALL_AND_MORE_THAN_2_ADMINS( + String.valueOf("ADMIN_TH_SET_TO_ALL_AND_MORE_THAN_2_ADMINS")), + + API_USERS_COUNT_PASSES_TH_AND_OWNER_NOT_MANDATORY( + String.valueOf("API_USERS_COUNT_PASSES_TH_AND_OWNER_NOT_MANDATORY")), + + API_COSIGNER_WITH_NO_CALLBACK(String.valueOf("API_COSIGNER_WITH_NO_CALLBACK")), + + API_USER_DIDNT_APPROVE_CCR_IN_X_DAYS( + String.valueOf("API_USER_DIDNT_APPROVE_CCR_IN_X_DAYS")), + + NON_VIEWER_DIDNT_INITIATE_APPROVE_OR_SIGN_TX_OR_CCR_LAST_X_DAYS( + String.valueOf("NON_VIEWER_DIDNT_INITIATE_APPROVE_OR_SIGN_TX_OR_CCR_LAST_X_DAYS")), + + TH_SET_TO_1_AND_MORE_THAN_3_APPROVERS( + String.valueOf("TH_SET_TO_1_AND_MORE_THAN_3_APPROVERS")), + + ADMIN_TH_SET_TO_1_AND_MORE_THAN_3_ADMINS( + String.valueOf("ADMIN_TH_SET_TO_1_AND_MORE_THAN_3_ADMINS")), + + NON_EVM_DAPP_CONNECTIONS_ENABLED_BUT_UNUSED( + String.valueOf("NON_EVM_DAPP_CONNECTIONS_ENABLED_BUT_UNUSED")), + + OTA_ENABLED_BUT_UNUSED(String.valueOf("OTA_ENABLED_BUT_UNUSED")), + + POLICY_NOT_UPDATED_RECENTLY(String.valueOf("POLICY_NOT_UPDATED_RECENTLY")), + + RAW_SIGNING_ENABLED_BUT_UNUSED(String.valueOf("RAW_SIGNING_ENABLED_BUT_UNUSED")), + + API_USER_UNUSED_FOR_90_DAYS(String.valueOf("API_USER_UNUSED_FOR_90_DAYS")), + + UNUSED_UNLIMITED_TOKEN_ALLOWANCES(String.valueOf("UNUSED_UNLIMITED_TOKEN_ALLOWANCES")), + + UNUSED_WHITELISTED_ADDRESS(String.valueOf("UNUSED_WHITELISTED_ADDRESS")), + + TRANSACTION_REPETITION_ATTACK(String.valueOf("TRANSACTION_REPETITION_ATTACK")), + + USER_EMAIL_DOMAIN_NON_BUSINESS(String.valueOf("USER_EMAIL_DOMAIN_NON_BUSINESS")), + + OUTDATED_MOBILE_APP_VERSION(String.valueOf("OUTDATED_MOBILE_APP_VERSION")), + + SINGLE_HOP_DRAIN_ATTACK(String.valueOf("SINGLE_HOP_DRAIN_ATTACK")), + + LATERAL_MOVEMENT_DRAIN_ATTACK(String.valueOf("LATERAL_MOVEMENT_DRAIN_ATTACK")), + + WORKSPACE_USER_DORMANT_FOR_X_DAYS(String.valueOf("WORKSPACE_USER_DORMANT_FOR_X_DAYS")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nullable private TypeEnum type; + + /** Current status of the finding */ + public enum StatusEnum { + OPEN(String.valueOf("OPEN")), + + ACCEPTED(String.valueOf("ACCEPTED")), + + RESOLVED(String.valueOf("RESOLVED")); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nullable private StatusEnum status; + + /** Severity level of the finding */ + public enum SeverityEnum { + INFO(String.valueOf("INFO")), + + LOW(String.valueOf("LOW")), + + MEDIUM(String.valueOf("MEDIUM")), + + HIGH(String.valueOf("HIGH")); + + private String value; + + SeverityEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SeverityEnum fromValue(String value) { + for (SeverityEnum b : SeverityEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SEVERITY = "severity"; + @jakarta.annotation.Nullable private SeverityEnum severity; + + /** Category of the finding */ + public enum CategoryEnum { + USER_MANAGEMENT(String.valueOf("USER_MANAGEMENT")), + + ACCESS_CONTROL(String.valueOf("ACCESS_CONTROL")), + + ADMIN_MANAGEMENT(String.valueOf("ADMIN_MANAGEMENT")), + + SECURITY(String.valueOf("SECURITY")), + + CONFIGURATION(String.valueOf("CONFIGURATION")), + + APPROVAL_GROUP_MANAGEMENT(String.valueOf("APPROVAL_GROUP_MANAGEMENT")), + + POLICY_ENGINE_UTILIZATION(String.valueOf("POLICY_ENGINE_UTILIZATION")), + + WORKSPACE_CONFIGURATION(String.valueOf("WORKSPACE_CONFIGURATION")), + + DEFI_ACCESS(String.valueOf("DEFI_ACCESS")), + + FLEET_MANAGEMENT(String.valueOf("FLEET_MANAGEMENT")); + + private String value; + + CategoryEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CategoryEnum fromValue(String value) { + for (CategoryEnum b : CategoryEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_CATEGORY = "category"; + @jakarta.annotation.Nullable private CategoryEnum category; + + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + @jakarta.annotation.Nullable private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_TITLE = "title"; + @jakarta.annotation.Nullable private String title; + + public SecurityFinding() {} + + public SecurityFinding id(@jakarta.annotation.Nullable UUID id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the finding + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(@jakarta.annotation.Nullable UUID id) { + this.id = id; + } + + public SecurityFinding type(@jakarta.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * The finding type identifier + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(@jakarta.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public SecurityFinding status(@jakarta.annotation.Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Current status of the finding + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public StatusEnum getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(@jakarta.annotation.Nullable StatusEnum status) { + this.status = status; + } + + public SecurityFinding severity(@jakarta.annotation.Nullable SeverityEnum severity) { + this.severity = severity; + return this; + } + + /** + * Severity level of the finding + * + * @return severity + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEVERITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SeverityEnum getSeverity() { + return severity; + } + + @JsonProperty(JSON_PROPERTY_SEVERITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSeverity(@jakarta.annotation.Nullable SeverityEnum severity) { + this.severity = severity; + } + + public SecurityFinding category(@jakarta.annotation.Nullable CategoryEnum category) { + this.category = category; + return this; + } + + /** + * Category of the finding + * + * @return category + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CategoryEnum getCategory() { + return category; + } + + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCategory(@jakarta.annotation.Nullable CategoryEnum category) { + this.category = category; + } + + public SecurityFinding createdAt(@jakarta.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * When the finding was first detected + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedAt(@jakarta.annotation.Nullable OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public SecurityFinding title(@jakarta.annotation.Nullable String title) { + this.title = title; + return this; + } + + /** + * Human-readable title of the finding + * + * @return title + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } + + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTitle(@jakarta.annotation.Nullable String title) { + this.title = title; + } + + /** Return true if this SecurityFinding object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SecurityFinding securityFinding = (SecurityFinding) o; + return Objects.equals(this.id, securityFinding.id) + && Objects.equals(this.type, securityFinding.type) + && Objects.equals(this.status, securityFinding.status) + && Objects.equals(this.severity, securityFinding.severity) + && Objects.equals(this.category, securityFinding.category) + && Objects.equals(this.createdAt, securityFinding.createdAt) + && Objects.equals(this.title, securityFinding.title); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, status, severity, category, createdAt, title); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SecurityFinding {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" severity: ").append(toIndentedString(severity)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * 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 "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add( + String.format( + "%sid%s=%s", + prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `severity` to the URL query string + if (getSeverity() != null) { + joiner.add( + String.format( + "%sseverity%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSeverity())))); + } + + // add `category` to the URL query string + if (getCategory() != null) { + joiner.add( + String.format( + "%scategory%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCategory())))); + } + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add( + String.format( + "%screatedAt%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `title` to the URL query string + if (getTitle() != null) { + joiner.add( + String.format( + "%stitle%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTitle())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java b/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java index a69c851d..ddc60aca 100644 --- a/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java @@ -75,6 +75,7 @@ TransactionResponse.JSON_PROPERTY_INDEX, TransactionResponse.JSON_PROPERTY_REWARD_INFO, TransactionResponse.JSON_PROPERTY_FEE_PAYER_INFO, + TransactionResponse.JSON_PROPERTY_GASLESS_INFO, TransactionResponse.JSON_PROPERTY_SYSTEM_MESSAGES, TransactionResponse.JSON_PROPERTY_ADDRESS_TYPE, TransactionResponse.JSON_PROPERTY_REQUESTED_AMOUNT, @@ -241,6 +242,9 @@ public class TransactionResponse { public static final String JSON_PROPERTY_FEE_PAYER_INFO = "feePayerInfo"; @jakarta.annotation.Nullable private FeePayerInfo feePayerInfo; + public static final String JSON_PROPERTY_GASLESS_INFO = "gaslessInfo"; + @jakarta.annotation.Nullable private GaslessInfo gaslessInfo; + public static final String JSON_PROPERTY_SYSTEM_MESSAGES = "systemMessages"; @jakarta.annotation.Nullable private List systemMessages; @@ -1543,6 +1547,29 @@ public void setFeePayerInfo(@jakarta.annotation.Nullable FeePayerInfo feePayerIn this.feePayerInfo = feePayerInfo; } + public TransactionResponse gaslessInfo(@jakarta.annotation.Nullable GaslessInfo gaslessInfo) { + this.gaslessInfo = gaslessInfo; + return this; + } + + /** + * Get gaslessInfo + * + * @return gaslessInfo + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GASLESS_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GaslessInfo getGaslessInfo() { + return gaslessInfo; + } + + @JsonProperty(JSON_PROPERTY_GASLESS_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGaslessInfo(@jakarta.annotation.Nullable GaslessInfo gaslessInfo) { + this.gaslessInfo = gaslessInfo; + } + public TransactionResponse systemMessages( @jakarta.annotation.Nullable List systemMessages) { this.systemMessages = systemMessages; @@ -1942,6 +1969,7 @@ public boolean equals(Object o) { && Objects.equals(this.index, transactionResponse.index) && Objects.equals(this.rewardInfo, transactionResponse.rewardInfo) && Objects.equals(this.feePayerInfo, transactionResponse.feePayerInfo) + && Objects.equals(this.gaslessInfo, transactionResponse.gaslessInfo) && Objects.equals(this.systemMessages, transactionResponse.systemMessages) && Objects.equals(this.addressType, transactionResponse.addressType) && Objects.equals(this.requestedAmount, transactionResponse.requestedAmount) @@ -2008,6 +2036,7 @@ public int hashCode() { index, rewardInfo, feePayerInfo, + gaslessInfo, systemMessages, addressType, requestedAmount, @@ -2097,6 +2126,7 @@ public String toString() { sb.append(" index: ").append(toIndentedString(index)).append("\n"); sb.append(" rewardInfo: ").append(toIndentedString(rewardInfo)).append("\n"); sb.append(" feePayerInfo: ").append(toIndentedString(feePayerInfo)).append("\n"); + sb.append(" gaslessInfo: ").append(toIndentedString(gaslessInfo)).append("\n"); sb.append(" systemMessages: ").append(toIndentedString(systemMessages)).append("\n"); sb.append(" addressType: ").append(toIndentedString(addressType)).append("\n"); sb.append(" requestedAmount: ").append(toIndentedString(requestedAmount)).append("\n"); @@ -2648,6 +2678,11 @@ public String toUrlQueryString(String prefix) { joiner.add(getFeePayerInfo().toUrlQueryString(prefix + "feePayerInfo" + suffix)); } + // add `gaslessInfo` to the URL query string + if (getGaslessInfo() != null) { + joiner.add(getGaslessInfo().toUrlQueryString(prefix + "gaslessInfo" + suffix)); + } + // add `systemMessages` to the URL query string if (getSystemMessages() != null) { for (int i = 0; i < getSystemMessages().size(); i++) { diff --git a/src/main/java/com/fireblocks/sdk/model/TravelRuleLegalNameIdentifier.java b/src/main/java/com/fireblocks/sdk/model/TravelRuleLegalNameIdentifier.java new file mode 100644 index 00000000..f2f56f5c --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TravelRuleLegalNameIdentifier.java @@ -0,0 +1,204 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * 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.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** TravelRuleLegalNameIdentifier */ +@JsonPropertyOrder({ + TravelRuleLegalNameIdentifier.JSON_PROPERTY_LEGAL_PERSON_NAME, + TravelRuleLegalNameIdentifier.JSON_PROPERTY_LEGAL_PERSON_NAME_IDENTIFIER_TYPE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class TravelRuleLegalNameIdentifier { + public static final String JSON_PROPERTY_LEGAL_PERSON_NAME = "legalPersonName"; + @jakarta.annotation.Nonnull private String legalPersonName; + + public static final String JSON_PROPERTY_LEGAL_PERSON_NAME_IDENTIFIER_TYPE = + "legalPersonNameIdentifierType"; + @jakarta.annotation.Nonnull private String legalPersonNameIdentifierType; + + public TravelRuleLegalNameIdentifier() {} + + @JsonCreator + public TravelRuleLegalNameIdentifier( + @JsonProperty(value = JSON_PROPERTY_LEGAL_PERSON_NAME, required = true) + String legalPersonName, + @JsonProperty(value = JSON_PROPERTY_LEGAL_PERSON_NAME_IDENTIFIER_TYPE, required = true) + String legalPersonNameIdentifierType) { + this.legalPersonName = legalPersonName; + this.legalPersonNameIdentifierType = legalPersonNameIdentifierType; + } + + public TravelRuleLegalNameIdentifier legalPersonName( + @jakarta.annotation.Nonnull String legalPersonName) { + this.legalPersonName = legalPersonName; + return this; + } + + /** + * Name by which the legal person is known. The value must be encrypted. + * + * @return legalPersonName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LEGAL_PERSON_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLegalPersonName() { + return legalPersonName; + } + + @JsonProperty(JSON_PROPERTY_LEGAL_PERSON_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLegalPersonName(@jakarta.annotation.Nonnull String legalPersonName) { + this.legalPersonName = legalPersonName; + } + + public TravelRuleLegalNameIdentifier legalPersonNameIdentifierType( + @jakarta.annotation.Nonnull String legalPersonNameIdentifierType) { + this.legalPersonNameIdentifierType = legalPersonNameIdentifierType; + return this; + } + + /** + * Specifies the type of name for a legal person (IVMS101 LegalPersonNameTypeCode). Acceptable + * values are: - 'LEGL': Legal name - official name under which the organisation is + * registered. - 'SHRT': Short name of the organisation. - 'TRAD': Trading name + * - name used by the business for commercial purposes. The value must be encrypted. + * + * @return legalPersonNameIdentifierType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LEGAL_PERSON_NAME_IDENTIFIER_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLegalPersonNameIdentifierType() { + return legalPersonNameIdentifierType; + } + + @JsonProperty(JSON_PROPERTY_LEGAL_PERSON_NAME_IDENTIFIER_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLegalPersonNameIdentifierType( + @jakarta.annotation.Nonnull String legalPersonNameIdentifierType) { + this.legalPersonNameIdentifierType = legalPersonNameIdentifierType; + } + + /** Return true if this TravelRuleLegalNameIdentifier object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TravelRuleLegalNameIdentifier travelRuleLegalNameIdentifier = + (TravelRuleLegalNameIdentifier) o; + return Objects.equals(this.legalPersonName, travelRuleLegalNameIdentifier.legalPersonName) + && Objects.equals( + this.legalPersonNameIdentifierType, + travelRuleLegalNameIdentifier.legalPersonNameIdentifierType); + } + + @Override + public int hashCode() { + return Objects.hash(legalPersonName, legalPersonNameIdentifierType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TravelRuleLegalNameIdentifier {\n"); + sb.append(" legalPersonName: ").append(toIndentedString(legalPersonName)).append("\n"); + sb.append(" legalPersonNameIdentifierType: ") + .append(toIndentedString(legalPersonNameIdentifierType)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * 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 "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `legalPersonName` to the URL query string + if (getLegalPersonName() != null) { + joiner.add( + String.format( + "%slegalPersonName%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getLegalPersonName())))); + } + + // add `legalPersonNameIdentifierType` to the URL query string + if (getLegalPersonNameIdentifierType() != null) { + joiner.add( + String.format( + "%slegalPersonNameIdentifierType%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getLegalPersonNameIdentifierType())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TravelRuleLegalPersonNameIdentifier.java b/src/main/java/com/fireblocks/sdk/model/TravelRuleLegalPersonNameIdentifier.java index b22f806a..5dbec4a7 100644 --- a/src/main/java/com/fireblocks/sdk/model/TravelRuleLegalPersonNameIdentifier.java +++ b/src/main/java/com/fireblocks/sdk/model/TravelRuleLegalPersonNameIdentifier.java @@ -16,77 +16,134 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fireblocks.sdk.ApiClient; +import java.util.ArrayList; +import java.util.List; import java.util.Objects; import java.util.StringJoiner; /** TravelRuleLegalPersonNameIdentifier */ @JsonPropertyOrder({ - TravelRuleLegalPersonNameIdentifier.JSON_PROPERTY_LEGAL_PERSON_NAME, - TravelRuleLegalPersonNameIdentifier.JSON_PROPERTY_LEGAL_PERSON_NAME_IDENTIFIER_TYPE + TravelRuleLegalPersonNameIdentifier.JSON_PROPERTY_NAME_IDENTIFIER, + TravelRuleLegalPersonNameIdentifier.JSON_PROPERTY_LOCAL_NAME_IDENTIFIER, + TravelRuleLegalPersonNameIdentifier.JSON_PROPERTY_PHONETIC_NAME_IDENTIFIER }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") public class TravelRuleLegalPersonNameIdentifier { - public static final String JSON_PROPERTY_LEGAL_PERSON_NAME = "legalPersonName"; - @jakarta.annotation.Nullable private String legalPersonName; + public static final String JSON_PROPERTY_NAME_IDENTIFIER = "nameIdentifier"; + @jakarta.annotation.Nullable private List nameIdentifier; - public static final String JSON_PROPERTY_LEGAL_PERSON_NAME_IDENTIFIER_TYPE = - "legalPersonNameIdentifierType"; - @jakarta.annotation.Nullable private String legalPersonNameIdentifierType; + public static final String JSON_PROPERTY_LOCAL_NAME_IDENTIFIER = "localNameIdentifier"; + @jakarta.annotation.Nullable private List localNameIdentifier; + + public static final String JSON_PROPERTY_PHONETIC_NAME_IDENTIFIER = "phoneticNameIdentifier"; + @jakarta.annotation.Nullable private List phoneticNameIdentifier; public TravelRuleLegalPersonNameIdentifier() {} - public TravelRuleLegalPersonNameIdentifier legalPersonName( - @jakarta.annotation.Nullable String legalPersonName) { - this.legalPersonName = legalPersonName; + public TravelRuleLegalPersonNameIdentifier nameIdentifier( + @jakarta.annotation.Nullable List nameIdentifier) { + this.nameIdentifier = nameIdentifier; + return this; + } + + public TravelRuleLegalPersonNameIdentifier addNameIdentifierItem( + TravelRuleLegalNameIdentifier nameIdentifierItem) { + if (this.nameIdentifier == null) { + this.nameIdentifier = new ArrayList<>(); + } + this.nameIdentifier.add(nameIdentifierItem); + return this; + } + + /** + * An array of name identifiers of the legal person. + * + * @return nameIdentifier + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME_IDENTIFIER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getNameIdentifier() { + return nameIdentifier; + } + + @JsonProperty(JSON_PROPERTY_NAME_IDENTIFIER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNameIdentifier( + @jakarta.annotation.Nullable List nameIdentifier) { + this.nameIdentifier = nameIdentifier; + } + + public TravelRuleLegalPersonNameIdentifier localNameIdentifier( + @jakarta.annotation.Nullable List localNameIdentifier) { + this.localNameIdentifier = localNameIdentifier; + return this; + } + + public TravelRuleLegalPersonNameIdentifier addLocalNameIdentifierItem( + TravelRuleLegalNameIdentifier localNameIdentifierItem) { + if (this.localNameIdentifier == null) { + this.localNameIdentifier = new ArrayList<>(); + } + this.localNameIdentifier.add(localNameIdentifierItem); return this; } /** - * Name by which the legal person is known. The value must be encrypted. + * An array of local name identifiers of the legal person. * - * @return legalPersonName + * @return localNameIdentifier */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LEGAL_PERSON_NAME) + @JsonProperty(JSON_PROPERTY_LOCAL_NAME_IDENTIFIER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLegalPersonName() { - return legalPersonName; + public List getLocalNameIdentifier() { + return localNameIdentifier; } - @JsonProperty(JSON_PROPERTY_LEGAL_PERSON_NAME) + @JsonProperty(JSON_PROPERTY_LOCAL_NAME_IDENTIFIER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLegalPersonName(@jakarta.annotation.Nullable String legalPersonName) { - this.legalPersonName = legalPersonName; + public void setLocalNameIdentifier( + @jakarta.annotation.Nullable List localNameIdentifier) { + this.localNameIdentifier = localNameIdentifier; } - public TravelRuleLegalPersonNameIdentifier legalPersonNameIdentifierType( - @jakarta.annotation.Nullable String legalPersonNameIdentifierType) { - this.legalPersonNameIdentifierType = legalPersonNameIdentifierType; + public TravelRuleLegalPersonNameIdentifier phoneticNameIdentifier( + @jakarta.annotation.Nullable + List phoneticNameIdentifier) { + this.phoneticNameIdentifier = phoneticNameIdentifier; + return this; + } + + public TravelRuleLegalPersonNameIdentifier addPhoneticNameIdentifierItem( + TravelRuleLegalNameIdentifier phoneticNameIdentifierItem) { + if (this.phoneticNameIdentifier == null) { + this.phoneticNameIdentifier = new ArrayList<>(); + } + this.phoneticNameIdentifier.add(phoneticNameIdentifierItem); return this; } /** - * Specifies the type of name for a legal person. Acceptable values are: - 'REGISTERED': - * The official registered name. - 'TRADE': A trading name or DBA (Doing Business As) - * name. - 'OTHER': Any other type of name. The value must be encrypted. + * An array of phonetic name identifiers of the legal person. * - * @return legalPersonNameIdentifierType + * @return phoneticNameIdentifier */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LEGAL_PERSON_NAME_IDENTIFIER_TYPE) + @JsonProperty(JSON_PROPERTY_PHONETIC_NAME_IDENTIFIER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLegalPersonNameIdentifierType() { - return legalPersonNameIdentifierType; + public List getPhoneticNameIdentifier() { + return phoneticNameIdentifier; } - @JsonProperty(JSON_PROPERTY_LEGAL_PERSON_NAME_IDENTIFIER_TYPE) + @JsonProperty(JSON_PROPERTY_PHONETIC_NAME_IDENTIFIER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLegalPersonNameIdentifierType( - @jakarta.annotation.Nullable String legalPersonNameIdentifierType) { - this.legalPersonNameIdentifierType = legalPersonNameIdentifierType; + public void setPhoneticNameIdentifier( + @jakarta.annotation.Nullable + List phoneticNameIdentifier) { + this.phoneticNameIdentifier = phoneticNameIdentifier; } /** Return true if this TravelRuleLegalPersonNameIdentifier object is equal to o. */ @@ -101,24 +158,30 @@ public boolean equals(Object o) { TravelRuleLegalPersonNameIdentifier travelRuleLegalPersonNameIdentifier = (TravelRuleLegalPersonNameIdentifier) o; return Objects.equals( - this.legalPersonName, travelRuleLegalPersonNameIdentifier.legalPersonName) + this.nameIdentifier, travelRuleLegalPersonNameIdentifier.nameIdentifier) + && Objects.equals( + this.localNameIdentifier, + travelRuleLegalPersonNameIdentifier.localNameIdentifier) && Objects.equals( - this.legalPersonNameIdentifierType, - travelRuleLegalPersonNameIdentifier.legalPersonNameIdentifierType); + this.phoneticNameIdentifier, + travelRuleLegalPersonNameIdentifier.phoneticNameIdentifier); } @Override public int hashCode() { - return Objects.hash(legalPersonName, legalPersonNameIdentifierType); + return Objects.hash(nameIdentifier, localNameIdentifier, phoneticNameIdentifier); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TravelRuleLegalPersonNameIdentifier {\n"); - sb.append(" legalPersonName: ").append(toIndentedString(legalPersonName)).append("\n"); - sb.append(" legalPersonNameIdentifierType: ") - .append(toIndentedString(legalPersonNameIdentifierType)) + sb.append(" nameIdentifier: ").append(toIndentedString(nameIdentifier)).append("\n"); + sb.append(" localNameIdentifier: ") + .append(toIndentedString(localNameIdentifier)) + .append("\n"); + sb.append(" phoneticNameIdentifier: ") + .append(toIndentedString(phoneticNameIdentifier)) .append("\n"); sb.append("}"); return sb.toString(); @@ -167,25 +230,73 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `legalPersonName` to the URL query string - if (getLegalPersonName() != null) { - joiner.add( - String.format( - "%slegalPersonName%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getLegalPersonName())))); + // add `nameIdentifier` to the URL query string + if (getNameIdentifier() != null) { + for (int i = 0; i < getNameIdentifier().size(); i++) { + if (getNameIdentifier().get(i) != null) { + joiner.add( + getNameIdentifier() + .get(i) + .toUrlQueryString( + String.format( + "%snameIdentifier%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `localNameIdentifier` to the URL query string + if (getLocalNameIdentifier() != null) { + for (int i = 0; i < getLocalNameIdentifier().size(); i++) { + if (getLocalNameIdentifier().get(i) != null) { + joiner.add( + getLocalNameIdentifier() + .get(i) + .toUrlQueryString( + String.format( + "%slocalNameIdentifier%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } } - // add `legalPersonNameIdentifierType` to the URL query string - if (getLegalPersonNameIdentifierType() != null) { - joiner.add( - String.format( - "%slegalPersonNameIdentifierType%s=%s", - prefix, - suffix, - ApiClient.urlEncode( - ApiClient.valueToString(getLegalPersonNameIdentifierType())))); + // add `phoneticNameIdentifier` to the URL query string + if (getPhoneticNameIdentifier() != null) { + for (int i = 0; i < getPhoneticNameIdentifier().size(); i++) { + if (getPhoneticNameIdentifier().get(i) != null) { + joiner.add( + getPhoneticNameIdentifier() + .get(i) + .toUrlQueryString( + String.format( + "%sphoneticNameIdentifier%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/TravelRuleValidateLegalNameIdentifier.java b/src/main/java/com/fireblocks/sdk/model/TravelRuleValidateLegalNameIdentifier.java new file mode 100644 index 00000000..f04daa9e --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TravelRuleValidateLegalNameIdentifier.java @@ -0,0 +1,250 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * 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.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** TravelRuleValidateLegalNameIdentifier */ +@JsonPropertyOrder({ + TravelRuleValidateLegalNameIdentifier.JSON_PROPERTY_LEGAL_PERSON_NAME, + TravelRuleValidateLegalNameIdentifier.JSON_PROPERTY_LEGAL_PERSON_NAME_IDENTIFIER_TYPE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class TravelRuleValidateLegalNameIdentifier { + public static final String JSON_PROPERTY_LEGAL_PERSON_NAME = "legalPersonName"; + @jakarta.annotation.Nonnull private String legalPersonName; + + /** + * Specifies the type of name for a legal person (IVMS101 LegalPersonNameTypeCode). Acceptable + * values are: - 'LEGL': Legal name - official name under which the organisation is + * registered. - 'SHRT': Short name of the organisation. - 'TRAD': Trading name + * - name used by the business for commercial purposes. + */ + public enum LegalPersonNameIdentifierTypeEnum { + LEGL(String.valueOf("LEGL")), + + SHRT(String.valueOf("SHRT")), + + TRAD(String.valueOf("TRAD")); + + private String value; + + LegalPersonNameIdentifierTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LegalPersonNameIdentifierTypeEnum fromValue(String value) { + for (LegalPersonNameIdentifierTypeEnum b : LegalPersonNameIdentifierTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_LEGAL_PERSON_NAME_IDENTIFIER_TYPE = + "legalPersonNameIdentifierType"; + + @jakarta.annotation.Nonnull + private LegalPersonNameIdentifierTypeEnum legalPersonNameIdentifierType; + + public TravelRuleValidateLegalNameIdentifier() {} + + @JsonCreator + public TravelRuleValidateLegalNameIdentifier( + @JsonProperty(value = JSON_PROPERTY_LEGAL_PERSON_NAME, required = true) + String legalPersonName, + @JsonProperty(value = JSON_PROPERTY_LEGAL_PERSON_NAME_IDENTIFIER_TYPE, required = true) + LegalPersonNameIdentifierTypeEnum legalPersonNameIdentifierType) { + this.legalPersonName = legalPersonName; + this.legalPersonNameIdentifierType = legalPersonNameIdentifierType; + } + + public TravelRuleValidateLegalNameIdentifier legalPersonName( + @jakarta.annotation.Nonnull String legalPersonName) { + this.legalPersonName = legalPersonName; + return this; + } + + /** + * Name by which the legal person is known. + * + * @return legalPersonName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LEGAL_PERSON_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLegalPersonName() { + return legalPersonName; + } + + @JsonProperty(JSON_PROPERTY_LEGAL_PERSON_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLegalPersonName(@jakarta.annotation.Nonnull String legalPersonName) { + this.legalPersonName = legalPersonName; + } + + public TravelRuleValidateLegalNameIdentifier legalPersonNameIdentifierType( + @jakarta.annotation.Nonnull + LegalPersonNameIdentifierTypeEnum legalPersonNameIdentifierType) { + this.legalPersonNameIdentifierType = legalPersonNameIdentifierType; + return this; + } + + /** + * Specifies the type of name for a legal person (IVMS101 LegalPersonNameTypeCode). Acceptable + * values are: - 'LEGL': Legal name - official name under which the organisation is + * registered. - 'SHRT': Short name of the organisation. - 'TRAD': Trading name + * - name used by the business for commercial purposes. + * + * @return legalPersonNameIdentifierType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LEGAL_PERSON_NAME_IDENTIFIER_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LegalPersonNameIdentifierTypeEnum getLegalPersonNameIdentifierType() { + return legalPersonNameIdentifierType; + } + + @JsonProperty(JSON_PROPERTY_LEGAL_PERSON_NAME_IDENTIFIER_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLegalPersonNameIdentifierType( + @jakarta.annotation.Nonnull + LegalPersonNameIdentifierTypeEnum legalPersonNameIdentifierType) { + this.legalPersonNameIdentifierType = legalPersonNameIdentifierType; + } + + /** Return true if this TravelRuleValidateLegalNameIdentifier object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TravelRuleValidateLegalNameIdentifier travelRuleValidateLegalNameIdentifier = + (TravelRuleValidateLegalNameIdentifier) o; + return Objects.equals( + this.legalPersonName, travelRuleValidateLegalNameIdentifier.legalPersonName) + && Objects.equals( + this.legalPersonNameIdentifierType, + travelRuleValidateLegalNameIdentifier.legalPersonNameIdentifierType); + } + + @Override + public int hashCode() { + return Objects.hash(legalPersonName, legalPersonNameIdentifierType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TravelRuleValidateLegalNameIdentifier {\n"); + sb.append(" legalPersonName: ").append(toIndentedString(legalPersonName)).append("\n"); + sb.append(" legalPersonNameIdentifierType: ") + .append(toIndentedString(legalPersonNameIdentifierType)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * 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 "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `legalPersonName` to the URL query string + if (getLegalPersonName() != null) { + joiner.add( + String.format( + "%slegalPersonName%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getLegalPersonName())))); + } + + // add `legalPersonNameIdentifierType` to the URL query string + if (getLegalPersonNameIdentifierType() != null) { + joiner.add( + String.format( + "%slegalPersonNameIdentifierType%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getLegalPersonNameIdentifierType())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TravelRuleValidateLegalPerson.java b/src/main/java/com/fireblocks/sdk/model/TravelRuleValidateLegalPerson.java index 8a73222d..05fd82d4 100644 --- a/src/main/java/com/fireblocks/sdk/model/TravelRuleValidateLegalPerson.java +++ b/src/main/java/com/fireblocks/sdk/model/TravelRuleValidateLegalPerson.java @@ -13,6 +13,7 @@ package com.fireblocks.sdk.model; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -36,7 +37,7 @@ comments = "Generator version: 7.14.0") public class TravelRuleValidateLegalPerson { public static final String JSON_PROPERTY_NAME = "name"; - @jakarta.annotation.Nullable private TravelRuleValidateLegalPersonNameIdentifier name; + @jakarta.annotation.Nonnull private TravelRuleValidateLegalPersonNameIdentifier name; public static final String JSON_PROPERTY_GEOGRAPHIC_ADDRESS = "geographicAddress"; @@ -59,8 +60,15 @@ public class TravelRuleValidateLegalPerson { public TravelRuleValidateLegalPerson() {} + @JsonCreator + public TravelRuleValidateLegalPerson( + @JsonProperty(value = JSON_PROPERTY_NAME, required = true) + TravelRuleValidateLegalPersonNameIdentifier name) { + this.name = name; + } + public TravelRuleValidateLegalPerson name( - @jakarta.annotation.Nullable TravelRuleValidateLegalPersonNameIdentifier name) { + @jakarta.annotation.Nonnull TravelRuleValidateLegalPersonNameIdentifier name) { this.name = name; return this; } @@ -70,17 +78,17 @@ public TravelRuleValidateLegalPerson name( * * @return name */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public TravelRuleValidateLegalPersonNameIdentifier getName() { return name; } @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setName( - @jakarta.annotation.Nullable TravelRuleValidateLegalPersonNameIdentifier name) { + @jakarta.annotation.Nonnull TravelRuleValidateLegalPersonNameIdentifier name) { this.name = name; } diff --git a/src/main/java/com/fireblocks/sdk/model/TravelRuleValidateLegalPersonNameIdentifier.java b/src/main/java/com/fireblocks/sdk/model/TravelRuleValidateLegalPersonNameIdentifier.java index 5094985b..351120c9 100644 --- a/src/main/java/com/fireblocks/sdk/model/TravelRuleValidateLegalPersonNameIdentifier.java +++ b/src/main/java/com/fireblocks/sdk/model/TravelRuleValidateLegalPersonNameIdentifier.java @@ -17,121 +17,149 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fireblocks.sdk.ApiClient; +import java.util.ArrayList; +import java.util.List; import java.util.Objects; import java.util.StringJoiner; /** TravelRuleValidateLegalPersonNameIdentifier */ @JsonPropertyOrder({ - TravelRuleValidateLegalPersonNameIdentifier.JSON_PROPERTY_LEGAL_PERSON_NAME, - TravelRuleValidateLegalPersonNameIdentifier.JSON_PROPERTY_LEGAL_PERSON_NAME_IDENTIFIER_TYPE + TravelRuleValidateLegalPersonNameIdentifier.JSON_PROPERTY_NAME_IDENTIFIER, + TravelRuleValidateLegalPersonNameIdentifier.JSON_PROPERTY_LOCAL_NAME_IDENTIFIER, + TravelRuleValidateLegalPersonNameIdentifier.JSON_PROPERTY_PHONETIC_NAME_IDENTIFIER }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") public class TravelRuleValidateLegalPersonNameIdentifier { - public static final String JSON_PROPERTY_LEGAL_PERSON_NAME = "legalPersonName"; - @jakarta.annotation.Nullable private String legalPersonName; + public static final String JSON_PROPERTY_NAME_IDENTIFIER = "nameIdentifier"; + @jakarta.annotation.Nonnull private List nameIdentifier; - /** - * Specifies the type of name for a legal person. Acceptable values are: - 'REGISTERED': - * The official registered name. - 'TRADE': A trading name or DBA (Doing Business As) - * name. - 'OTHER': Any other type of name. - */ - public enum LegalPersonNameIdentifierTypeEnum { - REGISTERED(String.valueOf("REGISTERED")), + public static final String JSON_PROPERTY_LOCAL_NAME_IDENTIFIER = "localNameIdentifier"; - TRADE(String.valueOf("TRADE")), + @jakarta.annotation.Nullable + private List localNameIdentifier; - OTHER(String.valueOf("OTHER")); + public static final String JSON_PROPERTY_PHONETIC_NAME_IDENTIFIER = "phoneticNameIdentifier"; - private String value; + @jakarta.annotation.Nullable + private List phoneticNameIdentifier; - LegalPersonNameIdentifierTypeEnum(String value) { - this.value = value; - } + public TravelRuleValidateLegalPersonNameIdentifier() {} - @JsonValue - public String getValue() { - return value; - } + @JsonCreator + public TravelRuleValidateLegalPersonNameIdentifier( + @JsonProperty(value = JSON_PROPERTY_NAME_IDENTIFIER, required = true) + List nameIdentifier) { + this.nameIdentifier = nameIdentifier; + } - @Override - public String toString() { - return String.valueOf(value); - } + public TravelRuleValidateLegalPersonNameIdentifier nameIdentifier( + @jakarta.annotation.Nonnull + List nameIdentifier) { + this.nameIdentifier = nameIdentifier; + return this; + } - @JsonCreator - public static LegalPersonNameIdentifierTypeEnum fromValue(String value) { - for (LegalPersonNameIdentifierTypeEnum b : LegalPersonNameIdentifierTypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + public TravelRuleValidateLegalPersonNameIdentifier addNameIdentifierItem( + TravelRuleValidateLegalNameIdentifier nameIdentifierItem) { + if (this.nameIdentifier == null) { + this.nameIdentifier = new ArrayList<>(); } + this.nameIdentifier.add(nameIdentifierItem); + return this; } - public static final String JSON_PROPERTY_LEGAL_PERSON_NAME_IDENTIFIER_TYPE = - "legalPersonNameIdentifierType"; + /** + * An array of name identifiers of the legal person. + * + * @return nameIdentifier + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME_IDENTIFIER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getNameIdentifier() { + return nameIdentifier; + } - @jakarta.annotation.Nullable - private LegalPersonNameIdentifierTypeEnum legalPersonNameIdentifierType; + @JsonProperty(JSON_PROPERTY_NAME_IDENTIFIER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setNameIdentifier( + @jakarta.annotation.Nonnull + List nameIdentifier) { + this.nameIdentifier = nameIdentifier; + } - public TravelRuleValidateLegalPersonNameIdentifier() {} + public TravelRuleValidateLegalPersonNameIdentifier localNameIdentifier( + @jakarta.annotation.Nullable + List localNameIdentifier) { + this.localNameIdentifier = localNameIdentifier; + return this; + } - public TravelRuleValidateLegalPersonNameIdentifier legalPersonName( - @jakarta.annotation.Nullable String legalPersonName) { - this.legalPersonName = legalPersonName; + public TravelRuleValidateLegalPersonNameIdentifier addLocalNameIdentifierItem( + TravelRuleValidateLegalNameIdentifier localNameIdentifierItem) { + if (this.localNameIdentifier == null) { + this.localNameIdentifier = new ArrayList<>(); + } + this.localNameIdentifier.add(localNameIdentifierItem); return this; } /** - * Name by which the legal person is known. + * An array of local name identifiers of the legal person. * - * @return legalPersonName + * @return localNameIdentifier */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LEGAL_PERSON_NAME) + @JsonProperty(JSON_PROPERTY_LOCAL_NAME_IDENTIFIER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getLegalPersonName() { - return legalPersonName; + public List getLocalNameIdentifier() { + return localNameIdentifier; } - @JsonProperty(JSON_PROPERTY_LEGAL_PERSON_NAME) + @JsonProperty(JSON_PROPERTY_LOCAL_NAME_IDENTIFIER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLegalPersonName(@jakarta.annotation.Nullable String legalPersonName) { - this.legalPersonName = legalPersonName; + public void setLocalNameIdentifier( + @jakarta.annotation.Nullable + List localNameIdentifier) { + this.localNameIdentifier = localNameIdentifier; } - public TravelRuleValidateLegalPersonNameIdentifier legalPersonNameIdentifierType( + public TravelRuleValidateLegalPersonNameIdentifier phoneticNameIdentifier( @jakarta.annotation.Nullable - LegalPersonNameIdentifierTypeEnum legalPersonNameIdentifierType) { - this.legalPersonNameIdentifierType = legalPersonNameIdentifierType; + List phoneticNameIdentifier) { + this.phoneticNameIdentifier = phoneticNameIdentifier; + return this; + } + + public TravelRuleValidateLegalPersonNameIdentifier addPhoneticNameIdentifierItem( + TravelRuleValidateLegalNameIdentifier phoneticNameIdentifierItem) { + if (this.phoneticNameIdentifier == null) { + this.phoneticNameIdentifier = new ArrayList<>(); + } + this.phoneticNameIdentifier.add(phoneticNameIdentifierItem); return this; } /** - * Specifies the type of name for a legal person. Acceptable values are: - 'REGISTERED': - * The official registered name. - 'TRADE': A trading name or DBA (Doing Business As) - * name. - 'OTHER': Any other type of name. + * An array of phonetic name identifiers of the legal person. * - * @return legalPersonNameIdentifierType + * @return phoneticNameIdentifier */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LEGAL_PERSON_NAME_IDENTIFIER_TYPE) + @JsonProperty(JSON_PROPERTY_PHONETIC_NAME_IDENTIFIER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public LegalPersonNameIdentifierTypeEnum getLegalPersonNameIdentifierType() { - return legalPersonNameIdentifierType; + public List getPhoneticNameIdentifier() { + return phoneticNameIdentifier; } - @JsonProperty(JSON_PROPERTY_LEGAL_PERSON_NAME_IDENTIFIER_TYPE) + @JsonProperty(JSON_PROPERTY_PHONETIC_NAME_IDENTIFIER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLegalPersonNameIdentifierType( + public void setPhoneticNameIdentifier( @jakarta.annotation.Nullable - LegalPersonNameIdentifierTypeEnum legalPersonNameIdentifierType) { - this.legalPersonNameIdentifierType = legalPersonNameIdentifierType; + List phoneticNameIdentifier) { + this.phoneticNameIdentifier = phoneticNameIdentifier; } /** Return true if this TravelRuleValidateLegalPersonNameIdentifier object is equal to o. */ @@ -146,25 +174,31 @@ public boolean equals(Object o) { TravelRuleValidateLegalPersonNameIdentifier travelRuleValidateLegalPersonNameIdentifier = (TravelRuleValidateLegalPersonNameIdentifier) o; return Objects.equals( - this.legalPersonName, - travelRuleValidateLegalPersonNameIdentifier.legalPersonName) + this.nameIdentifier, + travelRuleValidateLegalPersonNameIdentifier.nameIdentifier) && Objects.equals( - this.legalPersonNameIdentifierType, - travelRuleValidateLegalPersonNameIdentifier.legalPersonNameIdentifierType); + this.localNameIdentifier, + travelRuleValidateLegalPersonNameIdentifier.localNameIdentifier) + && Objects.equals( + this.phoneticNameIdentifier, + travelRuleValidateLegalPersonNameIdentifier.phoneticNameIdentifier); } @Override public int hashCode() { - return Objects.hash(legalPersonName, legalPersonNameIdentifierType); + return Objects.hash(nameIdentifier, localNameIdentifier, phoneticNameIdentifier); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TravelRuleValidateLegalPersonNameIdentifier {\n"); - sb.append(" legalPersonName: ").append(toIndentedString(legalPersonName)).append("\n"); - sb.append(" legalPersonNameIdentifierType: ") - .append(toIndentedString(legalPersonNameIdentifierType)) + sb.append(" nameIdentifier: ").append(toIndentedString(nameIdentifier)).append("\n"); + sb.append(" localNameIdentifier: ") + .append(toIndentedString(localNameIdentifier)) + .append("\n"); + sb.append(" phoneticNameIdentifier: ") + .append(toIndentedString(phoneticNameIdentifier)) .append("\n"); sb.append("}"); return sb.toString(); @@ -213,25 +247,73 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `legalPersonName` to the URL query string - if (getLegalPersonName() != null) { - joiner.add( - String.format( - "%slegalPersonName%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getLegalPersonName())))); + // add `nameIdentifier` to the URL query string + if (getNameIdentifier() != null) { + for (int i = 0; i < getNameIdentifier().size(); i++) { + if (getNameIdentifier().get(i) != null) { + joiner.add( + getNameIdentifier() + .get(i) + .toUrlQueryString( + String.format( + "%snameIdentifier%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `localNameIdentifier` to the URL query string + if (getLocalNameIdentifier() != null) { + for (int i = 0; i < getLocalNameIdentifier().size(); i++) { + if (getLocalNameIdentifier().get(i) != null) { + joiner.add( + getLocalNameIdentifier() + .get(i) + .toUrlQueryString( + String.format( + "%slocalNameIdentifier%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } } - // add `legalPersonNameIdentifierType` to the URL query string - if (getLegalPersonNameIdentifierType() != null) { - joiner.add( - String.format( - "%slegalPersonNameIdentifierType%s=%s", - prefix, - suffix, - ApiClient.urlEncode( - ApiClient.valueToString(getLegalPersonNameIdentifierType())))); + // add `phoneticNameIdentifier` to the URL query string + if (getPhoneticNameIdentifier() != null) { + for (int i = 0; i < getPhoneticNameIdentifier().size(); i++) { + if (getPhoneticNameIdentifier().get(i) != null) { + joiner.add( + getPhoneticNameIdentifier() + .get(i) + .toUrlQueryString( + String.format( + "%sphoneticNameIdentifier%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } } return joiner.toString(); diff --git a/src/test/java/com/fireblocks/sdk/FireblocksTest.java b/src/test/java/com/fireblocks/sdk/FireblocksTest.java index faaffc74..6372c04a 100644 --- a/src/test/java/com/fireblocks/sdk/FireblocksTest.java +++ b/src/test/java/com/fireblocks/sdk/FireblocksTest.java @@ -629,6 +629,15 @@ public void testGetResetDeviceApi() { Assert.assertSame(resetDevice, fireblocks.resetDevice()); } + @Test + public void testGetSecurityPostureManagementApi() { + setupFireblocks(true, null, null); + SecurityPostureManagementApi securityPostureManagement = + fireblocks.securityPostureManagement(); + Assert.assertNotNull(securityPostureManagement); + Assert.assertSame(securityPostureManagement, fireblocks.securityPostureManagement()); + } + @Test public void testGetSmartTransferApi() { setupFireblocks(true, null, null); diff --git a/src/test/java/com/fireblocks/sdk/api/ApiUserApiTest.java b/src/test/java/com/fireblocks/sdk/api/ApiUserApiTest.java index f45d3093..22871268 100644 --- a/src/test/java/com/fireblocks/sdk/api/ApiUserApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ApiUserApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.CreateAPIUser; import com.fireblocks.sdk.model.GetAPIUsersResponse; @@ -34,11 +33,9 @@ public class ApiUserApiTest { *

Create a new API key in your workspace. Learn more about Fireblocks API Keys management in * the following [guide](https://developers.fireblocks.com/docs/manage-api-keys). Endpoint * Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void createApiUserTest() throws ApiException { + public void createApiUserTest() { CreateAPIUser createAPIUser = null; String idempotencyKey = null; @@ -52,11 +49,9 @@ public void createApiUserTest() throws ApiException { *

List all API keys in your workspace. - Please note that this endpoint is available only * for API keys with Admin/Non Signing Admin permissions. Endpoint Permission: Admin, * Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getApiUsersTest() throws ApiException { + public void getApiUsersTest() { CompletableFuture> response = api.getApiUsers(); } @@ -68,11 +63,9 @@ public void getApiUsersTest() throws ApiException { * set up (enabled), the request is rejected with a 409 Conflict. - Please note that this * endpoint is available only for API keys with Owner/Admin/Non Signing Admin permissions. * Endpoint Permission: Owner, Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void issueApiUserPairingTokenTest() throws ApiException { + public void issueApiUserPairingTokenTest() { String userId = null; String idempotencyKey = null; CompletableFuture> response = diff --git a/src/test/java/com/fireblocks/sdk/api/AuditLogsApiTest.java b/src/test/java/com/fireblocks/sdk/api/AuditLogsApiTest.java index df1694e4..a2618853 100644 --- a/src/test/java/com/fireblocks/sdk/api/AuditLogsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/AuditLogsApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.GetAuditLogsResponse; import java.util.List; @@ -38,11 +37,9 @@ public class AuditLogsApiTest { * but new integrations should use `startTime`/`endTime` and * `pageCursor` instead. Endpoint Permission: Admin, Non-Signing Admin, Auditor, * Security Admin, Security Auditor. - * - * @throws ApiException if the Api call fails */ @Test - public void getAuditLogsTest() throws ApiException { + public void getAuditLogsTest() { Integer startTime = null; Integer endTime = null; String timePeriod = null; diff --git a/src/test/java/com/fireblocks/sdk/api/BlockchainLinkBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/BlockchainLinkBetaApiTest.java index c1de03cd..6c47a9f8 100644 --- a/src/test/java/com/fireblocks/sdk/api/BlockchainLinkBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/BlockchainLinkBetaApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.ActivateBlockchainResponse; import com.fireblocks.sdk.model.BlockchainDeclaredProperties; @@ -46,11 +45,9 @@ public class BlockchainLinkBetaApiTest { * *

Starts the asynchronous activation workflow for the blockchain identified by its ID, * transitioning it towards the ACTIVATED state. - * - * @throws ApiException if the Api call fails */ @Test - public void activateBlockchainLinkChainTest() throws ApiException { + public void activateBlockchainLinkChainTest() { String blockchainId = null; String idempotencyKey = null; CompletableFuture> response = @@ -63,11 +60,9 @@ public void activateBlockchainLinkChainTest() throws ApiException { *

Registers a new tenant-managed blockchain from the supplied declared properties. The * blockchain starts in the CREATED state and must be activated separately before it can be * used. - * - * @throws ApiException if the Api call fails */ @Test - public void createBlockchainLinkChainTest() throws ApiException { + public void createBlockchainLinkChainTest() { CreateBlockchainRequest createBlockchainRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -79,11 +74,9 @@ public void createBlockchainLinkChainTest() throws ApiException { * *

Permanently removes a blockchain identified by its ID. The blockchain must not be in an * active lifecycle state. - * - * @throws ApiException if the Api call fails */ @Test - public void deleteBlockchainLinkChainTest() throws ApiException { + public void deleteBlockchainLinkChainTest() { String blockchainId = null; CompletableFuture> response = api.deleteBlockchainLinkChain(blockchainId); @@ -94,11 +87,9 @@ public void deleteBlockchainLinkChainTest() throws ApiException { * *

Returns the tenant's blockchain activation limit and current usage. tenant_id is * derived from the JWT token context. - * - * @throws ApiException if the Api call fails */ @Test - public void getBlockchainLinkBillingInfoTest() throws ApiException { + public void getBlockchainLinkBillingInfoTest() { CompletableFuture> response = api.getBlockchainLinkBillingInfo(); } @@ -107,11 +98,9 @@ public void getBlockchainLinkBillingInfoTest() throws ApiException { * Get a blockchain by ID * *

Returns a single blockchain owned by the tenant, identified by its ID. - * - * @throws ApiException if the Api call fails */ @Test - public void getBlockchainLinkChainTest() throws ApiException { + public void getBlockchainLinkChainTest() { String blockchainId = null; CompletableFuture> response = api.getBlockchainLinkChain(blockchainId); @@ -122,11 +111,9 @@ public void getBlockchainLinkChainTest() throws ApiException { * *

Returns the Ethereum address derived from the configured external wallet private key, used * by the UI for test transfers. tenant_id is derived from the JWT token context. - * - * @throws ApiException if the Api call fails */ @Test - public void getBlockchainLinkTestWalletAddressTest() throws ApiException { + public void getBlockchainLinkTestWalletAddressTest() { CompletableFuture> response = api.getBlockchainLinkTestWalletAddress(); } @@ -136,11 +123,9 @@ public void getBlockchainLinkTestWalletAddressTest() throws ApiException { * *

Returns the tenant's blockchains, paginated and filterable by state, network * environment, and free-text search, with configurable sorting. - * - * @throws ApiException if the Api call fails */ @Test - public void listBlockchainLinkChainsTest() throws ApiException { + public void listBlockchainLinkChainsTest() { String pageCursor = null; BigDecimal pageSize = null; String search = null; @@ -166,11 +151,9 @@ public void listBlockchainLinkChainsTest() throws ApiException { * *

Starts the asynchronous validation workflow for a blockchain and its associated validation * session. - * - * @throws ApiException if the Api call fails */ @Test - public void triggerBlockchainLinkValidationTest() throws ApiException { + public void triggerBlockchainLinkValidationTest() { UUID blockchainId = null; String idempotencyKey = null; CompletableFuture> response = @@ -182,11 +165,9 @@ public void triggerBlockchainLinkValidationTest() throws ApiException { * *

Updates the declared properties of an existing blockchain identified by its ID. Only the * fields supplied in the request are modified. - * - * @throws ApiException if the Api call fails */ @Test - public void updateBlockchainLinkChainTest() throws ApiException { + public void updateBlockchainLinkChainTest() { BlockchainDeclaredProperties blockchainDeclaredProperties = null; String blockchainId = null; String idempotencyKey = null; diff --git a/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java b/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java index 276848dc..1488dba2 100644 --- a/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.Asset; import com.fireblocks.sdk.model.AssetClass; @@ -45,11 +44,9 @@ public class BlockchainsAssetsApiTest { *

Returns an asset by ID or legacyID. **Note**: - We will continue displaying and supporting * the legacy ID (API ID). Since not all Fireblocks services fully support the new Assets UUID, * please use only the legacy ID until further notice. - * - * @throws ApiException if the Api call fails */ @Test - public void getAssetTest() throws ApiException { + public void getAssetTest() { String id = null; String idempotencyKey = null; CompletableFuture> response = api.getAsset(id, idempotencyKey); @@ -59,11 +56,9 @@ public void getAssetTest() throws ApiException { * Get a Blockchain by ID * *

Returns a blockchain by ID or legacyID. - * - * @throws ApiException if the Api call fails */ @Test - public void getBlockchainTest() throws ApiException { + public void getBlockchainTest() { String id = null; CompletableFuture> response = api.getBlockchain(id); } @@ -77,11 +72,9 @@ public void getBlockchainTest() throws ApiException { * performance and to retrieve more detailed asset information.** Retrieves all assets supported * by Fireblocks in your workspace. **Endpoint Permissions:** Admin, Non-Signing Admin, Signer, * Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void getSupportedAssetsTest() throws ApiException { + public void getSupportedAssetsTest() { CompletableFuture>> response = api.getSupportedAssets(); } @@ -92,11 +85,9 @@ public void getSupportedAssetsTest() throws ApiException { * **Note:** We will continue to support and display the legacy ID (API ID). Since not all * Fireblocks services fully support the new Assets UUID, please use only the legacy ID until * further notice. - * - * @throws ApiException if the Api call fails */ @Test - public void listAssetsTest() throws ApiException { + public void listAssetsTest() { String blockchainId = null; AssetClass assetClass = null; String symbol = null; @@ -123,11 +114,9 @@ public void listAssetsTest() throws ApiException { * List blockchains * *

Returns all blockchains supported by Fireblocks. - * - * @throws ApiException if the Api call fails */ @Test - public void listBlockchainsTest() throws ApiException { + public void listBlockchainsTest() { String protocol = null; Boolean deprecated = null; Boolean test = null; @@ -144,11 +133,9 @@ public void listBlockchainsTest() throws ApiException { *

Register a new asset to a workspace and return the newly created asset's details. * Currently supported chains are: - EVM based chains - Stellar - Algorand - TRON - NEAR - * Solana - Sui - TON - * - * @throws ApiException if the Api call fails */ @Test - public void registerNewAssetTest() throws ApiException { + public void registerNewAssetTest() { RegisterNewAssetRequest registerNewAssetRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -159,11 +146,9 @@ public void registerNewAssetTest() throws ApiException { * Set asset price * *

Set asset price for the given asset id. Returns the asset price response. - * - * @throws ApiException if the Api call fails */ @Test - public void setAssetPriceTest() throws ApiException { + public void setAssetPriceTest() { String id = null; SetAssetPriceRequest setAssetPriceRequest = null; String idempotencyKey = null; @@ -176,11 +161,9 @@ public void setAssetPriceTest() throws ApiException { * *

Update the user’s metadata for an asset. Endpoint Permission: Owner, Admin, Non-Signing * Admin, NCW Admin, Signer, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void updateAssetUserMetadataTest() throws ApiException { + public void updateAssetUserMetadataTest() { String id = null; UpdateAssetUserMetadataRequest updateAssetUserMetadataRequest = null; String idempotencyKey = null; diff --git a/src/test/java/com/fireblocks/sdk/api/ComplianceApiTest.java b/src/test/java/com/fireblocks/sdk/api/ComplianceApiTest.java index 340f9afa..9fcaa8b2 100644 --- a/src/test/java/com/fireblocks/sdk/api/ComplianceApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ComplianceApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.AddressRegistryAddVaultOptOutsRequest; import com.fireblocks.sdk.model.AddressRegistryAddVaultOptOutsResponse; @@ -67,11 +66,9 @@ public class ComplianceApiTest { * *

Activates ARS (Address Registry Screening) for the authenticated tenant (sets * config.active to true). Once activated, ARS screening applies to matching transactions. - * - * @throws ApiException if the Api call fails */ @Test - public void activateArsConfigTest() throws ApiException { + public void activateArsConfigTest() { String idempotencyKey = null; CompletableFuture> response = api.activateArsConfig(idempotencyKey); @@ -83,11 +80,9 @@ public void activateArsConfigTest() throws ApiException { *

Activates BYORK Light for the authenticated tenant (sets config.active to true). Once * activated, BYORK screening applies to matching transactions. Requires BYORK Light to be * enabled for the tenant (contact your CSM to enable). - * - * @throws ApiException if the Api call fails */ @Test - public void activateByorkConfigTest() throws ApiException { + public void activateByorkConfigTest() { String idempotencyKey = null; CompletableFuture> response = api.activateByorkConfig(idempotencyKey); @@ -97,11 +92,9 @@ public void activateByorkConfigTest() throws ApiException { * Add vault accounts to the address registry opt-out list * *

Adds one or more vault account ids to the workspace opt-out list for the address registry. - * - * @throws ApiException if the Api call fails */ @Test - public void addAddressRegistryVaultOptOutsTest() throws ApiException { + public void addAddressRegistryVaultOptOutsTest() { AddressRegistryAddVaultOptOutsRequest addressRegistryAddVaultOptOutsRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -115,11 +108,9 @@ public void addAddressRegistryVaultOptOutsTest() throws ApiException { *

Assigns one or more vault accounts to a specific legal entity registration. Explicitly * mapped vault accounts take precedence over the workspace default legal entity. Endpoint * Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void assignVaultsToLegalEntityTest() throws ApiException { + public void assignVaultsToLegalEntityTest() { AssignVaultsToLegalEntityRequest assignVaultsToLegalEntityRequest = null; UUID legalEntityId = null; String idempotencyKey = null; @@ -132,11 +123,9 @@ public void assignVaultsToLegalEntityTest() throws ApiException { * Create a counterparty group * *

Creates a new counterparty group. **Endpoint Permissions:** Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void createCounterpartyGroupTest() throws ApiException { + public void createCounterpartyGroupTest() { CreateCounterpartyGroupRequest createCounterpartyGroupRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -149,11 +138,9 @@ public void createCounterpartyGroupTest() throws ApiException { *

Deactivates ARS (Address Registry Screening) for the authenticated tenant (sets * config.active to false). Once deactivated, ARS screening no longer applies until activated * again. - * - * @throws ApiException if the Api call fails */ @Test - public void deactivateArsConfigTest() throws ApiException { + public void deactivateArsConfigTest() { String idempotencyKey = null; CompletableFuture> response = api.deactivateArsConfig(idempotencyKey); @@ -165,11 +152,9 @@ public void deactivateArsConfigTest() throws ApiException { *

Deactivates BYORK Light for the authenticated tenant (sets config.active to false). Once * deactivated, BYORK screening no longer applies until activated again. Requires BYORK Light to * be enabled for the tenant (contact your CSM to enable). - * - * @throws ApiException if the Api call fails */ @Test - public void deactivateByorkConfigTest() throws ApiException { + public void deactivateByorkConfigTest() { String idempotencyKey = null; CompletableFuture> response = api.deactivateByorkConfig(idempotencyKey); @@ -180,11 +165,9 @@ public void deactivateByorkConfigTest() throws ApiException { * *

Permanently deletes a counterparty group. **Endpoint Permissions:** Admin, Non-Signing * Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void deleteCounterpartyGroupTest() throws ApiException { + public void deleteCounterpartyGroupTest() { UUID groupId = null; CompletableFuture> response = api.deleteCounterpartyGroup(groupId); @@ -195,11 +178,9 @@ public void deleteCounterpartyGroupTest() throws ApiException { * *

Delete a legal entity will change the status of a legal entity registration to REVOKED. * Endpoint Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void deleteLegalEntityTest() throws ApiException { + public void deleteLegalEntityTest() { UUID legalEntityId = null; CompletableFuture> response = api.deleteLegalEntity(legalEntityId); @@ -210,11 +191,9 @@ public void deleteLegalEntityTest() throws ApiException { * *

Returns whether the workspace is `OPTED_IN` or `OPTED_OUT` of the * address registry. - * - * @throws ApiException if the Api call fails */ @Test - public void getAddressRegistryTenantParticipationStatusTest() throws ApiException { + public void getAddressRegistryTenantParticipationStatusTest() { CompletableFuture> response = api.getAddressRegistryTenantParticipationStatus(); } @@ -225,11 +204,9 @@ public void getAddressRegistryTenantParticipationStatusTest() throws ApiExceptio *

Returns whether this vault account is on the workspace opt-out list (`optedOut` * true or false). List, add, and clear-all are available on * `/v1/address_registry/vaults`; this path reads or removes one vault. - * - * @throws ApiException if the Api call fails */ @Test - public void getAddressRegistryVaultOptOutTest() throws ApiException { + public void getAddressRegistryVaultOptOutTest() { Integer vaultAccountId = null; CompletableFuture> response = api.getAddressRegistryVaultOptOut(vaultAccountId); @@ -239,11 +216,9 @@ public void getAddressRegistryVaultOptOutTest() throws ApiException { * AML - View Post-Screening Policy * *

Get the post-screening policy for AML. - * - * @throws ApiException if the Api call fails */ @Test - public void getAmlPostScreeningPolicyTest() throws ApiException { + public void getAmlPostScreeningPolicyTest() { CompletableFuture> response = api.getAmlPostScreeningPolicy(); } @@ -252,11 +227,9 @@ public void getAmlPostScreeningPolicyTest() throws ApiException { * AML - View Screening Policy * *

Get the screening policy for AML. - * - * @throws ApiException if the Api call fails */ @Test - public void getAmlScreeningPolicyTest() throws ApiException { + public void getAmlScreeningPolicyTest() { CompletableFuture> response = api.getAmlScreeningPolicy(); } @@ -267,11 +240,9 @@ public void getAmlScreeningPolicyTest() throws ApiException { *

Retrieves BYORK Light configuration for the authenticated tenant (timeouts, active flag, * allowed timeout ranges). Returns default config when none exists. Requires BYORK Light to be * enabled for the tenant. - * - * @throws ApiException if the Api call fails */ @Test - public void getByorkConfigTest() throws ApiException { + public void getByorkConfigTest() { CompletableFuture> response = api.getByorkConfig(); } @@ -282,11 +253,9 @@ public void getByorkConfigTest() throws ApiException { * PRE_ACCEPTED, PENDING, RECEIVED (verdict is final but processing not yet complete), or * COMPLETED. Requires BYORK Light to be enabled for the tenant. Returns 404 if no BYORK verdict * is found for the transaction. - * - * @throws ApiException if the Api call fails */ @Test - public void getByorkVerdictTest() throws ApiException { + public void getByorkVerdictTest() { String txId = null; CompletableFuture> response = api.getByorkVerdict(txId); @@ -297,11 +266,9 @@ public void getByorkVerdictTest() throws ApiException { * *

Returns the details of a specific counterparty group. **Endpoint Permissions:** Admin, * Non-Signing Admin, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getCounterpartyGroupTest() throws ApiException { + public void getCounterpartyGroupTest() { UUID groupId = null; CompletableFuture> response = api.getCounterpartyGroup(groupId); @@ -312,11 +279,9 @@ public void getCounterpartyGroupTest() throws ApiException { * *

Returns details of a specific legal entity registration, including GLEIF data when * available. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getLegalEntityTest() throws ApiException { + public void getLegalEntityTest() { UUID legalEntityId = null; CompletableFuture> response = api.getLegalEntity(legalEntityId); @@ -328,11 +293,9 @@ public void getLegalEntityTest() throws ApiException { *

Returns legal entity information for the given blockchain address (LEI data availability, * LEI identifier, Travel Rule providers, contact email, and related fields — see response * schema). URL-encode `{address}` when required. - * - * @throws ApiException if the Api call fails */ @Test - public void getLegalEntityForAddressTest() throws ApiException { + public void getLegalEntityForAddressTest() { String address = null; CompletableFuture> response = api.getLegalEntityForAddress(address); @@ -342,11 +305,9 @@ public void getLegalEntityForAddressTest() throws ApiException { * Travel Rule - View Post-Screening Policy * *

Get the post-screening policy for Travel Rule. - * - * @throws ApiException if the Api call fails */ @Test - public void getPostScreeningPolicyTest() throws ApiException { + public void getPostScreeningPolicyTest() { CompletableFuture> response = api.getPostScreeningPolicy(); } @@ -355,11 +316,9 @@ public void getPostScreeningPolicyTest() throws ApiException { * Provides all the compliance details for the given screened transaction. * *

Provides all the compliance details for the given screened transaction. - * - * @throws ApiException if the Api call fails */ @Test - public void getScreeningFullDetailsTest() throws ApiException { + public void getScreeningFullDetailsTest() { String txId = null; CompletableFuture> response = api.getScreeningFullDetails(txId); @@ -369,11 +328,9 @@ public void getScreeningFullDetailsTest() throws ApiException { * Travel Rule - View Screening Policy * *

Get the screening policy for Travel Rule. - * - * @throws ApiException if the Api call fails */ @Test - public void getScreeningPolicyTest() throws ApiException { + public void getScreeningPolicyTest() { CompletableFuture> response = api.getScreeningPolicy(); } @@ -385,11 +342,9 @@ public void getScreeningPolicyTest() throws ApiException { * Pagination uses `next` and `prev` cursors from the response. If * `pageSize` is omitted, **50** items are returned per page; allowed range is * **1–100** per request. - * - * @throws ApiException if the Api call fails */ @Test - public void listAddressRegistryVaultOptOutsTest() throws ApiException { + public void listAddressRegistryVaultOptOutsTest() { String pageCursor = null; Integer pageSize = null; AddressRegistryVaultListOrder order = null; @@ -402,11 +357,9 @@ public void listAddressRegistryVaultOptOutsTest() throws ApiException { * *

Returns a paginated list of counterparty groups. **Endpoint Permissions:** Admin, * Non-Signing Admin, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void listCounterpartyGroupsTest() throws ApiException { + public void listCounterpartyGroupsTest() { String pageCursor = null; Integer pageSize = null; CompletableFuture> response = @@ -422,11 +375,9 @@ public void listCounterpartyGroupsTest() throws ApiException { * default legal entity is returned. Returns an empty response if neither a vault mapping nor a * default legal entity is configured. Endpoint Permission: Admin, Non-Signing Admin, Signer, * Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void listLegalEntitiesTest() throws ApiException { + public void listLegalEntitiesTest() { String vaultAccountId = null; String pageCursor = null; Integer pageSize = null; @@ -440,11 +391,9 @@ public void listLegalEntitiesTest() throws ApiException { *

Returns vault account IDs explicitly assigned to a specific legal entity registration, * with cursor-based pagination. Endpoint Permission: Admin, Non-Signing Admin, Signer, * Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void listVaultsForLegalEntityTest() throws ApiException { + public void listVaultsForLegalEntityTest() { UUID legalEntityId = null; String pageCursor = null; Integer pageSize = null; @@ -457,11 +406,9 @@ public void listVaultsForLegalEntityTest() throws ApiException { * *

Opts the workspace in. No request body. Response uses the same JSON shape as GET; status * is OPTED_IN. - * - * @throws ApiException if the Api call fails */ @Test - public void optInAddressRegistryTenantTest() throws ApiException { + public void optInAddressRegistryTenantTest() { String idempotencyKey = null; CompletableFuture> response = api.optInAddressRegistryTenant(idempotencyKey); @@ -472,11 +419,9 @@ public void optInAddressRegistryTenantTest() throws ApiException { * *

Opts the workspace out. No request body. Response uses the same JSON shape as GET; status * is OPTED_OUT. - * - * @throws ApiException if the Api call fails */ @Test - public void optOutAddressRegistryTenantTest() throws ApiException { + public void optOutAddressRegistryTenantTest() { CompletableFuture> response = api.optOutAddressRegistryTenant(); } @@ -487,11 +432,9 @@ public void optOutAddressRegistryTenantTest() throws ApiException { *

Registers a new legal entity for the workspace using its LEI (Legal Entity Identifier) * code. The LEI is validated against the GLEIF registry. Each workspace can register multiple * legal entities. Endpoint Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void registerLegalEntityTest() throws ApiException { + public void registerLegalEntityTest() { RegisterLegalEntityRequest registerLegalEntityRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -504,11 +447,9 @@ public void registerLegalEntityTest() throws ApiException { *

Removes this vault account id from the workspace opt-out list if it is present; otherwise * the call still succeeds. Response body matches GET (`optedOut` is `false` * after success). To clear the whole list, use `DELETE /v1/address_registry/vaults`. - * - * @throws ApiException if the Api call fails */ @Test - public void removeAddressRegistryVaultOptOutTest() throws ApiException { + public void removeAddressRegistryVaultOptOutTest() { Integer vaultAccountId = null; CompletableFuture> response = api.removeAddressRegistryVaultOptOut(vaultAccountId); @@ -518,11 +459,9 @@ public void removeAddressRegistryVaultOptOutTest() throws ApiException { * Remove all vault-level address registry opt-outs for the workspace * *

Removes all vault accounts from the workspace opt-out list. - * - * @throws ApiException if the Api call fails */ @Test - public void removeAllAddressRegistryVaultOptOutsTest() throws ApiException { + public void removeAllAddressRegistryVaultOptOutsTest() { CompletableFuture> response = api.removeAllAddressRegistryVaultOptOuts(); } @@ -533,11 +472,9 @@ public void removeAllAddressRegistryVaultOptOutsTest() throws ApiException { *

Re-runs compliance screening on an incoming transaction that was rejected or failed by * screening checks, moving it back to pending screening. This endpoint is only applicable to * incoming transactions with a rejected/failed AML screening status. - * - * @throws ApiException if the Api call fails */ @Test - public void rescreenRejectedTransactionTest() throws ApiException { + public void rescreenRejectedTransactionTest() { String txId = null; RescreenTransactionRequest rescreenTransactionRequest = null; String idempotencyKey = null; @@ -551,11 +488,9 @@ public void rescreenRejectedTransactionTest() throws ApiException { *

Triggers a new transaction, with the API user as the initiator, bypassing the screening * policy checks. This endpoint is restricted to Admin API users and is only applicable to * outgoing transactions. - * - * @throws ApiException if the Api call fails */ @Test - public void retryRejectedTransactionBypassScreeningChecksTest() throws ApiException { + public void retryRejectedTransactionBypassScreeningChecksTest() { String txId = null; String idempotencyKey = null; CompletableFuture> response = @@ -569,11 +504,9 @@ public void retryRejectedTransactionBypassScreeningChecksTest() throws ApiExcept * Verdict) is enabled. This endpoint is for Super Light only. For **BYORK Light**, use POST * /screening/byork/verdict instead. When Super Light is retired, this endpoint will be * deprecated; use the BYORK Light verdict API for new integrations. - * - * @throws ApiException if the Api call fails */ @Test - public void setAmlVerdictTest() throws ApiException { + public void setAmlVerdictTest() { AmlVerdictManualRequest amlVerdictManualRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -588,11 +521,9 @@ public void setAmlVerdictTest() throws ApiException { * the ranges returned in GET config (timeoutRangeIncoming for incomingTimeoutSeconds, * timeoutRangeOutgoing for outgoingTimeoutSeconds). Requires BYORK Light to be enabled for the * tenant (contact your CSM to enable). - * - * @throws ApiException if the Api call fails */ @Test - public void setByorkTimeoutsTest() throws ApiException { + public void setByorkTimeoutsTest() { ByorkSetTimeoutsRequest byorkSetTimeoutsRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -607,11 +538,9 @@ public void setByorkTimeoutsTest() throws ApiException { * COMPLETED). If processing has not yet reached that point, the verdict is stored and applied * when it does (response status PRE_ACCEPTED). Requires BYORK Light to be enabled for the * tenant. - * - * @throws ApiException if the Api call fails */ @Test - public void setByorkVerdictTest() throws ApiException { + public void setByorkVerdictTest() { ByorkVerdictRequest byorkVerdictRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -622,11 +551,9 @@ public void setByorkVerdictTest() throws ApiException { * Update AML Configuration * *

Updates bypass screening, inbound delay, or outbound delay configurations for AML. - * - * @throws ApiException if the Api call fails */ @Test - public void updateAmlScreeningConfigurationTest() throws ApiException { + public void updateAmlScreeningConfigurationTest() { String idempotencyKey = null; CompletableFuture> response = api.updateAmlScreeningConfiguration(idempotencyKey); @@ -637,11 +564,9 @@ public void updateAmlScreeningConfigurationTest() throws ApiException { * *

Updates an existing counterparty group. **Endpoint Permissions:** Admin, Non-Signing * Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void updateCounterpartyGroupTest() throws ApiException { + public void updateCounterpartyGroupTest() { UpdateCounterpartyGroupRequest updateCounterpartyGroupRequest = null; UUID groupId = null; String idempotencyKey = null; @@ -656,11 +581,9 @@ public void updateCounterpartyGroupTest() throws ApiException { *

Updates the status of a legal entity registration. Setting isDefault to true marks the * registration as the workspace default, which is applied to vault accounts that have no * explicit legal entity mapping. Endpoint Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void updateLegalEntityTest() throws ApiException { + public void updateLegalEntityTest() { UpdateLegalEntityRequest updateLegalEntityRequest = null; UUID legalEntityId = null; String idempotencyKey = null; @@ -672,11 +595,9 @@ public void updateLegalEntityTest() throws ApiException { * Tenant - Screening Configuration * *

Update tenant screening configuration. - * - * @throws ApiException if the Api call fails */ @Test - public void updateScreeningConfigurationTest() throws ApiException { + public void updateScreeningConfigurationTest() { ScreeningUpdateConfigurations screeningUpdateConfigurations = null; String idempotencyKey = null; CompletableFuture> response = @@ -687,11 +608,9 @@ public void updateScreeningConfigurationTest() throws ApiException { * Update Travel Rule Configuration * *

Updates bypass screening, inbound delay, or outbound delay configurations for Travel Rule. - * - * @throws ApiException if the Api call fails */ @Test - public void updateTravelRuleConfigTest() throws ApiException { + public void updateTravelRuleConfigTest() { String idempotencyKey = null; CompletableFuture> response = api.updateTravelRuleConfig(idempotencyKey); diff --git a/src/test/java/com/fireblocks/sdk/api/ComplianceScreeningConfigurationApiTest.java b/src/test/java/com/fireblocks/sdk/api/ComplianceScreeningConfigurationApiTest.java index a1b91586..a6d47ddd 100644 --- a/src/test/java/com/fireblocks/sdk/api/ComplianceScreeningConfigurationApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ComplianceScreeningConfigurationApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.ScreeningConfigurationsRequest; import java.util.concurrent.CompletableFuture; @@ -31,11 +30,9 @@ public class ComplianceScreeningConfigurationApiTest { * Get AML Screening Policy Configuration * *

Retrieves the configuration for Travel Rule screening policy. - * - * @throws ApiException if the Api call fails */ @Test - public void getAmlScreeningConfigurationTest() throws ApiException { + public void getAmlScreeningConfigurationTest() { CompletableFuture> response = api.getAmlScreeningConfiguration(); } @@ -44,11 +41,9 @@ public void getAmlScreeningConfigurationTest() throws ApiException { * Get Travel Rule Screening Policy Configuration * *

Retrieves the configuration for Travel Rule screening policy. - * - * @throws ApiException if the Api call fails */ @Test - public void getScreeningConfigurationTest() throws ApiException { + public void getScreeningConfigurationTest() { CompletableFuture> response = api.getScreeningConfiguration(); } diff --git a/src/test/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApiTest.java index 1d2993c7..2473648c 100644 --- a/src/test/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.AddConnectedAccountRequest; import com.fireblocks.sdk.model.AddConnectedAccountResponse; @@ -47,11 +46,9 @@ public class ConnectedAccountsBetaApiTest { * The `providerType` is derived server-side from the `providerId` — callers * do not supply it. Endpoint Permission: Editor, Admin, Non-Signing Admin. **Note:** This * endpoint is currently in beta and might be subject to changes. - * - * @throws ApiException if the Api call fails */ @Test - public void addConnectedAccountTest() throws ApiException { + public void addConnectedAccountTest() { AddConnectedAccountRequest addConnectedAccountRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -63,11 +60,9 @@ public void addConnectedAccountTest() throws ApiException { * *

Disconnect a connected account by ID. **Note**: - This endpoint is currently in beta and * might be subject to changes. - * - * @throws ApiException if the Api call fails */ @Test - public void disconnectConnectedAccountTest() throws ApiException { + public void disconnectConnectedAccountTest() { String accountId = null; CompletableFuture> response = api.disconnectConnectedAccount(accountId); @@ -78,11 +73,9 @@ public void disconnectConnectedAccountTest() throws ApiException { * *

Retrieve detailed information about a specific connected account by ID. **Note:** This * endpoint is currently in beta and might be subject to changes. - * - * @throws ApiException if the Api call fails */ @Test - public void getConnectedAccountTest() throws ApiException { + public void getConnectedAccountTest() { String accountId = null; CompletableFuture> response = api.getConnectedAccount(accountId); @@ -94,11 +87,9 @@ public void getConnectedAccountTest() throws ApiException { *

Retrieves the address allowlist for a specified connected account. **Note:** This endpoint * is currently in beta and might be subject to changes. Currently supports * CoinbaseExchange/Binance accounts only. - * - * @throws ApiException if the Api call fails */ @Test - public void getConnectedAccountAllowlistTest() throws ApiException { + public void getConnectedAccountAllowlistTest() { String accountId = null; AllowlistEntryStatus status = null; String assetId = null; @@ -125,11 +116,9 @@ public void getConnectedAccountAllowlistTest() throws ApiException { *

Retrieves a single allowlist entry by its Fireblocks identifier for a specified connected * account. **Note:** This endpoint is currently in beta and might be subject to changes. * Currently supports CoinbaseExchange/Binance accounts only. - * - * @throws ApiException if the Api call fails */ @Test - public void getConnectedAccountAllowlistEntryTest() throws ApiException { + public void getConnectedAccountAllowlistEntryTest() { String accountId = null; String allowlistId = null; CompletableFuture> response = @@ -142,11 +131,9 @@ public void getConnectedAccountAllowlistEntryTest() throws ApiException { *

Retrieve current asset balances for a specific connected account as a flat list (one row * per `assetId`, `balanceType`). **Note:** This endpoint is currently in * beta and might be subject to changes. - * - * @throws ApiException if the Api call fails */ @Test - public void getConnectedAccountBalancesTest() throws ApiException { + public void getConnectedAccountBalancesTest() { String accountId = null; Integer pageSize = null; String pageCursor = null; @@ -159,11 +146,9 @@ public void getConnectedAccountBalancesTest() throws ApiException { * *

Retrieve current exchange rates for converting between specific assets in a connected * account. **Note:** This endpoint is currently in beta and might be subject to changes. - * - * @throws ApiException if the Api call fails */ @Test - public void getConnectedAccountRatesTest() throws ApiException { + public void getConnectedAccountRatesTest() { String accountId = null; String baseAssetId = null; String quoteAssetId = null; @@ -177,11 +162,9 @@ public void getConnectedAccountRatesTest() throws ApiException { *

Retrieve all asset trading pairs supported by a specific connected account, including the * pair type (`quote`, `market`, `onOffRamp`). **Note:** This * endpoint is currently in beta and might be subject to changes. - * - * @throws ApiException if the Api call fails */ @Test - public void getConnectedAccountTradingPairsTest() throws ApiException { + public void getConnectedAccountTradingPairsTest() { String accountId = null; Integer pageSize = null; String pageCursor = null; @@ -194,11 +177,9 @@ public void getConnectedAccountTradingPairsTest() throws ApiException { * *

Returns all connected accounts. **Note:** This endpoint is currently in beta and might be * subject to changes. - * - * @throws ApiException if the Api call fails */ @Test - public void getConnectedAccountsTest() throws ApiException { + public void getConnectedAccountsTest() { Boolean mainAccounts = null; Integer pageSize = null; String pageCursor = null; @@ -213,11 +194,9 @@ public void getConnectedAccountsTest() throws ApiException { * `POST /connected_accounts`. The key is a singleton resource scoped to the * connected-accounts credentials domain — there is one per tenant context. **Note:** This * endpoint is currently in beta and might be subject to changes. - * - * @throws ApiException if the Api call fails */ @Test - public void getConnectedAccountsCredentialsPublicKeyTest() throws ApiException { + public void getConnectedAccountsCredentialsPublicKeyTest() { CompletableFuture> response = api.getConnectedAccountsCredentialsPublicKey(); } @@ -227,11 +206,9 @@ public void getConnectedAccountsCredentialsPublicKeyTest() throws ApiException { * *

Rename a connected account by account ID. **Note:** This endpoint is currently in beta and * might be subject to changes. - * - * @throws ApiException if the Api call fails */ @Test - public void renameConnectedAccountTest() throws ApiException { + public void renameConnectedAccountTest() { RenameConnectedAccountRequest renameConnectedAccountRequest = null; String accountId = null; String idempotencyKey = null; @@ -247,11 +224,9 @@ public void renameConnectedAccountTest() throws ApiException { * immediately. **Rate limit:** 1 request per minute per connected account. **Note:** This * endpoint is currently in beta and might be subject to changes. Currently supports * CoinbaseExchange/Binance accounts only. - * - * @throws ApiException if the Api call fails */ @Test - public void syncConnectedAccountAllowlistTest() throws ApiException { + public void syncConnectedAccountAllowlistTest() { String accountId = null; String idempotencyKey = null; diff --git a/src/test/java/com/fireblocks/sdk/api/ConsoleUserApiTest.java b/src/test/java/com/fireblocks/sdk/api/ConsoleUserApiTest.java index bfc71464..f8d34927 100644 --- a/src/test/java/com/fireblocks/sdk/api/ConsoleUserApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ConsoleUserApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.CreateConsoleUser; import com.fireblocks.sdk.model.GetConsoleUsersResponse; @@ -34,11 +33,9 @@ public class ConsoleUserApiTest { * for API keys with Admin/Non Signing Admin permissions. Learn more about Fireblocks Users * management in the following [guide](https://developers.fireblocks.com/docs/manage-users). * Endpoint Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void createConsoleUserTest() throws ApiException { + public void createConsoleUserTest() { CreateConsoleUser createConsoleUser = null; String idempotencyKey = null; @@ -52,11 +49,9 @@ public void createConsoleUserTest() throws ApiException { *

Get console users for your workspace. - Please note that this endpoint is available only * for API keys with Admin/Non Signing Admin permissions. Endpoint Permission: Admin, * Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getConsoleUsersTest() throws ApiException { + public void getConsoleUsersTest() { CompletableFuture> response = api.getConsoleUsers(); } } diff --git a/src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java b/src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java index a82ae336..e43d65a6 100644 --- a/src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.ContractAbiResponseDto; import com.fireblocks.sdk.model.ContractAddressResponse; @@ -40,11 +39,9 @@ public class ContractInteractionsApiTest { * *

Decode a function call data, error, or event log from a deployed contract by blockchain * native asset id and contract address. - * - * @throws ApiException if the Api call fails */ @Test - public void decodeContractDataTest() throws ApiException { + public void decodeContractDataTest() { ContractDataDecodeRequest contractDataDecodeRequest = null; String contractAddress = null; String baseAssetId = null; @@ -58,11 +55,9 @@ public void decodeContractDataTest() throws ApiException { * Get contract address by transaction hash * *

Retrieve the contract address by blockchain native asset ID and transaction hash - * - * @throws ApiException if the Api call fails */ @Test - public void getContractAddressTest() throws ApiException { + public void getContractAddressTest() { String baseAssetId = null; String txHash = null; String idempotencyKey = null; @@ -75,11 +70,9 @@ public void getContractAddressTest() throws ApiException { * *

Return deployed contract's ABI by blockchain native asset id and contract address. * Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, and Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getDeployedContractAbiTest() throws ApiException { + public void getDeployedContractAbiTest() { String contractAddress = null; String baseAssetId = null; String idempotencyKey = null; @@ -94,11 +87,9 @@ public void getDeployedContractAbiTest() throws ApiException { * **Note** > This functionality is exclusively available for EVM (Ethereum Virtual Machine) * compatible chains. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, * and Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getTransactionReceiptTest() throws ApiException { + public void getTransactionReceiptTest() { String baseAssetId = null; String txHash = null; CompletableFuture> response = @@ -110,11 +101,9 @@ public void getTransactionReceiptTest() throws ApiException { * *

Call a read function on a deployed contract by blockchain native asset id and contract * address - * - * @throws ApiException if the Api call fails */ @Test - public void readCallFunctionTest() throws ApiException { + public void readCallFunctionTest() { ReadCallFunctionDto readCallFunctionDto = null; String contractAddress = null; String baseAssetId = null; @@ -130,11 +119,9 @@ public void readCallFunctionTest() throws ApiException { *

Call a write function on a deployed contract by blockchain native asset id and contract * address. This creates an onchain transaction, thus it is an async operation. It returns a * transaction id that can be polled for status check - * - * @throws ApiException if the Api call fails */ @Test - public void writeCallFunctionTest() throws ApiException { + public void writeCallFunctionTest() { WriteCallFunctionDto writeCallFunctionDto = null; String contractAddress = null; String baseAssetId = null; diff --git a/src/test/java/com/fireblocks/sdk/api/ContractTemplatesApiTest.java b/src/test/java/com/fireblocks/sdk/api/ContractTemplatesApiTest.java index c24304e2..f8c96e3f 100644 --- a/src/test/java/com/fireblocks/sdk/api/ContractTemplatesApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ContractTemplatesApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.AbiFunction; import com.fireblocks.sdk.model.ContractDeployRequest; @@ -38,11 +37,9 @@ public class ContractTemplatesApiTest { * *

Delete a contract by id. allowed only for private contract templates. Notice: it is * irreversible! - * - * @throws ApiException if the Api call fails */ @Test - public void deleteContractTemplateByIdTest() throws ApiException { + public void deleteContractTemplateByIdTest() { String contractTemplateId = null; CompletableFuture> response = @@ -54,11 +51,9 @@ public void deleteContractTemplateByIdTest() throws ApiException { * *

Deploy a new contract by contract template id. If you wish to deploy a token (ERC20, * ERC721 etc), and create asset please use POST /tokenization - * - * @throws ApiException if the Api call fails */ @Test - public void deployContractTest() throws ApiException { + public void deployContractTest() { ContractDeployRequest contractDeployRequest = null; String contractTemplateId = null; String idempotencyKey = null; @@ -70,11 +65,9 @@ public void deployContractTest() throws ApiException { * Return contract template's constructor * *

Return contract template's constructor ABI - * - * @throws ApiException if the Api call fails */ @Test - public void getConstructorByContractTemplateIdTest() throws ApiException { + public void getConstructorByContractTemplateIdTest() { String contractTemplateId = null; Boolean withDocs = null; CompletableFuture> response = @@ -85,11 +78,9 @@ public void getConstructorByContractTemplateIdTest() throws ApiException { * Return contract template by id * *

Return detailed information about the contract template - * - * @throws ApiException if the Api call fails */ @Test - public void getContractTemplateByIdTest() throws ApiException { + public void getContractTemplateByIdTest() { String contractTemplateId = null; CompletableFuture> response = api.getContractTemplateById(contractTemplateId); @@ -100,11 +91,9 @@ public void getContractTemplateByIdTest() throws ApiException { * *

Return minimal representation of all the contract templates available for the workspace. * Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getContractTemplatesTest() throws ApiException { + public void getContractTemplatesTest() { BigDecimal limit = null; BigDecimal offset = null; String pageCursor = null; @@ -120,11 +109,9 @@ public void getContractTemplatesTest() throws ApiException { * Return contract template's function * *

Return contract template`s function ABI by signature - * - * @throws ApiException if the Api call fails */ @Test - public void getFunctionAbiByContractTemplateIdTest() throws ApiException { + public void getFunctionAbiByContractTemplateIdTest() { String contractTemplateId = null; String functionSignature = null; CompletableFuture> response = @@ -135,11 +122,9 @@ public void getFunctionAbiByContractTemplateIdTest() throws ApiException { * Get supported blockchains for the template * *

Get supported blockchains for the template - * - * @throws ApiException if the Api call fails */ @Test - public void getSupportedBlockchainsByTemplateIdTest() throws ApiException { + public void getSupportedBlockchainsByTemplateIdTest() { String contractTemplateId = null; CompletableFuture> response = api.getSupportedBlockchainsByTemplateId(contractTemplateId); @@ -149,11 +134,9 @@ public void getSupportedBlockchainsByTemplateIdTest() throws ApiException { * Upload contract template * *

Upload a new contract template. This contract template will be available for the workspace - * - * @throws ApiException if the Api call fails */ @Test - public void uploadContractTemplateTest() throws ApiException { + public void uploadContractTemplateTest() { ContractUploadRequest contractUploadRequest = null; String idempotencyKey = null; CompletableFuture> response = diff --git a/src/test/java/com/fireblocks/sdk/api/ContractsApiTest.java b/src/test/java/com/fireblocks/sdk/api/ContractsApiTest.java index 8057767d..a3f2e221 100644 --- a/src/test/java/com/fireblocks/sdk/api/ContractsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ContractsApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.AddContractAssetRequest; import com.fireblocks.sdk.model.CreateContractRequest; @@ -35,11 +34,9 @@ public class ContractsApiTest { * *

Adds an asset to a whitelisted contract. Endpoint Permission: Admin, Non-Signing Admin, * Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void addContractAssetTest() throws ApiException { + public void addContractAssetTest() { String contractId = null; String assetId = null; AddContractAssetRequest addContractAssetRequest = null; @@ -53,11 +50,9 @@ public void addContractAssetTest() throws ApiException { * *

Adds a contract to the workspace whitelist. Endpoint Permission: Admin, Non-Signing Admin, * Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void createContractTest() throws ApiException { + public void createContractTest() { CreateContractRequest createContractRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -69,11 +64,9 @@ public void createContractTest() throws ApiException { * *

Deletes a contract by ID. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, * Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void deleteContractTest() throws ApiException { + public void deleteContractTest() { String contractId = null; CompletableFuture> response = api.deleteContract(contractId); @@ -84,11 +77,9 @@ public void deleteContractTest() throws ApiException { * *

Deletes a whitelisted contract asset by ID. Endpoint Permission: Admin, Non-Signing Admin, * Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void deleteContractAssetTest() throws ApiException { + public void deleteContractAssetTest() { String contractId = null; String assetId = null; @@ -101,11 +92,9 @@ public void deleteContractAssetTest() throws ApiException { * *

Returns a whitelisted contract by Fireblocks Contract ID. Endpoint Permission: Admin, * Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void getContractTest() throws ApiException { + public void getContractTest() { String contractId = null; CompletableFuture> response = api.getContract(contractId); } @@ -115,11 +104,9 @@ public void getContractTest() throws ApiException { * *

Returns a whitelisted contract's asset by ID. Endpoint Permission: Admin, Non-Signing * Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void getContractAssetTest() throws ApiException { + public void getContractAssetTest() { String contractId = null; String assetId = null; CompletableFuture> response = @@ -131,11 +118,9 @@ public void getContractAssetTest() throws ApiException { * *

Gets a list of whitelisted contracts. Endpoint Permission: Admin, Non-Signing Admin, * Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getContractsTest() throws ApiException { + public void getContractsTest() { CompletableFuture>> response = api.getContracts(); } } diff --git a/src/test/java/com/fireblocks/sdk/api/CosignersBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/CosignersBetaApiTest.java index 728a0005..c7eb74d0 100644 --- a/src/test/java/com/fireblocks/sdk/api/CosignersBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/CosignersBetaApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.AddCosignerRequest; import com.fireblocks.sdk.model.AddCosignerResponse; @@ -44,11 +43,9 @@ public class CosignersBetaApiTest { * *

Add a new cosigner. The cosigner will be pending pairing until the API key is manually * paired Endpoint Permission: Admin and Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void addCosignerTest() throws ApiException { + public void addCosignerTest() { AddCosignerRequest addCosignerRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -60,11 +57,9 @@ public void addCosignerTest() throws ApiException { * *

Get an API key by ID. **Note:** These endpoints are currently in beta and might be subject * to changes. Endpoint Permission: Admin and Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getApiKeyTest() throws ApiException { + public void getApiKeyTest() { UUID cosignerId = null; String apiKeyId = null; CompletableFuture> response = api.getApiKey(cosignerId, apiKeyId); @@ -75,11 +70,9 @@ public void getApiKeyTest() throws ApiException { * *

Get all cosigner paired API keys (paginated). **Note:** These endpoints are currently in * beta and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getApiKeysTest() throws ApiException { + public void getApiKeysTest() { UUID cosignerId = null; String order = null; String pageCursor = null; @@ -93,11 +86,9 @@ public void getApiKeysTest() throws ApiException { * *

Get a cosigner by ID. **Note:** These endpoints are currently in beta and might be subject * to changes. Endpoint Permission: Admin and Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getCosignerTest() throws ApiException { + public void getCosignerTest() { UUID cosignerId = null; CompletableFuture> response = api.getCosigner(cosignerId); } @@ -107,11 +98,9 @@ public void getCosignerTest() throws ApiException { * *

Get all workspace cosigners (paginated). **Note:** These endpoints are currently in beta * and might be subject to changes. Endpoint Permission: Admin and Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getCosignersTest() throws ApiException { + public void getCosignersTest() { String order = null; String pageCursor = null; BigDecimal pageSize = null; @@ -124,11 +113,9 @@ public void getCosignersTest() throws ApiException { * *

Get the status of an asynchronous request Endpoint Permission: Admin and Non-Signing * Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getRequestStatusTest() throws ApiException { + public void getRequestStatusTest() { UUID cosignerId = null; String apiKeyId = null; String requestId = null; @@ -140,11 +127,9 @@ public void getRequestStatusTest() throws ApiException { * Pair API key * *

Pair an API key to a cosigner Endpoint Permission: Admin and Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void pairApiKeyTest() throws ApiException { + public void pairApiKeyTest() { PairApiKeyRequest pairApiKeyRequest = null; UUID cosignerId = null; String apiKeyId = null; @@ -158,11 +143,9 @@ public void pairApiKeyTest() throws ApiException { * *

Rename a cosigner by ID. **Note:** These endpoints are currently in beta and might be * subject to changes. Endpoint Permission: Admin and Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void renameCosignerTest() throws ApiException { + public void renameCosignerTest() { RenameCosigner renameCosigner = null; UUID cosignerId = null; CompletableFuture> response = @@ -173,11 +156,9 @@ public void renameCosignerTest() throws ApiException { * Unpair API key * *

Unpair an API key from a cosigner Endpoint Permission: Admin and Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void unpairApiKeyTest() throws ApiException { + public void unpairApiKeyTest() { UUID cosignerId = null; String apiKeyId = null; CompletableFuture> response = api.unpairApiKey(cosignerId, apiKeyId); @@ -188,11 +169,9 @@ public void unpairApiKeyTest() throws ApiException { * *

Update the callback handler of an API key Endpoint Permission: Admin and Non-Signing * Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void updateCallbackHandlerTest() throws ApiException { + public void updateCallbackHandlerTest() { UpdateCallbackHandlerRequest updateCallbackHandlerRequest = null; UUID cosignerId = null; String apiKeyId = null; diff --git a/src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java b/src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java index b46bf938..dbaf3aed 100644 --- a/src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/DeployedContractsApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.AddAbiRequestDto; import com.fireblocks.sdk.model.ContractWithAbiDto; @@ -35,11 +34,9 @@ public class DeployedContractsApiTest { * Save contract ABI * *

Save contract ABI for the tenant - * - * @throws ApiException if the Api call fails */ @Test - public void addContractABITest() throws ApiException { + public void addContractABITest() { AddAbiRequestDto addAbiRequestDto = null; String idempotencyKey = null; CompletableFuture> response = @@ -50,11 +47,9 @@ public void addContractABITest() throws ApiException { * Fetch the contract ABI * *

Fetch the ABI. If not found fetch the ABI from the block explorer - * - * @throws ApiException if the Api call fails */ @Test - public void fetchContractAbiTest() throws ApiException { + public void fetchContractAbiTest() { FetchAbiRequestDto fetchAbiRequestDto = null; String idempotencyKey = null; CompletableFuture> response = @@ -65,11 +60,9 @@ public void fetchContractAbiTest() throws ApiException { * Return deployed contract data * *

Return deployed contract data by blockchain native asset id and contract address - * - * @throws ApiException if the Api call fails */ @Test - public void getDeployedContractByAddressTest() throws ApiException { + public void getDeployedContractByAddressTest() { String contractAddress = null; String assetId = null; CompletableFuture> response = @@ -80,11 +73,9 @@ public void getDeployedContractByAddressTest() throws ApiException { * Return deployed contract data by id * *

Return deployed contract data by id - * - * @throws ApiException if the Api call fails */ @Test - public void getDeployedContractByIdTest() throws ApiException { + public void getDeployedContractByIdTest() { String id = null; CompletableFuture> response = api.getDeployedContractById(id); @@ -95,11 +86,9 @@ public void getDeployedContractByIdTest() throws ApiException { * *

Return a filtered lean representation of the deployed contracts data on all blockchains * (paginated) - * - * @throws ApiException if the Api call fails */ @Test - public void getDeployedContractsTest() throws ApiException { + public void getDeployedContractsTest() { String pageCursor = null; BigDecimal pageSize = null; String contractAddress = null; diff --git a/src/test/java/com/fireblocks/sdk/api/EarnApiTest.java b/src/test/java/com/fireblocks/sdk/api/EarnApiTest.java index 163c6b10..d5f21a87 100644 --- a/src/test/java/com/fireblocks/sdk/api/EarnApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/EarnApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.CreateEarnActionRequest; import com.fireblocks.sdk.model.CreateEarnActionResponse; @@ -39,11 +38,9 @@ public class EarnApiTest { * `isTermsApprovalRequired` is true on a provider (see list providers), call this * once before creating or executing earn actions with providers that require it. After success, * `GET /earn/providers` reflects `isTermsOfServiceApproved`. - * - * @throws ApiException if the Api call fails */ @Test - public void approveTermsOfServiceTest() throws ApiException { + public void approveTermsOfServiceTest() { String idempotencyKey = null; CompletableFuture> response = api.approveTermsOfService(idempotencyKey); @@ -55,11 +52,9 @@ public void approveTermsOfServiceTest() throws ApiException { *

Creates and runs a sequence of on-chain steps for either a deposit into or a withdrawal * from an earn vault/market. Specify the operation with `action` in the request body * (`DEPOSIT` or `WITHDRAW`). - * - * @throws ApiException if the Api call fails */ @Test - public void createEarnActionTest() throws ApiException { + public void createEarnActionTest() { CreateEarnActionRequest createEarnActionRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -70,11 +65,9 @@ public void createEarnActionTest() throws ApiException { * Get a single earn lending action * *

Returns one lending action by its action sequence id (tenant-scoped). - * - * @throws ApiException if the Api call fails */ @Test - public void getEarnActionTest() throws ApiException { + public void getEarnActionTest() { String id = null; CompletableFuture> response = api.getEarnAction(id); } @@ -84,11 +77,9 @@ public void getEarnActionTest() throws ApiException { * *

Returns a paginated list of lending actions (deposits and withdrawals) for the * authenticated tenant. - * - * @throws ApiException if the Api call fails */ @Test - public void getEarnActionsTest() throws ApiException { + public void getEarnActionsTest() { String pageCursor = null; Integer pageSize = null; String sortBy = null; @@ -101,11 +92,9 @@ public void getEarnActionsTest() throws ApiException { * Get list of earn opportunities * *

Get list of earn opportunities (vaults). - * - * @throws ApiException if the Api call fails */ @Test - public void getEarnOpportunitiesTest() throws ApiException { + public void getEarnOpportunitiesTest() { String pageCursor = null; Integer pageSize = null; String sortBy = null; @@ -119,11 +108,9 @@ public void getEarnOpportunitiesTest() throws ApiException { * *

Get list of earn positions for accounts tracked for this workspace. Optional query * parameters filter by chain, provider, and pagination. - * - * @throws ApiException if the Api call fails */ @Test - public void getEarnPositionsTest() throws ApiException { + public void getEarnPositionsTest() { Integer chainId = null; String providerId = null; String pageCursor = null; @@ -138,11 +125,9 @@ public void getEarnPositionsTest() throws ApiException { * Get list of earn providers * *

Get list of earn providers. - * - * @throws ApiException if the Api call fails */ @Test - public void getEarnProvidersTest() throws ApiException { + public void getEarnProvidersTest() { String pageCursor = null; Integer pageSize = null; String sortBy = null; diff --git a/src/test/java/com/fireblocks/sdk/api/EmbeddedWalletsApiTest.java b/src/test/java/com/fireblocks/sdk/api/EmbeddedWalletsApiTest.java index e0f42e1c..f7d00492 100644 --- a/src/test/java/com/fireblocks/sdk/api/EmbeddedWalletsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/EmbeddedWalletsApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.EmbeddedWallet; import com.fireblocks.sdk.model.EmbeddedWalletAccount; @@ -49,11 +48,9 @@ public class EmbeddedWalletsApiTest { * *

Get the addresses of a specific asset, under a specific account, under a specific Non * Custodial Wallet - * - * @throws ApiException if the Api call fails */ @Test - public void addEmbeddedWalletAssetTest() throws ApiException { + public void addEmbeddedWalletAssetTest() { String walletId = null; String accountId = null; String assetId = null; @@ -66,11 +63,9 @@ public void addEmbeddedWalletAssetTest() throws ApiException { * Assign a wallet * *

Assign a specific Non Custodial Wallet to a user - * - * @throws ApiException if the Api call fails */ @Test - public void assignEmbeddedWalletTest() throws ApiException { + public void assignEmbeddedWalletTest() { String walletId = null; String idempotencyKey = null; CompletableFuture> response = @@ -81,11 +76,9 @@ public void assignEmbeddedWalletTest() throws ApiException { * Create a new wallet * *

Create new Non Custodial Wallet - * - * @throws ApiException if the Api call fails */ @Test - public void createEmbeddedWalletTest() throws ApiException { + public void createEmbeddedWalletTest() { String idempotencyKey = null; CompletableFuture> response = api.createEmbeddedWallet(idempotencyKey); @@ -95,11 +88,9 @@ public void createEmbeddedWalletTest() throws ApiException { * Create a new account * *

Create a new account under a specific Non Custodial Wallet - * - * @throws ApiException if the Api call fails */ @Test - public void createEmbeddedWalletAccountTest() throws ApiException { + public void createEmbeddedWalletAccountTest() { String walletId = null; String idempotencyKey = null; CompletableFuture> response = @@ -110,11 +101,9 @@ public void createEmbeddedWalletAccountTest() throws ApiException { * Get a wallet * *

Get a wallet - * - * @throws ApiException if the Api call fails */ @Test - public void getEmbeddedWalletTest() throws ApiException { + public void getEmbeddedWalletTest() { String walletId = null; CompletableFuture> response = api.getEmbeddedWallet(walletId); } @@ -123,11 +112,9 @@ public void getEmbeddedWalletTest() throws ApiException { * Get a account * *

Get a specific account under a specific Non Custodial Wallet - * - * @throws ApiException if the Api call fails */ @Test - public void getEmbeddedWalletAccountTest() throws ApiException { + public void getEmbeddedWalletAccountTest() { String walletId = null; String accountId = null; CompletableFuture> response = @@ -139,11 +126,9 @@ public void getEmbeddedWalletAccountTest() throws ApiException { * *

Get the addresses of a specific asset, under a specific account, under a specific Non * Custodial Wallet - * - * @throws ApiException if the Api call fails */ @Test - public void getEmbeddedWalletAddressesTest() throws ApiException { + public void getEmbeddedWalletAddressesTest() { String walletId = null; String accountId = null; String assetId = null; @@ -161,11 +146,9 @@ public void getEmbeddedWalletAddressesTest() throws ApiException { * Retrieve asset * *

Get asset under a specific account, under a specific Non Custodial Wallet - * - * @throws ApiException if the Api call fails */ @Test - public void getEmbeddedWalletAssetTest() throws ApiException { + public void getEmbeddedWalletAssetTest() { String walletId = null; String accountId = null; String assetId = null; @@ -177,11 +160,9 @@ public void getEmbeddedWalletAssetTest() throws ApiException { * Retrieve asset balance * *

Get balance for specific asset, under a specific account - * - * @throws ApiException if the Api call fails */ @Test - public void getEmbeddedWalletAssetBalanceTest() throws ApiException { + public void getEmbeddedWalletAssetBalanceTest() { String walletId = null; String accountId = null; String assetId = null; @@ -193,11 +174,9 @@ public void getEmbeddedWalletAssetBalanceTest() throws ApiException { * Retrieve assets * *

Retrieve assets for a specific account under a specific Non Custodial Wallet - * - * @throws ApiException if the Api call fails */ @Test - public void getEmbeddedWalletAssetsTest() throws ApiException { + public void getEmbeddedWalletAssetsTest() { String walletId = null; String accountId = null; List sort = null; @@ -212,11 +191,9 @@ public void getEmbeddedWalletAssetsTest() throws ApiException { * Get Embedded Wallet Device * *

Get specific device for a specific s Wallet - * - * @throws ApiException if the Api call fails */ @Test - public void getEmbeddedWalletDeviceTest() throws ApiException { + public void getEmbeddedWalletDeviceTest() { String walletId = null; String deviceId = null; CompletableFuture> response = @@ -227,11 +204,9 @@ public void getEmbeddedWalletDeviceTest() throws ApiException { * Get device key setup state * *

Get the state of the specific device setup key under a specific Non Custodial Wallet - * - * @throws ApiException if the Api call fails */ @Test - public void getEmbeddedWalletDeviceSetupStateTest() throws ApiException { + public void getEmbeddedWalletDeviceSetupStateTest() { String walletId = null; String deviceId = null; CompletableFuture> response = @@ -242,11 +217,9 @@ public void getEmbeddedWalletDeviceSetupStateTest() throws ApiException { * Get registered devices - paginated * *

Get a paginated list of registered devices for a specific Non Custodial Wallet - * - * @throws ApiException if the Api call fails */ @Test - public void getEmbeddedWalletDevicesPaginatedTest() throws ApiException { + public void getEmbeddedWalletDevicesPaginatedTest() { String walletId = null; List sort = null; String pageCursor = null; @@ -260,11 +233,9 @@ public void getEmbeddedWalletDevicesPaginatedTest() throws ApiException { * Get wallet Latest Backup details * *

Get wallet Latest Backup details, including the deviceId, and backup time - * - * @throws ApiException if the Api call fails */ @Test - public void getEmbeddedWalletLatestBackupTest() throws ApiException { + public void getEmbeddedWalletLatestBackupTest() { String walletId = null; CompletableFuture> response = api.getEmbeddedWalletLatestBackup(walletId); @@ -275,11 +246,9 @@ public void getEmbeddedWalletLatestBackupTest() throws ApiException { * *

Gets the public key of an asset associated with a specific account within a Non-Custodial * Wallet - * - * @throws ApiException if the Api call fails */ @Test - public void getEmbeddedWalletPublicKeyInfoForAddressTest() throws ApiException { + public void getEmbeddedWalletPublicKeyInfoForAddressTest() { UUID xEndUserWalletId = null; String walletId = null; String accountId = null; @@ -303,11 +272,9 @@ public void getEmbeddedWalletPublicKeyInfoForAddressTest() throws ApiException { * *

Get the key setup state for a specific Non Custodial Wallet, including required algorithms * and device setup status - * - * @throws ApiException if the Api call fails */ @Test - public void getEmbeddedWalletSetupStatusTest() throws ApiException { + public void getEmbeddedWalletSetupStatusTest() { String walletId = null; CompletableFuture> response = api.getEmbeddedWalletSetupStatus(walletId); @@ -317,11 +284,9 @@ public void getEmbeddedWalletSetupStatusTest() throws ApiException { * Retrieve supported assets * *

Get all the available supported assets for the Non-Custodial Wallet - * - * @throws ApiException if the Api call fails */ @Test - public void getEmbeddedWalletSupportedAssetsTest() throws ApiException { + public void getEmbeddedWalletSupportedAssetsTest() { String pageCursor = null; BigDecimal pageSize = null; Boolean onlyBaseAssets = null; @@ -333,11 +298,9 @@ public void getEmbeddedWalletSupportedAssetsTest() throws ApiException { * List wallets * *

Get all Non Custodial Wallets - * - * @throws ApiException if the Api call fails */ @Test - public void getEmbeddedWalletsTest() throws ApiException { + public void getEmbeddedWalletsTest() { String pageCursor = null; BigDecimal pageSize = null; String sort = null; @@ -352,11 +315,9 @@ public void getEmbeddedWalletsTest() throws ApiException { * *

Gets the public key information based on derivation path and signing algorithm within a * Non-Custodial Wallet - * - * @throws ApiException if the Api call fails */ @Test - public void getPublicKeyInfoNcwTest() throws ApiException { + public void getPublicKeyInfoNcwTest() { UUID xEndUserWalletId = null; String walletId = null; String derivationPath = null; @@ -371,11 +332,9 @@ public void getPublicKeyInfoNcwTest() throws ApiException { * Refresh asset balance * *

Refresh the balance of an asset in a specific account - * - * @throws ApiException if the Api call fails */ @Test - public void refreshEmbeddedWalletAssetBalanceTest() throws ApiException { + public void refreshEmbeddedWalletAssetBalanceTest() { String walletId = null; String accountId = null; String assetId = null; @@ -388,11 +347,9 @@ public void refreshEmbeddedWalletAssetBalanceTest() throws ApiException { * Update device status * *

Update the enabled/disabled status of a specific device for a Non Custodial Wallet - * - * @throws ApiException if the Api call fails */ @Test - public void updateEmbeddedWalletDeviceStatusTest() throws ApiException { + public void updateEmbeddedWalletDeviceStatusTest() { EnableDevice enableDevice = null; String walletId = null; String deviceId = null; @@ -407,11 +364,9 @@ public void updateEmbeddedWalletDeviceStatusTest() throws ApiException { * Update wallet status * *

Update the enabled/disabled status of a specific Non Custodial Wallet - * - * @throws ApiException if the Api call fails */ @Test - public void updateEmbeddedWalletStatusTest() throws ApiException { + public void updateEmbeddedWalletStatusTest() { EnableWallet enableWallet = null; String walletId = null; String idempotencyKey = null; diff --git a/src/test/java/com/fireblocks/sdk/api/ExchangeAccountsApiTest.java b/src/test/java/com/fireblocks/sdk/api/ExchangeAccountsApiTest.java index 350035fd..695a20d6 100644 --- a/src/test/java/com/fireblocks/sdk/api/ExchangeAccountsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ExchangeAccountsApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.AddExchangeAccountRequest; import com.fireblocks.sdk.model.AddExchangeAccountResponse; @@ -46,11 +45,9 @@ public class ExchangeAccountsApiTest { * `COINHAKO`, `BULLISH`, `BITGET`, and `LUNO` To add an * exchange account, please use the following * [guide](https://developers.fireblocks.com/docs/add-an-exchange-account). - * - * @throws ApiException if the Api call fails */ @Test - public void addExchangeAccountTest() throws ApiException { + public void addExchangeAccountTest() { AddExchangeAccountRequest addExchangeAccountRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -65,11 +62,9 @@ public void addExchangeAccountTest() throws ApiException { * Fireblocks Exchange Connectivity in the following * [guide](https://developers.fireblocks.com/docs/connect-to-exchanges-and-fiat-providers). * Endpoint Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void convertAssetsTest() throws ApiException { + public void convertAssetsTest() { String exchangeAccountId = null; ConvertAssetsRequest convertAssetsRequest = null; String idempotencyKey = null; @@ -81,11 +76,9 @@ public void convertAssetsTest() throws ApiException { * Get a specific exchange account * *

Returns an exchange account by ID. Endpoint Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getExchangeAccountTest() throws ApiException { + public void getExchangeAccountTest() { String exchangeAccountId = null; CompletableFuture> response = api.getExchangeAccount(exchangeAccountId); @@ -95,11 +88,9 @@ public void getExchangeAccountTest() throws ApiException { * Get an asset for an exchange account * *

Returns an asset for an exchange account. Endpoint Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getExchangeAccountAssetTest() throws ApiException { + public void getExchangeAccountAssetTest() { String exchangeAccountId = null; String assetId = null; CompletableFuture> response = @@ -110,11 +101,9 @@ public void getExchangeAccountAssetTest() throws ApiException { * Get public key to encrypt exchange credentials * *

Return public key - * - * @throws ApiException if the Api call fails */ @Test - public void getExchangeAccountsCredentialsPublicKeyTest() throws ApiException { + public void getExchangeAccountsCredentialsPublicKeyTest() { CompletableFuture> response = api.getExchangeAccountsCredentialsPublicKey(); } @@ -124,11 +113,9 @@ public void getExchangeAccountsCredentialsPublicKeyTest() throws ApiException { * *

Returns a list of the connected exchange accounts in your workspace. Endpoint Permission: * Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getPagedExchangeAccountsTest() throws ApiException { + public void getPagedExchangeAccountsTest() { BigDecimal limit = null; String before = null; String after = null; @@ -143,11 +130,9 @@ public void getPagedExchangeAccountsTest() throws ApiException { * Fireblocks Exchange Connectivity in the following * [guide](https://developers.fireblocks.com/docs/connect-to-exchanges-and-fiat-providers). * Endpoint Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void internalTransferTest() throws ApiException { + public void internalTransferTest() { String exchangeAccountId = null; CreateInternalTransferRequest createInternalTransferRequest = null; String idempotencyKey = null; diff --git a/src/test/java/com/fireblocks/sdk/api/ExternalWalletsApiTest.java b/src/test/java/com/fireblocks/sdk/api/ExternalWalletsApiTest.java index 95fdb781..c1a7a9f1 100644 --- a/src/test/java/com/fireblocks/sdk/api/ExternalWalletsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ExternalWalletsApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.AddAssetToExternalWalletRequest; import com.fireblocks.sdk.model.CreateWalletRequest; @@ -36,11 +35,9 @@ public class ExternalWalletsApiTest { * *

Adds an asset to an existing external wallet. Endpoint Permission: Admin, Non-Signing * Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void addAssetToExternalWalletTest() throws ApiException { + public void addAssetToExternalWalletTest() { String walletId = null; String assetId = null; AddAssetToExternalWalletRequest addAssetToExternalWalletRequest = null; @@ -58,11 +55,9 @@ public void addAssetToExternalWalletTest() throws ApiException { * of the external wallet. - You cannot initiate transactions from an external wallet as the * source via Fireblocks. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, * Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void createExternalWalletTest() throws ApiException { + public void createExternalWalletTest() { CreateWalletRequest createWalletRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -75,11 +70,9 @@ public void createExternalWalletTest() throws ApiException { *

Deletes an external wallet by ID. External Wallet is a whitelisted address of a wallet * that belongs to your users/counterparties. Endpoint Permission: Admin, Non-Signing Admin, * Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void deleteExternalWalletTest() throws ApiException { + public void deleteExternalWalletTest() { String walletId = null; CompletableFuture> response = api.deleteExternalWallet(walletId); @@ -91,11 +84,9 @@ public void deleteExternalWalletTest() throws ApiException { *

Returns an external wallet by ID. External Wallet is a whitelisted address of a wallet * that belongs to your users/counterparties. Endpoint Permission: Admin, Non-Signing Admin, * Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getExternalWalletTest() throws ApiException { + public void getExternalWalletTest() { String walletId = null; CompletableFuture> response = api.getExternalWallet(walletId); } @@ -106,11 +97,9 @@ public void getExternalWalletTest() throws ApiException { *

Returns an external wallet by wallet ID and asset ID. External Wallet is a whitelisted * address of a wallet that belongs to your users/counterparties. Endpoint Permission: Admin, * Non-Signing Admin, Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getExternalWalletAssetTest() throws ApiException { + public void getExternalWalletAssetTest() { String walletId = null; String assetId = null; CompletableFuture> response = @@ -125,11 +114,9 @@ public void getExternalWalletAssetTest() throws ApiException { * of the external wallet. - You cannot initiate transactions from an external wallet as the * source via Fireblocks. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, * Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getExternalWalletsTest() throws ApiException { + public void getExternalWalletsTest() { CompletableFuture>> response = api.getExternalWallets(); } @@ -138,11 +125,9 @@ public void getExternalWalletsTest() throws ApiException { * *

Deletes an external wallet asset by ID. Endpoint Permission: Admin, Non-Signing Admin, * Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void removeAssetFromExternalWalletTest() throws ApiException { + public void removeAssetFromExternalWalletTest() { String walletId = null; String assetId = null; @@ -156,11 +141,9 @@ public void removeAssetFromExternalWalletTest() throws ApiException { *

Sets an AML/KYT customer reference ID for the specific external wallet. External Wallet is * a whitelisted address of a wallet that belongs to your users/counterparties. Endpoint * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void setExternalWalletCustomerRefIdTest() throws ApiException { + public void setExternalWalletCustomerRefIdTest() { SetCustomerRefIdRequest setCustomerRefIdRequest = null; String walletId = null; String idempotencyKey = null; diff --git a/src/test/java/com/fireblocks/sdk/api/FiatAccountsApiTest.java b/src/test/java/com/fireblocks/sdk/api/FiatAccountsApiTest.java index 524d3d62..cec1b587 100644 --- a/src/test/java/com/fireblocks/sdk/api/FiatAccountsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/FiatAccountsApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.DepositFundsFromLinkedDDAResponse; import com.fireblocks.sdk.model.FiatAccount; @@ -34,11 +33,9 @@ public class FiatAccountsApiTest { * Deposit funds from DDA * *

Deposits funds from the linked DDA. - * - * @throws ApiException if the Api call fails */ @Test - public void depositFundsFromLinkedDDATest() throws ApiException { + public void depositFundsFromLinkedDDATest() { String accountId = null; Funds funds = null; String idempotencyKey = null; @@ -50,11 +47,9 @@ public void depositFundsFromLinkedDDATest() throws ApiException { * Find a specific fiat account * *

Returns a fiat account by ID. Endpoint Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getFiatAccountTest() throws ApiException { + public void getFiatAccountTest() { String accountId = null; CompletableFuture> response = api.getFiatAccount(accountId); } @@ -63,11 +58,9 @@ public void getFiatAccountTest() throws ApiException { * List fiat accounts * *

Returns all fiat accounts. Endpoint Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getFiatAccountsTest() throws ApiException { + public void getFiatAccountsTest() { CompletableFuture>> response = api.getFiatAccounts(); } @@ -75,11 +68,9 @@ public void getFiatAccountsTest() throws ApiException { * Redeem funds to DDA * *

Redeems funds to the linked DDA. - * - * @throws ApiException if the Api call fails */ @Test - public void redeemFundsToLinkedDDATest() throws ApiException { + public void redeemFundsToLinkedDDATest() { String accountId = null; Funds funds = null; String idempotencyKey = null; diff --git a/src/test/java/com/fireblocks/sdk/api/GasStationsApiTest.java b/src/test/java/com/fireblocks/sdk/api/GasStationsApiTest.java index abe0d3dc..3f8221f6 100644 --- a/src/test/java/com/fireblocks/sdk/api/GasStationsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/GasStationsApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.EditGasStationConfigurationResponse; import com.fireblocks.sdk.model.GasStationConfiguration; @@ -33,11 +32,9 @@ public class GasStationsApiTest { * *

Returns gas station settings and balances for a requested asset. Endpoint Permission: * Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void getGasStationByAssetIdTest() throws ApiException { + public void getGasStationByAssetIdTest() { String assetId = null; CompletableFuture> response = api.getGasStationByAssetId(assetId); @@ -48,11 +45,9 @@ public void getGasStationByAssetIdTest() throws ApiException { * *

Returns gas station settings and ETH balance. Endpoint Permission: Admin, Non-Signing * Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void getGasStationInfoTest() throws ApiException { + public void getGasStationInfoTest() { CompletableFuture> response = api.getGasStationInfo(); } @@ -63,11 +58,9 @@ public void getGasStationInfoTest() throws ApiException { *

Configures gas station settings for ETH. Learn more about the Fireblocks Gas Station in * the following [guide](https://developers.fireblocks.com/docs/work-with-gas-station). Endpoint * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void updateGasStationConfigurationTest() throws ApiException { + public void updateGasStationConfigurationTest() { GasStationConfiguration gasStationConfiguration = null; String idempotencyKey = null; CompletableFuture> response = @@ -81,11 +74,9 @@ public void updateGasStationConfigurationTest() throws ApiException { * Station in the following * [guide](https://developers.fireblocks.com/docs/work-with-gas-station). Endpoint Permission: * Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void updateGasStationConfigurationByAssetIdTest() throws ApiException { + public void updateGasStationConfigurationByAssetIdTest() { GasStationConfiguration gasStationConfiguration = null; String assetId = null; String idempotencyKey = null; diff --git a/src/test/java/com/fireblocks/sdk/api/GenieBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/GenieBetaApiTest.java index d4be3448..b97cabcb 100644 --- a/src/test/java/com/fireblocks/sdk/api/GenieBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/GenieBetaApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.GenieChatMessage; import com.fireblocks.sdk.model.GenieCreateSessionResponse; @@ -35,11 +34,9 @@ public class GenieBetaApiTest { * `sessionId` — pass it when sending messages, and reuse it across calls to keep one * continuous conversation. **Note:** This endpoint is currently in beta and might be subject to * changes. - * - * @throws ApiException if the Api call fails */ @Test - public void createGenieSessionTest() throws ApiException { + public void createGenieSessionTest() { String idempotencyKey = null; CompletableFuture> response = api.createGenieSession(idempotencyKey); @@ -51,11 +48,9 @@ public void createGenieSessionTest() throws ApiException { *

Sends a question to Genie and returns a single answer. Reuse the `sessionId` * from the original session on follow-up messages to continue the conversation with prior * context. **Note:** This endpoint is currently in beta and might be subject to changes. - * - * @throws ApiException if the Api call fails */ @Test - public void sendGenieMessageTest() throws ApiException { + public void sendGenieMessageTest() { GenieSendMessageRequest genieSendMessageRequest = null; String sessionId = null; String idempotencyKey = null; diff --git a/src/test/java/com/fireblocks/sdk/api/InternalWalletsApiTest.java b/src/test/java/com/fireblocks/sdk/api/InternalWalletsApiTest.java index c5614ed9..2c222606 100644 --- a/src/test/java/com/fireblocks/sdk/api/InternalWalletsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/InternalWalletsApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.CreateInternalWalletAssetRequest; import com.fireblocks.sdk.model.CreateWalletRequest; @@ -39,11 +38,9 @@ public class InternalWalletsApiTest { *

Creates a new internal wallet with the requested name. Learn more about Whitelisted * Internal Addresses * [here](https://developers.fireblocks.com/docs/whitelist-addresses#internal-wallets) - * - * @throws ApiException if the Api call fails */ @Test - public void createInternalWalletTest() throws ApiException { + public void createInternalWalletTest() { CreateWalletRequest createWalletRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -54,11 +51,9 @@ public void createInternalWalletTest() throws ApiException { * Add an asset to an internal wallet * *

Adds an asset to an existing internal wallet. - * - * @throws ApiException if the Api call fails */ @Test - public void createInternalWalletAssetTest() throws ApiException { + public void createInternalWalletAssetTest() { String walletId = null; String assetId = null; CreateInternalWalletAssetRequest createInternalWalletAssetRequest = null; @@ -72,11 +67,9 @@ public void createInternalWalletAssetTest() throws ApiException { * Delete an internal wallet * *

Deletes an internal wallet by ID. - * - * @throws ApiException if the Api call fails */ @Test - public void deleteInternalWalletTest() throws ApiException { + public void deleteInternalWalletTest() { String walletId = null; CompletableFuture> response = api.deleteInternalWallet(walletId); @@ -86,11 +79,9 @@ public void deleteInternalWalletTest() throws ApiException { * Delete a whitelisted address * *

Deletes a whitelisted address (for an asset) from an internal wallet. - * - * @throws ApiException if the Api call fails */ @Test - public void deleteInternalWalletAssetTest() throws ApiException { + public void deleteInternalWalletAssetTest() { String walletId = null; String assetId = null; @@ -102,11 +93,9 @@ public void deleteInternalWalletAssetTest() throws ApiException { * Get assets for internal wallet * *

Returns information for an internal wallet. - * - * @throws ApiException if the Api call fails */ @Test - public void getInternalWalletTest() throws ApiException { + public void getInternalWalletTest() { String walletId = null; CompletableFuture> response = api.getInternalWallet(walletId); } @@ -115,11 +104,9 @@ public void getInternalWalletTest() throws ApiException { * Get an asset from an internal wallet * *

Returns information for an asset in an internal wallet. - * - * @throws ApiException if the Api call fails */ @Test - public void getInternalWalletAssetTest() throws ApiException { + public void getInternalWalletAssetTest() { String walletId = null; String assetId = null; CompletableFuture> response = @@ -130,11 +117,9 @@ public void getInternalWalletAssetTest() throws ApiException { * List assets in an internal wallet (Paginated) * *

Returns a paginated response of assets in an internal wallet. - * - * @throws ApiException if the Api call fails */ @Test - public void getInternalWalletAssetsPaginatedTest() throws ApiException { + public void getInternalWalletAssetsPaginatedTest() { String walletId = null; BigDecimal pageSize = null; String pageCursor = null; @@ -146,11 +131,9 @@ public void getInternalWalletAssetsPaginatedTest() throws ApiException { * List internal wallets * *

Gets a list of internal wallets. - * - * @throws ApiException if the Api call fails */ @Test - public void getInternalWalletsTest() throws ApiException { + public void getInternalWalletsTest() { CompletableFuture>> response = api.getInternalWallets(); } @@ -158,11 +141,9 @@ public void getInternalWalletsTest() throws ApiException { * Set an AML/KYT customer reference ID for internal wallet * *

Sets an AML/KYT customer reference ID for the specific internal wallet. - * - * @throws ApiException if the Api call fails */ @Test - public void setCustomerRefIdForInternalWalletTest() throws ApiException { + public void setCustomerRefIdForInternalWalletTest() { SetCustomerRefIdRequest setCustomerRefIdRequest = null; String walletId = null; String idempotencyKey = null; diff --git a/src/test/java/com/fireblocks/sdk/api/KeyLinkBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/KeyLinkBetaApiTest.java index c649b005..966ede9c 100644 --- a/src/test/java/com/fireblocks/sdk/api/KeyLinkBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/KeyLinkBetaApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.CreateSigningKeyDto; import com.fireblocks.sdk.model.CreateValidationKeyDto; @@ -42,11 +41,9 @@ public class KeyLinkBetaApiTest { *

Adds a new signing key to the workspace. The added key will be linked to the specific * Fireblocks agent user ID. The same user will receive the proof of ownership message to be * signed, and upon successful proof, the key will become enabled. - * - * @throws ApiException if the Api call fails */ @Test - public void createSigningKeyTest() throws ApiException { + public void createSigningKeyTest() { CreateSigningKeyDto createSigningKeyDto = null; String idempotencyKey = null; CompletableFuture> response = @@ -58,11 +55,9 @@ public void createSigningKeyTest() throws ApiException { * *

Adds a new validation key used to validate signing keys. The new validation key will * undergo an approval process by the workspace quorum. - * - * @throws ApiException if the Api call fails */ @Test - public void createValidationKeyTest() throws ApiException { + public void createValidationKeyTest() { CreateValidationKeyDto createValidationKeyDto = null; String idempotencyKey = null; CompletableFuture> response = @@ -74,11 +69,9 @@ public void createValidationKeyTest() throws ApiException { * *

Allows disabling validation key even if it has not expired yet. It is not allowed to * enable the validation key back. Another key has to be used for future validations. - * - * @throws ApiException if the Api call fails */ @Test - public void disableValidationKeyTest() throws ApiException { + public void disableValidationKeyTest() { ModifyValidationKeyDto modifyValidationKeyDto = null; String keyId = null; CompletableFuture> response = @@ -89,11 +82,9 @@ public void disableValidationKeyTest() throws ApiException { * Get a signing key by `keyId` * *

Returns a signing key if it exists, identified by the specified `keyId`. - * - * @throws ApiException if the Api call fails */ @Test - public void getSigningKeyTest() throws ApiException { + public void getSigningKeyTest() { String keyId = null; CompletableFuture> response = api.getSigningKey(keyId); } @@ -102,11 +93,9 @@ public void getSigningKeyTest() throws ApiException { * Get list of signing keys * *

Returns the list of signing keys in the workspace - * - * @throws ApiException if the Api call fails */ @Test - public void getSigningKeysListTest() throws ApiException { + public void getSigningKeysListTest() { String pageCursor = null; BigDecimal pageSize = null; String sortBy = null; @@ -137,11 +126,9 @@ public void getSigningKeysListTest() throws ApiException { * Get a validation key by `keyId` * *

Returns a validation key if it exists, identified by the specified `keyId`. - * - * @throws ApiException if the Api call fails */ @Test - public void getValidationKeyTest() throws ApiException { + public void getValidationKeyTest() { String keyId = null; CompletableFuture> response = api.getValidationKey(keyId); } @@ -150,11 +137,9 @@ public void getValidationKeyTest() throws ApiException { * Get list of registered validation keys * *

Returns the list of validation keys in the workspace - * - * @throws ApiException if the Api call fails */ @Test - public void getValidationKeysListTest() throws ApiException { + public void getValidationKeysListTest() { String pageCursor = null; BigDecimal pageSize = null; String sortBy = null; @@ -169,11 +154,9 @@ public void getValidationKeysListTest() throws ApiException { *

Can modify existing signing key id if the key is not enabled. The change done in * background and will be visible once applied. If key is already enabled (after proof of * ownership) the user cannot be changed. - * - * @throws ApiException if the Api call fails */ @Test - public void setAgentIdTest() throws ApiException { + public void setAgentIdTest() { ModifySigningKeyAgentIdDto modifySigningKeyAgentIdDto = null; String keyId = null; @@ -186,11 +169,9 @@ public void setAgentIdTest() throws ApiException { * *

Allows assigning the signing key to a vault account, if it hasn't been assigned to any * other vault accounts yet. - * - * @throws ApiException if the Api call fails */ @Test - public void updateSigningKeyTest() throws ApiException { + public void updateSigningKeyTest() { ModifySigningKeyDto modifySigningKeyDto = null; String keyId = null; CompletableFuture> response = diff --git a/src/test/java/com/fireblocks/sdk/api/KeysBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/KeysBetaApiTest.java index 3a1c7488..4eeb1ef9 100644 --- a/src/test/java/com/fireblocks/sdk/api/KeysBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/KeysBetaApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.GetMpcKeysResponse; import java.util.concurrent.CompletableFuture; @@ -32,11 +31,9 @@ public class KeysBetaApiTest { *

Returns a list of MPC signing keys of the workspace. For each key, the list of players * associated with it is attached. **Note:** This endpoint is currently in beta and might be * subject to changes. - * - * @throws ApiException if the Api call fails */ @Test - public void getMpcKeysListTest() throws ApiException { + public void getMpcKeysListTest() { CompletableFuture> response = api.getMpcKeysList(); } @@ -46,11 +43,9 @@ public void getMpcKeysListTest() throws ApiException { *

Returns a list of MPC signing keys of a specific user. For each key, the list of players * associated with it is attached. **Note:** This endpoint is currently in beta and might be * subject to changes. - * - * @throws ApiException if the Api call fails */ @Test - public void getMpcKeysListByUserTest() throws ApiException { + public void getMpcKeysListByUserTest() { String userId = null; CompletableFuture> response = api.getMpcKeysListByUser(userId); diff --git a/src/test/java/com/fireblocks/sdk/api/NetworkConnectionsApiTest.java b/src/test/java/com/fireblocks/sdk/api/NetworkConnectionsApiTest.java index cd381d0e..466290f4 100644 --- a/src/test/java/com/fireblocks/sdk/api/NetworkConnectionsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/NetworkConnectionsApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.CreateNetworkIdRequest; import com.fireblocks.sdk.model.DeleteNetworkConnectionResponse; @@ -47,11 +46,9 @@ public class NetworkConnectionsApiTest { *

The Fireblocks Network allows for flexibility around incoming deposits. A receiver can * receive network deposits to locations other than Fireblocks. This endpoint validates whether * future transactions are routed to the displayed recipient or to a 3rd party. - * - * @throws ApiException if the Api call fails */ @Test - public void checkThirdPartyRoutingTest() throws ApiException { + public void checkThirdPartyRoutingTest() { String connectionId = null; String assetType = null; CompletableFuture> response = @@ -74,11 +71,9 @@ public void checkThirdPartyRoutingTest() throws ApiException { * can be found at `/network_ids/routing_policy_asset_groups` - **Note**: By default, * Custom routing scheme uses (`dstId` = `0`, `dstType` * = `VAULT`). - * - * @throws ApiException if the Api call fails */ @Test - public void createNetworkConnectionTest() throws ApiException { + public void createNetworkConnectionTest() { NetworkConnection networkConnection = null; String idempotencyKey = null; CompletableFuture> response = @@ -89,11 +84,9 @@ public void createNetworkConnectionTest() throws ApiException { * Creates a new Network ID * *

Create a new Network ID. - * - * @throws ApiException if the Api call fails */ @Test - public void createNetworkIdTest() throws ApiException { + public void createNetworkIdTest() { CreateNetworkIdRequest createNetworkIdRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -104,11 +97,9 @@ public void createNetworkIdTest() throws ApiException { * Delete a network connection by ID * *

Deletes an existing network connection specified by its connection ID. - * - * @throws ApiException if the Api call fails */ @Test - public void deleteNetworkConnectionTest() throws ApiException { + public void deleteNetworkConnectionTest() { String connectionId = null; CompletableFuture> response = api.deleteNetworkConnection(connectionId); @@ -118,11 +109,9 @@ public void deleteNetworkConnectionTest() throws ApiException { * Delete specific network ID. * *

Deletes a network by its ID. - * - * @throws ApiException if the Api call fails */ @Test - public void deleteNetworkIdTest() throws ApiException { + public void deleteNetworkIdTest() { String networkId = null; CompletableFuture> response = api.deleteNetworkId(networkId); @@ -132,11 +121,9 @@ public void deleteNetworkIdTest() throws ApiException { * Get a network connection * *

Gets a network connection by ID. - * - * @throws ApiException if the Api call fails */ @Test - public void getNetworkTest() throws ApiException { + public void getNetworkTest() { String connectionId = null; CompletableFuture> response = api.getNetwork(connectionId); @@ -155,11 +142,9 @@ public void getNetworkTest() throws ApiException { * also referred to as \"Profile Routing\" Default Workspace Presets: - Network * Profile Crypto → **Custom** - Network Profile FIAT → **None** - Network Connection Crypto → * **Default** - Network Connection FIAT → **Default** - * - * @throws ApiException if the Api call fails */ @Test - public void getNetworkConnectionsTest() throws ApiException { + public void getNetworkConnectionsTest() { CompletableFuture>> response = api.getNetworkConnections(); } @@ -168,11 +153,9 @@ public void getNetworkConnectionsTest() throws ApiException { * Return specific network ID. * *

Returns specific network ID. - * - * @throws ApiException if the Api call fails */ @Test - public void getNetworkIdTest() throws ApiException { + public void getNetworkIdTest() { String networkId = null; CompletableFuture> response = api.getNetworkId(networkId); } @@ -181,11 +164,9 @@ public void getNetworkIdTest() throws ApiException { * Get all network IDs * *

Retrieves a list of all local and discoverable remote network IDs. - * - * @throws ApiException if the Api call fails */ @Test - public void getNetworkIdsTest() throws ApiException { + public void getNetworkIdsTest() { CompletableFuture>> response = api.getNetworkIds(); } @@ -193,11 +174,9 @@ public void getNetworkIdsTest() throws ApiException { * Return all enabled routing policy asset groups * *

Returns all enabled routing policy asset groups - * - * @throws ApiException if the Api call fails */ @Test - public void getRoutingPolicyAssetGroupsTest() throws ApiException { + public void getRoutingPolicyAssetGroupsTest() { CompletableFuture>> response = api.getRoutingPolicyAssetGroups(); } @@ -205,11 +184,9 @@ public void getRoutingPolicyAssetGroupsTest() throws ApiException { * Get both local IDs and discoverable remote IDs * *

Retrieves a list of all local and discoverable remote network IDs. Can be filtered. - * - * @throws ApiException if the Api call fails */ @Test - public void searchNetworkIdsTest() throws ApiException { + public void searchNetworkIdsTest() { String search = null; Boolean excludeSelf = null; Boolean onlySelf = null; @@ -225,11 +202,9 @@ public void searchNetworkIdsTest() throws ApiException { * Update network ID's discoverability. * *

Update whether or not the network ID is discoverable by others. - * - * @throws ApiException if the Api call fails */ @Test - public void setNetworkIdDiscoverabilityTest() throws ApiException { + public void setNetworkIdDiscoverabilityTest() { SetNetworkIdDiscoverabilityRequest setNetworkIdDiscoverabilityRequest = null; String networkId = null; CompletableFuture> response = @@ -240,11 +215,9 @@ public void setNetworkIdDiscoverabilityTest() throws ApiException { * Update network ID's name. * *

Updates name of a specified network ID. - * - * @throws ApiException if the Api call fails */ @Test - public void setNetworkIdNameTest() throws ApiException { + public void setNetworkIdNameTest() { SetNetworkIdNameRequest setNetworkIdNameRequest = null; String networkId = null; CompletableFuture> response = @@ -255,11 +228,9 @@ public void setNetworkIdNameTest() throws ApiException { * Update network id routing policy. * *

Updates the routing policy of a specified network ID. - * - * @throws ApiException if the Api call fails */ @Test - public void setNetworkIdRoutingPolicyTest() throws ApiException { + public void setNetworkIdRoutingPolicyTest() { String networkId = null; SetNetworkIdRoutingPolicyRequest setNetworkIdRoutingPolicyRequest = null; CompletableFuture> response = @@ -270,11 +241,9 @@ public void setNetworkIdRoutingPolicyTest() throws ApiException { * Update network connection routing policy. * *

Updates an existing network connection's routing policy. - * - * @throws ApiException if the Api call fails */ @Test - public void setRoutingPolicyTest() throws ApiException { + public void setRoutingPolicyTest() { String connectionId = null; SetRoutingPolicyRequest setRoutingPolicyRequest = null; CompletableFuture> response = diff --git a/src/test/java/com/fireblocks/sdk/api/NftsApiTest.java b/src/test/java/com/fireblocks/sdk/api/NftsApiTest.java index 9622264c..8d9ffbe5 100644 --- a/src/test/java/com/fireblocks/sdk/api/NftsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/NftsApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.GetNFTsResponse; import com.fireblocks.sdk.model.GetOwnershipTokensResponse; @@ -40,11 +39,9 @@ public class NftsApiTest { * List token data by ID * *

Returns the requested token data. - * - * @throws ApiException if the Api call fails */ @Test - public void getNFTTest() throws ApiException { + public void getNFTTest() { String id = null; CompletableFuture> response = api.getNFT(id); } @@ -53,11 +50,9 @@ public void getNFTTest() throws ApiException { * List tokens by IDs * *

Returns the requested tokens data. - * - * @throws ApiException if the Api call fails */ @Test - public void getNFTsTest() throws ApiException { + public void getNFTsTest() { String ids = null; String pageCursor = null; BigDecimal pageSize = null; @@ -71,11 +66,9 @@ public void getNFTsTest() throws ApiException { * List all owned tokens (paginated) * *

Returns all tokens and their data in your workspace. - * - * @throws ApiException if the Api call fails */ @Test - public void getOwnershipTokensTest() throws ApiException { + public void getOwnershipTokensTest() { String blockchainDescriptor = null; String vaultAccountIds = null; String ncwId = null; @@ -112,11 +105,9 @@ public void getOwnershipTokensTest() throws ApiException { * List owned collections (paginated) * *

Returns all collections in your workspace - * - * @throws ApiException if the Api call fails */ @Test - public void listOwnedCollectionsTest() throws ApiException { + public void listOwnedCollectionsTest() { String ncwId = null; String walletType = null; String search = null; @@ -134,11 +125,9 @@ public void listOwnedCollectionsTest() throws ApiException { * List all distinct owned tokens (paginated) * *

Returns all owned distinct tokens (for your tenant) and their data in your workspace. - * - * @throws ApiException if the Api call fails */ @Test - public void listOwnedTokensTest() throws ApiException { + public void listOwnedTokensTest() { String ncwId = null; String walletType = null; String pageCursor = null; @@ -157,11 +146,9 @@ public void listOwnedTokensTest() throws ApiException { * Refresh token metadata * *

Updates the latest token metadata. - * - * @throws ApiException if the Api call fails */ @Test - public void refreshNFTMetadataTest() throws ApiException { + public void refreshNFTMetadataTest() { String id = null; UUID xEndUserWalletId = null; String idempotencyKey = null; @@ -177,11 +164,9 @@ public void refreshNFTMetadataTest() throws ApiException { * Fireblocks NFT management in the following * [guide](https://developers.fireblocks.com/reference/deploy-an-nft-collection). Endpoint * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void updateOwnershipTokensTest() throws ApiException { + public void updateOwnershipTokensTest() { String blockchainDescriptor = null; String vaultAccountId = null; String idempotencyKey = null; @@ -194,11 +179,9 @@ public void updateOwnershipTokensTest() throws ApiException { * Update token ownership status * *

Updates token status for a tenant, in all tenant vaults. - * - * @throws ApiException if the Api call fails */ @Test - public void updateTokenOwnershipStatusTest() throws ApiException { + public void updateTokenOwnershipStatusTest() { UpdateTokenOwnershipStatusDto updateTokenOwnershipStatusDto = null; String id = null; UUID xEndUserWalletId = null; @@ -213,11 +196,9 @@ public void updateTokenOwnershipStatusTest() throws ApiException { * Update tokens ownership spam property * *

Updates tokens spam property for a tenant's token ownerships, in all tenant vaults. - * - * @throws ApiException if the Api call fails */ @Test - public void updateTokensOwnershipSpamTest() throws ApiException { + public void updateTokensOwnershipSpamTest() { List tokenOwnershipSpamUpdatePayload = null; UUID xEndUserWalletId = null; String idempotencyKey = null; @@ -231,11 +212,9 @@ public void updateTokensOwnershipSpamTest() throws ApiException { * Update tokens ownership status * *

Updates tokens status for a tenant, in all tenant vaults. - * - * @throws ApiException if the Api call fails */ @Test - public void updateTokensOwnershipStatusTest() throws ApiException { + public void updateTokensOwnershipStatusTest() { List tokenOwnershipStatusUpdatePayload = null; UUID xEndUserWalletId = null; String idempotencyKey = null; diff --git a/src/test/java/com/fireblocks/sdk/api/OffExchangesApiTest.java b/src/test/java/com/fireblocks/sdk/api/OffExchangesApiTest.java index fd408b09..d11e5ba5 100644 --- a/src/test/java/com/fireblocks/sdk/api/OffExchangesApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/OffExchangesApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.AddCollateralRequestBody; import com.fireblocks.sdk.model.CreateTransactionResponse; @@ -38,11 +37,9 @@ public class OffExchangesApiTest { *

Add collateral and create deposit request. Learn more about Fireblocks Off Exchange in the * following [guide](https://developers.fireblocks.com/docs/off-exchange). Endpoint Permission: * Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void addOffExchangeTest() throws ApiException { + public void addOffExchangeTest() { AddCollateralRequestBody addCollateralRequestBody = null; String idempotencyKey = null; CompletableFuture> response = @@ -55,11 +52,9 @@ public void addOffExchangeTest() throws ApiException { *

Returns a collateral account by mainExchangeAccountId. Learn more about Fireblocks Off * Exchange in the following [guide](https://developers.fireblocks.com/docs/off-exchange). * Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void getOffExchangeCollateralAccountsTest() throws ApiException { + public void getOffExchangeCollateralAccountsTest() { String mainExchangeAccountId = null; CompletableFuture> response = api.getOffExchangeCollateralAccounts(mainExchangeAccountId); @@ -71,11 +66,9 @@ public void getOffExchangeCollateralAccountsTest() throws ApiException { *

Get settlements transactions from exchange. Learn more about Fireblocks Off Exchange in * the following [guide](https://developers.fireblocks.com/docs/off-exchange). Endpoint * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void getOffExchangeSettlementTransactionsTest() throws ApiException { + public void getOffExchangeSettlementTransactionsTest() { String mainExchangeAccountId = null; CompletableFuture> response = api.getOffExchangeSettlementTransactions(mainExchangeAccountId); @@ -87,11 +80,9 @@ public void getOffExchangeSettlementTransactionsTest() throws ApiException { *

Remove collateral, create withdraw request. Learn more about Fireblocks Off Exchange in * the following [guide](https://developers.fireblocks.com/docs/off-exchange). Endpoint * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void removeOffExchangeTest() throws ApiException { + public void removeOffExchangeTest() { RemoveCollateralRequestBody removeCollateralRequestBody = null; String idempotencyKey = null; CompletableFuture> response = @@ -104,11 +95,9 @@ public void removeOffExchangeTest() throws ApiException { *

Create settlement for a trader. Learn more about Fireblocks Off Exchange in the following * [guide](https://developers.fireblocks.com/docs/off-exchange). Endpoint Permission: Admin, * Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void settleOffExchangeTradesTest() throws ApiException { + public void settleOffExchangeTradesTest() { SettlementRequestBody settlementRequestBody = null; String idempotencyKey = null; CompletableFuture> response = diff --git a/src/test/java/com/fireblocks/sdk/api/OnchainDataApiTest.java b/src/test/java/com/fireblocks/sdk/api/OnchainDataApiTest.java index 376e6509..3eb6102c 100644 --- a/src/test/java/com/fireblocks/sdk/api/OnchainDataApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/OnchainDataApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.AccessRegistryCurrentStateResponse2; import com.fireblocks.sdk.model.AccessRegistrySummaryResponse; @@ -40,11 +39,9 @@ public class OnchainDataApiTest { * *

Returns the current state of addresses in the specified access registry. Only addresses * that are currently active (added but not removed) are included. - * - * @throws ApiException if the Api call fails */ @Test - public void getAccessRegistryCurrentStateTest() throws ApiException { + public void getAccessRegistryCurrentStateTest() { String baseAssetId = null; String accessRegistryAddress = null; String pageCursor = null; @@ -61,11 +58,9 @@ public void getAccessRegistryCurrentStateTest() throws ApiException { * *

Returns a summary of the current state of the access registry for the specified * baseAssetId and accessRegistryAddress. - * - * @throws ApiException if the Api call fails */ @Test - public void getAccessRegistrySummaryTest() throws ApiException { + public void getAccessRegistrySummaryTest() { String baseAssetId = null; String accessRegistryAddress = null; CompletableFuture> response = @@ -77,11 +72,9 @@ public void getAccessRegistrySummaryTest() throws ApiException { * *

Returns a list of currently active roles for the specified baseAssetId and * contractAddress. - * - * @throws ApiException if the Api call fails */ @Test - public void getActiveRolesForContractTest() throws ApiException { + public void getActiveRolesForContractTest() { String baseAssetId = null; String contractAddress = null; CompletableFuture>> response = @@ -93,11 +86,9 @@ public void getActiveRolesForContractTest() throws ApiException { * *

Returns the paginated balance history of the specified account in a contract with optional * date range and interval filtering. - * - * @throws ApiException if the Api call fails */ @Test - public void getContractBalanceHistoryTest() throws ApiException { + public void getContractBalanceHistoryTest() { String baseAssetId = null; String contractAddress = null; String accountAddress = null; @@ -127,11 +118,9 @@ public void getContractBalanceHistoryTest() throws ApiException { * *

Returns the total number of unique addresses holding balances and the total supply for the * specified contract. - * - * @throws ApiException if the Api call fails */ @Test - public void getContractBalancesSummaryTest() throws ApiException { + public void getContractBalancesSummaryTest() { String baseAssetId = null; String contractAddress = null; CompletableFuture> response = @@ -143,11 +132,9 @@ public void getContractBalancesSummaryTest() throws ApiException { * *

Returns the paginated total supply history of the specified contract with optional date * range and interval filtering. - * - * @throws ApiException if the Api call fails */ @Test - public void getContractTotalSupplyTest() throws ApiException { + public void getContractTotalSupplyTest() { String baseAssetId = null; String contractAddress = null; OffsetDateTime startDate = null; @@ -175,11 +162,9 @@ public void getContractTotalSupplyTest() throws ApiException { * *

Returns the latest balance for each unique address with support for numeric balance * sorting. The `prev` cursor is reserved for future support. - * - * @throws ApiException if the Api call fails */ @Test - public void getLatestBalancesForContractTest() throws ApiException { + public void getLatestBalancesForContractTest() { String baseAssetId = null; String contractAddress = null; String accountAddress = null; @@ -203,11 +188,9 @@ public void getLatestBalancesForContractTest() throws ApiException { * *

Returns a paginated list of onchain transactions for the specified contract address and * base asset ID, optionally filtered by date range. - * - * @throws ApiException if the Api call fails */ @Test - public void getOnchainTransactionsTest() throws ApiException { + public void getOnchainTransactionsTest() { String baseAssetId = null; String contractAddress = null; OffsetDateTime startDate = null; diff --git a/src/test/java/com/fireblocks/sdk/api/OtaBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/OtaBetaApiTest.java index ab4ae2db..7be468d4 100644 --- a/src/test/java/com/fireblocks/sdk/api/OtaBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/OtaBetaApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.GetOtaStatusResponse; import com.fireblocks.sdk.model.SetOtaStatusRequest; @@ -32,11 +31,9 @@ public class OtaBetaApiTest { * Returns current OTA status * *

Returns current OTA status - * - * @throws ApiException if the Api call fails */ @Test - public void getOtaStatusTest() throws ApiException { + public void getOtaStatusTest() { CompletableFuture> response = api.getOtaStatus(); } @@ -46,11 +43,9 @@ public void getOtaStatusTest() throws ApiException { *

Enable or disable transactions to One Time Addresses (Non Whitelisted addresses). Learn * more about [One Time * Addresses](https://support.fireblocks.io/hc/en-us/articles/4409104568338-One-Time-Address-OTA-feature) - * - * @throws ApiException if the Api call fails */ @Test - public void setOtaStatusTest() throws ApiException { + public void setOtaStatusTest() { SetOtaStatusRequest setOtaStatusRequest = null; String idempotencyKey = null; CompletableFuture> response = diff --git a/src/test/java/com/fireblocks/sdk/api/PaymentsPayoutApiTest.java b/src/test/java/com/fireblocks/sdk/api/PaymentsPayoutApiTest.java index 76baa20c..261680d1 100644 --- a/src/test/java/com/fireblocks/sdk/api/PaymentsPayoutApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/PaymentsPayoutApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.CreatePayoutRequest; import com.fireblocks.sdk.model.DispatchPayoutResponse; @@ -44,11 +43,9 @@ public class PaymentsPayoutApiTest { * about Fireblocks Payments - Payouts in the following * [guide](https://developers.fireblocks.com/docs/create-payouts). Endpoint Permission: Admin, * Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void createPayoutTest() throws ApiException { + public void createPayoutTest() { CreatePayoutRequest createPayoutRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -67,11 +64,9 @@ public void createPayoutTest() throws ApiException { * you are executing a payout instruction set from a payment account with an already active * payout the active payout will complete before the new payout instruction set can be executed. * You cannot execute the same payout instruction set more than once. - * - * @throws ApiException if the Api call fails */ @Test - public void executePayoutActionTest() throws ApiException { + public void executePayoutActionTest() { String payoutId = null; String idempotencyKey = null; CompletableFuture> response = @@ -87,11 +82,9 @@ public void executePayoutActionTest() throws ApiException { * changes. If you want to learn more about Fireblocks Payments Engine, please contact your * Fireblocks Customer Success Manager or email CSM@fireblocks.com. Endpoint Permission: Admin, * Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getPayoutTest() throws ApiException { + public void getPayoutTest() { String payoutId = null; CompletableFuture> response = api.getPayout(payoutId); } diff --git a/src/test/java/com/fireblocks/sdk/api/PolicyEditorBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/PolicyEditorBetaApiTest.java index d05f8267..c7c29531 100644 --- a/src/test/java/com/fireblocks/sdk/api/PolicyEditorBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/PolicyEditorBetaApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.LegacyDraftReviewAndValidationResponse; import com.fireblocks.sdk.model.LegacyPolicyAndValidationResponse; @@ -40,11 +39,9 @@ public class PolicyEditorBetaApiTest { * subject to changes. If you want to participate and learn more about the Fireblocks TAP, * please contact your Fireblocks Customer Success Manager or send an email to * CSM@fireblocks.com. - * - * @throws ApiException if the Api call fails */ @Test - public void getActivePolicyLegacyTest() throws ApiException { + public void getActivePolicyLegacyTest() { CompletableFuture> response = api.getActivePolicyLegacy(); } @@ -58,11 +55,9 @@ public void getActivePolicyLegacyTest() throws ApiException { * improved functionality. - These endpoints are currently in beta and might be subject to * changes. If you want to participate and learn more about the Fireblocks TAP, please contact * your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - * - * @throws ApiException if the Api call fails */ @Test - public void getDraftLegacyTest() throws ApiException { + public void getDraftLegacyTest() { CompletableFuture> response = api.getDraftLegacy(); } @@ -77,11 +72,9 @@ public void getDraftLegacyTest() throws ApiException { * subject to changes. If you want to participate and learn more about the Fireblocks TAP, * please contact your Fireblocks Customer Success Manager or send an email to * CSM@fireblocks.com. - * - * @throws ApiException if the Api call fails */ @Test - public void publishDraftLegacyTest() throws ApiException { + public void publishDraftLegacyTest() { LegacyPublishDraftRequest legacyPublishDraftRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -95,11 +88,9 @@ public void publishDraftLegacyTest() throws ApiException { * endpoints are currently in beta and might be subject to changes. If you want to participate * and learn more about the Fireblocks TAP, please contact your Fireblocks Customer Success * Manager or send an email to CSM@fireblocks.com. - * - * @throws ApiException if the Api call fails */ @Test - public void publishPolicyRulesTest() throws ApiException { + public void publishPolicyRulesTest() { LegacyPolicyRules legacyPolicyRules = null; String idempotencyKey = null; CompletableFuture> response = @@ -115,11 +106,9 @@ public void publishPolicyRulesTest() throws ApiException { * and improved functionality. - These endpoints are currently in beta and might be subject to * changes. If you want to participate and learn more about the Fireblocks TAP, please contact * your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - * - * @throws ApiException if the Api call fails */ @Test - public void updateDraftLegacyTest() throws ApiException { + public void updateDraftLegacyTest() { LegacyPolicyRules legacyPolicyRules = null; String idempotencyKey = null; CompletableFuture> response = diff --git a/src/test/java/com/fireblocks/sdk/api/PolicyEditorV2ApiTest.java b/src/test/java/com/fireblocks/sdk/api/PolicyEditorV2ApiTest.java index 2691a6f5..96d51737 100644 --- a/src/test/java/com/fireblocks/sdk/api/PolicyEditorV2ApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/PolicyEditorV2ApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.DraftReviewAndValidationResponse; import com.fireblocks.sdk.model.PolicyAndValidationResponse; @@ -36,11 +35,9 @@ public class PolicyEditorV2ApiTest { * *

Returns the active policy and its validation for a specific policy type. Endpoint * Permissions: Owner, Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getActivePolicyTest() throws ApiException { + public void getActivePolicyTest() { PolicyType policyType = null; CompletableFuture> response = api.getActivePolicy(policyType); @@ -50,11 +47,9 @@ public void getActivePolicyTest() throws ApiException { * Get the active draft by policy type * *

Returns the active draft and its validation for a specific policy type. - * - * @throws ApiException if the Api call fails */ @Test - public void getDraftTest() throws ApiException { + public void getDraftTest() { PolicyType policyType = null; CompletableFuture> response = api.getDraft(policyType); @@ -71,11 +66,9 @@ public void getDraftTest() throws ApiException { * advanced users with comprehensive, multi-layer security controls in place. If you want to * learn more about the Fireblocks Policy Editor, please contact your Fireblocks Customer * Success Manager or send an email to CSM@fireblocks.com. - * - * @throws ApiException if the Api call fails */ @Test - public void publishDraftTest() throws ApiException { + public void publishDraftTest() { PublishDraftRequest publishDraftRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -91,11 +84,9 @@ public void publishDraftTest() throws ApiException { * practice, Fireblocks strongly recommends manual editing accompanied by strict human oversight * and approval workflows for all policy changes. Programmatic updates should only be * implemented by advanced users with comprehensive, multi-layer security controls in place. - * - * @throws ApiException if the Api call fails */ @Test - public void updateDraftTest() throws ApiException { + public void updateDraftTest() { UpdateDraftRequest updateDraftRequest = null; String idempotencyKey = null; CompletableFuture> response = diff --git a/src/test/java/com/fireblocks/sdk/api/PolicyEditorV2BetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/PolicyEditorV2BetaApiTest.java index d1fbc35b..9e2899af 100644 --- a/src/test/java/com/fireblocks/sdk/api/PolicyEditorV2BetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/PolicyEditorV2BetaApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.PolicyRuleQuotaRequest; import com.fireblocks.sdk.model.PolicyRuleQuotaResponse; @@ -32,11 +31,9 @@ public class PolicyEditorV2BetaApiTest { * *

Returns the Amount Over Time (AOT) quota calculated for a specific policy rule. Endpoint * Permissions: Owner, Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getPolicyRuleQuotaTest() throws ApiException { + public void getPolicyRuleQuotaTest() { PolicyRuleQuotaRequest policyRuleQuotaRequest = null; String idempotencyKey = null; CompletableFuture> response = diff --git a/src/test/java/com/fireblocks/sdk/api/ReportsBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/ReportsBetaApiTest.java index 5ab05fa1..9b8a0e62 100644 --- a/src/test/java/com/fireblocks/sdk/api/ReportsBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ReportsBetaApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.CreateAddressesReportRequest; import com.fireblocks.sdk.model.CreateReportResponse; @@ -40,11 +39,9 @@ public class ReportsBetaApiTest { * `COMPLETED`, the poll response includes a fresh pre-signed download URL in * `links.downloadUrl`. **Note:** These endpoints are currently in beta and might be * subject to changes. Endpoint Permission: Viewer and above. - * - * @throws ApiException if the Api call fails */ @Test - public void createReportTest() throws ApiException { + public void createReportTest() { CreateAddressesReportRequest body = null; String idempotencyKey = null; CompletableFuture> response = @@ -61,11 +58,9 @@ public void createReportTest() throws ApiException { * `FAILED`, the `failedAt` timestamp indicates when the failure occurred. * **Note:** These endpoints are currently in beta and might be subject to changes. Endpoint * Permission: Viewer and above. - * - * @throws ApiException if the Api call fails */ @Test - public void getReportTest() throws ApiException { + public void getReportTest() { String reportId = null; CompletableFuture> response = api.getReport(reportId); } @@ -77,11 +72,9 @@ public void getReportTest() throws ApiException { * URLs are not included in list responses. Call `GET /v1/reports/{reportId}` to * obtain a fresh signed download URL for a specific completed report. **Note:** These endpoints * are currently in beta and might be subject to changes. Endpoint Permission: Viewer and above. - * - * @throws ApiException if the Api call fails */ @Test - public void listReportsTest() throws ApiException { + public void listReportsTest() { String pageCursor = null; Integer pageSize = null; String sortBy = null; diff --git a/src/test/java/com/fireblocks/sdk/api/ResetDeviceApiTest.java b/src/test/java/com/fireblocks/sdk/api/ResetDeviceApiTest.java index 4df59f08..783685e9 100644 --- a/src/test/java/com/fireblocks/sdk/api/ResetDeviceApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/ResetDeviceApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; @@ -31,11 +30,9 @@ public class ResetDeviceApiTest { *

Resets mobile device for given console user, that user will need to do mobile onboarding * again. - Please note that this endpoint is available only for API keys with Admin/Non Signing * Admin permissions. Endpoint Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void resetDeviceTest() throws ApiException { + public void resetDeviceTest() { String id = null; String idempotencyKey = null; diff --git a/src/test/java/com/fireblocks/sdk/api/SecurityPostureManagementApiTest.java b/src/test/java/com/fireblocks/sdk/api/SecurityPostureManagementApiTest.java new file mode 100644 index 00000000..7d3d6ca2 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/api/SecurityPostureManagementApiTest.java @@ -0,0 +1,44 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * 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.fireblocks.sdk.api; + + +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.GetFindingsExternalResponse; +import java.util.concurrent.CompletableFuture; +import org.junit.Ignore; +import org.junit.Test; + +/** API tests for SecurityPostureManagementApi */ +@Ignore +public class SecurityPostureManagementApiTest { + + private final SecurityPostureManagementApi api = new SecurityPostureManagementApi(); + + /** + * Get FSPM security findings + * + *

Returns a paginated list of FSPM security findings for the workspace. Endpoint + * Permissions: Security Admin, Security Auditor. + */ + @Test + public void getSecurityFindingsTest() { + String pageCursor = null; + Integer pageSize = null; + String severity = null; + String category = null; + String status = null; + CompletableFuture> response = + api.getSecurityFindings(pageCursor, pageSize, severity, category, status); + } +} diff --git a/src/test/java/com/fireblocks/sdk/api/SmartTransferApiTest.java b/src/test/java/com/fireblocks/sdk/api/SmartTransferApiTest.java index 9d9842f1..58e3dc46 100644 --- a/src/test/java/com/fireblocks/sdk/api/SmartTransferApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/SmartTransferApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.SmartTransferApproveTerm; import com.fireblocks.sdk.model.SmartTransferCreateTicket; @@ -49,11 +48,9 @@ public class SmartTransferApiTest { * *

Set funding source for ticket term and creating approving transaction for contract to * transfer asset - * - * @throws ApiException if the Api call fails */ @Test - public void approveDvPTicketTermTest() throws ApiException { + public void approveDvPTicketTermTest() { SmartTransferApproveTerm smartTransferApproveTerm = null; String ticketId = null; String termId = null; @@ -68,11 +65,9 @@ public void approveDvPTicketTermTest() throws ApiException { * *

Cancel Smart Transfer ticket. Endpoint Permission: Admin, Non-Signing Admin, Signer, * Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void cancelTicketTest() throws ApiException { + public void cancelTicketTest() { String ticketId = null; String idempotencyKey = null; CompletableFuture> response = @@ -87,11 +82,9 @@ public void cancelTicketTest() throws ApiException { * `DVP` value is in Early Access and should only be used if Fireblocks has enabled it * in your workspace. Contact your Customer Success Manager for more information. **Endpoint * Permissions:** Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void createTicketTest() throws ApiException { + public void createTicketTest() { SmartTransferCreateTicket smartTransferCreateTicket = null; String idempotencyKey = null; CompletableFuture> response = @@ -105,11 +98,9 @@ public void createTicketTest() throws ApiException { * Fireblocks Smart Transfers in the following * [guide](https://developers.fireblocks.com/docs/execute-smart-transfers). Endpoint Permission: * Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void createTicketTermTest() throws ApiException { + public void createTicketTermTest() { SmartTransferCreateTicketTerm smartTransferCreateTicketTerm = null; String ticketId = null; String idempotencyKey = null; @@ -122,11 +113,9 @@ public void createTicketTermTest() throws ApiException { * *

Find Smart Transfer ticket by id. Endpoint Permission: Admin, Non-Signing Admin, Signer, * Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void findTicketByIdTest() throws ApiException { + public void findTicketByIdTest() { String ticketId = null; CompletableFuture> response = api.findTicketById(ticketId); @@ -137,11 +126,9 @@ public void findTicketByIdTest() throws ApiException { * *

Find a specific term of a specific Smart Transfer ticket. Endpoint Permission: Admin, * Non-Signing Admin, Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void findTicketTermByIdTest() throws ApiException { + public void findTicketTermByIdTest() { String ticketId = null; String termId = null; CompletableFuture> response = @@ -153,11 +140,9 @@ public void findTicketTermByIdTest() throws ApiException { * *

Manually fulfill ticket, in case when all terms (legs) are funded manually. Endpoint * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void fulfillTicketTest() throws ApiException { + public void fulfillTicketTest() { String ticketId = null; String idempotencyKey = null; CompletableFuture> response = @@ -168,11 +153,9 @@ public void fulfillTicketTest() throws ApiException { * Fund dvp ticket * *

Create or fulfill dvp ticket order - * - * @throws ApiException if the Api call fails */ @Test - public void fundDvpTicketTest() throws ApiException { + public void fundDvpTicketTest() { SmartTransferFundDvpTicket smartTransferFundDvpTicket = null; String ticketId = null; String idempotencyKey = null; @@ -185,11 +168,9 @@ public void fundDvpTicketTest() throws ApiException { * *

Set funding source for ticket term (in case of ASYNC tickets, this will execute transfer * immediately). Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void fundTicketTermTest() throws ApiException { + public void fundTicketTermTest() { SmartTransferFundTerm smartTransferFundTerm = null; String ticketId = null; String termId = null; @@ -202,11 +183,9 @@ public void fundTicketTermTest() throws ApiException { * Get smart transfers statistic * *

Get smart transfer statistic - * - * @throws ApiException if the Api call fails */ @Test - public void getSmartTransferStatisticTest() throws ApiException { + public void getSmartTransferStatisticTest() { CompletableFuture> response = api.getSmartTransferStatistic(); } @@ -216,11 +195,9 @@ public void getSmartTransferStatisticTest() throws ApiException { * *

Get Smart Transfer user groups. Endpoint Permission: Admin, Non-Signing Admin, Signer, * Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getSmartTransferUserGroupsTest() throws ApiException { + public void getSmartTransferUserGroupsTest() { CompletableFuture> response = api.getSmartTransferUserGroups(); } @@ -230,11 +207,9 @@ public void getSmartTransferUserGroupsTest() throws ApiException { * *

Manually set ticket term transaction. Endpoint Permission: Admin, Non-Signing Admin, * Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void manuallyFundTicketTermTest() throws ApiException { + public void manuallyFundTicketTermTest() { SmartTransferManuallyFundTerm smartTransferManuallyFundTerm = null; String ticketId = null; String termId = null; @@ -248,11 +223,9 @@ public void manuallyFundTicketTermTest() throws ApiException { * Delete ticket leg (term) * *

Delete ticket term when ticket is in DRAFT status - * - * @throws ApiException if the Api call fails */ @Test - public void removeTicketTermTest() throws ApiException { + public void removeTicketTermTest() { String ticketId = null; String termId = null; @@ -265,11 +238,9 @@ public void removeTicketTermTest() throws ApiException { *

Find tickets by their title or ticker. You can also query all tickets without filters by * not providing any input parameters. **Endpoint Permissions:** Admin, Non-Signing Admin, * Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void searchTicketsTest() throws ApiException { + public void searchTicketsTest() { String q = null; List statuses = null; String networkId = null; @@ -303,11 +274,9 @@ public void searchTicketsTest() throws ApiException { * *

Set external id Smart Transfer ticket. Endpoint Permission: Admin, Non-Signing Admin, * Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void setExternalRefIdTest() throws ApiException { + public void setExternalRefIdTest() { SmartTransferSetTicketExternalId smartTransferSetTicketExternalId = null; String ticketId = null; String idempotencyKey = null; @@ -320,11 +289,9 @@ public void setExternalRefIdTest() throws ApiException { * *

Set expiration date on Smart Transfer ticket. Endpoint Permission: Admin, Non-Signing * Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void setTicketExpirationTest() throws ApiException { + public void setTicketExpirationTest() { SmartTransferSetTicketExpiration smartTransferSetTicketExpiration = null; String ticketId = null; String idempotencyKey = null; @@ -337,11 +304,9 @@ public void setTicketExpirationTest() throws ApiException { * *

Set Smart Transfers user group to receive email notifications for Smart Transfers. * Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void setUserGroupsTest() throws ApiException { + public void setUserGroupsTest() { SmartTransferSetUserGroups smartTransferSetUserGroups = null; String idempotencyKey = null; CompletableFuture> response = @@ -354,11 +319,9 @@ public void setUserGroupsTest() throws ApiException { *

Submit Smart Transfer ticket - change status into ready for approval if auto approval is * not turned on, or OPEN if auto approval is on. Endpoint Permission: Admin, Non-Signing Admin, * Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void submitTicketTest() throws ApiException { + public void submitTicketTest() { SmartTransferSubmitTicket smartTransferSubmitTicket = null; String ticketId = null; String idempotencyKey = null; @@ -370,11 +333,9 @@ public void submitTicketTest() throws ApiException { * Update ticket leg (term) * *

Update ticket term (when ticket status is DRAFT) - * - * @throws ApiException if the Api call fails */ @Test - public void updateTicketTermTest() throws ApiException { + public void updateTicketTermTest() { SmartTransferUpdateTicketTerm smartTransferUpdateTicketTerm = null; String ticketId = null; String termId = null; diff --git a/src/test/java/com/fireblocks/sdk/api/StakingApiTest.java b/src/test/java/com/fireblocks/sdk/api/StakingApiTest.java index d4cf5d62..877c474c 100644 --- a/src/test/java/com/fireblocks/sdk/api/StakingApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/StakingApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.ChainDescriptor; import com.fireblocks.sdk.model.ChainInfoResponse; @@ -49,11 +48,9 @@ public class StakingApiTest { * *

Approves the provider's terms of service. Must be called once before performing any * staking operation with this provider. - * - * @throws ApiException if the Api call fails */ @Test - public void approveTermsOfServiceByProviderIdTest() throws ApiException { + public void approveTermsOfServiceByProviderIdTest() { StakingProvider providerId = null; String idempotencyKey = null; @@ -66,11 +63,9 @@ public void approveTermsOfServiceByProviderIdTest() throws ApiException { * *

Claims available staking rewards for the specified chain and vault. Supported chains: * Solana and Polygon (POL/Matic). Behavior depends on protocol reward distribution. - * - * @throws ApiException if the Api call fails */ @Test - public void claimRewardsTest() throws ApiException { + public void claimRewardsTest() { ClaimRewardsRequest claimRewardsRequest = null; String chainDescriptor = null; String idempotencyKey = null; @@ -89,11 +84,9 @@ public void claimRewardsTest() throws ApiException { * validator. Supported chains: Ethereum (ETH) only. Endpoint Permission: Owner, Admin, * Non-Signing Admin, Signer, Approver, Editor. **Note:** This endpoint is currently in beta and * might be subject to changes. - * - * @throws ApiException if the Api call fails */ @Test - public void consolidateTest() throws ApiException { + public void consolidateTest() { MergeStakeAccountsRequest mergeStakeAccountsRequest = null; String chainDescriptor = null; String idempotencyKey = null; @@ -105,12 +98,11 @@ public void consolidateTest() throws ApiException { * List staking positions * *

Returns all staking positions with core details: amounts, rewards, status, chain, and - * vault. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails + * vault. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, + * Viewer. */ @Test - public void getAllDelegationsTest() throws ApiException { + public void getAllDelegationsTest() { ChainDescriptor chainDescriptor = null; String vaultAccountId = null; CompletableFuture>> response = @@ -122,11 +114,9 @@ public void getAllDelegationsTest() throws ApiException { * *

Returns chain-specific staking information such as epoch/slot cadence, lockup or unbonding * periods, fee/reward mechanics, and other operational constraints. - * - * @throws ApiException if the Api call fails */ @Test - public void getChainInfoTest() throws ApiException { + public void getChainInfoTest() { ChainDescriptor chainDescriptor = null; CompletableFuture> response = api.getChainInfo(chainDescriptor); @@ -137,11 +127,9 @@ public void getChainInfoTest() throws ApiException { * *

Returns an alphabetical list of blockchains supported for staking by the current workspace * context. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void getChainsTest() throws ApiException { + public void getChainsTest() { CompletableFuture>> response = api.getChains(); } @@ -150,11 +138,9 @@ public void getChainsTest() throws ApiException { * *

Returns full details for a single staking position: amounts, rewards, status, chain, and * vault. - * - * @throws ApiException if the Api call fails */ @Test - public void getDelegationByIdTest() throws ApiException { + public void getDelegationByIdTest() { String id = null; CompletableFuture> response = api.getDelegationById(id); } @@ -165,11 +151,9 @@ public void getDelegationByIdTest() throws ApiException { *

Returns enriched transaction history for a staking position with cursor-based pagination. * Includes in-flight transactions with status pending. The in-flight transaction is always * returned first; completed and failed history is ordered by the order parameter. - * - * @throws ApiException if the Api call fails */ @Test - public void getPositionRelatedTransactionsTest() throws ApiException { + public void getPositionRelatedTransactionsTest() { String id = null; Integer pageSize = null; String pageCursor = null; @@ -183,13 +167,11 @@ public void getPositionRelatedTransactionsTest() throws ApiException { * *

Returns staking positions with core details: amounts, rewards, status, chain, and vault. * It supports cursor-based pagination for efficient data retrieval. This endpoint always - * returns a paginated response with {data, next} structure. Endpoint Permission: Admin, - * Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails + * returns a paginated response with {data, next} structure. Endpoint Permission: Owner, Admin, + * Non-Signing Admin, Signer, Approver, Editor, Viewer. */ @Test - public void getPositionsTest() throws ApiException { + public void getPositionsTest() { Integer pageSize = null; ChainDescriptor chainDescriptor = null; String vaultAccountId = null; @@ -203,12 +185,11 @@ public void getPositionsTest() throws ApiException { * List staking providers * *

Returns all available staking providers with metadata such as name, ID, and supported - * chains. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails + * chains. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, + * Viewer. */ @Test - public void getProvidersTest() throws ApiException { + public void getProvidersTest() { CompletableFuture>> response = api.getProviders(); } @@ -217,11 +198,9 @@ public void getProvidersTest() throws ApiException { * *

Returns an aggregated cross-vault summary: active/inactive counts, total staked, and total * rewards per chain. - * - * @throws ApiException if the Api call fails */ @Test - public void getSummaryTest() throws ApiException { + public void getSummaryTest() { CompletableFuture> response = api.getSummary(); } @@ -229,11 +208,9 @@ public void getSummaryTest() throws ApiException { * Get positions summary by vault * *

Returns per-vault aggregates: status breakdown, total staked, and total rewards per chain. - * - * @throws ApiException if the Api call fails */ @Test - public void getSummaryByVaultTest() throws ApiException { + public void getSummaryByVaultTest() { CompletableFuture>> response = api.getSummaryByVault(); } @@ -245,11 +222,9 @@ public void getSummaryByVaultTest() throws ApiException { * destination and closing the source account once complete. Both accounts must be from the same * validator provider and of same vault account.. Supported chains: Solana (SOL). Endpoint * Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void mergeStakeAccountsTest() throws ApiException { + public void mergeStakeAccountsTest() { MergeStakeAccountsRequest mergeStakeAccountsRequest = null; String chainDescriptor = null; String idempotencyKey = null; @@ -262,11 +237,9 @@ public void mergeStakeAccountsTest() throws ApiException { * *

Splits a staking position by creating a new stake account with the requested amount, while * keeping the original account with the remaining balance. Supported chains: Solana (SOL). - * - * @throws ApiException if the Api call fails */ @Test - public void splitTest() throws ApiException { + public void splitTest() { SplitRequest splitRequest = null; String chainDescriptor = null; String idempotencyKey = null; @@ -285,11 +258,9 @@ public void splitTest() throws ApiException { * validator provider and same vault account if one exists, otherwise create a new position. For * Solana and Polygon (MATIC/POL): always create new positions regardless of existing * delegations. - * - * @throws ApiException if the Api call fails */ @Test - public void stakeTest() throws ApiException { + public void stakeTest() { StakeRequest stakeRequest = null; ChainDescriptor chainDescriptor = null; String idempotencyKey = null; @@ -301,11 +272,9 @@ public void stakeTest() throws ApiException { * Initiate unstake * *

Submits a chain-specific unstake request. - * - * @throws ApiException if the Api call fails */ @Test - public void unstakeTest() throws ApiException { + public void unstakeTest() { UnstakeRequest unstakeRequest = null; ChainDescriptor chainDescriptor = null; String idempotencyKey = null; @@ -323,11 +292,9 @@ public void unstakeTest() throws ApiException { * and Cosmos chains via the optional 'amount' field. For ETH compounding validators, * the remaining balance must be at least 32 ETH after the withdrawal. For all other chains, * omitting 'amount' withdraws the entire available balance. - * - * @throws ApiException if the Api call fails */ @Test - public void withdrawTest() throws ApiException { + public void withdrawTest() { WithdrawRequest withdrawRequest = null; ChainDescriptor chainDescriptor = null; String idempotencyKey = null; diff --git a/src/test/java/com/fireblocks/sdk/api/TagsApiTest.java b/src/test/java/com/fireblocks/sdk/api/TagsApiTest.java index 94178f0a..27805a3f 100644 --- a/src/test/java/com/fireblocks/sdk/api/TagsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/TagsApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.ApprovalRequest; import com.fireblocks.sdk.model.CreateTagRequest; @@ -39,11 +38,9 @@ public class TagsApiTest { * *

Create a new tag. Endpoint Permissions: For protected tags: ADMIN,NON_SIGNING_ADMIN,OWNER. * For non protected tags: ADMIN,NON_SIGNING_ADMIN,OWNER,SIGNER,EDITOR,APPROVER. - * - * @throws ApiException if the Api call fails */ @Test - public void createTagTest() throws ApiException { + public void createTagTest() { CreateTagRequest createTagRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -56,11 +53,9 @@ public void createTagTest() throws ApiException { *

Delete the specified tag. Endpoint Permission: For protected tags: Owner, Admin, * Non-Signing Admin. For non protected tags: Owner, Admin, Non-Signing Admin, Signer, Editor, * Approver. - * - * @throws ApiException if the Api call fails */ @Test - public void deleteTagTest() throws ApiException { + public void deleteTagTest() { UUID tagId = null; CompletableFuture> response = api.deleteTag(tagId); @@ -70,11 +65,9 @@ public void deleteTagTest() throws ApiException { * Get an approval request by id * *

Get an approval request by id - * - * @throws ApiException if the Api call fails */ @Test - public void getApprovalRequestTest() throws ApiException { + public void getApprovalRequestTest() { String id = null; CompletableFuture> response = api.getApprovalRequest(id); } @@ -83,11 +76,9 @@ public void getApprovalRequestTest() throws ApiException { * Get a tag * *

Retrieve an existing tag by ID. - * - * @throws ApiException if the Api call fails */ @Test - public void getTagTest() throws ApiException { + public void getTagTest() { UUID tagId = null; CompletableFuture> response = api.getTag(tagId); } @@ -96,11 +87,9 @@ public void getTagTest() throws ApiException { * Get list of tags * *

Retrieve a paged list of all tags according to filters. - * - * @throws ApiException if the Api call fails */ @Test - public void getTagsTest() throws ApiException { + public void getTagsTest() { String pageCursor = null; BigDecimal pageSize = null; String label = null; @@ -127,11 +116,9 @@ public void getTagsTest() throws ApiException { *

Update an existing specified tag. Endpoint Permission: For protected tags: Owner, Admin, * Non-Signing Admin. For non protected tags: Owner, Admin, Non-Signing Admin, Signer, Editor, * Approver. - * - * @throws ApiException if the Api call fails */ @Test - public void updateTagTest() throws ApiException { + public void updateTagTest() { UpdateTagRequest updateTagRequest = null; UUID tagId = null; String idempotencyKey = null; diff --git a/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java b/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java index c9d52daf..bc97cfc0 100644 --- a/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.AccessRegistryCurrentStateResponse; import com.fireblocks.sdk.model.AccessRegistrySummaryResponse; @@ -72,11 +71,9 @@ public class TokenizationApiTest { * Burn tokens * *

Burn tokens in a collection - * - * @throws ApiException if the Api call fails */ @Test - public void burnCollectionTokenTest() throws ApiException { + public void burnCollectionTokenTest() { CollectionBurnRequestDto collectionBurnRequestDto = null; String id = null; String idempotencyKey = null; @@ -89,11 +86,9 @@ public void burnCollectionTokenTest() throws ApiException { * *

Create a new collection and link it as a token. Endpoint Permission: Owner, Admin, * Non-Signing Admin, Signer, and Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void createNewCollectionTest() throws ApiException { + public void createNewCollectionTest() { CollectionDeployRequestDto collectionDeployRequestDto = null; String idempotencyKey = null; CompletableFuture> response = @@ -105,11 +100,9 @@ public void createNewCollectionTest() throws ApiException { * *

Remove LayerZero adapters by deactivating and unlinking them. This endpoint revokes roles * and deactivates the specified adapter contracts. - * - * @throws ApiException if the Api call fails */ @Test - public void deactivateAndUnlinkAdaptersTest() throws ApiException { + public void deactivateAndUnlinkAdaptersTest() { RemoveLayerZeroAdaptersRequest removeLayerZeroAdaptersRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -121,11 +114,9 @@ public void deactivateAndUnlinkAdaptersTest() throws ApiException { * *

Deploy LayerZero adapters for multichain token bridging functionality. This endpoint * creates adapter contracts that enable cross-chain token transfers. - * - * @throws ApiException if the Api call fails */ @Test - public void deployAndLinkAdaptersTest() throws ApiException { + public void deployAndLinkAdaptersTest() { DeployLayerZeroAdaptersRequest deployLayerZeroAdaptersRequest = null; String idempotencyKey = null; CompletableFuture>> response = @@ -136,11 +127,9 @@ public void deployAndLinkAdaptersTest() throws ApiException { * Get collection token details * *

Get collection token details by id - * - * @throws ApiException if the Api call fails */ @Test - public void fetchCollectionTokenDetailsTest() throws ApiException { + public void fetchCollectionTokenDetailsTest() { String id = null; String tokenId = null; CompletableFuture> response = @@ -151,11 +140,9 @@ public void fetchCollectionTokenDetailsTest() throws ApiException { * Get a collection by id * *

Get a collection by id - * - * @throws ApiException if the Api call fails */ @Test - public void getCollectionByIdTest() throws ApiException { + public void getCollectionByIdTest() { String id = null; CompletableFuture> response = api.getCollectionById(id); } @@ -166,11 +153,9 @@ public void getCollectionByIdTest() throws ApiException { *

Get a deterministic address for contract deployment. The address is derived from the * contract's bytecode and provided salt. This endpoint is used to get the address of a * contract that will be deployed in the future. - * - * @throws ApiException if the Api call fails */ @Test - public void getDeployableAddressTest() throws ApiException { + public void getDeployableAddressTest() { GetDeployableAddressRequest getDeployableAddressRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -182,11 +167,9 @@ public void getDeployableAddressTest() throws ApiException { * *

Retrieve the DVN (Data Verification Network) configuration for a specific adapter. Returns * DVN configurations for channels between the source adapter and its peers. - * - * @throws ApiException if the Api call fails */ @Test - public void getLayerZeroDvnConfigTest() throws ApiException { + public void getLayerZeroDvnConfigTest() { UUID adapterTokenLinkId = null; UUID peerAdapterTokenLinkId = null; CompletableFuture> response = @@ -198,11 +181,9 @@ public void getLayerZeroDvnConfigTest() throws ApiException { * *

Retrieve the LayerZero peers configured for a specific adapter. Returns information about * peer relationships for cross-chain communication. - * - * @throws ApiException if the Api call fails */ @Test - public void getLayerZeroPeersTest() throws ApiException { + public void getLayerZeroPeersTest() { UUID adapterTokenLinkId = null; CompletableFuture> response = api.getLayerZeroPeers(adapterTokenLinkId); @@ -213,11 +194,9 @@ public void getLayerZeroPeersTest() throws ApiException { * *

Get collections (paginated). Endpoint Permission: Admin, Non-Signing Admin, Signer, * Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getLinkedCollectionsTest() throws ApiException { + public void getLinkedCollectionsTest() { String pageCursor = null; BigDecimal pageSize = null; Object status = null; @@ -229,11 +208,9 @@ public void getLinkedCollectionsTest() throws ApiException { * Return a linked token * *

Return a linked token, with its status and metadata. - * - * @throws ApiException if the Api call fails */ @Test - public void getLinkedTokenTest() throws ApiException { + public void getLinkedTokenTest() { String id = null; CompletableFuture> response = api.getLinkedToken(id); } @@ -242,11 +219,9 @@ public void getLinkedTokenTest() throws ApiException { * List all linked tokens * *

Return all linked tokens (paginated) - * - * @throws ApiException if the Api call fails */ @Test - public void getLinkedTokensTest() throws ApiException { + public void getLinkedTokensTest() { String pageCursor = null; BigDecimal pageSize = null; Object status = null; @@ -258,11 +233,9 @@ public void getLinkedTokensTest() throws ApiException { * Get the total count of linked tokens * *

Get the total count of linked tokens - * - * @throws ApiException if the Api call fails */ @Test - public void getLinkedTokensCountTest() throws ApiException { + public void getLinkedTokensCountTest() { CompletableFuture> response = api.getLinkedTokensCount(); } @@ -270,11 +243,9 @@ public void getLinkedTokensCountTest() throws ApiException { * Get current state of addresses in an access registry * *

Returns the currently active addresses in the access registry (added but not removed). - * - * @throws ApiException if the Api call fails */ @Test - public void getTokenAccessRegistryAddressesTest() throws ApiException { + public void getTokenAccessRegistryAddressesTest() { String id = null; String pageCursor = null; Integer pageSize = null; @@ -288,11 +259,9 @@ public void getTokenAccessRegistryAddressesTest() throws ApiException { * Get summary of an access registry * *

Returns a summary of the current state of the access registry. - * - * @throws ApiException if the Api call fails */ @Test - public void getTokenAccessRegistrySummaryTest() throws ApiException { + public void getTokenAccessRegistrySummaryTest() { String id = null; CompletableFuture> response = api.getTokenAccessRegistrySummary(id); @@ -302,11 +271,9 @@ public void getTokenAccessRegistrySummaryTest() throws ApiException { * Get the latest balance for a specific account * *

Returns the latest token balance for the specified account address. - * - * @throws ApiException if the Api call fails */ @Test - public void getTokenBalanceForAccountTest() throws ApiException { + public void getTokenBalanceForAccountTest() { String id = null; String accountAddress = null; CompletableFuture> response = @@ -318,11 +285,9 @@ public void getTokenBalanceForAccountTest() throws ApiException { * *

Returns paginated balance history for the specified account address with optional * time-range filtering. - * - * @throws ApiException if the Api call fails */ @Test - public void getTokenBalanceHistoryTest() throws ApiException { + public void getTokenBalanceHistoryTest() { String id = null; String accountAddress = null; OffsetDateTime startDate = null; @@ -349,11 +314,9 @@ public void getTokenBalanceHistoryTest() throws ApiException { * Get latest balances for all holders of a token * *

Returns the latest balance for each unique address holding this token. - * - * @throws ApiException if the Api call fails */ @Test - public void getTokenBalancesTest() throws ApiException { + public void getTokenBalancesTest() { String id = null; String pageCursor = null; Integer pageSize = null; @@ -367,11 +330,9 @@ public void getTokenBalancesTest() throws ApiException { * Get onchain summary for a token * *

Returns the total number of unique holders and the total supply for the token contract. - * - * @throws ApiException if the Api call fails */ @Test - public void getTokenContractSummaryTest() throws ApiException { + public void getTokenContractSummaryTest() { String id = null; CompletableFuture> response = api.getTokenContractSummary(id); @@ -381,11 +342,9 @@ public void getTokenContractSummaryTest() throws ApiException { * Get active RBAC roles for a token * *

Returns a list of currently active roles for the token contract. - * - * @throws ApiException if the Api call fails */ @Test - public void getTokenRbacTest() throws ApiException { + public void getTokenRbacTest() { String id = null; CompletableFuture> response = api.getTokenRbac(id); } @@ -395,11 +354,9 @@ public void getTokenRbacTest() throws ApiException { * *

Returns paginated total supply history for the token contract with optional time-range * filtering and binning. - * - * @throws ApiException if the Api call fails */ @Test - public void getTokenTotalSupplyTest() throws ApiException { + public void getTokenTotalSupplyTest() { String id = null; OffsetDateTime startDate = null; OffsetDateTime endDate = null; @@ -418,11 +375,9 @@ public void getTokenTotalSupplyTest() throws ApiException { * *

Returns a paginated list of onchain transactions for the token contract, optionally * filtered by date range. - * - * @throws ApiException if the Api call fails */ @Test - public void getTokenTransactionsTest() throws ApiException { + public void getTokenTransactionsTest() { String id = null; OffsetDateTime startDate = null; OffsetDateTime endDate = null; @@ -440,11 +395,9 @@ public void getTokenTransactionsTest() throws ApiException { * *

Returns a paginated list of ERC20 transfer events for the token contract, optionally * filtered by date range. - * - * @throws ApiException if the Api call fails */ @Test - public void getTokenTransfersTest() throws ApiException { + public void getTokenTransfersTest() { String id = null; OffsetDateTime startDate = null; OffsetDateTime endDate = null; @@ -476,11 +429,9 @@ public void getTokenTransfersTest() throws ApiException { * to the workspace without deploying a contract. Returns the token link with status * \"PENDING\" until the token is deployed or \"SUCCESS\" if no deployment * is needed. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, and Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void issueNewTokenTest() throws ApiException { + public void issueNewTokenTest() { CreateTokenRequestDto createTokenRequestDto = null; String idempotencyKey = null; CompletableFuture> response = @@ -491,11 +442,9 @@ public void issueNewTokenTest() throws ApiException { * Issue a token on one or more blockchains * *

Facilitates the creation of a new token on one or more blockchains. - * - * @throws ApiException if the Api call fails */ @Test - public void issueTokenMultiChainTest() throws ApiException { + public void issueTokenMultiChainTest() { CreateMultichainTokenRequest createMultichainTokenRequest = null; String idempotencyKey = null; CompletableFuture>> response = @@ -506,11 +455,9 @@ public void issueTokenMultiChainTest() throws ApiException { * Link a contract * *

Link an a contract - * - * @throws ApiException if the Api call fails */ @Test - public void linkTest() throws ApiException { + public void linkTest() { TokenLinkRequestDto tokenLinkRequestDto = null; String idempotencyKey = null; CompletableFuture> response = @@ -521,11 +468,9 @@ public void linkTest() throws ApiException { * Mint tokens * *

Mint tokens and upload metadata - * - * @throws ApiException if the Api call fails */ @Test - public void mintCollectionTokenTest() throws ApiException { + public void mintCollectionTokenTest() { CollectionMintRequestDto collectionMintRequestDto = null; String id = null; String idempotencyKey = null; @@ -538,11 +483,9 @@ public void mintCollectionTokenTest() throws ApiException { * *

Reissue a multichain token. This endpoint allows you to reissue a token on one or more * blockchains. The token must be initially issued using the issueTokenMultiChain endpoint. - * - * @throws ApiException if the Api call fails */ @Test - public void reIssueTokenMultiChainTest() throws ApiException { + public void reIssueTokenMultiChainTest() { ReissueMultichainTokenRequest reissueMultichainTokenRequest = null; String tokenLinkId = null; String idempotencyKey = null; @@ -556,11 +499,9 @@ public void reIssueTokenMultiChainTest() throws ApiException { * *

Remove LayerZero peers to disconnect adapter contracts. This endpoint removes peer * relationships between LayerZero adapters. - * - * @throws ApiException if the Api call fails */ @Test - public void removeLayerZeroPeersTest() throws ApiException { + public void removeLayerZeroPeersTest() { RemoveLayerZeroPeersRequest removeLayerZeroPeersRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -572,11 +513,9 @@ public void removeLayerZeroPeersTest() throws ApiException { * *

Configure DVN settings for LayerZero adapters. This endpoint sets up the DVN configuration * for message verification between source and destination adapters. - * - * @throws ApiException if the Api call fails */ @Test - public void setLayerZeroDvnConfigTest() throws ApiException { + public void setLayerZeroDvnConfigTest() { SetLayerZeroDvnConfigRequest setLayerZeroDvnConfigRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -590,11 +529,9 @@ public void setLayerZeroDvnConfigTest() throws ApiException { * creates peer relationships that enable cross-chain communication. It sets the destination * adapter as a peer of the source adapter. If `bidirectional` is true, it also sets * the source adapter as a peer of the destination adapter(s). - * - * @throws ApiException if the Api call fails */ @Test - public void setLayerZeroPeersTest() throws ApiException { + public void setLayerZeroPeersTest() { SetLayerZeroPeersRequest setLayerZeroPeersRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -606,11 +543,9 @@ public void setLayerZeroPeersTest() throws ApiException { * *

Unlink a token. The token will be unlinked from the workspace. The token will not be * deleted on chain nor the refId, only the link to the workspace will be removed. - * - * @throws ApiException if the Api call fails */ @Test - public void unlinkTest() throws ApiException { + public void unlinkTest() { String id = null; CompletableFuture> response = api.unlink(id); @@ -620,11 +555,9 @@ public void unlinkTest() throws ApiException { * Delete a collection link * *

Delete a collection link - * - * @throws ApiException if the Api call fails */ @Test - public void unlinkCollectionTest() throws ApiException { + public void unlinkCollectionTest() { String id = null; CompletableFuture> response = api.unlinkCollection(id); @@ -635,11 +568,9 @@ public void unlinkCollectionTest() throws ApiException { * *

Validate the LayerZero channel configuration between adapters. This endpoint checks if the * channel configuration is correct and returns any validation errors. - * - * @throws ApiException if the Api call fails */ @Test - public void validateLayerZeroChannelConfigTest() throws ApiException { + public void validateLayerZeroChannelConfigTest() { UUID adapterTokenLinkId = null; UUID peerAdapterTokenLinkId = null; CompletableFuture> response = diff --git a/src/test/java/com/fireblocks/sdk/api/TrLinkApiTest.java b/src/test/java/com/fireblocks/sdk/api/TrLinkApiTest.java index 2df8c52d..60a452d3 100644 --- a/src/test/java/com/fireblocks/sdk/api/TrLinkApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/TrLinkApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.TRLinkAPIPagedResponse; import com.fireblocks.sdk.model.TRLinkAssessTravelRuleRequest; @@ -61,11 +60,9 @@ public class TrLinkApiTest { *

Assesses travel rule requirement for a transaction by validating stored credentials and * determining whether Travel Rule compliance is required based on amount, jurisdiction, and * partner thresholds. - * - * @throws ApiException if the Api call fails */ @Test - public void assessTRLinkTravelRuleRequirementTest() throws ApiException { + public void assessTRLinkTravelRuleRequirementTest() { TRLinkAssessTravelRuleRequest trLinkAssessTravelRuleRequest = null; UUID customerIntegrationId = null; String idempotencyKey = null; @@ -79,11 +76,9 @@ public void assessTRLinkTravelRuleRequirementTest() throws ApiException { * *

Cancels a travel rule message. The TRM status will be updated to cancelled and the partner * will be notified. - * - * @throws ApiException if the Api call fails */ @Test - public void cancelTRLinkTrmTest() throws ApiException { + public void cancelTRLinkTrmTest() { TRLinkCancelTrmRequest trLinkCancelTrmRequest = null; UUID customerIntegrationId = null; String trmId = null; @@ -98,11 +93,9 @@ public void cancelTRLinkTrmTest() throws ApiException { * *

Connects a customer integration by providing API credentials. Stores encrypted credentials * and enables the integration for use. - * - * @throws ApiException if the Api call fails */ @Test - public void connectTRLinkIntegrationTest() throws ApiException { + public void connectTRLinkIntegrationTest() { TRLinkConnectIntegrationRequest trLinkConnectIntegrationRequest = null; UUID customerIntegrationId = null; String idempotencyKey = null; @@ -117,11 +110,9 @@ public void connectTRLinkIntegrationTest() throws ApiException { *

Creates a new customer (legal entity/VASP) for TRSupport Travel Rule compliance * operations. The customer represents your organization in the Travel Rule network and contains * IVMS101-compliant identity information. - * - * @throws ApiException if the Api call fails */ @Test - public void createTRLinkCustomerTest() throws ApiException { + public void createTRLinkCustomerTest() { TRLinkCreateCustomerRequest trLinkCreateCustomerRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -135,11 +126,9 @@ public void createTRLinkCustomerTest() throws ApiException { * placeholder between a customer and a Travel Rule partner. Use the connect endpoint to provide * credentials after creation. You may optionally supply `customerIntegrationId` in * the request body when your tenant is enabled for client-provided integration ids. - * - * @throws ApiException if the Api call fails */ @Test - public void createTRLinkIntegrationTest() throws ApiException { + public void createTRLinkIntegrationTest() { TRLinkCreateIntegrationRequest trLinkCreateIntegrationRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -151,11 +140,9 @@ public void createTRLinkIntegrationTest() throws ApiException { * *

Accept or reject destinations stuck in NoTRM step without waiting for TRP webhook or * policy timeout. - * - * @throws ApiException if the Api call fails */ @Test - public void createTRLinkManualDecisionTest() throws ApiException { + public void createTRLinkManualDecisionTest() { TRLinkManualDecisionRequest trLinkManualDecisionRequest = null; UUID customerIntegrationId = null; UUID txId = null; @@ -170,11 +157,9 @@ public void createTRLinkManualDecisionTest() throws ApiException { * *

Creates a new travel rule message with IVMS101-compliant PII data. Encrypts sensitive * originator and beneficiary information before sending to partner. - * - * @throws ApiException if the Api call fails */ @Test - public void createTRLinkTrmTest() throws ApiException { + public void createTRLinkTrmTest() { TRLinkCreateTrmRequest trLinkCreateTrmRequest = null; UUID customerIntegrationId = null; String idempotencyKey = null; @@ -186,11 +171,9 @@ public void createTRLinkTrmTest() throws ApiException { * Delete customer * *

Deletes a customer and all associated integrations. This action cannot be undone. - * - * @throws ApiException if the Api call fails */ @Test - public void deleteTRLinkCustomerTest() throws ApiException { + public void deleteTRLinkCustomerTest() { UUID customerId = null; CompletableFuture> response = api.deleteTRLinkCustomer(customerId); @@ -203,11 +186,9 @@ public void deleteTRLinkCustomerTest() throws ApiException { * credentials and deletes this tenant's integration record. The operation is scoped to the * caller's tenant; it does not remove partner-side state for other workspaces that reuse * the same logical customer integration. The record cannot be recovered after delete. - * - * @throws ApiException if the Api call fails */ @Test - public void disconnectTRLinkIntegrationTest() throws ApiException { + public void disconnectTRLinkIntegrationTest() { UUID customerIntegrationId = null; CompletableFuture> response = @@ -218,11 +199,9 @@ public void disconnectTRLinkIntegrationTest() throws ApiException { * Get customer by ID * *

Retrieves detailed information about a specific customer by their unique identifier. - * - * @throws ApiException if the Api call fails */ @Test - public void getTRLinkCustomerByIdTest() throws ApiException { + public void getTRLinkCustomerByIdTest() { UUID customerId = null; CompletableFuture> response = api.getTRLinkCustomerById(customerId); @@ -232,11 +211,9 @@ public void getTRLinkCustomerByIdTest() throws ApiException { * Get customer integration by ID * *

Retrieves detailed information about a specific customer integration. - * - * @throws ApiException if the Api call fails */ @Test - public void getTRLinkCustomerIntegrationByIdTest() throws ApiException { + public void getTRLinkCustomerIntegrationByIdTest() { UUID customerId = null; UUID customerIntegrationId = null; CompletableFuture> response = @@ -248,11 +225,9 @@ public void getTRLinkCustomerIntegrationByIdTest() throws ApiException { * *

Retrieves all TRSupport integrations for a specific customer. Returns a list of partner * integrations configured for Travel Rule compliance. - * - * @throws ApiException if the Api call fails */ @Test - public void getTRLinkCustomerIntegrationsTest() throws ApiException { + public void getTRLinkCustomerIntegrationsTest() { UUID customerId = null; CompletableFuture>> response = api.getTRLinkCustomerIntegrations(customerId); @@ -263,11 +238,9 @@ public void getTRLinkCustomerIntegrationsTest() throws ApiException { * *

Retrieves all customers associated with the authenticated tenant. Returns a list of legal * entities configured for Travel Rule compliance. - * - * @throws ApiException if the Api call fails */ @Test - public void getTRLinkCustomersTest() throws ApiException { + public void getTRLinkCustomersTest() { CompletableFuture>> response = api.getTRLinkCustomers(); } @@ -278,11 +251,9 @@ public void getTRLinkCustomersTest() throws ApiException { *

Retrieves the partner's public key in JWK format for encrypting PII data in Travel * Rule Messages. Use this key to encrypt sensitive originator and beneficiary information * before sending Travel Rule messages. - * - * @throws ApiException if the Api call fails */ @Test - public void getTRLinkIntegrationPublicKeyTest() throws ApiException { + public void getTRLinkIntegrationPublicKeyTest() { UUID customerIntegrationId = null; CompletableFuture> response = api.getTRLinkIntegrationPublicKey(customerIntegrationId); @@ -294,11 +265,9 @@ public void getTRLinkIntegrationPublicKeyTest() throws ApiException { *

Retrieves a list of all available Travel Rule Support integration partners. Partners * provide Travel Rule compliance services such as VASP discovery, TRM exchange, and PII * encryption. - * - * @throws ApiException if the Api call fails */ @Test - public void getTRLinkPartnersTest() throws ApiException { + public void getTRLinkPartnersTest() { CompletableFuture>> response = api.getTRLinkPartners(); } @@ -311,11 +280,9 @@ public void getTRLinkPartnersTest() throws ApiException { * determine whether transactions should be screened. Post-screening rules determine actions * based on screening results. Missing TRM rules handle cases when screening data is * unavailable. - * - * @throws ApiException if the Api call fails */ @Test - public void getTRLinkPolicyTest() throws ApiException { + public void getTRLinkPolicyTest() { CompletableFuture> response = api.getTRLinkPolicy(); } @@ -324,11 +291,9 @@ public void getTRLinkPolicyTest() throws ApiException { * *

Retrieves detailed information about a specific asset by its Fireblocks asset ID. Returns * the transformed Fireblocks asset data, raw partner response, and support status. - * - * @throws ApiException if the Api call fails */ @Test - public void getTRLinkSupportedAssetTest() throws ApiException { + public void getTRLinkSupportedAssetTest() { UUID customerIntegrationId = null; String assetId = null; CompletableFuture> response = @@ -340,11 +305,9 @@ public void getTRLinkSupportedAssetTest() throws ApiException { * *

Retrieves a Travel Rule Message by its unique identifier from the partner provider. * Returns full TRM details including status, IVMS101 data, and transaction information. - * - * @throws ApiException if the Api call fails */ @Test - public void getTRLinkTrmByIdTest() throws ApiException { + public void getTRLinkTrmByIdTest() { UUID customerIntegrationId = null; String trmId = null; CompletableFuture> response = @@ -356,11 +319,9 @@ public void getTRLinkTrmByIdTest() throws ApiException { * *

Retrieves the list of required actions (e.g., PII fields) needed to process the Travel * Rule Message. - * - * @throws ApiException if the Api call fails */ @Test - public void getTRLinkTrmRequiredActionsTest() throws ApiException { + public void getTRLinkTrmRequiredActionsTest() { UUID customerIntegrationId = null; String trmId = null; CompletableFuture> response = @@ -372,11 +333,9 @@ public void getTRLinkTrmRequiredActionsTest() throws ApiException { * *

Retrieves detailed information about a specific VASP by its unique identifier. Returns * VASP details including public key if available. - * - * @throws ApiException if the Api call fails */ @Test - public void getTRLinkVaspByIdTest() throws ApiException { + public void getTRLinkVaspByIdTest() { UUID customerIntegrationId = null; String vaspId = null; CompletableFuture> response = @@ -389,11 +348,9 @@ public void getTRLinkVaspByIdTest() throws ApiException { *

Retrieves a paginated list of assets supported by the partner integration. Includes a flag * indicating whether the partner can handle assets not explicitly listed. Supports cursor-based * pagination. - * - * @throws ApiException if the Api call fails */ @Test - public void listTRLinkSupportedAssetsTest() throws ApiException { + public void listTRLinkSupportedAssetsTest() { UUID customerIntegrationId = null; Integer pageSize = null; String pageCursor = null; @@ -406,11 +363,9 @@ public void listTRLinkSupportedAssetsTest() throws ApiException { * *

Retrieves a paginated list of VASPs (Virtual Asset Service Providers) available through * the partner integration. Supports cursor-based pagination. - * - * @throws ApiException if the Api call fails */ @Test - public void listTRLinkVaspsTest() throws ApiException { + public void listTRLinkVaspsTest() { UUID customerIntegrationId = null; Integer pageSize = null; String pageCursor = null; @@ -423,11 +378,9 @@ public void listTRLinkVaspsTest() throws ApiException { * *

Redirects a Travel Rule Message to a subsidiary VASP. This operation requires the partner * to support nested VASPs functionality. - * - * @throws ApiException if the Api call fails */ @Test - public void redirectTRLinkTrmTest() throws ApiException { + public void redirectTRLinkTrmTest() { TRLinkRedirectTrmRequest trLinkRedirectTrmRequest = null; UUID customerIntegrationId = null; String trmId = null; @@ -442,11 +395,9 @@ public void redirectTRLinkTrmTest() throws ApiException { * *

Submits required data (e.g., beneficiary PII) to resolve a pending Travel Rule Message * action. - * - * @throws ApiException if the Api call fails */ @Test - public void resolveActionTRLinkTrmTest() throws ApiException { + public void resolveActionTRLinkTrmTest() { TRLinkResolveActionRequest trLinkResolveActionRequest = null; UUID customerIntegrationId = null; String trmId = null; @@ -461,11 +412,9 @@ public void resolveActionTRLinkTrmTest() throws ApiException { * *

Associates a Travel Rule Message ID with a specific destination in a multi-destination * Fireblocks transaction. Matches destinations by amount and peer path. - * - * @throws ApiException if the Api call fails */ @Test - public void setTRLinkDestinationTravelRuleMessageIdTest() throws ApiException { + public void setTRLinkDestinationTravelRuleMessageIdTest() { TRLinkSetDestinationTravelRuleMessageIdRequest trLinkSetDestinationTravelRuleMessageIdRequest = null; UUID txId = null; @@ -480,11 +429,9 @@ public void setTRLinkDestinationTravelRuleMessageIdTest() throws ApiException { * *

Associates a Travel Rule Message ID with a Fireblocks transaction. This links the TRM * compliance data to the blockchain transaction. - * - * @throws ApiException if the Api call fails */ @Test - public void setTRLinkTransactionTravelRuleMessageIdTest() throws ApiException { + public void setTRLinkTransactionTravelRuleMessageIdTest() { TRLinkSetTransactionTravelRuleMessageIdRequest trLinkSetTransactionTravelRuleMessageIdRequest = null; UUID txId = null; @@ -500,11 +447,9 @@ public void setTRLinkTransactionTravelRuleMessageIdTest() throws ApiException { *

Tests the connection to a customer integration by validating stored credentials and * attempting communication with the Travel Rule partner. Returns connection status and any * error messages. - * - * @throws ApiException if the Api call fails */ @Test - public void testTRLinkIntegrationConnectionTest() throws ApiException { + public void testTRLinkIntegrationConnectionTest() { UUID customerIntegrationId = null; String idempotencyKey = null; CompletableFuture> response = @@ -516,11 +461,9 @@ public void testTRLinkIntegrationConnectionTest() throws ApiException { * *

Updates an existing customer's information. All fields are optional - only provided * fields will be updated. - * - * @throws ApiException if the Api call fails */ @Test - public void updateTRLinkCustomerTest() throws ApiException { + public void updateTRLinkCustomerTest() { TRLinkUpdateCustomerRequest trLinkUpdateCustomerRequest = null; UUID customerId = null; String idempotencyKey = null; diff --git a/src/test/java/com/fireblocks/sdk/api/TradingBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/TradingBetaApiTest.java index 5c395fd0..8051eec8 100644 --- a/src/test/java/com/fireblocks/sdk/api/TradingBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/TradingBetaApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.CreateOffersRequest; import com.fireblocks.sdk.model.CreateOrderRequest; @@ -51,11 +50,9 @@ public class TradingBetaApiTest { * Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and * troubleshooting, please refer to our [API Error Codes * documentation](https://developers.fireblocks.com/reference/api-error-codes). - * - * @throws ApiException if the Api call fails */ @Test - public void createOrderTest() throws ApiException { + public void createOrderTest() { CreateOrderRequest createOrderRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -72,11 +69,9 @@ public void createOrderTest() throws ApiException { * Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. For detailed information about * error codes and troubleshooting, please refer to our [API Error Codes * documentation](https://developers.fireblocks.com/reference/api-error-codes). - * - * @throws ApiException if the Api call fails */ @Test - public void createQuoteTest() throws ApiException { + public void createQuoteTest() { CreateQuote createQuote = null; String idempotencyKey = null; CompletableFuture> response = @@ -96,11 +91,9 @@ public void createQuoteTest() throws ApiException { * Admin, Non-Signing Admin, Signer, Editor. For detailed information about error codes and * troubleshooting, please refer to our [API Error Codes * documentation](https://developers.fireblocks.com/reference/api-error-codes). - * - * @throws ApiException if the Api call fails */ @Test - public void fetchAllOffersTest() throws ApiException { + public void fetchAllOffersTest() { CreateOffersRequest createOffersRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -118,11 +111,9 @@ public void fetchAllOffersTest() throws ApiException { * Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed information about error * codes and troubleshooting, please refer to our [API Error Codes * documentation](https://developers.fireblocks.com/reference/api-error-codes). - * - * @throws ApiException if the Api call fails */ @Test - public void fetchRatesTest() throws ApiException { + public void fetchRatesTest() { RatesRequest ratesRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -139,11 +130,9 @@ public void fetchRatesTest() throws ApiException { * Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, * please refer to our [API Error Codes * documentation](https://developers.fireblocks.com/reference/api-error-codes). - * - * @throws ApiException if the Api call fails */ @Test - public void getOrderTest() throws ApiException { + public void getOrderTest() { String orderId = null; CompletableFuture> response = api.getOrder(orderId); } @@ -163,11 +152,9 @@ public void getOrderTest() throws ApiException { * Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, * please refer to our [API Error Codes * documentation](https://developers.fireblocks.com/reference/api-error-codes). - * - * @throws ApiException if the Api call fails */ @Test - public void getOrderRequirementsTest() throws ApiException { + public void getOrderRequirementsTest() { String orderId = null; CompletableFuture> response = api.getOrderRequirements(orderId); @@ -183,11 +170,9 @@ public void getOrderRequirementsTest() throws ApiException { * Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. For detailed * information about error codes and troubleshooting, please refer to our [API Error Codes * documentation](https://developers.fireblocks.com/reference/api-error-codes). - * - * @throws ApiException if the Api call fails */ @Test - public void getOrdersTest() throws ApiException { + public void getOrdersTest() { Integer pageSize = null; String pageCursor = null; String order = null; @@ -220,11 +205,9 @@ public void getOrdersTest() throws ApiException { * Approver, Editor, Viewer. For detailed information about error codes and troubleshooting, * please refer to our [API Error Codes * documentation](https://developers.fireblocks.com/reference/api-error-codes). - * - * @throws ApiException if the Api call fails */ @Test - public void getTradingProviderByIdTest() throws ApiException { + public void getTradingProviderByIdTest() { String providerId = null; CompletableFuture> response = api.getTradingProviderById(providerId); @@ -240,11 +223,9 @@ public void getTradingProviderByIdTest() throws ApiException { * **Endpoint Permission:** Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. * For detailed information about error codes and troubleshooting, please refer to our [API * Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). - * - * @throws ApiException if the Api call fails */ @Test - public void getTradingProvidersTest() throws ApiException { + public void getTradingProvidersTest() { Integer pageSize = null; String pageCursor = null; CompletableFuture> response = @@ -264,11 +245,9 @@ public void getTradingProvidersTest() throws ApiException { * to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. * For detailed information about error codes and troubleshooting, please refer to our [API * Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). - * - * @throws ApiException if the Api call fails */ @Test - public void submitOrderRequirementsTest() throws ApiException { + public void submitOrderRequirementsTest() { SubmitOrderRequirementRequest submitOrderRequirementRequest = null; String orderId = null; String idempotencyKey = null; @@ -292,11 +271,9 @@ public void submitOrderRequirementsTest() throws ApiException { * to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. * For detailed information about error codes and troubleshooting, please refer to our [API * Error Codes documentation](https://developers.fireblocks.com/reference/api-error-codes). - * - * @throws ApiException if the Api call fails */ @Test - public void uploadOrderRequirementFileTest() throws ApiException { + public void uploadOrderRequirementFileTest() { String fileKey = null; File _file = null; String orderId = null; diff --git a/src/test/java/com/fireblocks/sdk/api/TransactionsApiTest.java b/src/test/java/com/fireblocks/sdk/api/TransactionsApiTest.java index 56c756ee..533df88f 100644 --- a/src/test/java/com/fireblocks/sdk/api/TransactionsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/TransactionsApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.CancelTransactionResponse; import com.fireblocks.sdk.model.CreateTransactionResponse; @@ -46,11 +45,9 @@ public class TransactionsApiTest { *

Cancels a transaction by Fireblocks Transaction ID. Can be used only for transactions that * did not get to the BROADCASTING state. Endpoint Permission: Admin, Non-Signing Admin, Signer, * Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void cancelTransactionTest() throws ApiException { + public void cancelTransactionTest() { String txId = null; UUID xEndUserWalletId = null; String idempotencyKey = null; @@ -66,11 +63,9 @@ public void cancelTransactionTest() throws ApiException { * `assetId`, `source`, `destination` and `amount`. - * For Contract Calls, the required parameters are: `operation.CONTRACT_CALL`, * `assetId` (Base Asset), `source`, - * - * @throws ApiException if the Api call fails */ @Test - public void createTransactionTest() throws ApiException { + public void createTransactionTest() { TransactionRequest transactionRequest = null; UUID xEndUserWalletId = null; String idempotencyKey = null; @@ -83,11 +78,9 @@ public void createTransactionTest() throws ApiException { * *

Drops a stuck ETH (EVM) transaction and creates a replacement transaction with 0 amount. * Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void dropTransactionTest() throws ApiException { + public void dropTransactionTest() { String txId = null; DropTransactionRequest dropTransactionRequest = null; UUID xEndUserWalletId = null; @@ -114,11 +107,9 @@ public void dropTransactionTest() throws ApiException { * the `networkFee` parameter. Learn more about Fireblocks Fee Management in the * following [guide](https://developers.fireblocks.com/reference/estimate-transaction-fee). * Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void estimateNetworkFeeTest() throws ApiException { + public void estimateNetworkFeeTest() { String assetId = null; CompletableFuture> response = api.estimateNetworkFee(assetId); @@ -134,11 +125,9 @@ public void estimateNetworkFeeTest() throws ApiException { * calls is not available. Learn more about Fireblocks Fee Management in the following * [guide](https://developers.fireblocks.com/reference/estimate-transaction-fee). Endpoint * Permission: Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void estimateTransactionFeeTest() throws ApiException { + public void estimateTransactionFeeTest() { TransactionRequest transactionRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -152,11 +141,9 @@ public void estimateTransactionFeeTest() throws ApiException { * should be quarantined. For account based assets - the entire amount of the transaction is * frozen For UTXO based assets - all UTXOs of the specified transaction are frozen Endpoint * Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void freezeTransactionTest() throws ApiException { + public void freezeTransactionTest() { String txId = null; UUID xEndUserWalletId = null; String idempotencyKey = null; @@ -169,11 +156,9 @@ public void freezeTransactionTest() throws ApiException { * *

Get a specific transaction data by Fireblocks Transaction ID Endpoint Permission: Admin, * Non-Signing Admin, Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getTransactionTest() throws ApiException { + public void getTransactionTest() { String txId = null; CompletableFuture> response = api.getTransaction(txId); } @@ -183,11 +168,9 @@ public void getTransactionTest() throws ApiException { * *

Returns transaction by external transaction ID. Endpoint Permission: Admin, Non-Signing * Admin, Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getTransactionByExternalIdTest() throws ApiException { + public void getTransactionByExternalIdTest() { String externalTxId = null; CompletableFuture> response = api.getTransactionByExternalId(externalTxId); @@ -198,11 +181,9 @@ public void getTransactionByExternalIdTest() throws ApiException { * *

Get the transaction history for your workspace. **Endpoint Permissions:** Admin, * Non-Signing Admin, Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getTransactionsTest() throws ApiException { + public void getTransactionsTest() { String next = null; String prev = null; String before = null; @@ -244,11 +225,9 @@ public void getTransactionsTest() throws ApiException { * *

Overrides the required number of confirmations for transaction completion by transaction * hash. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void setConfirmationThresholdByTransactionHashTest() throws ApiException { + public void setConfirmationThresholdByTransactionHashTest() { String txHash = null; SetConfirmationsThresholdRequest setConfirmationsThresholdRequest = null; String idempotencyKey = null; @@ -262,11 +241,9 @@ public void setConfirmationThresholdByTransactionHashTest() throws ApiException * *

Overrides the required number of confirmations for transaction completion Fireblocks * Transaction ID. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void setTransactionConfirmationThresholdTest() throws ApiException { + public void setTransactionConfirmationThresholdTest() { String txId = null; SetConfirmationsThresholdRequest setConfirmationsThresholdRequest = null; String idempotencyKey = null; @@ -280,11 +257,9 @@ public void setTransactionConfirmationThresholdTest() throws ApiException { * *

Unfreezes a transaction by Fireblocks Transaction ID and makes the transaction available * again. Endpoint Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void unfreezeTransactionTest() throws ApiException { + public void unfreezeTransactionTest() { String txId = null; UUID xEndUserWalletId = null; String idempotencyKey = null; @@ -297,11 +272,9 @@ public void unfreezeTransactionTest() throws ApiException { * *

Checks if an address is valid and active (for XRP, DOT, XLM, and EOS). Endpoint * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void validateAddressTest() throws ApiException { + public void validateAddressTest() { String assetId = null; String address = null; CompletableFuture> response = diff --git a/src/test/java/com/fireblocks/sdk/api/TravelRuleApiTest.java b/src/test/java/com/fireblocks/sdk/api/TravelRuleApiTest.java index eecefd24..b2e47fbe 100644 --- a/src/test/java/com/fireblocks/sdk/api/TravelRuleApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/TravelRuleApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.TravelRuleGetAllVASPsResponse; import com.fireblocks.sdk.model.TravelRuleUpdateVASPDetails; @@ -41,11 +40,9 @@ public class TravelRuleApiTest { * Create Trust Network Proof of Address * *

Creates a cryptographic proof of address ownership for TRUST network. - * - * @throws ApiException if the Api call fails */ @Test - public void createTrustProofOfAddressTest() throws ApiException { + public void createTrustProofOfAddressTest() { TrustProofOfAddressRequest trustProofOfAddressRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -57,11 +54,9 @@ public void createTrustProofOfAddressTest() throws ApiException { * *

Retrieves the TRUST-compatible encoded signature for a proof of address transaction. Send * this signature directly to TRUST for verification. - * - * @throws ApiException if the Api call fails */ @Test - public void getTrustProofOfAddressTest() throws ApiException { + public void getTrustProofOfAddressTest() { UUID transactionId = null; CompletableFuture> response = api.getTrustProofOfAddress(transactionId); @@ -73,11 +68,9 @@ public void getTrustProofOfAddressTest() throws ApiException { *

Get VASP Details. Returns information about a VASP that has the specified DID. The * response may contain fields that are not documented in the schema below. Clients must ignore * unrecognised fields rather than failing to deserialize. - * - * @throws ApiException if the Api call fails */ @Test - public void getVASPByDIDTest() throws ApiException { + public void getVASPByDIDTest() { String did = null; List fields = null; CompletableFuture> response = api.getVASPByDID(did, fields); @@ -89,11 +82,9 @@ public void getVASPByDIDTest() throws ApiException { *

Get All VASPs. Returns a list of VASPs. VASPs can be searched and sorted. Each VASP in the * response may contain fields that are not documented in the schema below. Clients must ignore * unrecognised fields rather than failing to deserialize. - * - * @throws ApiException if the Api call fails */ @Test - public void getVASPsTest() throws ApiException { + public void getVASPsTest() { String order = null; BigDecimal pageSize = null; List fields = null; @@ -109,11 +100,9 @@ public void getVASPsTest() throws ApiException { * *

Get assigned VASP Did for a specific vault. Returns empty string vaspDid value in response * if none assigned. - * - * @throws ApiException if the Api call fails */ @Test - public void getVaspForVaultTest() throws ApiException { + public void getVaspForVaultTest() { String vaultAccountId = null; CompletableFuture> response = api.getVaspForVault(vaultAccountId); @@ -123,11 +112,9 @@ public void getVaspForVaultTest() throws ApiException { * Assign VASP to vault * *

Sets the VASP Did for a specific vault. Pass empty string to remove existing one. - * - * @throws ApiException if the Api call fails */ @Test - public void setVaspForVaultTest() throws ApiException { + public void setVaspForVaultTest() { TravelRuleVaspForVault travelRuleVaspForVault = null; String vaultAccountId = null; String idempotencyKey = null; @@ -140,11 +127,9 @@ public void setVaspForVaultTest() throws ApiException { * *

Update VASP Details. Updates a VASP with the provided parameters. Use this endpoint to add * your public jsonDIDkey generated by Notabene. - * - * @throws ApiException if the Api call fails */ @Test - public void updateVaspTest() throws ApiException { + public void updateVaspTest() { TravelRuleUpdateVASPDetails travelRuleUpdateVASPDetails = null; String idempotencyKey = null; CompletableFuture> response = @@ -156,11 +141,9 @@ public void updateVaspTest() throws ApiException { * *

Validate Full Travel Rule transactions. Checks for all required information on the * originator and beneficiary VASPs. - * - * @throws ApiException if the Api call fails */ @Test - public void validateFullTravelRuleTransactionTest() throws ApiException { + public void validateFullTravelRuleTransactionTest() { TravelRuleValidateFullTransactionRequest travelRuleValidateFullTransactionRequest = null; List notation = null; String idempotencyKey = null; diff --git a/src/test/java/com/fireblocks/sdk/api/UserGroupsBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/UserGroupsBetaApiTest.java index df705fd0..0c19895b 100644 --- a/src/test/java/com/fireblocks/sdk/api/UserGroupsBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/UserGroupsBetaApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.CreateUserGroupResponse; import com.fireblocks.sdk.model.UserGroupCreateRequest; @@ -36,11 +35,9 @@ public class UserGroupsBetaApiTest { * *

Create a new user group. Users with the Viewer role cannot be added to groups. Endpoint * Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void createUserGroupTest() throws ApiException { + public void createUserGroupTest() { UserGroupCreateRequest userGroupCreateRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -53,11 +50,9 @@ public void createUserGroupTest() throws ApiException { *

Delete a user group by ID. **Note**: - This endpoint is now in Beta, disabled for general * availability at this time. - Please note that this endpoint is available only for API keys * with Admin permissions. - * - * @throws ApiException if the Api call fails */ @Test - public void deleteUserGroupTest() throws ApiException { + public void deleteUserGroupTest() { String groupId = null; CompletableFuture> response = api.deleteUserGroup(groupId); @@ -69,11 +64,9 @@ public void deleteUserGroupTest() throws ApiException { *

Get a user group by ID. **Note**: - This endpoint is now in Beta, disabled for general * availability at this time. - Please note that this endpoint is available only for API keys * with Admin permissions. - * - * @throws ApiException if the Api call fails */ @Test - public void getUserGroupTest() throws ApiException { + public void getUserGroupTest() { String groupId = null; CompletableFuture> response = api.getUserGroup(groupId); } @@ -84,11 +77,9 @@ public void getUserGroupTest() throws ApiException { *

Get all user groups in your workspace - Please note that this endpoint is available only * for API keys with Admin/Non Signing Admin permissions. Endpoint Permission: Admin, * Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getUserGroupsTest() throws ApiException { + public void getUserGroupsTest() { CompletableFuture>> response = api.getUserGroups(); } @@ -98,11 +89,9 @@ public void getUserGroupsTest() throws ApiException { *

Update a user group by ID. **Note**: - This endpoint is now in Beta, disabled for general * availability at this time. - Please note that this endpoint is available only for API keys * with Admin permissions. - * - * @throws ApiException if the Api call fails */ @Test - public void updateUserGroupTest() throws ApiException { + public void updateUserGroupTest() { UserGroupUpdateRequest userGroupUpdateRequest = null; String groupId = null; String idempotencyKey = null; diff --git a/src/test/java/com/fireblocks/sdk/api/UsersApiTest.java b/src/test/java/com/fireblocks/sdk/api/UsersApiTest.java index 31e125a5..35cb9c3a 100644 --- a/src/test/java/com/fireblocks/sdk/api/UsersApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/UsersApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.UserResponse; import java.util.List; @@ -32,11 +31,9 @@ public class UsersApiTest { * *

List all users for the workspace. Please note that this endpoint is available only for API * keys with Admin permissions. - * - * @throws ApiException if the Api call fails */ @Test - public void getUsersTest() throws ApiException { + public void getUsersTest() { CompletableFuture>> response = api.getUsers(); } } diff --git a/src/test/java/com/fireblocks/sdk/api/UtxoManagementBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/UtxoManagementBetaApiTest.java index 6b79e4e4..02d6e178 100644 --- a/src/test/java/com/fireblocks/sdk/api/UtxoManagementBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/UtxoManagementBetaApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.AttachDetachUtxoLabelsRequest; import com.fireblocks.sdk.model.AttachDetachUtxoLabelsResponse; @@ -37,11 +36,9 @@ public class UtxoManagementBetaApiTest { * a vault account, with optional filters for labels, statuses, amounts, and more. **Note:** * These endpoints are currently in beta and might be subject to changes. Endpoint Permission: * Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getUtxosTest() throws ApiException { + public void getUtxosTest() { String vaultAccountId = null; String assetId = null; String pageCursor = null; @@ -84,11 +81,9 @@ public void getUtxosTest() throws ApiException { * adds to the existing label set and `labelsToDetach` removes from it. Neither * operation replaces the full set. **Note:** These endpoints are currently in beta and might be * subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void updateUtxoLabelsTest() throws ApiException { + public void updateUtxoLabelsTest() { AttachDetachUtxoLabelsRequest attachDetachUtxoLabelsRequest = null; String vaultAccountId = null; String assetId = null; diff --git a/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java b/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java index 6c1f1590..c4c4a37c 100644 --- a/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.AddressReverseLookupResponse; import com.fireblocks.sdk.model.AutomationSettingsRequest; @@ -70,11 +69,9 @@ public class VaultsApiTest { *

Initiates activation for a wallet in a vault account. Activation is required for tokens * that need an on-chain transaction for creation (XLM tokens, SOL tokens etc). Endpoint * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void activateAssetForVaultAccountTest() throws ApiException { + public void activateAssetForVaultAccountTest() { String vaultAccountId = null; String assetId = null; String idempotencyKey = null; @@ -91,11 +88,9 @@ public void activateAssetForVaultAccountTest() throws ApiException { * does not yet exist it is created in an activated state. **Note:** This endpoint is currently * in beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, * Signer, Approver. - * - * @throws ApiException if the Api call fails */ @Test - public void activateUsdcGatewayWalletBetaTest() throws ApiException { + public void activateUsdcGatewayWalletBetaTest() { String vaultAccountId = null; String idempotencyKey = null; CompletableFuture> response = @@ -108,11 +103,9 @@ public void activateUsdcGatewayWalletBetaTest() throws ApiException { *

Attach or detach one or more tags from the requested vault accounts. Endpoint Permission: * For protected tags: Owner, Admin, Non-Signing Admin. For non protected tags: Owner, Admin, * Non-Signing Admin, Signer, Editor, Approver. - * - * @throws ApiException if the Api call fails */ @Test - public void attachOrDetachTagsFromVaultAccountsTest() throws ApiException { + public void attachOrDetachTagsFromVaultAccountsTest() { VaultAccountsTagAttachmentOperationsRequest vaultAccountsTagAttachmentOperationsRequest = null; String idempotencyKey = null; @@ -126,11 +119,9 @@ public void attachOrDetachTagsFromVaultAccountsTest() throws ApiException { * *

Converts an existing segwit address to the legacy format. Endpoint Permission: Admin, * Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void createLegacyAddressTest() throws ApiException { + public void createLegacyAddressTest() { String vaultAccountId = null; String assetId = null; String addressId = null; @@ -146,11 +137,9 @@ public void createLegacyAddressTest() throws ApiException { * and DOT blockchains are not supported. - These endpoints are currently in beta and might be * subject to changes. - Limited to a maximum of 10,000 accounts per operation. **Endpoint * Permissions:** Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void createMultipleAccountsTest() throws ApiException { + public void createMultipleAccountsTest() { CreateMultipleAccountsRequest createMultipleAccountsRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -165,11 +154,9 @@ public void createMultipleAccountsTest() throws ApiException { * - Limited to a maximum of 10,000 addresses per operation. Use multiple operations for the * same Vault account/permanent address if needed. **Endpoint Permissions:** Admin, Non-Signing * Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void createMultipleDepositAddressesTest() throws ApiException { + public void createMultipleDepositAddressesTest() { CreateMultipleDepositAddressesRequest createMultipleDepositAddressesRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -184,11 +171,9 @@ public void createMultipleDepositAddressesTest() throws ApiException { * consist of ASCII characters only. Learn more about Fireblocks Vault Accounts in the following * [guide](https://developers.fireblocks.com/reference/create-vault-account). Endpoint * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void createVaultAccountTest() throws ApiException { + public void createVaultAccountTest() { CreateVaultAccountRequest createVaultAccountRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -202,11 +187,9 @@ public void createVaultAccountTest() throws ApiException { * Vault Wallets in the following * [guide](https://developers.fireblocks.com/reference/create-vault-wallet). Endpoint * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void createVaultAccountAssetTest() throws ApiException { + public void createVaultAccountAssetTest() { String vaultAccountId = null; String assetId = null; CreateAssetsRequest createAssetsRequest = null; @@ -227,11 +210,9 @@ public void createVaultAccountAssetTest() throws ApiException { *

Creates a new deposit address for an asset of a vault account. Should be used for UTXO or * Tag/Memo based assets ONLY. Requests with account based assets will fail. Endpoint * Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void createVaultAccountAssetAddressTest() throws ApiException { + public void createVaultAccountAssetAddressTest() { String vaultAccountId = null; String assetId = null; CreateAddressRequest createAddressRequest = null; @@ -247,11 +228,9 @@ public void createVaultAccountAssetAddressTest() throws ApiException { *

Deactivates the USDC Gateway wallet associated with the given vault account. **Note:** * This endpoint is currently in beta and might be subject to changes. Endpoint Permission: * Admin, Non-Signing Admin, Signer, Approver. - * - * @throws ApiException if the Api call fails */ @Test - public void deactivateUsdcGatewayWalletBetaTest() throws ApiException { + public void deactivateUsdcGatewayWalletBetaTest() { String vaultAccountId = null; String idempotencyKey = null; CompletableFuture> response = @@ -265,11 +244,9 @@ public void deactivateUsdcGatewayWalletBetaTest() throws ApiException { * configured, only its schedule stops. Turn it back on later with PATCH, without setting up the * automation again from scratch. **Note:** This endpoint is currently in beta and might be * subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver. - * - * @throws ApiException if the Api call fails */ @Test - public void disableUsdcGatewayDepositAutomationScheduleBetaTest() throws ApiException { + public void disableUsdcGatewayDepositAutomationScheduleBetaTest() { String vaultAccountId = null; UUID automationId = null; @@ -283,11 +260,9 @@ public void disableUsdcGatewayDepositAutomationScheduleBetaTest() throws ApiExce *

Get all vault wallets of the vault accounts in your workspace. A vault wallet is an asset * in a vault account. This method allows fast traversal of all account balances. Endpoint * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getAssetWalletsTest() throws ApiException { + public void getAssetWalletsTest() { BigDecimal totalAmountLargerThan = null; String assetId = null; String orderBy = null; @@ -304,11 +279,9 @@ public void getAssetWalletsTest() throws ApiException { *

Returns the current status of (or an error for) the specified deposit addresss bulk * creation job. **Endpoint Permissions:** Admin, Non-Signing Admin, Signer, Approver, Editor, * and Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getCreateMultipleDepositAddressesJobStatusTest() throws ApiException { + public void getCreateMultipleDepositAddressesJobStatusTest() { String jobId = null; CompletableFuture> response = api.getCreateMultipleDepositAddressesJobStatus(jobId); @@ -319,11 +292,9 @@ public void getCreateMultipleDepositAddressesJobStatusTest() throws ApiException * *

Returns the current status of (or error for) the specified vault account bulk creation * job. **Endpoint Permissions:** Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getCreateMultipleVaultAccountsJobStatusTest() throws ApiException { + public void getCreateMultipleVaultAccountsJobStatusTest() { String jobId = null; CompletableFuture> response = api.getCreateMultipleVaultAccountsJobStatus(jobId); @@ -334,11 +305,9 @@ public void getCreateMultipleVaultAccountsJobStatusTest() throws ApiException { * *

Retrieves the maximum BIP44 address index and change address index used for a specific * asset in a vault account (BIP44 standard). - * - * @throws ApiException if the Api call fails */ @Test - public void getMaxBipIndexUsedTest() throws ApiException { + public void getMaxBipIndexUsedTest() { String vaultAccountId = null; String assetId = null; CompletableFuture> response = @@ -351,11 +320,9 @@ public void getMaxBipIndexUsedTest() throws ApiException { *

**UTXO assets only.** Retrieve the maximum amount of the specified asset that can be spent * in a single transaction from the specified vault account. **Endpoint Permissions:** Admin, * Non-Signing Admin, Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getMaxSpendableAmountTest() throws ApiException { + public void getMaxSpendableAmountTest() { String vaultAccountId = null; String assetId = null; Boolean manualSignging = null; @@ -384,11 +351,9 @@ public void getMaxSpendableAmountTest() throws ApiException { *

Gets all vault accounts in your workspace. This endpoint returns a limited amount of * results with a quick response time. Endpoint Permission: Admin, Non-Signing Admin, Signer, * Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getPagedVaultAccountsTest() throws ApiException { + public void getPagedVaultAccountsTest() { String namePrefix = null; String nameSuffix = null; BigDecimal minAmountThreshold = null; @@ -420,11 +385,9 @@ public void getPagedVaultAccountsTest() throws ApiException { * *

Gets the public key information based on derivation path and signing algorithm. Endpoint * Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getPublicKeyInfoTest() throws ApiException { + public void getPublicKeyInfoTest() { String derivationPath = null; String algorithm = null; Boolean compressed = null; @@ -437,11 +400,9 @@ public void getPublicKeyInfoTest() throws ApiException { * *

Get the public key information for a specific asset in a vault account. Endpoint * Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getPublicKeyInfoForAddressTest() throws ApiException { + public void getPublicKeyInfoForAddressTest() { String vaultAccountId = null; String assetId = null; BigDecimal change = null; @@ -457,11 +418,9 @@ public void getPublicKeyInfoForAddressTest() throws ApiException { * *

Returns unspent inputs information of an UTXO asset in a vault account. Endpoint * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getUnspentInputsTest() throws ApiException { + public void getUnspentInputsTest() { String vaultAccountId = null; String assetId = null; CompletableFuture>> response = @@ -474,11 +433,9 @@ public void getUnspentInputsTest() throws ApiException { *

Returns the USDC Gateway deposit automations configured for the given vault account. * **Note:** This endpoint is currently in beta and might be subject to changes. Endpoint * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getUsdcGatewayDepositAutomationBetaTest() throws ApiException { + public void getUsdcGatewayDepositAutomationBetaTest() { String vaultAccountId = null; CompletableFuture> response = api.getUsdcGatewayDepositAutomationBeta(vaultAccountId); @@ -490,11 +447,9 @@ public void getUsdcGatewayDepositAutomationBetaTest() throws ApiException { *

Returns the USDC Gateway wallet information associated with the given vault account. * **Note:** This endpoint is currently in beta and might be subject to changes. Endpoint * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getUsdcGatewayWalletInfoBetaTest() throws ApiException { + public void getUsdcGatewayWalletInfoBetaTest() { String vaultAccountId = null; CompletableFuture> response = api.getUsdcGatewayWalletInfoBeta(vaultAccountId); @@ -505,11 +460,9 @@ public void getUsdcGatewayWalletInfoBetaTest() throws ApiException { * *

Get a vault account by its unique ID. Endpoint Permission: Admin, Non-Signing Admin, * Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getVaultAccountTest() throws ApiException { + public void getVaultAccountTest() { String vaultAccountId = null; CompletableFuture> response = api.getVaultAccount(vaultAccountId); } @@ -519,11 +472,9 @@ public void getVaultAccountTest() throws ApiException { * *

Returns a specific vault wallet balance information for a specific asset. Endpoint * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getVaultAccountAssetTest() throws ApiException { + public void getVaultAccountAssetTest() { String vaultAccountId = null; String assetId = null; CompletableFuture> response = @@ -535,11 +486,9 @@ public void getVaultAccountAssetTest() throws ApiException { * *

Returns a paginated response of the addresses for a given vault account and asset. * Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getVaultAccountAssetAddressesPaginatedTest() throws ApiException { + public void getVaultAccountAssetAddressesPaginatedTest() { String vaultAccountId = null; String assetId = null; BigDecimal limit = null; @@ -555,11 +504,9 @@ public void getVaultAccountAssetAddressesPaginatedTest() throws ApiException { * *

Gets the assets amount summary for all accounts or filtered accounts. Endpoint Permission: * Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getVaultAssetsTest() throws ApiException { + public void getVaultAssetsTest() { String accountNamePrefix = null; String accountNameSuffix = null; CompletableFuture>> response = @@ -571,11 +518,9 @@ public void getVaultAssetsTest() throws ApiException { * *

Get the total balance of an asset across all the vault accounts. Endpoint Permission: * Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails */ @Test - public void getVaultBalanceByAssetTest() throws ApiException { + public void getVaultBalanceByAssetTest() { String assetId = null; CompletableFuture> response = api.getVaultBalanceByAsset(assetId); } @@ -590,11 +535,9 @@ public void getVaultBalanceByAssetTest() throws ApiException { * NOTE: Hiding the vault account from the web console will also hide all the related * transactions to/from this vault. Endpoint Permission: Admin, Non-Signing Admin, Signer, * Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void hideVaultAccountTest() throws ApiException { + public void hideVaultAccountTest() { String vaultAccountId = null; String idempotencyKey = null; CompletableFuture> response = @@ -607,11 +550,9 @@ public void hideVaultAccountTest() throws ApiException { *

Resolves a blockchain address to the vault account that owns it. Returns the vault account * ID and the blockchains associated with the address. **Note:** This endpoint is currently in * beta and might be subject to changes. - * - * @throws ApiException if the Api call fails */ @Test - public void lookupVaultByAddressTest() throws ApiException { + public void lookupVaultByAddressTest() { String address = null; CompletableFuture> response = api.lookupVaultByAddress(address); @@ -622,11 +563,9 @@ public void lookupVaultByAddressTest() throws ApiException { * *

Sets an AML/KYT customer reference ID for a specific address. Endpoint Permission: Admin, * Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void setCustomerRefIdForAddressTest() throws ApiException { + public void setCustomerRefIdForAddressTest() { SetCustomerRefIdForAddressRequest setCustomerRefIdForAddressRequest = null; String vaultAccountId = null; String assetId = null; @@ -649,11 +588,9 @@ public void setCustomerRefIdForAddressTest() throws ApiException { * account and asset. Use PATCH to change it instead. **Note:** This endpoint is currently in * beta and might be subject to changes. Endpoint Permission: Admin, Non-Signing Admin, Signer, * Approver. - * - * @throws ApiException if the Api call fails */ @Test - public void setUsdcGatewayDepositAutomationBetaTest() throws ApiException { + public void setUsdcGatewayDepositAutomationBetaTest() { AutomationSettingsRequest automationSettingsRequest = null; String vaultAccountId = null; String idempotencyKey = null; @@ -670,11 +607,9 @@ public void setUsdcGatewayDepositAutomationBetaTest() throws ApiException { * Gas Station. Learn more about the Fireblocks Gas Station in the following * [guide](https://developers.fireblocks.com/docs/work-with-gas-station). Endpoint Permission: * Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void setVaultAccountAutoFuelTest() throws ApiException { + public void setVaultAccountAutoFuelTest() { SetAutoFuelRequest setAutoFuelRequest = null; String vaultAccountId = null; String idempotencyKey = null; @@ -689,11 +624,9 @@ public void setVaultAccountAutoFuelTest() throws ApiException { * Fireblocks AML management in the following * [guide](https://developers.fireblocks.com/docs/define-aml-policies). Endpoint Permission: * Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void setVaultAccountCustomerRefIdTest() throws ApiException { + public void setVaultAccountCustomerRefIdTest() { SetCustomerRefIdRequest setCustomerRefIdRequest = null; String vaultAccountId = null; String idempotencyKey = null; @@ -707,11 +640,9 @@ public void setVaultAccountCustomerRefIdTest() throws ApiException { * *

Makes a hidden vault account visible in web console view. Endpoint Permission: Admin, * Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void unhideVaultAccountTest() throws ApiException { + public void unhideVaultAccountTest() { String vaultAccountId = null; String idempotencyKey = null; CompletableFuture> response = @@ -724,11 +655,9 @@ public void unhideVaultAccountTest() throws ApiException { *

Changes an existing USDC Gateway deposit automation for a vault account. **Note:** This * endpoint is currently in beta and might be subject to changes. Endpoint Permission: Admin, * Non-Signing Admin, Signer, Approver. - * - * @throws ApiException if the Api call fails */ @Test - public void updateUsdcGatewayDepositAutomationBetaTest() throws ApiException { + public void updateUsdcGatewayDepositAutomationBetaTest() { UpdateAutomationSettingsRequest updateAutomationSettingsRequest = null; String vaultAccountId = null; UUID automationId = null; @@ -746,11 +675,9 @@ public void updateUsdcGatewayDepositAutomationBetaTest() throws ApiException { * *

Renames the requested vault account. Endpoint Permission: Admin, Non-Signing Admin, * Signer, Approver. - * - * @throws ApiException if the Api call fails */ @Test - public void updateVaultAccountTest() throws ApiException { + public void updateVaultAccountTest() { UpdateVaultAccountRequest updateVaultAccountRequest = null; String vaultAccountId = null; String idempotencyKey = null; @@ -763,11 +690,9 @@ public void updateVaultAccountTest() throws ApiException { * *

Updates the description of an existing address of an asset in a vault account. Endpoint * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void updateVaultAccountAssetAddressTest() throws ApiException { + public void updateVaultAccountAssetAddressTest() { String vaultAccountId = null; String assetId = null; String addressId = null; @@ -788,11 +713,9 @@ public void updateVaultAccountAssetAddressTest() throws ApiException { *

Updates the balance of a specific asset in a vault account. This API endpoint is subject * to a strict rate limit. Should be used by clients in very specific scenarios. Endpoint * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void updateVaultAccountAssetBalanceTest() throws ApiException { + public void updateVaultAccountAssetBalanceTest() { String vaultAccountId = null; String assetId = null; String idempotencyKey = null; diff --git a/src/test/java/com/fireblocks/sdk/api/Web3ConnectionsApiTest.java b/src/test/java/com/fireblocks/sdk/api/Web3ConnectionsApiTest.java index b6d32c13..1372a22a 100644 --- a/src/test/java/com/fireblocks/sdk/api/Web3ConnectionsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/Web3ConnectionsApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.CreateConnectionRequest; import com.fireblocks.sdk.model.CreateConnectionResponse; @@ -37,11 +36,9 @@ public class Web3ConnectionsApiTest { * *

Initiate a new Web3 connection. * Note: After this succeeds, make a request to `PUT * /v1/connections/wc/{id}` (below) to approve or reject the new Web3 connection. - * - * @throws ApiException if the Api call fails */ @Test - public void createTest() throws ApiException { + public void createTest() { CreateConnectionRequest createConnectionRequest = null; String idempotencyKey = null; UUID xEndUserWalletId = null; @@ -53,11 +50,9 @@ public void createTest() throws ApiException { * List all open Web3 connections. * *

Get open Web3 connections. - * - * @throws ApiException if the Api call fails */ @Test - public void getTest() throws ApiException { + public void getTest() { UUID xEndUserWalletId = null; String order = null; GetFilterParameter filter = null; @@ -72,11 +67,9 @@ public void getTest() throws ApiException { * Remove an existing Web3 connection. * *

Remove a Web3 connection - * - * @throws ApiException if the Api call fails */ @Test - public void removeTest() throws ApiException { + public void removeTest() { String id = null; UUID xEndUserWalletId = null; @@ -89,11 +82,9 @@ public void removeTest() throws ApiException { *

Submit a response to *approve* or *reject* an initiated Web3 connection. * Note: This call * is used to complete your `POST /v1/connections/wc/` request. After this succeeds, * your new Web3 connection is created and functioning. - * - * @throws ApiException if the Api call fails */ @Test - public void submitTest() throws ApiException { + public void submitTest() { RespondToConnectionRequest respondToConnectionRequest = null; String id = null; String idempotencyKey = null; diff --git a/src/test/java/com/fireblocks/sdk/api/WebhooksApiTest.java b/src/test/java/com/fireblocks/sdk/api/WebhooksApiTest.java index 6379f1b7..1f218d34 100644 --- a/src/test/java/com/fireblocks/sdk/api/WebhooksApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/WebhooksApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.ResendTransactionWebhooksRequest; import com.fireblocks.sdk.model.ResendWebhooksByTransactionIdResponse; @@ -35,11 +34,9 @@ public class WebhooksApiTest { * Fireblocks Webhooks in the following * [guide](https://developers.fireblocks.com/docs/configure-webhooks). **Endpoint Permissions:** * Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void resendTransactionWebhooksTest() throws ApiException { + public void resendTransactionWebhooksTest() { ResendTransactionWebhooksRequest resendTransactionWebhooksRequest = null; String txId = null; String idempotencyKey = null; @@ -54,11 +51,9 @@ public void resendTransactionWebhooksTest() throws ApiException { *

Resends all failed webhook notifications. Learn more about Fireblocks Webhooks in the * following [guide](https://developers.fireblocks.com/docs/configure-webhooks). Endpoint * Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - * - * @throws ApiException if the Api call fails */ @Test - public void resendWebhooksTest() throws ApiException { + public void resendWebhooksTest() { String idempotencyKey = null; CompletableFuture> response = api.resendWebhooks(idempotencyKey); diff --git a/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java b/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java index 01dff66b..3f29f02d 100644 --- a/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.CreateWebhookRequest; import com.fireblocks.sdk.model.NotificationAttemptsPaginatedResponse; @@ -50,11 +49,9 @@ public class WebhooksV2ApiTest { * *

Creates a new webhook, which will be triggered on the specified events **Endpoint * Permissions:** Owner, Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void createWebhookTest() throws ApiException { + public void createWebhookTest() { CreateWebhookRequest createWebhookRequest = null; String idempotencyKey = null; CompletableFuture> response = @@ -65,11 +62,9 @@ public void createWebhookTest() throws ApiException { * Delete webhook * *

Delete a webhook by its id Endpoint Permission: Owner, Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void deleteWebhookTest() throws ApiException { + public void deleteWebhookTest() { UUID webhookId = null; CompletableFuture> response = api.deleteWebhook(webhookId); } @@ -78,11 +73,9 @@ public void deleteWebhookTest() throws ApiException { * Get webhook metrics * *

Get webhook metrics by webhook id and metric name - * - * @throws ApiException if the Api call fails */ @Test - public void getMetricsTest() throws ApiException { + public void getMetricsTest() { UUID webhookId = null; String metricName = null; CompletableFuture> response = @@ -94,11 +87,9 @@ public void getMetricsTest() throws ApiException { * *

Returns the Fireblocks Certificate Signing Request (CSR) PEM that customers use to * generate their signed client certificate. - * - * @throws ApiException if the Api call fails */ @Test - public void getMtlsCsrTest() throws ApiException { + public void getMtlsCsrTest() { CompletableFuture> response = api.getMtlsCsr(); } @@ -106,11 +97,9 @@ public void getMtlsCsrTest() throws ApiException { * Get notification by id * *

Get notification by id - * - * @throws ApiException if the Api call fails */ @Test - public void getNotificationTest() throws ApiException { + public void getNotificationTest() { String webhookId = null; String notificationId = null; Boolean includeData = null; @@ -122,11 +111,9 @@ public void getNotificationTest() throws ApiException { * Get notification attempts * *

Get notification attempts by notification id - * - * @throws ApiException if the Api call fails */ @Test - public void getNotificationAttemptsTest() throws ApiException { + public void getNotificationAttemptsTest() { String webhookId = null; String notificationId = null; String pageCursor = null; @@ -139,11 +126,9 @@ public void getNotificationAttemptsTest() throws ApiException { * Get all notifications by webhook id * *

Get all notifications by webhook id (paginated) - * - * @throws ApiException if the Api call fails */ @Test - public void getNotificationsTest() throws ApiException { + public void getNotificationsTest() { UUID webhookId = null; String order = null; String sortBy = null; @@ -172,11 +157,9 @@ public void getNotificationsTest() throws ApiException { * Get resend by query job status * *

Get the status of a resend by query job - * - * @throws ApiException if the Api call fails */ @Test - public void getResendByQueryJobStatusTest() throws ApiException { + public void getResendByQueryJobStatusTest() { String webhookId = null; String jobId = null; CompletableFuture> response = @@ -187,11 +170,9 @@ public void getResendByQueryJobStatusTest() throws ApiException { * Get resend job status * *

Get the status of a resend job - * - * @throws ApiException if the Api call fails */ @Test - public void getResendJobStatusTest() throws ApiException { + public void getResendJobStatusTest() { String webhookId = null; String jobId = null; CompletableFuture> response = @@ -202,11 +183,9 @@ public void getResendJobStatusTest() throws ApiException { * Get webhook by id * *

Retrieve a webhook by its id - * - * @throws ApiException if the Api call fails */ @Test - public void getWebhookTest() throws ApiException { + public void getWebhookTest() { UUID webhookId = null; CompletableFuture> response = api.getWebhook(webhookId); } @@ -215,11 +194,9 @@ public void getWebhookTest() throws ApiException { * Get all webhooks * *

Get all webhooks (paginated). - * - * @throws ApiException if the Api call fails */ @Test - public void getWebhooksTest() throws ApiException { + public void getWebhooksTest() { String order = null; String pageCursor = null; BigDecimal pageSize = null; @@ -232,11 +209,9 @@ public void getWebhooksTest() throws ApiException { * *

Resend all failed notifications for a webhook in the last 24 hours Endpoint Permission: * Owner, Admin, Non-Signing Admin, Editor, Signer. - * - * @throws ApiException if the Api call fails */ @Test - public void resendFailedNotificationsTest() throws ApiException { + public void resendFailedNotificationsTest() { ResendFailedNotificationsRequest resendFailedNotificationsRequest = null; String webhookId = null; String idempotencyKey = null; @@ -250,11 +225,9 @@ public void resendFailedNotificationsTest() throws ApiException { * *

Resend notification by ID Endpoint Permission: Owner, Admin, Non-Signing Admin, Editor, * Signer. - * - * @throws ApiException if the Api call fails */ @Test - public void resendNotificationByIdTest() throws ApiException { + public void resendNotificationByIdTest() { String webhookId = null; String notificationId = null; String idempotencyKey = null; @@ -268,11 +241,9 @@ public void resendNotificationByIdTest() throws ApiException { * *

Resend notifications matching the given query filters (statuses, events, time range, * resource ID) Endpoint Permission: Owner, Admin, Non-Signing Admin, Editor, Signer. - * - * @throws ApiException if the Api call fails */ @Test - public void resendNotificationsByQueryTest() throws ApiException { + public void resendNotificationsByQueryTest() { ResendByQueryRequest resendByQueryRequest = null; String webhookId = null; String idempotencyKey = null; @@ -285,11 +256,9 @@ public void resendNotificationsByQueryTest() throws ApiException { * *

Resend notifications by resource Id Endpoint Permission: Owner, Admin, Non-Signing Admin, * Editor, Signer. - * - * @throws ApiException if the Api call fails */ @Test - public void resendNotificationsByResourceIdTest() throws ApiException { + public void resendNotificationsByResourceIdTest() { ResendNotificationsByResourceIdRequest resendNotificationsByResourceIdRequest = null; String webhookId = null; String idempotencyKey = null; @@ -303,11 +272,9 @@ public void resendNotificationsByResourceIdTest() throws ApiException { * Update webhook * *

Update a webhook by its id Endpoint Permission: Owner, Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void updateWebhookTest() throws ApiException { + public void updateWebhookTest() { UpdateWebhookRequest updateWebhookRequest = null; UUID webhookId = null; CompletableFuture> response = diff --git a/src/test/java/com/fireblocks/sdk/api/WhitelistIpAddressesApiTest.java b/src/test/java/com/fireblocks/sdk/api/WhitelistIpAddressesApiTest.java index f1598fa0..599df6af 100644 --- a/src/test/java/com/fireblocks/sdk/api/WhitelistIpAddressesApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/WhitelistIpAddressesApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.GetWhitelistIpAddressesResponse; import java.util.concurrent.CompletableFuture; @@ -32,11 +31,9 @@ public class WhitelistIpAddressesApiTest { *

Get a list of the whitelisted IP addresses for a specific API Key - Please note that this * endpoint is available only for API keys with Admin/Non Signing Admin permissions. Endpoint * Permission: Admin, Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getWhitelistIpAddressesTest() throws ApiException { + public void getWhitelistIpAddressesTest() { String userId = null; CompletableFuture> response = api.getWhitelistIpAddresses(userId); diff --git a/src/test/java/com/fireblocks/sdk/api/WorkspaceApiTest.java b/src/test/java/com/fireblocks/sdk/api/WorkspaceApiTest.java index 8ea50da6..e5b2e5c1 100644 --- a/src/test/java/com/fireblocks/sdk/api/WorkspaceApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/WorkspaceApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.Workspace; import java.util.concurrent.CompletableFuture; @@ -30,11 +29,9 @@ public class WorkspaceApiTest { * Get workspace * *

Returns the workspace ID and name for the authenticated user. - * - * @throws ApiException if the Api call fails */ @Test - public void getWorkspaceTest() throws ApiException { + public void getWorkspaceTest() { CompletableFuture> response = api.getWorkspace(); } } diff --git a/src/test/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApiTest.java index d4f983d8..deccecdd 100644 --- a/src/test/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApiTest.java @@ -13,7 +13,6 @@ package com.fireblocks.sdk.api; -import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.GetWorkspaceStatusResponse; import java.util.concurrent.CompletableFuture; @@ -33,11 +32,9 @@ public class WorkspaceStatusBetaApiTest { * disabled for general availability at this time. - Please note that this endpoint is available * only for API keys with Admin/Non Signing Admin permissions. Endpoint Permission: Admin, * Non-Signing Admin. - * - * @throws ApiException if the Api call fails */ @Test - public void getWorkspaceStatusTest() throws ApiException { + public void getWorkspaceStatusTest() { CompletableFuture> response = api.getWorkspaceStatus(); } diff --git a/src/test/java/com/fireblocks/sdk/model/DelegationBlockchainPositionInfoTest.java b/src/test/java/com/fireblocks/sdk/model/DelegationBlockchainPositionInfoTest.java index 34f332cd..6c0379b2 100644 --- a/src/test/java/com/fireblocks/sdk/model/DelegationBlockchainPositionInfoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/DelegationBlockchainPositionInfoTest.java @@ -55,6 +55,24 @@ void estimatedActivationTimeTest() { // TODO: test estimatedActivationTime } + /** Test the property 'estimatedSourceExitTime' */ + @Test + void estimatedSourceExitTimeTest() { + // TODO: test estimatedSourceExitTime + } + + /** Test the property 'estimatedConsolidationTime' */ + @Test + void estimatedConsolidationTimeTest() { + // TODO: test estimatedConsolidationTime + } + + /** Test the property 'estimatedWithdrawalTime' */ + @Test + void estimatedWithdrawalTimeTest() { + // TODO: test estimatedWithdrawalTime + } + /** Test the property 'totalWithdrawableAmount' */ @Test void totalWithdrawableAmountTest() { diff --git a/src/test/java/com/fireblocks/sdk/model/EthereumBlockchainDataTest.java b/src/test/java/com/fireblocks/sdk/model/EthereumBlockchainDataTest.java index 57bdfd8b..6c2e5714 100644 --- a/src/test/java/com/fireblocks/sdk/model/EthereumBlockchainDataTest.java +++ b/src/test/java/com/fireblocks/sdk/model/EthereumBlockchainDataTest.java @@ -36,4 +36,22 @@ void isCompoundingValidatorTest() { void estimatedActivationTimeTest() { // TODO: test estimatedActivationTime } + + /** Test the property 'estimatedSourceExitTime' */ + @Test + void estimatedSourceExitTimeTest() { + // TODO: test estimatedSourceExitTime + } + + /** Test the property 'estimatedConsolidationTime' */ + @Test + void estimatedConsolidationTimeTest() { + // TODO: test estimatedConsolidationTime + } + + /** Test the property 'estimatedWithdrawalTime' */ + @Test + void estimatedWithdrawalTimeTest() { + // TODO: test estimatedWithdrawalTime + } } diff --git a/src/test/java/com/fireblocks/sdk/model/GaslessInfoTest.java b/src/test/java/com/fireblocks/sdk/model/GaslessInfoTest.java new file mode 100644 index 00000000..69bdd45a --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/GaslessInfoTest.java @@ -0,0 +1,51 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * 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.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for GaslessInfo */ +class GaslessInfoTest { + private final GaslessInfo model = new GaslessInfo(); + + /** Model tests for GaslessInfo */ + @Test + void testGaslessInfo() { + // TODO: test GaslessInfo + } + + /** Test the property 'isMetaTx' */ + @Test + void isMetaTxTest() { + // TODO: test isMetaTx + } + + /** Test the property 'relayTenantId' */ + @Test + void relayTenantIdTest() { + // TODO: test relayTenantId + } + + /** Test the property 'relayTenantName' */ + @Test + void relayTenantNameTest() { + // TODO: test relayTenantName + } + + /** Test the property 'relayVaultAccountId' */ + @Test + void relayVaultAccountIdTest() { + // TODO: test relayVaultAccountId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/GetFindingsExternalResponseTest.java b/src/test/java/com/fireblocks/sdk/model/GetFindingsExternalResponseTest.java new file mode 100644 index 00000000..d6a85837 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/GetFindingsExternalResponseTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * 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.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for GetFindingsExternalResponse */ +class GetFindingsExternalResponseTest { + private final GetFindingsExternalResponse model = new GetFindingsExternalResponse(); + + /** Model tests for GetFindingsExternalResponse */ + @Test + void testGetFindingsExternalResponse() { + // TODO: test GetFindingsExternalResponse + } + + /** Test the property 'data' */ + @Test + void dataTest() { + // TODO: test data + } + + /** Test the property 'total' */ + @Test + void totalTest() { + // TODO: test total + } + + /** Test the property 'next' */ + @Test + void nextTest() { + // TODO: test next + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SecurityFindingTest.java b/src/test/java/com/fireblocks/sdk/model/SecurityFindingTest.java new file mode 100644 index 00000000..886c0cc1 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SecurityFindingTest.java @@ -0,0 +1,69 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * 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.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for SecurityFinding */ +class SecurityFindingTest { + private final SecurityFinding model = new SecurityFinding(); + + /** Model tests for SecurityFinding */ + @Test + void testSecurityFinding() { + // TODO: test SecurityFinding + } + + /** Test the property 'id' */ + @Test + void idTest() { + // TODO: test id + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'status' */ + @Test + void statusTest() { + // TODO: test status + } + + /** Test the property 'severity' */ + @Test + void severityTest() { + // TODO: test severity + } + + /** Test the property 'category' */ + @Test + void categoryTest() { + // TODO: test category + } + + /** Test the property 'createdAt' */ + @Test + void createdAtTest() { + // TODO: test createdAt + } + + /** Test the property 'title' */ + @Test + void titleTest() { + // TODO: test title + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransactionResponseTest.java b/src/test/java/com/fireblocks/sdk/model/TransactionResponseTest.java index f9506c86..97420e35 100644 --- a/src/test/java/com/fireblocks/sdk/model/TransactionResponseTest.java +++ b/src/test/java/com/fireblocks/sdk/model/TransactionResponseTest.java @@ -313,6 +313,12 @@ void feePayerInfoTest() { // TODO: test feePayerInfo } + /** Test the property 'gaslessInfo' */ + @Test + void gaslessInfoTest() { + // TODO: test gaslessInfo + } + /** Test the property 'systemMessages' */ @Test void systemMessagesTest() { diff --git a/src/test/java/com/fireblocks/sdk/model/TravelRuleLegalNameIdentifierTest.java b/src/test/java/com/fireblocks/sdk/model/TravelRuleLegalNameIdentifierTest.java new file mode 100644 index 00000000..8ad57cd3 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TravelRuleLegalNameIdentifierTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * 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.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for TravelRuleLegalNameIdentifier */ +class TravelRuleLegalNameIdentifierTest { + private final TravelRuleLegalNameIdentifier model = new TravelRuleLegalNameIdentifier(); + + /** Model tests for TravelRuleLegalNameIdentifier */ + @Test + void testTravelRuleLegalNameIdentifier() { + // TODO: test TravelRuleLegalNameIdentifier + } + + /** Test the property 'legalPersonName' */ + @Test + void legalPersonNameTest() { + // TODO: test legalPersonName + } + + /** Test the property 'legalPersonNameIdentifierType' */ + @Test + void legalPersonNameIdentifierTypeTest() { + // TODO: test legalPersonNameIdentifierType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TravelRuleLegalPersonNameIdentifierTest.java b/src/test/java/com/fireblocks/sdk/model/TravelRuleLegalPersonNameIdentifierTest.java index 2d7a66a7..cd9ef312 100644 --- a/src/test/java/com/fireblocks/sdk/model/TravelRuleLegalPersonNameIdentifierTest.java +++ b/src/test/java/com/fireblocks/sdk/model/TravelRuleLegalPersonNameIdentifierTest.java @@ -26,15 +26,21 @@ void testTravelRuleLegalPersonNameIdentifier() { // TODO: test TravelRuleLegalPersonNameIdentifier } - /** Test the property 'legalPersonName' */ + /** Test the property 'nameIdentifier' */ @Test - void legalPersonNameTest() { - // TODO: test legalPersonName + void nameIdentifierTest() { + // TODO: test nameIdentifier } - /** Test the property 'legalPersonNameIdentifierType' */ + /** Test the property 'localNameIdentifier' */ @Test - void legalPersonNameIdentifierTypeTest() { - // TODO: test legalPersonNameIdentifierType + void localNameIdentifierTest() { + // TODO: test localNameIdentifier + } + + /** Test the property 'phoneticNameIdentifier' */ + @Test + void phoneticNameIdentifierTest() { + // TODO: test phoneticNameIdentifier } } diff --git a/src/test/java/com/fireblocks/sdk/model/TravelRuleValidateLegalNameIdentifierTest.java b/src/test/java/com/fireblocks/sdk/model/TravelRuleValidateLegalNameIdentifierTest.java new file mode 100644 index 00000000..0e634486 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TravelRuleValidateLegalNameIdentifierTest.java @@ -0,0 +1,40 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * 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.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for TravelRuleValidateLegalNameIdentifier */ +class TravelRuleValidateLegalNameIdentifierTest { + private final TravelRuleValidateLegalNameIdentifier model = + new TravelRuleValidateLegalNameIdentifier(); + + /** Model tests for TravelRuleValidateLegalNameIdentifier */ + @Test + void testTravelRuleValidateLegalNameIdentifier() { + // TODO: test TravelRuleValidateLegalNameIdentifier + } + + /** Test the property 'legalPersonName' */ + @Test + void legalPersonNameTest() { + // TODO: test legalPersonName + } + + /** Test the property 'legalPersonNameIdentifierType' */ + @Test + void legalPersonNameIdentifierTypeTest() { + // TODO: test legalPersonNameIdentifierType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TravelRuleValidateLegalPersonNameIdentifierTest.java b/src/test/java/com/fireblocks/sdk/model/TravelRuleValidateLegalPersonNameIdentifierTest.java index cbcc3e0b..ef859c6a 100644 --- a/src/test/java/com/fireblocks/sdk/model/TravelRuleValidateLegalPersonNameIdentifierTest.java +++ b/src/test/java/com/fireblocks/sdk/model/TravelRuleValidateLegalPersonNameIdentifierTest.java @@ -26,15 +26,21 @@ void testTravelRuleValidateLegalPersonNameIdentifier() { // TODO: test TravelRuleValidateLegalPersonNameIdentifier } - /** Test the property 'legalPersonName' */ + /** Test the property 'nameIdentifier' */ @Test - void legalPersonNameTest() { - // TODO: test legalPersonName + void nameIdentifierTest() { + // TODO: test nameIdentifier } - /** Test the property 'legalPersonNameIdentifierType' */ + /** Test the property 'localNameIdentifier' */ @Test - void legalPersonNameIdentifierTypeTest() { - // TODO: test legalPersonNameIdentifierType + void localNameIdentifierTest() { + // TODO: test localNameIdentifier + } + + /** Test the property 'phoneticNameIdentifier' */ + @Test + void phoneticNameIdentifierTest() { + // TODO: test phoneticNameIdentifier } }