diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index b2006482..5181c34a 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -36,26 +36,27 @@ docs/AmountInfo.md docs/ApiKey.md docs/ApiKeysPaginatedResponse.md docs/ApiUserApi.md +docs/Asset.md docs/AssetAlreadyExistHttpError.md docs/AssetAmount.md docs/AssetBadRequestErrorResponse.md -docs/AssetClassBeta.md +docs/AssetClass.md docs/AssetConflictErrorResponse.md +docs/AssetDetailsMetadata.md +docs/AssetDetailsOnchain.md docs/AssetForbiddenErrorResponse.md docs/AssetInternalServerErrorResponse.md docs/AssetMedia.md docs/AssetMediaAttributes.md docs/AssetMetadata.md -docs/AssetMetadataBeta.md docs/AssetMetadataDto.md docs/AssetNotFoundErrorResponse.md docs/AssetOnchain.md -docs/AssetOnchainBeta.md docs/AssetPriceForbiddenErrorResponse.md docs/AssetPriceNotFoundErrorResponse.md docs/AssetPriceResponse.md docs/AssetResponse.md -docs/AssetResponseBeta.md +docs/AssetScope.md docs/AssetTypeResponse.md docs/AssetWallet.md docs/AssetsApi.md @@ -72,7 +73,6 @@ docs/BlockchainNotFoundErrorResponse.md docs/BlockchainOnchain.md docs/BlockchainResponse.md docs/BlockchainsAssetsApi.md -docs/BlockchainsAssetsBetaApi.md docs/CallbackHandler.md docs/CallbackHandlerRequest.md docs/CancelTransactionResponse.md @@ -612,7 +612,6 @@ src/main/java/com/fireblocks/sdk/api/ApiUserApi.java src/main/java/com/fireblocks/sdk/api/AssetsApi.java src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java -src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsBetaApi.java src/main/java/com/fireblocks/sdk/api/ComplianceApi.java src/main/java/com/fireblocks/sdk/api/ComplianceScreeningConfigurationApi.java src/main/java/com/fireblocks/sdk/api/ConsoleUserApi.java @@ -678,26 +677,27 @@ src/main/java/com/fireblocks/sdk/model/AmountAndChainDescriptor.java src/main/java/com/fireblocks/sdk/model/AmountInfo.java src/main/java/com/fireblocks/sdk/model/ApiKey.java src/main/java/com/fireblocks/sdk/model/ApiKeysPaginatedResponse.java +src/main/java/com/fireblocks/sdk/model/Asset.java src/main/java/com/fireblocks/sdk/model/AssetAlreadyExistHttpError.java src/main/java/com/fireblocks/sdk/model/AssetAmount.java src/main/java/com/fireblocks/sdk/model/AssetBadRequestErrorResponse.java -src/main/java/com/fireblocks/sdk/model/AssetClassBeta.java +src/main/java/com/fireblocks/sdk/model/AssetClass.java src/main/java/com/fireblocks/sdk/model/AssetConflictErrorResponse.java +src/main/java/com/fireblocks/sdk/model/AssetDetailsMetadata.java +src/main/java/com/fireblocks/sdk/model/AssetDetailsOnchain.java src/main/java/com/fireblocks/sdk/model/AssetForbiddenErrorResponse.java src/main/java/com/fireblocks/sdk/model/AssetInternalServerErrorResponse.java src/main/java/com/fireblocks/sdk/model/AssetMedia.java src/main/java/com/fireblocks/sdk/model/AssetMediaAttributes.java src/main/java/com/fireblocks/sdk/model/AssetMetadata.java -src/main/java/com/fireblocks/sdk/model/AssetMetadataBeta.java src/main/java/com/fireblocks/sdk/model/AssetMetadataDto.java src/main/java/com/fireblocks/sdk/model/AssetNotFoundErrorResponse.java src/main/java/com/fireblocks/sdk/model/AssetOnchain.java -src/main/java/com/fireblocks/sdk/model/AssetOnchainBeta.java src/main/java/com/fireblocks/sdk/model/AssetPriceForbiddenErrorResponse.java src/main/java/com/fireblocks/sdk/model/AssetPriceNotFoundErrorResponse.java src/main/java/com/fireblocks/sdk/model/AssetPriceResponse.java src/main/java/com/fireblocks/sdk/model/AssetResponse.java -src/main/java/com/fireblocks/sdk/model/AssetResponseBeta.java +src/main/java/com/fireblocks/sdk/model/AssetScope.java src/main/java/com/fireblocks/sdk/model/AssetTypeResponse.java src/main/java/com/fireblocks/sdk/model/AssetWallet.java src/main/java/com/fireblocks/sdk/model/AuditLogData.java @@ -1194,7 +1194,6 @@ src/test/java/com/fireblocks/sdk/api/ApiUserApiTest.java src/test/java/com/fireblocks/sdk/api/AssetsApiTest.java src/test/java/com/fireblocks/sdk/api/AuditLogsApiTest.java src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java -src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsBetaApiTest.java src/test/java/com/fireblocks/sdk/api/ComplianceApiTest.java src/test/java/com/fireblocks/sdk/api/ComplianceScreeningConfigurationApiTest.java src/test/java/com/fireblocks/sdk/api/ConsoleUserApiTest.java @@ -1262,23 +1261,24 @@ src/test/java/com/fireblocks/sdk/model/ApiKeysPaginatedResponseTest.java src/test/java/com/fireblocks/sdk/model/AssetAlreadyExistHttpErrorTest.java src/test/java/com/fireblocks/sdk/model/AssetAmountTest.java src/test/java/com/fireblocks/sdk/model/AssetBadRequestErrorResponseTest.java -src/test/java/com/fireblocks/sdk/model/AssetClassBetaTest.java +src/test/java/com/fireblocks/sdk/model/AssetClassTest.java src/test/java/com/fireblocks/sdk/model/AssetConflictErrorResponseTest.java +src/test/java/com/fireblocks/sdk/model/AssetDetailsMetadataTest.java +src/test/java/com/fireblocks/sdk/model/AssetDetailsOnchainTest.java src/test/java/com/fireblocks/sdk/model/AssetForbiddenErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/AssetInternalServerErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/AssetMediaAttributesTest.java src/test/java/com/fireblocks/sdk/model/AssetMediaTest.java -src/test/java/com/fireblocks/sdk/model/AssetMetadataBetaTest.java src/test/java/com/fireblocks/sdk/model/AssetMetadataDtoTest.java src/test/java/com/fireblocks/sdk/model/AssetMetadataTest.java src/test/java/com/fireblocks/sdk/model/AssetNotFoundErrorResponseTest.java -src/test/java/com/fireblocks/sdk/model/AssetOnchainBetaTest.java src/test/java/com/fireblocks/sdk/model/AssetOnchainTest.java src/test/java/com/fireblocks/sdk/model/AssetPriceForbiddenErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/AssetPriceNotFoundErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/AssetPriceResponseTest.java -src/test/java/com/fireblocks/sdk/model/AssetResponseBetaTest.java src/test/java/com/fireblocks/sdk/model/AssetResponseTest.java +src/test/java/com/fireblocks/sdk/model/AssetScopeTest.java +src/test/java/com/fireblocks/sdk/model/AssetTest.java src/test/java/com/fireblocks/sdk/model/AssetTypeResponseTest.java src/test/java/com/fireblocks/sdk/model/AssetWalletTest.java src/test/java/com/fireblocks/sdk/model/AuditLogDataTest.java diff --git a/README.md b/README.md index 9edb95e3..f90e4467 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 9.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:9.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-9.0.0.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` @@ -145,13 +145,13 @@ Class | Method | HTTP request | Description *ApiUserApi* | [**getApiUsers**](docs/ApiUserApi.md#getApiUsers) | **GET** /management/api_users | Get Api users *AssetsApi* | [**createAssetsBulk**](docs/AssetsApi.md#createAssetsBulk) | **POST** /vault/assets/bulk | Bulk creation of wallets *AuditLogsApi* | [**getAuditLogs**](docs/AuditLogsApi.md#getAuditLogs) | **GET** /management/audit_logs | Get audit logs -*BlockchainsAssetsApi* | [**getSupportedAssets**](docs/BlockchainsAssetsApi.md#getSupportedAssets) | **GET** /supported_assets | List all asset types supported by Fireblocks +*BlockchainsAssetsApi* | [**getAsset**](docs/BlockchainsAssetsApi.md#getAsset) | **GET** /assets/{id} | Get an asset +*BlockchainsAssetsApi* | [**getBlockchain**](docs/BlockchainsAssetsApi.md#getBlockchain) | **GET** /blockchains/{id} | Get an blockchain +*BlockchainsAssetsApi* | [**getSupportedAssets**](docs/BlockchainsAssetsApi.md#getSupportedAssets) | **GET** /supported_assets | List all asset types supported by Fireblocks - legacy endpoint +*BlockchainsAssetsApi* | [**listAssets**](docs/BlockchainsAssetsApi.md#listAssets) | **GET** /assets | List assets +*BlockchainsAssetsApi* | [**listBlockchains**](docs/BlockchainsAssetsApi.md#listBlockchains) | **GET** /blockchains | List blockchains *BlockchainsAssetsApi* | [**registerNewAsset**](docs/BlockchainsAssetsApi.md#registerNewAsset) | **POST** /assets | Register an asset *BlockchainsAssetsApi* | [**setAssetPrice**](docs/BlockchainsAssetsApi.md#setAssetPrice) | **POST** /assets/prices/{id} | Set asset price -*BlockchainsAssetsBetaApi* | [**getAssetById**](docs/BlockchainsAssetsBetaApi.md#getAssetById) | **GET** /assets/{id} | Get an asset -*BlockchainsAssetsBetaApi* | [**getBlockchainById**](docs/BlockchainsAssetsBetaApi.md#getBlockchainById) | **GET** /blockchains/{id} | Get an blockchain -*BlockchainsAssetsBetaApi* | [**listAssets**](docs/BlockchainsAssetsBetaApi.md#listAssets) | **GET** /assets | List assets -*BlockchainsAssetsBetaApi* | [**listBlockchains**](docs/BlockchainsAssetsBetaApi.md#listBlockchains) | **GET** /blockchains | List blockchains *ComplianceApi* | [**getAmlPostScreeningPolicy**](docs/ComplianceApi.md#getAmlPostScreeningPolicy) | **GET** /screening/aml/post_screening_policy | AML - View Post-Screening Policy *ComplianceApi* | [**getAmlScreeningPolicy**](docs/ComplianceApi.md#getAmlScreeningPolicy) | **GET** /screening/aml/screening_policy | AML - View Screening Policy *ComplianceApi* | [**getPostScreeningPolicy**](docs/ComplianceApi.md#getPostScreeningPolicy) | **GET** /screening/travel_rule/post_screening_policy | Travel Rule - View Post-Screening Policy @@ -432,26 +432,27 @@ Class | Method | HTTP request | Description - [AmountInfo](docs/AmountInfo.md) - [ApiKey](docs/ApiKey.md) - [ApiKeysPaginatedResponse](docs/ApiKeysPaginatedResponse.md) + - [Asset](docs/Asset.md) - [AssetAlreadyExistHttpError](docs/AssetAlreadyExistHttpError.md) - [AssetAmount](docs/AssetAmount.md) - [AssetBadRequestErrorResponse](docs/AssetBadRequestErrorResponse.md) - - [AssetClassBeta](docs/AssetClassBeta.md) + - [AssetClass](docs/AssetClass.md) - [AssetConflictErrorResponse](docs/AssetConflictErrorResponse.md) + - [AssetDetailsMetadata](docs/AssetDetailsMetadata.md) + - [AssetDetailsOnchain](docs/AssetDetailsOnchain.md) - [AssetForbiddenErrorResponse](docs/AssetForbiddenErrorResponse.md) - [AssetInternalServerErrorResponse](docs/AssetInternalServerErrorResponse.md) - [AssetMedia](docs/AssetMedia.md) - [AssetMediaAttributes](docs/AssetMediaAttributes.md) - [AssetMetadata](docs/AssetMetadata.md) - - [AssetMetadataBeta](docs/AssetMetadataBeta.md) - [AssetMetadataDto](docs/AssetMetadataDto.md) - [AssetNotFoundErrorResponse](docs/AssetNotFoundErrorResponse.md) - [AssetOnchain](docs/AssetOnchain.md) - - [AssetOnchainBeta](docs/AssetOnchainBeta.md) - [AssetPriceForbiddenErrorResponse](docs/AssetPriceForbiddenErrorResponse.md) - [AssetPriceNotFoundErrorResponse](docs/AssetPriceNotFoundErrorResponse.md) - [AssetPriceResponse](docs/AssetPriceResponse.md) - [AssetResponse](docs/AssetResponse.md) - - [AssetResponseBeta](docs/AssetResponseBeta.md) + - [AssetScope](docs/AssetScope.md) - [AssetTypeResponse](docs/AssetTypeResponse.md) - [AssetWallet](docs/AssetWallet.md) - [AuditLogData](docs/AuditLogData.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index ada37337..c15fb77e 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -7245,7 +7245,13 @@ paths: x-accepts: application/json /supported_assets: get: - description: Returns all asset types supported by Fireblocks. + description: | + Legacy Endpoint – Retrieves all assets supported by Fireblocks in your workspace without extended information.
+ **Note**: + + - This endpoint will remain available for the foreseeable future and is not deprecated.
+ - The `listAssets` endpoint provides more detailed asset information and improved performance.
+ - We recommend transitioning to the `listAssets` endpoint for better results. operationId: getSupportedAssets responses: "200": @@ -7266,7 +7272,7 @@ paths: headers: X-Request-ID: $ref: '#/components/headers/X-Request-ID' - summary: List all asset types supported by Fireblocks + summary: List all asset types supported by Fireblocks - legacy endpoint tags: - Blockchains & assets x-readme: @@ -7301,10 +7307,10 @@ paths: /assets: get: description: | - Returns all asset type supported by Fireblocks.
- + Retrieves all assets supported by Fireblocks in your workspace, providing extended information and enhanced performance compared to the legacy `supported_assets` endpoint.
**Note**: - - This endpoint is now in Beta, disabled for general availability at this time. + + - 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.
operationId: listAssets parameters: - description: Blockchain id of the assets @@ -7322,7 +7328,7 @@ paths: name: assetClass required: false schema: - $ref: '#/components/schemas/AssetClassBeta' + $ref: '#/components/schemas/AssetClass' style: form - description: Assets onchain symbol example: ETH @@ -7335,16 +7341,12 @@ paths: type: string style: form - description: Scope of the assets - example: Global explode: true in: query name: scope required: false schema: - enum: - - Global - - Local - type: string + $ref: '#/components/schemas/AssetScope' style: form - description: Are assets deprecated example: false @@ -7411,7 +7413,7 @@ paths: $ref: '#/components/headers/X-Request-ID' summary: List assets tags: - - Blockchains & assets (Beta) + - Blockchains & assets x-readme: code-samples: - language: python @@ -7422,25 +7424,25 @@ paths: name: Fireblocks SDK Javascript example - language: typescript code: "const response: Promise> =\ - \ fireblocks.blockchainsAssetsBeta.listAssets(blockchainsAssetsBetaApiListAssetsRequest);" + \ fireblocks.blockchainsAssets.listAssets(blockchainsAssetsApiListAssetsRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.blockchainsAssetsBeta().listAssets(blockchainId,\ + code: "CompletableFuture> response = fireblocks.blockchainsAssets().listAssets(blockchainId,\ \ assetClass, symbol, scope, deprecated, pageCursor, pageSize, idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.blockchains_&_assets_beta.list_assets(blockchain_id,\ + code: "response = fireblocks.blockchains_&_assets.list_assets(blockchain_id,\ \ asset_class, symbol, scope, deprecated, page_cursor, page_size, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript source: "const response: Promise> =\ - \ fireblocks.blockchainsAssetsBeta.listAssets(blockchainsAssetsBetaApiListAssetsRequest);" + \ fireblocks.blockchainsAssets.listAssets(blockchainsAssetsApiListAssetsRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.blockchainsAssetsBeta().listAssets(blockchainId,\ + source: "CompletableFuture> response = fireblocks.blockchainsAssets().listAssets(blockchainId,\ \ assetClass, symbol, scope, deprecated, pageCursor, pageSize, idempotencyKey);" - lang: Python - source: "response = fireblocks.blockchains_&_assets_beta.list_assets(blockchain_id,\ + source: "response = fireblocks.blockchains_&_assets.list_assets(blockchain_id,\ \ asset_class, symbol, scope, deprecated, page_cursor, page_size, idempotency_key);" x-accepts: application/json post: @@ -7577,8 +7579,9 @@ paths: Returns an asset by ID or legacyID.
**Note**: - - This endpoint is now in Beta, disabled for general availability at this time. - operationId: getAssetById + + - 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. + operationId: getAsset parameters: - description: The ID or legacyId of the asset example: ETH @@ -7606,7 +7609,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AssetResponseBeta' + $ref: '#/components/schemas/Asset' description: Asset with requested identification headers: X-Request-ID: @@ -7635,7 +7638,7 @@ paths: $ref: '#/components/headers/X-Request-ID' summary: Get an asset tags: - - Blockchains & assets (Beta) + - Blockchains & assets x-readme: code-samples: - language: python @@ -7645,27 +7648,23 @@ paths: code: const asset = await fireblocks.getAssetById(assetId); name: Fireblocks SDK Javascript example - language: typescript - code: "const response: Promise> =\ - \ fireblocks.blockchainsAssetsBeta.getAssetById(blockchainsAssetsBetaApiGetAssetByIdRequest);" + code: "const response: Promise> = fireblocks.blockchainsAssets.getAsset(blockchainsAssetsApiGetAssetRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.blockchainsAssetsBeta().getAssetById(id,\ + code: "CompletableFuture> response = fireblocks.blockchainsAssets().getAsset(id,\ \ idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.blockchains_&_assets_beta.get_asset_by_id(id,\ - \ idempotency_key);" + code: "response = fireblocks.blockchains_&_assets.get_asset(id, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> =\ - \ fireblocks.blockchainsAssetsBeta.getAssetById(blockchainsAssetsBetaApiGetAssetByIdRequest);" + source: "const response: Promise> = fireblocks.blockchainsAssets.getAsset(blockchainsAssetsApiGetAssetRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.blockchainsAssetsBeta().getAssetById(id,\ + source: "CompletableFuture> response = fireblocks.blockchainsAssets().getAsset(id,\ \ idempotencyKey);" - lang: Python - source: "response = fireblocks.blockchains_&_assets_beta.get_asset_by_id(id,\ - \ idempotency_key);" + source: "response = fireblocks.blockchains_&_assets.get_asset(id, idempotency_key);" x-accepts: application/json /assets/prices/{id}: post: @@ -7767,10 +7766,7 @@ paths: /blockchains: get: description: | - Returns all blockchains supported by Fireblocks.
- - **Note**: - - This endpoint is now in Beta, disabled for general availability at this time. + Returns all blockchains supported by Fireblocks. operationId: listBlockchains parameters: - description: Blockchain protocol @@ -7845,7 +7841,7 @@ paths: $ref: '#/components/headers/X-Request-ID' summary: List blockchains tags: - - Blockchains & assets (Beta) + - Blockchains & assets x-readme: code-samples: - language: python @@ -7856,37 +7852,34 @@ paths: name: Fireblocks SDK Javascript example - language: typescript code: "const response: Promise>\ - \ = fireblocks.blockchainsAssetsBeta.listBlockchains(blockchainsAssetsBetaApiListBlockchainsRequest);" + \ = fireblocks.blockchainsAssets.listBlockchains(blockchainsAssetsApiListBlockchainsRequest);" name: Fireblocks SDK TypeScript example - language: java code: "CompletableFuture> response\ - \ = fireblocks.blockchainsAssetsBeta().listBlockchains(protocol, deprecated,\ + \ = fireblocks.blockchainsAssets().listBlockchains(protocol, deprecated,\ \ test, pageCursor, pageSize);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.blockchains_&_assets_beta.list_blockchains(protocol,\ + code: "response = fireblocks.blockchains_&_assets.list_blockchains(protocol,\ \ deprecated, test, page_cursor, page_size);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript source: "const response: Promise>\ - \ = fireblocks.blockchainsAssetsBeta.listBlockchains(blockchainsAssetsBetaApiListBlockchainsRequest);" + \ = fireblocks.blockchainsAssets.listBlockchains(blockchainsAssetsApiListBlockchainsRequest);" - lang: Java source: "CompletableFuture> response\ - \ = fireblocks.blockchainsAssetsBeta().listBlockchains(protocol, deprecated,\ + \ = fireblocks.blockchainsAssets().listBlockchains(protocol, deprecated,\ \ test, pageCursor, pageSize);" - lang: Python - source: "response = fireblocks.blockchains_&_assets_beta.list_blockchains(protocol,\ + source: "response = fireblocks.blockchains_&_assets.list_blockchains(protocol,\ \ deprecated, test, page_cursor, page_size);" x-accepts: application/json /blockchains/{id}: get: description: | - Returns an blockchain by ID or legacyID.
- - **Note**: - - This endpoint is now in Beta, disabled for general availability at this time. - operationId: getBlockchainById + Returns an blockchain by ID or legacyID. + operationId: getBlockchain parameters: - description: The ID or legacyId of the blockchain example: ETH @@ -7931,7 +7924,7 @@ paths: $ref: '#/components/headers/X-Request-ID' summary: Get an blockchain tags: - - Blockchains & assets (Beta) + - Blockchains & assets x-readme: code-samples: - language: python @@ -7942,22 +7935,22 @@ paths: name: Fireblocks SDK Javascript example - language: typescript code: "const response: Promise> =\ - \ fireblocks.blockchainsAssetsBeta.getBlockchainById(blockchainsAssetsBetaApiGetBlockchainByIdRequest);" + \ fireblocks.blockchainsAssets.getBlockchain(blockchainsAssetsApiGetBlockchainRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.blockchainsAssetsBeta().getBlockchainById(id); + code: CompletableFuture> response = fireblocks.blockchainsAssets().getBlockchain(id); name: Fireblocks SDK Java example - language: python - code: response = fireblocks.blockchains_&_assets_beta.get_blockchain_by_id(id); + code: response = fireblocks.blockchains_&_assets.get_blockchain(id); name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript source: "const response: Promise> =\ - \ fireblocks.blockchainsAssetsBeta.getBlockchainById(blockchainsAssetsBetaApiGetBlockchainByIdRequest);" + \ fireblocks.blockchainsAssets.getBlockchain(blockchainsAssetsApiGetBlockchainRequest);" - lang: Java - source: CompletableFuture> response = fireblocks.blockchainsAssetsBeta().getBlockchainById(id); + source: CompletableFuture> response = fireblocks.blockchainsAssets().getBlockchain(id); - lang: Python - source: response = fireblocks.blockchains_&_assets_beta.get_blockchain_by_id(id); + source: response = fireblocks.blockchains_&_assets.get_blockchain(id); x-accepts: application/json /transactions: get: @@ -23093,7 +23086,7 @@ components: items: $ref: '#/components/schemas/AssetTypeResponse' type: array - AssetClassBeta: + AssetClass: enum: - NATIVE - FT @@ -23102,30 +23095,37 @@ components: - SFT example: FT type: string - AssetOnchainBeta: + AssetScope: + description: The scope of the asset + enum: + - GLOBAL + - LOCAL + example: GLOBAL + type: string + AssetDetailsOnchain: example: standards: - ERC20 - symbol: TST3 - address: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991 - decimals: 18 - name: Test 3 + symbol: USDT + address: 1.2488751460129641E+48 + decimals: 6 + name: Tether USD properties: symbol: description: The asset symbol - example: TST3 + example: USDT type: string name: description: The asset name - example: Test 3 + example: Tether USD type: string address: description: The asset address - example: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991 + example: 1.2488751460129641E+48 type: string decimals: description: Number of decimals - example: 18 + example: 6 type: number standards: description: Supported standards @@ -23163,13 +23163,12 @@ components: - type - url type: object - AssetMetadataBeta: + AssetDetailsMetadata: example: website: https://example.org - scope: Global + scope: GLOBAL deprecated: false deprecationReferralId: 056776ab-9efa-4219-9820-9ece0cc4d90d - verified: true media: - attributes: monochrome: true @@ -23181,12 +23180,7 @@ components: url: https://example.com/image.png properties: scope: - description: The scope of the asset - enum: - - Global - - Local - example: Global - type: string + $ref: '#/components/schemas/AssetScope' deprecated: description: Is asset deprecated example: false @@ -23195,10 +23189,6 @@ components: description: New asset ID replacement example: 056776ab-9efa-4219-9820-9ece0cc4d90d type: string - verified: - description: Is asset verified by Fireblocks - example: true - type: boolean website: description: Vendor’s website example: https://example.org @@ -23211,17 +23201,15 @@ components: required: - deprecated - scope - - verified type: object - AssetResponseBeta: + Asset: example: - displaySymbol: TST3 + displaySymbol: USDT metadata: website: https://example.org - scope: Global + scope: GLOBAL deprecated: false deprecationReferralId: 056776ab-9efa-4219-9820-9ece0cc4d90d - verified: true media: - attributes: monochrome: true @@ -23231,18 +23219,18 @@ components: monochrome: true type: image/svg+xml url: https://example.com/image.png - displayName: Test 3 - legacyId: TST3 + displayName: Tether USD + legacyId: USDT_ERC20 id: 9f9f7062-df90-4fc0-8697-96685184358d assetClass: FT blockchainId: e85208ff-3b15-44e9-af14-0ed0280b2a15 onchain: standards: - ERC20 - symbol: TST3 - address: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991 - decimals: 18 - name: Test 3 + symbol: USDT + address: 1.2488751460129641E+48 + decimals: 6 + name: Tether USD properties: id: description: The ID of the asset @@ -23250,7 +23238,7 @@ components: type: string legacyId: description: The Legacy ID of the asset - example: TST3 + example: USDT_ERC20 type: string blockchainId: description: The ID of the asset's blockchain @@ -23258,20 +23246,22 @@ components: type: string displayName: description: Asset's display name - example: Test 3 + example: Tether USD type: string displaySymbol: description: Asset's display symbol - example: TST3 + example: USDT type: string assetClass: - $ref: '#/components/schemas/AssetClassBeta' + $ref: '#/components/schemas/AssetClass' onchain: - $ref: '#/components/schemas/AssetOnchainBeta' + $ref: '#/components/schemas/AssetDetailsOnchain' metadata: - $ref: '#/components/schemas/AssetMetadataBeta' + $ref: '#/components/schemas/AssetDetailsMetadata' required: - assetClass + - displayName + - displaySymbol - id - legacyId - metadata @@ -23280,13 +23270,12 @@ components: example: next: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 data: - - displaySymbol: TST3 + - displaySymbol: USDT metadata: website: https://example.org - scope: Global + scope: GLOBAL deprecated: false deprecationReferralId: 056776ab-9efa-4219-9820-9ece0cc4d90d - verified: true media: - attributes: monochrome: true @@ -23296,25 +23285,24 @@ components: monochrome: true type: image/svg+xml url: https://example.com/image.png - displayName: Test 3 - legacyId: TST3 + displayName: Tether USD + legacyId: USDT_ERC20 id: 9f9f7062-df90-4fc0-8697-96685184358d assetClass: FT blockchainId: e85208ff-3b15-44e9-af14-0ed0280b2a15 onchain: standards: - ERC20 - symbol: TST3 - address: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991 - decimals: 18 - name: Test 3 - - displaySymbol: TST3 + symbol: USDT + address: 1.2488751460129641E+48 + decimals: 6 + name: Tether USD + - displaySymbol: USDT metadata: website: https://example.org - scope: Global + scope: GLOBAL deprecated: false deprecationReferralId: 056776ab-9efa-4219-9820-9ece0cc4d90d - verified: true media: - attributes: monochrome: true @@ -23324,23 +23312,23 @@ components: monochrome: true type: image/svg+xml url: https://example.com/image.png - displayName: Test 3 - legacyId: TST3 + displayName: Tether USD + legacyId: USDT_ERC20 id: 9f9f7062-df90-4fc0-8697-96685184358d assetClass: FT blockchainId: e85208ff-3b15-44e9-af14-0ed0280b2a15 onchain: standards: - ERC20 - symbol: TST3 - address: 0xe7A9as1oa38bc4da0248s179E30aa94CcF453991 - decimals: 18 - name: Test 3 + symbol: USDT + address: 1.2488751460129641E+48 + decimals: 6 + name: Tether USD properties: data: description: The data of the current page items: - $ref: '#/components/schemas/AssetResponseBeta' + $ref: '#/components/schemas/Asset' type: array next: description: Cursor to the next page @@ -23738,7 +23726,7 @@ components: type: object BlockchainMetadata: example: - scope: Global + scope: GLOBAL deprecated: false explorer: address: "https://example.com/address/{address}" @@ -23752,12 +23740,7 @@ components: url: https://example.com/image.png properties: scope: - description: Is blockchain listed on all workspaces? Global or Local - enum: - - Global - - Local - example: Global - type: string + $ref: '#/components/schemas/AssetScope' deprecated: description: Is blockchain deprecated example: false @@ -23777,7 +23760,7 @@ components: example: nativeAssetId: 9f9f7062-df90-4fc0-8697-96685184356a metadata: - scope: Global + scope: GLOBAL deprecated: false explorer: address: "https://example.com/address/{address}" @@ -23789,8 +23772,8 @@ components: url: https://example.com/image.png - type: image/svg+xml url: https://example.com/image.png - displayName: Test 3 - legacyId: TST3 + displayName: Ethereum + legacyId: ETH id: 9f9f7062-df90-4fc0-8697-96685184357b onchain: protocol: EVM @@ -23804,11 +23787,11 @@ components: type: string legacyId: description: The old blockchain ID representation of the blockchain - example: TST3 + example: ETH type: string displayName: description: The name of the blockchain - example: Test 3 + example: Ethereum type: string nativeAssetId: description: Native asset ID of this blockchain @@ -23832,7 +23815,7 @@ components: data: - nativeAssetId: 9f9f7062-df90-4fc0-8697-96685184356a metadata: - scope: Global + scope: GLOBAL deprecated: false explorer: address: "https://example.com/address/{address}" @@ -23844,8 +23827,8 @@ components: url: https://example.com/image.png - type: image/svg+xml url: https://example.com/image.png - displayName: Test 3 - legacyId: TST3 + displayName: Ethereum + legacyId: ETH id: 9f9f7062-df90-4fc0-8697-96685184357b onchain: protocol: EVM @@ -23854,7 +23837,7 @@ components: signingAlgo: ECDSA_SECP256K1 - nativeAssetId: 9f9f7062-df90-4fc0-8697-96685184356a metadata: - scope: Global + scope: GLOBAL deprecated: false explorer: address: "https://example.com/address/{address}" @@ -23866,8 +23849,8 @@ components: url: https://example.com/image.png - type: image/svg+xml url: https://example.com/image.png - displayName: Test 3 - legacyId: TST3 + displayName: Ethereum + legacyId: ETH id: 9f9f7062-df90-4fc0-8697-96685184357b onchain: protocol: EVM diff --git a/build.gradle b/build.gradle index 52329d32..358eefb7 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'eclipse' apply plugin: 'com.diffplug.spotless' group = 'com.fireblocks.sdk' -version = '9.0.0' +version = '0.0.0' buildscript { repositories { diff --git a/docs/AssetResponseBeta.md b/docs/Asset.md similarity index 56% rename from docs/AssetResponseBeta.md rename to docs/Asset.md index fe34f454..794a0c04 100644 --- a/docs/AssetResponseBeta.md +++ b/docs/Asset.md @@ -1,6 +1,6 @@ -# AssetResponseBeta +# Asset ## Properties @@ -10,11 +10,11 @@ |**id** | **String** | The ID of the asset | | |**legacyId** | **String** | The Legacy ID of the asset | | |**blockchainId** | **String** | The ID of the asset's blockchain | [optional] | -|**displayName** | **String** | Asset's display name | [optional] | -|**displaySymbol** | **String** | Asset's display symbol | [optional] | -|**assetClass** | **AssetClassBeta** | | | -|**onchain** | [**AssetOnchainBeta**](AssetOnchainBeta.md) | | [optional] | -|**metadata** | [**AssetMetadataBeta**](AssetMetadataBeta.md) | | | +|**displayName** | **String** | Asset's display name | | +|**displaySymbol** | **String** | Asset's display symbol | | +|**assetClass** | **AssetClass** | | | +|**onchain** | [**AssetDetailsOnchain**](AssetDetailsOnchain.md) | | [optional] | +|**metadata** | [**AssetDetailsMetadata**](AssetDetailsMetadata.md) | | | diff --git a/docs/AssetClassBeta.md b/docs/AssetClass.md similarity index 89% rename from docs/AssetClassBeta.md rename to docs/AssetClass.md index 0c26b23b..7e02b428 100644 --- a/docs/AssetClassBeta.md +++ b/docs/AssetClass.md @@ -1,6 +1,6 @@ -# AssetClassBeta +# AssetClass ## Enum diff --git a/docs/AssetMetadataBeta.md b/docs/AssetDetailsMetadata.md similarity index 60% rename from docs/AssetMetadataBeta.md rename to docs/AssetDetailsMetadata.md index 0e39f42f..42cc7ea5 100644 --- a/docs/AssetMetadataBeta.md +++ b/docs/AssetDetailsMetadata.md @@ -1,27 +1,17 @@ -# AssetMetadataBeta +# AssetDetailsMetadata ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**scope** | [**ScopeEnum**](#ScopeEnum) | The scope of the asset | | +|**scope** | **AssetScope** | | | |**deprecated** | **Boolean** | Is asset deprecated | | |**deprecationReferralId** | **String** | New asset ID replacement | [optional] | -|**verified** | **Boolean** | Is asset verified by Fireblocks | | |**website** | **String** | Vendor’s website | [optional] | |**media** | [**List<AssetMedia>**](AssetMedia.md) | Asset’s media | [optional] | -## Enum: ScopeEnum - -| Name | Value | -|---- | -----| -| GLOBAL | "Global" | -| LOCAL | "Local" | - - - diff --git a/docs/AssetOnchainBeta.md b/docs/AssetDetailsOnchain.md similarity index 94% rename from docs/AssetOnchainBeta.md rename to docs/AssetDetailsOnchain.md index c679b77c..ea0106f2 100644 --- a/docs/AssetOnchainBeta.md +++ b/docs/AssetDetailsOnchain.md @@ -1,6 +1,6 @@ -# AssetOnchainBeta +# AssetDetailsOnchain ## Properties diff --git a/docs/AssetScope.md b/docs/AssetScope.md new file mode 100644 index 00000000..87ff99a2 --- /dev/null +++ b/docs/AssetScope.md @@ -0,0 +1,13 @@ + + +# AssetScope + +## Enum + + +* `GLOBAL` (value: `"GLOBAL"`) + +* `LOCAL` (value: `"LOCAL"`) + + + diff --git a/docs/BlockchainMetadata.md b/docs/BlockchainMetadata.md index 35e80c95..9ffaf898 100644 --- a/docs/BlockchainMetadata.md +++ b/docs/BlockchainMetadata.md @@ -7,19 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**scope** | [**ScopeEnum**](#ScopeEnum) | Is blockchain listed on all workspaces? Global or Local | | +|**scope** | **AssetScope** | | | |**deprecated** | **Boolean** | Is blockchain deprecated | | |**media** | [**List<BlockchainMedia>**](BlockchainMedia.md) | Blockchain’s media | [optional] | |**explorer** | [**BlockchainExplorer**](BlockchainExplorer.md) | | [optional] | -## Enum: ScopeEnum - -| Name | Value | -|---- | -----| -| GLOBAL | "Global" | -| LOCAL | "Local" | - - - diff --git a/docs/BlockchainsAssetsApi.md b/docs/BlockchainsAssetsApi.md index d62228ac..9092d820 100644 --- a/docs/BlockchainsAssetsApi.md +++ b/docs/BlockchainsAssetsApi.md @@ -4,19 +4,195 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getSupportedAssets**](BlockchainsAssetsApi.md#getSupportedAssets) | **GET** /supported_assets | List all asset types supported by Fireblocks | +| [**getAsset**](BlockchainsAssetsApi.md#getAsset) | **GET** /assets/{id} | Get an asset | +| [**getBlockchain**](BlockchainsAssetsApi.md#getBlockchain) | **GET** /blockchains/{id} | Get an blockchain | +| [**getSupportedAssets**](BlockchainsAssetsApi.md#getSupportedAssets) | **GET** /supported_assets | List all asset types supported by Fireblocks - legacy endpoint | +| [**listAssets**](BlockchainsAssetsApi.md#listAssets) | **GET** /assets | List assets | +| [**listBlockchains**](BlockchainsAssetsApi.md#listBlockchains) | **GET** /blockchains | List blockchains | | [**registerNewAsset**](BlockchainsAssetsApi.md#registerNewAsset) | **POST** /assets | Register an asset | | [**setAssetPrice**](BlockchainsAssetsApi.md#setAssetPrice) | **POST** /assets/prices/{id} | Set asset price | +## getAsset + +> CompletableFuture> getAsset getAsset(id, idempotencyKey) + +Get an asset + +Returns an asset by ID or legacyID.</br> **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. + +### 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.BlockchainsAssetsApi; +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 id = "ETH"; // String | The ID or legacyId of the asset + String idempotencyKey = "idempotencyKey_example"; // String | 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. + try { + CompletableFuture> response = fireblocks.blockchainsAssets().getAsset(id, idempotencyKey); + 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 BlockchainsAssetsApi#getAsset"); + System.err.println("Status code: " + apiException.getCode()); + 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(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The ID or legacyId of the asset | | +| **idempotencyKey** | **String**| 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 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** | Asset with requested identification | * X-Request-ID -
| +| **404** | - Asset with specified ID or legacy ID is not found. Error code 1504 | - | +| **500** | Error occurred while getting an asset | - | +| **0** | Error Response | * X-Request-ID -
| + + +## getBlockchain + +> CompletableFuture> getBlockchain getBlockchain(id) + +Get an blockchain + +Returns an blockchain by ID or legacyID. + +### 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.BlockchainsAssetsApi; +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 id = "ETH"; // String | The ID or legacyId of the blockchain + try { + CompletableFuture> response = fireblocks.blockchainsAssets().getBlockchain(id); + 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 BlockchainsAssetsApi#getBlockchain"); + System.err.println("Status code: " + apiException.getCode()); + 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(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| The ID or legacyId of the blockchain | | + +### 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** | Blockchain with requested identification | * X-Request-ID -
| +| **404** | - Blockchain with specified ID or legacy ID is not found. Error code 1505 | - | +| **500** | Error occurred while getting an blockchain | - | +| **0** | Error Response | * X-Request-ID -
| + + ## getSupportedAssets > CompletableFuture>> getSupportedAssets getSupportedAssets() -List all asset types supported by Fireblocks +List all asset types supported by Fireblocks - legacy endpoint -Returns all asset types supported by Fireblocks. +Legacy Endpoint – Retrieves all assets supported by Fireblocks in your workspace without extended information.</br> **Note**: - This endpoint will remain available for the foreseeable future and is not deprecated.</br> - The `listAssets` endpoint provides more detailed asset information and improved performance.</br> - We recommend transitioning to the `listAssets` endpoint for better results. ### Example @@ -89,6 +265,196 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## listAssets + +> CompletableFuture> listAssets listAssets(blockchainId, assetClass, symbol, scope, deprecated, pageCursor, pageSize, idempotencyKey) + +List assets + +Retrieves all assets supported by Fireblocks in your workspace, providing extended information and enhanced performance compared to the legacy `supported_assets` endpoint.</br> **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.</br> + +### 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.BlockchainsAssetsApi; +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 blockchainId = "0f672204-a28b-464a-b318-a387abd3d3c7"; // String | Blockchain id of the assets + AssetClass assetClass = AssetClass.fromValue("NATIVE"); // AssetClass | Assets class + String symbol = "ETH"; // String | Assets onchain symbol + AssetScope scope = AssetScope.fromValue("GLOBAL"); // AssetScope | Scope of the assets + Boolean deprecated = false; // Boolean | Are assets deprecated + String pageCursor = "MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA=="; // String | Next page cursor to fetch + BigDecimal pageSize = new BigDecimal("500"); // BigDecimal | Items per page + String idempotencyKey = "idempotencyKey_example"; // String | 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. + try { + CompletableFuture> response = fireblocks.blockchainsAssets().listAssets(blockchainId, assetClass, symbol, scope, deprecated, pageCursor, pageSize, idempotencyKey); + 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 BlockchainsAssetsApi#listAssets"); + System.err.println("Status code: " + apiException.getCode()); + 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(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **blockchainId** | **String**| Blockchain id of the assets | [optional] | +| **assetClass** | [**AssetClass**](.md)| Assets class | [optional] [enum: NATIVE, FT, FIAT, NFT, SFT] | +| **symbol** | **String**| Assets onchain symbol | [optional] | +| **scope** | [**AssetScope**](.md)| Scope of the assets | [optional] [enum: GLOBAL, LOCAL] | +| **deprecated** | **Boolean**| Are assets deprecated | [optional] | +| **pageCursor** | **String**| Next page cursor to fetch | [optional] | +| **pageSize** | **BigDecimal**| Items per page | [optional] [default to 500] | +| **idempotencyKey** | **String**| 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 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** | List of assets | - | +| **500** | Error occurred while listing assets | - | +| **0** | Error Response | * X-Request-ID -
| + + +## listBlockchains + +> CompletableFuture> listBlockchains listBlockchains(protocol, deprecated, test, pageCursor, pageSize) + +List blockchains + +Returns all blockchains supported by Fireblocks. + +### 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.BlockchainsAssetsApi; +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 protocol = "SOL"; // String | Blockchain protocol + Boolean deprecated = false; // Boolean | Is blockchain deprecated + Boolean test = false; // Boolean | Is test blockchain + String pageCursor = "MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA=="; // String | Page cursor to fetch + BigDecimal pageSize = new BigDecimal("500"); // BigDecimal | Items per page (max 500) + try { + CompletableFuture> response = fireblocks.blockchainsAssets().listBlockchains(protocol, deprecated, test, pageCursor, pageSize); + 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 BlockchainsAssetsApi#listBlockchains"); + System.err.println("Status code: " + apiException.getCode()); + 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(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **protocol** | **String**| Blockchain protocol | [optional] | +| **deprecated** | **Boolean**| Is blockchain deprecated | [optional] | +| **test** | **Boolean**| Is test blockchain | [optional] | +| **pageCursor** | **String**| Page cursor to fetch | [optional] | +| **pageSize** | **BigDecimal**| Items per page (max 500) | [optional] [default to 500] | + +### 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** | List of supported blockchains | - | +| **500** | Error occurred while listing blockchains | - | +| **0** | Error Response | * X-Request-ID -
| + + ## registerNewAsset > CompletableFuture> registerNewAsset registerNewAsset(registerNewAssetRequest, idempotencyKey) diff --git a/docs/BlockchainsAssetsBetaApi.md b/docs/BlockchainsAssetsBetaApi.md deleted file mode 100644 index b748f5dc..00000000 --- a/docs/BlockchainsAssetsBetaApi.md +++ /dev/null @@ -1,374 +0,0 @@ -# BlockchainsAssetsBetaApi - -All URIs are relative to https://developers.fireblocks.com/reference/ - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**getAssetById**](BlockchainsAssetsBetaApi.md#getAssetById) | **GET** /assets/{id} | Get an asset | -| [**getBlockchainById**](BlockchainsAssetsBetaApi.md#getBlockchainById) | **GET** /blockchains/{id} | Get an blockchain | -| [**listAssets**](BlockchainsAssetsBetaApi.md#listAssets) | **GET** /assets | List assets | -| [**listBlockchains**](BlockchainsAssetsBetaApi.md#listBlockchains) | **GET** /blockchains | List blockchains | - - - -## getAssetById - -> CompletableFuture> getAssetById getAssetById(id, idempotencyKey) - -Get an asset - -Returns an asset by ID or legacyID.</br> **Note**: - This endpoint is now in Beta, disabled for general availability at this time. - -### 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.BlockchainsAssetsBetaApi; -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 id = "ETH"; // String | The ID or legacyId of the asset - String idempotencyKey = "idempotencyKey_example"; // String | 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. - try { - CompletableFuture> response = fireblocks.blockchainsAssetsBeta().getAssetById(id, idempotencyKey); - 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 BlockchainsAssetsBetaApi#getAssetById"); - System.err.println("Status code: " + apiException.getCode()); - System.err.println("Response headers: " + apiException.getResponseHeaders()); - System.err.println("Reason: " + apiException.getResponseBody()); - e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainsAssetsBetaApi#getAssetById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **String**| The ID or legacyId of the asset | | -| **idempotencyKey** | **String**| 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 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** | Asset with requested identification | * X-Request-ID -
| -| **404** | - Asset with specified ID or legacy ID is not found. Error code 1504 | - | -| **500** | Error occurred while getting an asset | - | -| **0** | Error Response | * X-Request-ID -
| - - -## getBlockchainById - -> CompletableFuture> getBlockchainById getBlockchainById(id) - -Get an blockchain - -Returns an blockchain by ID or legacyID.</br> **Note**: - This endpoint is now in Beta, disabled for general availability at this time. - -### 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.BlockchainsAssetsBetaApi; -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 id = "ETH"; // String | The ID or legacyId of the blockchain - try { - CompletableFuture> response = fireblocks.blockchainsAssetsBeta().getBlockchainById(id); - 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 BlockchainsAssetsBetaApi#getBlockchainById"); - System.err.println("Status code: " + apiException.getCode()); - System.err.println("Response headers: " + apiException.getResponseHeaders()); - System.err.println("Reason: " + apiException.getResponseBody()); - e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainsAssetsBetaApi#getBlockchainById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **id** | **String**| The ID or legacyId of the blockchain | | - -### 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** | Blockchain with requested identification | * X-Request-ID -
| -| **404** | - Blockchain with specified ID or legacy ID is not found. Error code 1505 | - | -| **500** | Error occurred while getting an blockchain | - | -| **0** | Error Response | * X-Request-ID -
| - - -## listAssets - -> CompletableFuture> listAssets listAssets(blockchainId, assetClass, symbol, scope, deprecated, pageCursor, pageSize, idempotencyKey) - -List assets - -Returns all asset type supported by Fireblocks.</br> **Note**: - This endpoint is now in Beta, disabled for general availability at this time. - -### 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.BlockchainsAssetsBetaApi; -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 blockchainId = "0f672204-a28b-464a-b318-a387abd3d3c7"; // String | Blockchain id of the assets - AssetClassBeta assetClass = AssetClassBeta.fromValue("NATIVE"); // AssetClassBeta | Assets class - String symbol = "ETH"; // String | Assets onchain symbol - String scope = "Global"; // String | Scope of the assets - Boolean deprecated = false; // Boolean | Are assets deprecated - String pageCursor = "MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA=="; // String | Next page cursor to fetch - BigDecimal pageSize = new BigDecimal("500"); // BigDecimal | Items per page - String idempotencyKey = "idempotencyKey_example"; // String | 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. - try { - CompletableFuture> response = fireblocks.blockchainsAssetsBeta().listAssets(blockchainId, assetClass, symbol, scope, deprecated, pageCursor, pageSize, idempotencyKey); - 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 BlockchainsAssetsBetaApi#listAssets"); - System.err.println("Status code: " + apiException.getCode()); - System.err.println("Response headers: " + apiException.getResponseHeaders()); - System.err.println("Reason: " + apiException.getResponseBody()); - e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainsAssetsBetaApi#listAssets"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **blockchainId** | **String**| Blockchain id of the assets | [optional] | -| **assetClass** | [**AssetClassBeta**](.md)| Assets class | [optional] [enum: NATIVE, FT, FIAT, NFT, SFT] | -| **symbol** | **String**| Assets onchain symbol | [optional] | -| **scope** | **String**| Scope of the assets | [optional] [enum: Global, Local] | -| **deprecated** | **Boolean**| Are assets deprecated | [optional] | -| **pageCursor** | **String**| Next page cursor to fetch | [optional] | -| **pageSize** | **BigDecimal**| Items per page | [optional] [default to 500] | -| **idempotencyKey** | **String**| 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 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** | List of assets | - | -| **500** | Error occurred while listing assets | - | -| **0** | Error Response | * X-Request-ID -
| - - -## listBlockchains - -> CompletableFuture> listBlockchains listBlockchains(protocol, deprecated, test, pageCursor, pageSize) - -List blockchains - -Returns all blockchains supported by Fireblocks.</br> **Note**: - This endpoint is now in Beta, disabled for general availability at this time. - -### 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.BlockchainsAssetsBetaApi; -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 protocol = "SOL"; // String | Blockchain protocol - Boolean deprecated = false; // Boolean | Is blockchain deprecated - Boolean test = false; // Boolean | Is test blockchain - String pageCursor = "MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA=="; // String | Page cursor to fetch - BigDecimal pageSize = new BigDecimal("500"); // BigDecimal | Items per page (max 500) - try { - CompletableFuture> response = fireblocks.blockchainsAssetsBeta().listBlockchains(protocol, deprecated, test, pageCursor, pageSize); - 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 BlockchainsAssetsBetaApi#listBlockchains"); - System.err.println("Status code: " + apiException.getCode()); - System.err.println("Response headers: " + apiException.getResponseHeaders()); - System.err.println("Reason: " + apiException.getResponseBody()); - e.printStackTrace(); - } catch (ApiException e) { - System.err.println("Exception when calling BlockchainsAssetsBetaApi#listBlockchains"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Response headers: " + e.getResponseHeaders()); - System.err.println("Reason: " + e.getResponseBody()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **protocol** | **String**| Blockchain protocol | [optional] | -| **deprecated** | **Boolean**| Is blockchain deprecated | [optional] | -| **test** | **Boolean**| Is test blockchain | [optional] | -| **pageCursor** | **String**| Page cursor to fetch | [optional] | -| **pageSize** | **BigDecimal**| Items per page (max 500) | [optional] [default to 500] | - -### 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** | List of supported blockchains | - | -| **500** | Error occurred while listing blockchains | - | -| **0** | Error Response | * X-Request-ID -
| - diff --git a/docs/ListAssetsResponse.md b/docs/ListAssetsResponse.md index d25f90d5..c4f718c7 100644 --- a/docs/ListAssetsResponse.md +++ b/docs/ListAssetsResponse.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**data** | [**List<AssetResponseBeta>**](AssetResponseBeta.md) | The data of the current page | | +|**data** | [**List<Asset>**](Asset.md) | The data of the current page | | |**next** | **String** | Cursor to the next page | | diff --git a/pom.xml b/pom.xml index 6aa110af..94938f50 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 9.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 631e521f..9ec56d09 100644 --- a/src/main/java/com/fireblocks/sdk/Configuration.java +++ b/src/main/java/com/fireblocks/sdk/Configuration.java @@ -14,7 +14,7 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { - public static final String VERSION = "9.0.0"; + public static final String VERSION = "0.0.0"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/com/fireblocks/sdk/Fireblocks.java b/src/main/java/com/fireblocks/sdk/Fireblocks.java index b9afd3a6..a42ce29e 100644 --- a/src/main/java/com/fireblocks/sdk/Fireblocks.java +++ b/src/main/java/com/fireblocks/sdk/Fireblocks.java @@ -40,7 +40,6 @@ public class Fireblocks { private AssetsApi assets; private AuditLogsApi auditLogs; private BlockchainsAssetsApi blockchainsAssets; - private BlockchainsAssetsBetaApi blockchainsAssetsBeta; private ComplianceApi compliance; private ComplianceScreeningConfigurationApi complianceScreeningConfiguration; private ConsoleUserApi consoleUser; @@ -245,13 +244,6 @@ public BlockchainsAssetsApi blockchainsAssets() { return blockchainsAssets; } - public BlockchainsAssetsBetaApi blockchainsAssetsBeta() { - if (blockchainsAssetsBeta == null) { - blockchainsAssetsBeta = new BlockchainsAssetsBetaApi(apiClient); - } - return blockchainsAssetsBeta; - } - public ComplianceApi compliance() { if (compliance == null) { compliance = new ComplianceApi(apiClient); diff --git a/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java b/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java index 65b5b48e..a7dfd471 100644 --- a/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java @@ -18,20 +18,30 @@ import com.fireblocks.sdk.ApiClient; import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; +import com.fireblocks.sdk.model.Asset; +import com.fireblocks.sdk.model.AssetClass; import com.fireblocks.sdk.model.AssetPriceResponse; import com.fireblocks.sdk.model.AssetResponse; +import com.fireblocks.sdk.model.AssetScope; import com.fireblocks.sdk.model.AssetTypeResponse; +import com.fireblocks.sdk.model.BlockchainResponse; +import com.fireblocks.sdk.model.ListAssetsResponse; +import com.fireblocks.sdk.model.ListBlockchainsResponse; import com.fireblocks.sdk.model.RegisterNewAssetRequest; import com.fireblocks.sdk.model.SetAssetPriceRequest; import java.io.IOException; import java.io.InputStream; +import java.math.BigDecimal; 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.CompletableFuture; import java.util.function.Consumer; @@ -74,7 +84,148 @@ private String formatExceptionMessage(String operationId, int statusCode, String } /** - * List all asset types supported by Fireblocks Returns all asset types supported by Fireblocks. + * Get an asset Returns an asset by ID or legacyID.</br> **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. + * + * @param id The ID or legacyId of the asset (required) + * @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 + */ + public CompletableFuture> getAsset(String id, String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = getAssetRequestBuilder(id, idempotencyKey); + 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("getAsset", 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< + Asset>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getAssetRequestBuilder(String id, String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("getAsset", "id", id); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/assets/{id}".replace("{id}", ApiClient.urlEncode(id.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + 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; + } + /** + * Get an blockchain Returns an 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 + */ + public CompletableFuture> getBlockchain(String id) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = getBlockchainRequestBuilder(id); + 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("getBlockchain", 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< + BlockchainResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getBlockchainRequestBuilder(String id) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("getBlockchain", "id", id); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/blockchains/{id}".replace("{id}", ApiClient.urlEncode(id.toString())); + + 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; + } + /** + * List all asset types supported by Fireblocks - legacy endpoint Legacy Endpoint – Retrieves + * all assets supported by Fireblocks in your workspace without extended information.</br> + * **Note**: - This endpoint will remain available for the foreseeable future and is not + * deprecated.</br> - The `listAssets` endpoint provides more detailed asset + * information and improved performance.</br> - We recommend transitioning to the + * `listAssets` endpoint for better results. * * @return CompletableFuture<ApiResponse<List<AssetTypeResponse>>> * @throws ApiException if fails to make API call @@ -136,6 +287,240 @@ private HttpRequest.Builder getSupportedAssetsRequestBuilder() throws ApiExcepti } return localVarRequestBuilder; } + /** + * List assets Retrieves all assets supported by Fireblocks in your workspace, providing + * extended information and enhanced performance compared to the legacy + * `supported_assets` endpoint.</br> **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.</br> + * + * @param blockchainId Blockchain id of the assets (optional) + * @param assetClass Assets class (optional) + * @param symbol Assets onchain symbol (optional) + * @param scope Scope of the assets (optional) + * @param deprecated Are assets deprecated (optional) + * @param pageCursor Next page cursor to fetch (optional) + * @param pageSize Items per page (optional, default to 500) + * @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 + */ + public CompletableFuture> listAssets( + String blockchainId, + AssetClass assetClass, + String symbol, + AssetScope scope, + Boolean deprecated, + String pageCursor, + BigDecimal pageSize, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + listAssetsRequestBuilder( + blockchainId, + assetClass, + symbol, + scope, + deprecated, + pageCursor, + pageSize, + idempotencyKey); + 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("listAssets", 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< + ListAssetsResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder listAssetsRequestBuilder( + String blockchainId, + AssetClass assetClass, + String symbol, + AssetScope scope, + Boolean deprecated, + String pageCursor, + BigDecimal pageSize, + String idempotencyKey) + throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/assets"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "blockchainId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("blockchainId", blockchainId)); + localVarQueryParameterBaseName = "assetClass"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("assetClass", assetClass)); + localVarQueryParameterBaseName = "symbol"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("symbol", symbol)); + localVarQueryParameterBaseName = "scope"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("scope", scope)); + localVarQueryParameterBaseName = "deprecated"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("deprecated", deprecated)); + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + + 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)); + } + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + 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; + } + /** + * List blockchains Returns all blockchains supported by Fireblocks. + * + * @param protocol Blockchain protocol (optional) + * @param deprecated Is blockchain deprecated (optional) + * @param test Is test blockchain (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 + */ + public CompletableFuture> listBlockchains( + String protocol, + Boolean deprecated, + Boolean test, + String pageCursor, + BigDecimal pageSize) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + listBlockchainsRequestBuilder(protocol, deprecated, test, pageCursor, pageSize); + 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("listBlockchains", 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< + ListBlockchainsResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder listBlockchainsRequestBuilder( + String protocol, + Boolean deprecated, + Boolean test, + String pageCursor, + BigDecimal pageSize) + throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/blockchains"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "protocol"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("protocol", protocol)); + localVarQueryParameterBaseName = "deprecated"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("deprecated", deprecated)); + localVarQueryParameterBaseName = "test"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("test", test)); + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + + 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; + } /** * Register an asset Register a new asset to a workspace and return the newly created * asset's details. Currently supported chains are: - EVM based chains - Stellar - Algorand diff --git a/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsBetaApi.java b/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsBetaApi.java deleted file mode 100644 index 19eceec6..00000000 --- a/src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsBetaApi.java +++ /dev/null @@ -1,449 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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.ValidationUtils; -import com.fireblocks.sdk.model.AssetClassBeta; -import com.fireblocks.sdk.model.AssetResponseBeta; -import com.fireblocks.sdk.model.BlockchainResponse; -import com.fireblocks.sdk.model.ListAssetsResponse; -import com.fireblocks.sdk.model.ListBlockchainsResponse; -import java.io.IOException; -import java.io.InputStream; -import java.math.BigDecimal; -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.CompletableFuture; -import java.util.function.Consumer; - -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BlockchainsAssetsBetaApi { - 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 BlockchainsAssetsBetaApi() { - this(new ApiClient()); - } - - public BlockchainsAssetsBetaApi(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()); - } - - 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 an asset Returns an asset by ID or legacyID.</br> **Note**: - This endpoint is now - * in Beta, disabled for general availability at this time. - * - * @param id The ID or legacyId of the asset (required) - * @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<AssetResponseBeta>> - * @throws ApiException if fails to make API call - */ - public CompletableFuture> getAssetById( - String id, String idempotencyKey) throws ApiException { - try { - HttpRequest.Builder localVarRequestBuilder = - getAssetByIdRequestBuilder(id, idempotencyKey); - 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("getAssetById", 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< - AssetResponseBeta>() {}))); - } catch (IOException e) { - return CompletableFuture.failedFuture(new ApiException(e)); - } - }); - } catch (ApiException e) { - return CompletableFuture.failedFuture(e); - } - } - - private HttpRequest.Builder getAssetByIdRequestBuilder(String id, String idempotencyKey) - throws ApiException { - ValidationUtils.assertParamExistsAndNotEmpty("getAssetById", "id", id); - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/assets/{id}".replace("{id}", ApiClient.urlEncode(id.toString())); - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - if (idempotencyKey != null) { - localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); - } - 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; - } - /** - * Get an blockchain Returns an blockchain by ID or legacyID.</br> **Note**: - This - * endpoint is now in Beta, disabled for general availability at this time. - * - * @param id The ID or legacyId of the blockchain (required) - * @return CompletableFuture<ApiResponse<BlockchainResponse>> - * @throws ApiException if fails to make API call - */ - public CompletableFuture> getBlockchainById(String id) - throws ApiException { - try { - HttpRequest.Builder localVarRequestBuilder = getBlockchainByIdRequestBuilder(id); - 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("getBlockchainById", 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< - BlockchainResponse>() {}))); - } catch (IOException e) { - return CompletableFuture.failedFuture(new ApiException(e)); - } - }); - } catch (ApiException e) { - return CompletableFuture.failedFuture(e); - } - } - - private HttpRequest.Builder getBlockchainByIdRequestBuilder(String id) throws ApiException { - ValidationUtils.assertParamExistsAndNotEmpty("getBlockchainById", "id", id); - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = - "/blockchains/{id}".replace("{id}", ApiClient.urlEncode(id.toString())); - - 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; - } - /** - * List assets Returns all asset type supported by Fireblocks.</br> **Note**: - This - * endpoint is now in Beta, disabled for general availability at this time. - * - * @param blockchainId Blockchain id of the assets (optional) - * @param assetClass Assets class (optional) - * @param symbol Assets onchain symbol (optional) - * @param scope Scope of the assets (optional) - * @param deprecated Are assets deprecated (optional) - * @param pageCursor Next page cursor to fetch (optional) - * @param pageSize Items per page (optional, default to 500) - * @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 - */ - public CompletableFuture> listAssets( - String blockchainId, - AssetClassBeta assetClass, - String symbol, - String scope, - Boolean deprecated, - String pageCursor, - BigDecimal pageSize, - String idempotencyKey) - throws ApiException { - try { - HttpRequest.Builder localVarRequestBuilder = - listAssetsRequestBuilder( - blockchainId, - assetClass, - symbol, - scope, - deprecated, - pageCursor, - pageSize, - idempotencyKey); - 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("listAssets", 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< - ListAssetsResponse>() {}))); - } catch (IOException e) { - return CompletableFuture.failedFuture(new ApiException(e)); - } - }); - } catch (ApiException e) { - return CompletableFuture.failedFuture(e); - } - } - - private HttpRequest.Builder listAssetsRequestBuilder( - String blockchainId, - AssetClassBeta assetClass, - String symbol, - String scope, - Boolean deprecated, - String pageCursor, - BigDecimal pageSize, - String idempotencyKey) - throws ApiException { - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/assets"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "blockchainId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("blockchainId", blockchainId)); - localVarQueryParameterBaseName = "assetClass"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("assetClass", assetClass)); - localVarQueryParameterBaseName = "symbol"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("symbol", symbol)); - localVarQueryParameterBaseName = "scope"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("scope", scope)); - localVarQueryParameterBaseName = "deprecated"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("deprecated", deprecated)); - localVarQueryParameterBaseName = "pageCursor"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); - localVarQueryParameterBaseName = "pageSize"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); - - 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)); - } - - if (idempotencyKey != null) { - localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); - } - 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; - } - /** - * List blockchains Returns all blockchains supported by Fireblocks.</br> **Note**: - This - * endpoint is now in Beta, disabled for general availability at this time. - * - * @param protocol Blockchain protocol (optional) - * @param deprecated Is blockchain deprecated (optional) - * @param test Is test blockchain (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 - */ - public CompletableFuture> listBlockchains( - String protocol, - Boolean deprecated, - Boolean test, - String pageCursor, - BigDecimal pageSize) - throws ApiException { - try { - HttpRequest.Builder localVarRequestBuilder = - listBlockchainsRequestBuilder(protocol, deprecated, test, pageCursor, pageSize); - 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("listBlockchains", 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< - ListBlockchainsResponse>() {}))); - } catch (IOException e) { - return CompletableFuture.failedFuture(new ApiException(e)); - } - }); - } catch (ApiException e) { - return CompletableFuture.failedFuture(e); - } - } - - private HttpRequest.Builder listBlockchainsRequestBuilder( - String protocol, - Boolean deprecated, - Boolean test, - String pageCursor, - BigDecimal pageSize) - throws ApiException { - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = "/blockchains"; - - List localVarQueryParams = new ArrayList<>(); - StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); - String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "protocol"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("protocol", protocol)); - localVarQueryParameterBaseName = "deprecated"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("deprecated", deprecated)); - localVarQueryParameterBaseName = "test"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("test", test)); - localVarQueryParameterBaseName = "pageCursor"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); - localVarQueryParameterBaseName = "pageSize"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); - - 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/model/AssetResponseBeta.java b/src/main/java/com/fireblocks/sdk/model/Asset.java similarity index 81% rename from src/main/java/com/fireblocks/sdk/model/AssetResponseBeta.java rename to src/main/java/com/fireblocks/sdk/model/Asset.java index e941f760..9cb23c2e 100644 --- a/src/main/java/com/fireblocks/sdk/model/AssetResponseBeta.java +++ b/src/main/java/com/fireblocks/sdk/model/Asset.java @@ -21,19 +21,19 @@ import java.util.Objects; import java.util.StringJoiner; -/** AssetResponseBeta */ +/** Asset */ @JsonPropertyOrder({ - AssetResponseBeta.JSON_PROPERTY_ID, - AssetResponseBeta.JSON_PROPERTY_LEGACY_ID, - AssetResponseBeta.JSON_PROPERTY_BLOCKCHAIN_ID, - AssetResponseBeta.JSON_PROPERTY_DISPLAY_NAME, - AssetResponseBeta.JSON_PROPERTY_DISPLAY_SYMBOL, - AssetResponseBeta.JSON_PROPERTY_ASSET_CLASS, - AssetResponseBeta.JSON_PROPERTY_ONCHAIN, - AssetResponseBeta.JSON_PROPERTY_METADATA + Asset.JSON_PROPERTY_ID, + Asset.JSON_PROPERTY_LEGACY_ID, + Asset.JSON_PROPERTY_BLOCKCHAIN_ID, + Asset.JSON_PROPERTY_DISPLAY_NAME, + Asset.JSON_PROPERTY_DISPLAY_SYMBOL, + Asset.JSON_PROPERTY_ASSET_CLASS, + Asset.JSON_PROPERTY_ONCHAIN, + Asset.JSON_PROPERTY_METADATA }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AssetResponseBeta { +public class Asset { public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -50,17 +50,17 @@ public class AssetResponseBeta { private String displaySymbol; public static final String JSON_PROPERTY_ASSET_CLASS = "assetClass"; - private AssetClassBeta assetClass; + private AssetClass assetClass; public static final String JSON_PROPERTY_ONCHAIN = "onchain"; - private AssetOnchainBeta onchain; + private AssetDetailsOnchain onchain; public static final String JSON_PROPERTY_METADATA = "metadata"; - private AssetMetadataBeta metadata; + private AssetDetailsMetadata metadata; - public AssetResponseBeta() {} + public Asset() {} - public AssetResponseBeta id(String id) { + public Asset id(String id) { this.id = id; return this; } @@ -83,7 +83,7 @@ public void setId(String id) { this.id = id; } - public AssetResponseBeta legacyId(String legacyId) { + public Asset legacyId(String legacyId) { this.legacyId = legacyId; return this; } @@ -106,7 +106,7 @@ public void setLegacyId(String legacyId) { this.legacyId = legacyId; } - public AssetResponseBeta blockchainId(String blockchainId) { + public Asset blockchainId(String blockchainId) { this.blockchainId = blockchainId; return this; } @@ -129,7 +129,7 @@ public void setBlockchainId(String blockchainId) { this.blockchainId = blockchainId; } - public AssetResponseBeta displayName(String displayName) { + public Asset displayName(String displayName) { this.displayName = displayName; return this; } @@ -139,20 +139,20 @@ public AssetResponseBeta displayName(String displayName) { * * @return displayName */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getDisplayName() { return displayName; } @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setDisplayName(String displayName) { this.displayName = displayName; } - public AssetResponseBeta displaySymbol(String displaySymbol) { + public Asset displaySymbol(String displaySymbol) { this.displaySymbol = displaySymbol; return this; } @@ -162,20 +162,20 @@ public AssetResponseBeta displaySymbol(String displaySymbol) { * * @return displaySymbol */ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_DISPLAY_SYMBOL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getDisplaySymbol() { return displaySymbol; } @JsonProperty(JSON_PROPERTY_DISPLAY_SYMBOL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setDisplaySymbol(String displaySymbol) { this.displaySymbol = displaySymbol; } - public AssetResponseBeta assetClass(AssetClassBeta assetClass) { + public Asset assetClass(AssetClass assetClass) { this.assetClass = assetClass; return this; } @@ -188,17 +188,17 @@ public AssetResponseBeta assetClass(AssetClassBeta assetClass) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_ASSET_CLASS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AssetClassBeta getAssetClass() { + public AssetClass getAssetClass() { return assetClass; } @JsonProperty(JSON_PROPERTY_ASSET_CLASS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAssetClass(AssetClassBeta assetClass) { + public void setAssetClass(AssetClass assetClass) { this.assetClass = assetClass; } - public AssetResponseBeta onchain(AssetOnchainBeta onchain) { + public Asset onchain(AssetDetailsOnchain onchain) { this.onchain = onchain; return this; } @@ -211,17 +211,17 @@ public AssetResponseBeta onchain(AssetOnchainBeta onchain) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ONCHAIN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AssetOnchainBeta getOnchain() { + public AssetDetailsOnchain getOnchain() { return onchain; } @JsonProperty(JSON_PROPERTY_ONCHAIN) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOnchain(AssetOnchainBeta onchain) { + public void setOnchain(AssetDetailsOnchain onchain) { this.onchain = onchain; } - public AssetResponseBeta metadata(AssetMetadataBeta metadata) { + public Asset metadata(AssetDetailsMetadata metadata) { this.metadata = metadata; return this; } @@ -234,17 +234,17 @@ public AssetResponseBeta metadata(AssetMetadataBeta metadata) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public AssetMetadataBeta getMetadata() { + public AssetDetailsMetadata getMetadata() { return metadata; } @JsonProperty(JSON_PROPERTY_METADATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setMetadata(AssetMetadataBeta metadata) { + public void setMetadata(AssetDetailsMetadata metadata) { this.metadata = metadata; } - /** Return true if this AssetResponseBeta object is equal to o. */ + /** Return true if this Asset object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -253,15 +253,15 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AssetResponseBeta assetResponseBeta = (AssetResponseBeta) o; - return Objects.equals(this.id, assetResponseBeta.id) - && Objects.equals(this.legacyId, assetResponseBeta.legacyId) - && Objects.equals(this.blockchainId, assetResponseBeta.blockchainId) - && Objects.equals(this.displayName, assetResponseBeta.displayName) - && Objects.equals(this.displaySymbol, assetResponseBeta.displaySymbol) - && Objects.equals(this.assetClass, assetResponseBeta.assetClass) - && Objects.equals(this.onchain, assetResponseBeta.onchain) - && Objects.equals(this.metadata, assetResponseBeta.metadata); + Asset asset = (Asset) o; + return Objects.equals(this.id, asset.id) + && Objects.equals(this.legacyId, asset.legacyId) + && Objects.equals(this.blockchainId, asset.blockchainId) + && Objects.equals(this.displayName, asset.displayName) + && Objects.equals(this.displaySymbol, asset.displaySymbol) + && Objects.equals(this.assetClass, asset.assetClass) + && Objects.equals(this.onchain, asset.onchain) + && Objects.equals(this.metadata, asset.metadata); } @Override @@ -280,7 +280,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AssetResponseBeta {\n"); + sb.append("class Asset {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" legacyId: ").append(toIndentedString(legacyId)).append("\n"); sb.append(" blockchainId: ").append(toIndentedString(blockchainId)).append("\n"); diff --git a/src/main/java/com/fireblocks/sdk/model/AssetClassBeta.java b/src/main/java/com/fireblocks/sdk/model/AssetClass.java similarity index 86% rename from src/main/java/com/fireblocks/sdk/model/AssetClassBeta.java rename to src/main/java/com/fireblocks/sdk/model/AssetClass.java index b8cdef41..32c863ca 100644 --- a/src/main/java/com/fireblocks/sdk/model/AssetClassBeta.java +++ b/src/main/java/com/fireblocks/sdk/model/AssetClass.java @@ -16,8 +16,8 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Gets or Sets AssetClassBeta */ -public enum AssetClassBeta { +/** Gets or Sets AssetClass */ +public enum AssetClass { NATIVE("NATIVE"), FT("FT"), @@ -30,7 +30,7 @@ public enum AssetClassBeta { private String value; - AssetClassBeta(String value) { + AssetClass(String value) { this.value = value; } @@ -45,8 +45,8 @@ public String toString() { } @JsonCreator - public static AssetClassBeta fromValue(String value) { - for (AssetClassBeta b : AssetClassBeta.values()) { + public static AssetClass fromValue(String value) { + for (AssetClass b : AssetClass.values()) { if (b.value.equals(value)) { return b; } diff --git a/src/main/java/com/fireblocks/sdk/model/AssetMetadataBeta.java b/src/main/java/com/fireblocks/sdk/model/AssetDetailsMetadata.java similarity index 72% rename from src/main/java/com/fireblocks/sdk/model/AssetMetadataBeta.java rename to src/main/java/com/fireblocks/sdk/model/AssetDetailsMetadata.java index d7adc853..e6dcc810 100644 --- a/src/main/java/com/fireblocks/sdk/model/AssetMetadataBeta.java +++ b/src/main/java/com/fireblocks/sdk/model/AssetDetailsMetadata.java @@ -13,11 +13,9 @@ 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 java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.ArrayList; @@ -25,52 +23,18 @@ import java.util.Objects; import java.util.StringJoiner; -/** AssetMetadataBeta */ +/** AssetDetailsMetadata */ @JsonPropertyOrder({ - AssetMetadataBeta.JSON_PROPERTY_SCOPE, - AssetMetadataBeta.JSON_PROPERTY_DEPRECATED, - AssetMetadataBeta.JSON_PROPERTY_DEPRECATION_REFERRAL_ID, - AssetMetadataBeta.JSON_PROPERTY_VERIFIED, - AssetMetadataBeta.JSON_PROPERTY_WEBSITE, - AssetMetadataBeta.JSON_PROPERTY_MEDIA + AssetDetailsMetadata.JSON_PROPERTY_SCOPE, + AssetDetailsMetadata.JSON_PROPERTY_DEPRECATED, + AssetDetailsMetadata.JSON_PROPERTY_DEPRECATION_REFERRAL_ID, + AssetDetailsMetadata.JSON_PROPERTY_WEBSITE, + AssetDetailsMetadata.JSON_PROPERTY_MEDIA }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AssetMetadataBeta { - /** The scope of the asset */ - public enum ScopeEnum { - GLOBAL("Global"), - - LOCAL("Local"); - - private String value; - - ScopeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ScopeEnum fromValue(String value) { - for (ScopeEnum b : ScopeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - +public class AssetDetailsMetadata { public static final String JSON_PROPERTY_SCOPE = "scope"; - private ScopeEnum scope; + private AssetScope scope; public static final String JSON_PROPERTY_DEPRECATED = "deprecated"; private Boolean deprecated; @@ -78,41 +42,38 @@ public static ScopeEnum fromValue(String value) { public static final String JSON_PROPERTY_DEPRECATION_REFERRAL_ID = "deprecationReferralId"; private String deprecationReferralId; - public static final String JSON_PROPERTY_VERIFIED = "verified"; - private Boolean verified; - public static final String JSON_PROPERTY_WEBSITE = "website"; private String website; public static final String JSON_PROPERTY_MEDIA = "media"; private List media; - public AssetMetadataBeta() {} + public AssetDetailsMetadata() {} - public AssetMetadataBeta scope(ScopeEnum scope) { + public AssetDetailsMetadata scope(AssetScope scope) { this.scope = scope; return this; } /** - * The scope of the asset + * Get scope * * @return scope */ @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_SCOPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ScopeEnum getScope() { + public AssetScope getScope() { return scope; } @JsonProperty(JSON_PROPERTY_SCOPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setScope(ScopeEnum scope) { + public void setScope(AssetScope scope) { this.scope = scope; } - public AssetMetadataBeta deprecated(Boolean deprecated) { + public AssetDetailsMetadata deprecated(Boolean deprecated) { this.deprecated = deprecated; return this; } @@ -135,7 +96,7 @@ public void setDeprecated(Boolean deprecated) { this.deprecated = deprecated; } - public AssetMetadataBeta deprecationReferralId(String deprecationReferralId) { + public AssetDetailsMetadata deprecationReferralId(String deprecationReferralId) { this.deprecationReferralId = deprecationReferralId; return this; } @@ -158,30 +119,7 @@ public void setDeprecationReferralId(String deprecationReferralId) { this.deprecationReferralId = deprecationReferralId; } - public AssetMetadataBeta verified(Boolean verified) { - this.verified = verified; - return this; - } - - /** - * Is asset verified by Fireblocks - * - * @return verified - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_VERIFIED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getVerified() { - return verified; - } - - @JsonProperty(JSON_PROPERTY_VERIFIED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVerified(Boolean verified) { - this.verified = verified; - } - - public AssetMetadataBeta website(String website) { + public AssetDetailsMetadata website(String website) { this.website = website; return this; } @@ -204,12 +142,12 @@ public void setWebsite(String website) { this.website = website; } - public AssetMetadataBeta media(List media) { + public AssetDetailsMetadata media(List media) { this.media = media; return this; } - public AssetMetadataBeta addMediaItem(AssetMedia mediaItem) { + public AssetDetailsMetadata addMediaItem(AssetMedia mediaItem) { if (this.media == null) { this.media = new ArrayList<>(); } @@ -235,7 +173,7 @@ public void setMedia(List media) { this.media = media; } - /** Return true if this AssetMetadataBeta object is equal to o. */ + /** Return true if this AssetDetailsMetadata object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -244,31 +182,29 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AssetMetadataBeta assetMetadataBeta = (AssetMetadataBeta) o; - return Objects.equals(this.scope, assetMetadataBeta.scope) - && Objects.equals(this.deprecated, assetMetadataBeta.deprecated) + AssetDetailsMetadata assetDetailsMetadata = (AssetDetailsMetadata) o; + return Objects.equals(this.scope, assetDetailsMetadata.scope) + && Objects.equals(this.deprecated, assetDetailsMetadata.deprecated) && Objects.equals( - this.deprecationReferralId, assetMetadataBeta.deprecationReferralId) - && Objects.equals(this.verified, assetMetadataBeta.verified) - && Objects.equals(this.website, assetMetadataBeta.website) - && Objects.equals(this.media, assetMetadataBeta.media); + this.deprecationReferralId, assetDetailsMetadata.deprecationReferralId) + && Objects.equals(this.website, assetDetailsMetadata.website) + && Objects.equals(this.media, assetDetailsMetadata.media); } @Override public int hashCode() { - return Objects.hash(scope, deprecated, deprecationReferralId, verified, website, media); + return Objects.hash(scope, deprecated, deprecationReferralId, website, media); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AssetMetadataBeta {\n"); + sb.append("class AssetDetailsMetadata {\n"); sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); sb.append(" deprecated: ").append(toIndentedString(deprecated)).append("\n"); sb.append(" deprecationReferralId: ") .append(toIndentedString(deprecationReferralId)) .append("\n"); - sb.append(" verified: ").append(toIndentedString(verified)).append("\n"); sb.append(" website: ").append(toIndentedString(website)).append("\n"); sb.append(" media: ").append(toIndentedString(media)).append("\n"); sb.append("}"); @@ -354,17 +290,6 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } - // add `verified` to the URL query string - if (getVerified() != null) { - joiner.add( - String.format( - "%sverified%s=%s", - prefix, - suffix, - URLEncoder.encode(String.valueOf(getVerified()), StandardCharsets.UTF_8) - .replaceAll("\\+", "%20"))); - } - // add `website` to the URL query string if (getWebsite() != null) { joiner.add( diff --git a/src/main/java/com/fireblocks/sdk/model/AssetOnchainBeta.java b/src/main/java/com/fireblocks/sdk/model/AssetDetailsOnchain.java similarity index 87% rename from src/main/java/com/fireblocks/sdk/model/AssetOnchainBeta.java rename to src/main/java/com/fireblocks/sdk/model/AssetDetailsOnchain.java index 1dc83554..34c31fc3 100644 --- a/src/main/java/com/fireblocks/sdk/model/AssetOnchainBeta.java +++ b/src/main/java/com/fireblocks/sdk/model/AssetDetailsOnchain.java @@ -24,16 +24,16 @@ import java.util.Objects; import java.util.StringJoiner; -/** AssetOnchainBeta */ +/** AssetDetailsOnchain */ @JsonPropertyOrder({ - AssetOnchainBeta.JSON_PROPERTY_SYMBOL, - AssetOnchainBeta.JSON_PROPERTY_NAME, - AssetOnchainBeta.JSON_PROPERTY_ADDRESS, - AssetOnchainBeta.JSON_PROPERTY_DECIMALS, - AssetOnchainBeta.JSON_PROPERTY_STANDARDS + AssetDetailsOnchain.JSON_PROPERTY_SYMBOL, + AssetDetailsOnchain.JSON_PROPERTY_NAME, + AssetDetailsOnchain.JSON_PROPERTY_ADDRESS, + AssetDetailsOnchain.JSON_PROPERTY_DECIMALS, + AssetDetailsOnchain.JSON_PROPERTY_STANDARDS }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AssetOnchainBeta { +public class AssetDetailsOnchain { public static final String JSON_PROPERTY_SYMBOL = "symbol"; private String symbol; @@ -49,9 +49,9 @@ public class AssetOnchainBeta { public static final String JSON_PROPERTY_STANDARDS = "standards"; private List standards; - public AssetOnchainBeta() {} + public AssetDetailsOnchain() {} - public AssetOnchainBeta symbol(String symbol) { + public AssetDetailsOnchain symbol(String symbol) { this.symbol = symbol; return this; } @@ -74,7 +74,7 @@ public void setSymbol(String symbol) { this.symbol = symbol; } - public AssetOnchainBeta name(String name) { + public AssetDetailsOnchain name(String name) { this.name = name; return this; } @@ -97,7 +97,7 @@ public void setName(String name) { this.name = name; } - public AssetOnchainBeta address(String address) { + public AssetDetailsOnchain address(String address) { this.address = address; return this; } @@ -120,7 +120,7 @@ public void setAddress(String address) { this.address = address; } - public AssetOnchainBeta decimals(BigDecimal decimals) { + public AssetDetailsOnchain decimals(BigDecimal decimals) { this.decimals = decimals; return this; } @@ -143,12 +143,12 @@ public void setDecimals(BigDecimal decimals) { this.decimals = decimals; } - public AssetOnchainBeta standards(List standards) { + public AssetDetailsOnchain standards(List standards) { this.standards = standards; return this; } - public AssetOnchainBeta addStandardsItem(String standardsItem) { + public AssetDetailsOnchain addStandardsItem(String standardsItem) { if (this.standards == null) { this.standards = new ArrayList<>(); } @@ -174,7 +174,7 @@ public void setStandards(List standards) { this.standards = standards; } - /** Return true if this AssetOnchainBeta object is equal to o. */ + /** Return true if this AssetDetailsOnchain object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -183,12 +183,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AssetOnchainBeta assetOnchainBeta = (AssetOnchainBeta) o; - return Objects.equals(this.symbol, assetOnchainBeta.symbol) - && Objects.equals(this.name, assetOnchainBeta.name) - && Objects.equals(this.address, assetOnchainBeta.address) - && Objects.equals(this.decimals, assetOnchainBeta.decimals) - && Objects.equals(this.standards, assetOnchainBeta.standards); + AssetDetailsOnchain assetDetailsOnchain = (AssetDetailsOnchain) o; + return Objects.equals(this.symbol, assetDetailsOnchain.symbol) + && Objects.equals(this.name, assetDetailsOnchain.name) + && Objects.equals(this.address, assetDetailsOnchain.address) + && Objects.equals(this.decimals, assetDetailsOnchain.decimals) + && Objects.equals(this.standards, assetDetailsOnchain.standards); } @Override @@ -199,7 +199,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AssetOnchainBeta {\n"); + sb.append("class AssetDetailsOnchain {\n"); sb.append(" symbol: ").append(toIndentedString(symbol)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); diff --git a/src/main/java/com/fireblocks/sdk/model/AssetScope.java b/src/main/java/com/fireblocks/sdk/model/AssetScope.java new file mode 100644 index 00000000..ec07d078 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetScope.java @@ -0,0 +1,64 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.JsonValue; + +/** The scope of the asset */ +public enum AssetScope { + GLOBAL("GLOBAL"), + + LOCAL("LOCAL"); + + private String value; + + AssetScope(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AssetScope fromValue(String value) { + for (AssetScope b : AssetScope.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + if (prefix == null) { + prefix = ""; + } + + return String.format("%s=%s", prefix, this.toString()); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/BlockchainMetadata.java b/src/main/java/com/fireblocks/sdk/model/BlockchainMetadata.java index 6c3b1a1b..5009859d 100644 --- a/src/main/java/com/fireblocks/sdk/model/BlockchainMetadata.java +++ b/src/main/java/com/fireblocks/sdk/model/BlockchainMetadata.java @@ -13,11 +13,9 @@ 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 java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.ArrayList; @@ -34,41 +32,8 @@ }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class BlockchainMetadata { - /** Is blockchain listed on all workspaces? Global or Local */ - public enum ScopeEnum { - GLOBAL("Global"), - - LOCAL("Local"); - - private String value; - - ScopeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ScopeEnum fromValue(String value) { - for (ScopeEnum b : ScopeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - public static final String JSON_PROPERTY_SCOPE = "scope"; - private ScopeEnum scope; + private AssetScope scope; public static final String JSON_PROPERTY_DEPRECATED = "deprecated"; private Boolean deprecated; @@ -81,26 +46,26 @@ public static ScopeEnum fromValue(String value) { public BlockchainMetadata() {} - public BlockchainMetadata scope(ScopeEnum scope) { + public BlockchainMetadata scope(AssetScope scope) { this.scope = scope; return this; } /** - * Is blockchain listed on all workspaces? Global or Local + * Get scope * * @return scope */ @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_SCOPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ScopeEnum getScope() { + public AssetScope getScope() { return scope; } @JsonProperty(JSON_PROPERTY_SCOPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setScope(ScopeEnum scope) { + public void setScope(AssetScope scope) { this.scope = scope; } diff --git a/src/main/java/com/fireblocks/sdk/model/ListAssetsResponse.java b/src/main/java/com/fireblocks/sdk/model/ListAssetsResponse.java index 14456388..5e4e7259 100644 --- a/src/main/java/com/fireblocks/sdk/model/ListAssetsResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/ListAssetsResponse.java @@ -28,19 +28,19 @@ @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ListAssetsResponse { public static final String JSON_PROPERTY_DATA = "data"; - private List data = new ArrayList<>(); + private List data = new ArrayList<>(); public static final String JSON_PROPERTY_NEXT = "next"; private String next; public ListAssetsResponse() {} - public ListAssetsResponse data(List data) { + public ListAssetsResponse data(List data) { this.data = data; return this; } - public ListAssetsResponse addDataItem(AssetResponseBeta dataItem) { + public ListAssetsResponse addDataItem(Asset dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -56,13 +56,13 @@ public ListAssetsResponse addDataItem(AssetResponseBeta dataItem) { @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { + public List getData() { return data; } @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setData(List data) { + public void setData(List data) { this.data = data; } diff --git a/src/test/java/com/fireblocks/sdk/FireblocksTest.java b/src/test/java/com/fireblocks/sdk/FireblocksTest.java index b3f4c57a..aa60672b 100644 --- a/src/test/java/com/fireblocks/sdk/FireblocksTest.java +++ b/src/test/java/com/fireblocks/sdk/FireblocksTest.java @@ -387,14 +387,6 @@ public void testGetBlockchainsAssetsApi() { Assert.assertSame(blockchainsAssets, fireblocks.blockchainsAssets()); } - @Test - public void testGetBlockchainsAssetsBetaApi() { - setupFireblocks(true, null, null); - BlockchainsAssetsBetaApi blockchainsAssetsBeta = fireblocks.blockchainsAssetsBeta(); - Assert.assertNotNull(blockchainsAssetsBeta); - Assert.assertSame(blockchainsAssetsBeta, fireblocks.blockchainsAssetsBeta()); - } - @Test public void testGetComplianceApi() { setupFireblocks(true, null, null); diff --git a/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java b/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java index 27d9772f..d065eaf7 100644 --- a/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java @@ -15,11 +15,18 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.Asset; +import com.fireblocks.sdk.model.AssetClass; import com.fireblocks.sdk.model.AssetPriceResponse; import com.fireblocks.sdk.model.AssetResponse; +import com.fireblocks.sdk.model.AssetScope; import com.fireblocks.sdk.model.AssetTypeResponse; +import com.fireblocks.sdk.model.BlockchainResponse; +import com.fireblocks.sdk.model.ListAssetsResponse; +import com.fireblocks.sdk.model.ListBlockchainsResponse; import com.fireblocks.sdk.model.RegisterNewAssetRequest; import com.fireblocks.sdk.model.SetAssetPriceRequest; +import java.math.BigDecimal; import java.util.List; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; @@ -32,9 +39,42 @@ public class BlockchainsAssetsApiTest { private final BlockchainsAssetsApi api = new BlockchainsAssetsApi(); /** - * List all asset types supported by Fireblocks + * Get an asset * - *

Returns all asset types supported by Fireblocks. + *

Returns an asset by ID or legacyID.</br> **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 { + String id = null; + String idempotencyKey = null; + CompletableFuture> response = api.getAsset(id, idempotencyKey); + } + + /** + * Get an blockchain + * + *

Returns an blockchain by ID or legacyID. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getBlockchainTest() throws ApiException { + String id = null; + CompletableFuture> response = api.getBlockchain(id); + } + + /** + * List all asset types supported by Fireblocks - legacy endpoint + * + *

Legacy Endpoint – Retrieves all assets supported by Fireblocks in your workspace without + * extended information.</br> **Note**: - This endpoint will remain available for the + * foreseeable future and is not deprecated.</br> - The `listAssets` endpoint + * provides more detailed asset information and improved performance.</br> - We recommend + * transitioning to the `listAssets` endpoint for better results. * * @throws ApiException if the Api call fails */ @@ -43,6 +83,57 @@ public void getSupportedAssetsTest() throws ApiException { CompletableFuture>> response = api.getSupportedAssets(); } + /** + * List assets + * + *

Retrieves all assets supported by Fireblocks in your workspace, providing extended + * information and enhanced performance compared to the legacy `supported_assets` + * endpoint.</br> **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.</br> + * + * @throws ApiException if the Api call fails + */ + @Test + public void listAssetsTest() throws ApiException { + String blockchainId = null; + AssetClass assetClass = null; + String symbol = null; + AssetScope scope = null; + Boolean deprecated = null; + String pageCursor = null; + BigDecimal pageSize = null; + String idempotencyKey = null; + CompletableFuture> response = + api.listAssets( + blockchainId, + assetClass, + symbol, + scope, + deprecated, + pageCursor, + pageSize, + idempotencyKey); + } + + /** + * List blockchains + * + *

Returns all blockchains supported by Fireblocks. + * + * @throws ApiException if the Api call fails + */ + @Test + public void listBlockchainsTest() throws ApiException { + String protocol = null; + Boolean deprecated = null; + Boolean test = null; + String pageCursor = null; + BigDecimal pageSize = null; + CompletableFuture> response = + api.listBlockchains(protocol, deprecated, test, pageCursor, pageSize); + } + /** * Register an asset * diff --git a/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsBetaApiTest.java deleted file mode 100644 index 24a859ec..00000000 --- a/src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsBetaApiTest.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@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.ApiException; -import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.model.AssetClassBeta; -import com.fireblocks.sdk.model.AssetResponseBeta; -import com.fireblocks.sdk.model.BlockchainResponse; -import com.fireblocks.sdk.model.ListAssetsResponse; -import com.fireblocks.sdk.model.ListBlockchainsResponse; -import java.math.BigDecimal; -import java.util.concurrent.CompletableFuture; -import org.junit.Ignore; -import org.junit.Test; - -/** API tests for BlockchainsAssetsBetaApi */ -@Ignore -public class BlockchainsAssetsBetaApiTest { - - private final BlockchainsAssetsBetaApi api = new BlockchainsAssetsBetaApi(); - - /** - * Get an asset - * - *

Returns an asset by ID or legacyID.</br> **Note**: - This endpoint is now in Beta, - * disabled for general availability at this time. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getAssetByIdTest() throws ApiException { - String id = null; - String idempotencyKey = null; - CompletableFuture> response = - api.getAssetById(id, idempotencyKey); - } - - /** - * Get an blockchain - * - *

Returns an blockchain by ID or legacyID.</br> **Note**: - This endpoint is now in - * Beta, disabled for general availability at this time. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getBlockchainByIdTest() throws ApiException { - String id = null; - CompletableFuture> response = api.getBlockchainById(id); - } - - /** - * List assets - * - *

Returns all asset type supported by Fireblocks.</br> **Note**: - This endpoint is - * now in Beta, disabled for general availability at this time. - * - * @throws ApiException if the Api call fails - */ - @Test - public void listAssetsTest() throws ApiException { - String blockchainId = null; - AssetClassBeta assetClass = null; - String symbol = null; - String scope = null; - Boolean deprecated = null; - String pageCursor = null; - BigDecimal pageSize = null; - String idempotencyKey = null; - CompletableFuture> response = - api.listAssets( - blockchainId, - assetClass, - symbol, - scope, - deprecated, - pageCursor, - pageSize, - idempotencyKey); - } - - /** - * List blockchains - * - *

Returns all blockchains supported by Fireblocks.</br> **Note**: - This endpoint is - * now in Beta, disabled for general availability at this time. - * - * @throws ApiException if the Api call fails - */ - @Test - public void listBlockchainsTest() throws ApiException { - String protocol = null; - Boolean deprecated = null; - Boolean test = null; - String pageCursor = null; - BigDecimal pageSize = null; - CompletableFuture> response = - api.listBlockchains(protocol, deprecated, test, pageCursor, pageSize); - } -} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetClassBetaTest.java b/src/test/java/com/fireblocks/sdk/model/AssetClassTest.java similarity index 70% rename from src/test/java/com/fireblocks/sdk/model/AssetClassBetaTest.java rename to src/test/java/com/fireblocks/sdk/model/AssetClassTest.java index d1429abf..c0065d43 100644 --- a/src/test/java/com/fireblocks/sdk/model/AssetClassBetaTest.java +++ b/src/test/java/com/fireblocks/sdk/model/AssetClassTest.java @@ -15,11 +15,11 @@ import org.junit.Test; -/** Model tests for AssetClassBeta */ -public class AssetClassBetaTest { - /** Model tests for AssetClassBeta */ +/** Model tests for AssetClass */ +public class AssetClassTest { + /** Model tests for AssetClass */ @Test - public void testAssetClassBeta() { - // TODO: test AssetClassBeta + public void testAssetClass() { + // TODO: test AssetClass } } diff --git a/src/test/java/com/fireblocks/sdk/model/AssetMetadataBetaTest.java b/src/test/java/com/fireblocks/sdk/model/AssetDetailsMetadataTest.java similarity index 73% rename from src/test/java/com/fireblocks/sdk/model/AssetMetadataBetaTest.java rename to src/test/java/com/fireblocks/sdk/model/AssetDetailsMetadataTest.java index c892727c..5735084a 100644 --- a/src/test/java/com/fireblocks/sdk/model/AssetMetadataBetaTest.java +++ b/src/test/java/com/fireblocks/sdk/model/AssetDetailsMetadataTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for AssetMetadataBeta */ -public class AssetMetadataBetaTest { - private final AssetMetadataBeta model = new AssetMetadataBeta(); +/** Model tests for AssetDetailsMetadata */ +public class AssetDetailsMetadataTest { + private final AssetDetailsMetadata model = new AssetDetailsMetadata(); - /** Model tests for AssetMetadataBeta */ + /** Model tests for AssetDetailsMetadata */ @Test - public void testAssetMetadataBeta() { - // TODO: test AssetMetadataBeta + public void testAssetDetailsMetadata() { + // TODO: test AssetDetailsMetadata } /** Test the property 'scope' */ @@ -43,12 +43,6 @@ public void deprecationReferralIdTest() { // TODO: test deprecationReferralId } - /** Test the property 'verified' */ - @Test - public void verifiedTest() { - // TODO: test verified - } - /** Test the property 'website' */ @Test public void websiteTest() { diff --git a/src/test/java/com/fireblocks/sdk/model/AssetOnchainBetaTest.java b/src/test/java/com/fireblocks/sdk/model/AssetDetailsOnchainTest.java similarity index 78% rename from src/test/java/com/fireblocks/sdk/model/AssetOnchainBetaTest.java rename to src/test/java/com/fireblocks/sdk/model/AssetDetailsOnchainTest.java index 489e90b4..df9cdd67 100644 --- a/src/test/java/com/fireblocks/sdk/model/AssetOnchainBetaTest.java +++ b/src/test/java/com/fireblocks/sdk/model/AssetDetailsOnchainTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for AssetOnchainBeta */ -public class AssetOnchainBetaTest { - private final AssetOnchainBeta model = new AssetOnchainBeta(); +/** Model tests for AssetDetailsOnchain */ +public class AssetDetailsOnchainTest { + private final AssetDetailsOnchain model = new AssetDetailsOnchain(); - /** Model tests for AssetOnchainBeta */ + /** Model tests for AssetDetailsOnchain */ @Test - public void testAssetOnchainBeta() { - // TODO: test AssetOnchainBeta + public void testAssetDetailsOnchain() { + // TODO: test AssetDetailsOnchain } /** Test the property 'symbol' */ diff --git a/src/test/java/com/fireblocks/sdk/model/AssetScopeTest.java b/src/test/java/com/fireblocks/sdk/model/AssetScopeTest.java new file mode 100644 index 00000000..7d751947 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AssetScopeTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@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.Test; + +/** Model tests for AssetScope */ +public class AssetScopeTest { + /** Model tests for AssetScope */ + @Test + public void testAssetScope() { + // TODO: test AssetScope + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetResponseBetaTest.java b/src/test/java/com/fireblocks/sdk/model/AssetTest.java similarity index 84% rename from src/test/java/com/fireblocks/sdk/model/AssetResponseBetaTest.java rename to src/test/java/com/fireblocks/sdk/model/AssetTest.java index eba130c2..ca9bdc47 100644 --- a/src/test/java/com/fireblocks/sdk/model/AssetResponseBetaTest.java +++ b/src/test/java/com/fireblocks/sdk/model/AssetTest.java @@ -15,14 +15,14 @@ import org.junit.Test; -/** Model tests for AssetResponseBeta */ -public class AssetResponseBetaTest { - private final AssetResponseBeta model = new AssetResponseBeta(); +/** Model tests for Asset */ +public class AssetTest { + private final Asset model = new Asset(); - /** Model tests for AssetResponseBeta */ + /** Model tests for Asset */ @Test - public void testAssetResponseBeta() { - // TODO: test AssetResponseBeta + public void testAsset() { + // TODO: test Asset } /** Test the property 'id' */