From 89d4915d7add92a26fe04d09b216ae0e8fbc5a04 Mon Sep 17 00:00:00 2001 From: fireblocks_dx_team Date: Mon, 11 Aug 2025 10:48:14 +0000 Subject: [PATCH] Generated SDK #1782 --- .github/workflows/create-pr.yml | 2 +- .openapi-generator/FILES | 30 +- README.md | 35 +- api/openapi.yaml | 825 +++++++++++++----- build.gradle | 2 +- docs/DestinationTransferPeerPathResponse.md | 2 +- docs/EstimatedFeeDetails.md | 16 + docs/EstimatedTransactionFeeResponse.md | 1 + docs/FeeBreakdown.md | 37 + docs/FeeBreakdownOneOf.md | 17 + docs/FeeBreakdownOneOf1.md | 16 + docs/Notification.md | 1 - docs/NotificationAttemptsPaginatedResponse.md | 14 + docs/NotificationWithData.md | 1 - ...endFailedNotificationsJobStatusResponse.md | 27 + docs/ResendFailedNotificationsRequest.md | 14 + docs/ResendFailedNotificationsResponse.md | 13 + docs/SourceTransferPeerPathResponse.md | 2 +- docs/TransactionRequest.md | 1 + docs/TransactionRequestDestination.md | 2 + docs/WebhookEvent.md | 16 +- ...{WebhooksV2BetaApi.md => WebhooksV2Api.md} | 389 +++++++-- pom.xml | 2 +- .../com/fireblocks/sdk/Configuration.java | 2 +- .../java/com/fireblocks/sdk/Fireblocks.java | 10 +- ...hooksV2BetaApi.java => WebhooksV2Api.java} | 360 ++++++-- .../DestinationTransferPeerPathResponse.java | 13 +- .../sdk/model/EstimatedFeeDetails.java | 201 +++++ .../EstimatedTransactionFeeResponse.java | 40 +- .../fireblocks/sdk/model/FeeBreakdown.java | 316 +++++++ .../sdk/model/FeeBreakdownOneOf.java | 263 ++++++ .../sdk/model/FeeBreakdownOneOf1.java | 223 +++++ .../fireblocks/sdk/model/Notification.java | 68 +- ...NotificationAttemptsPaginatedResponse.java | 204 +++++ .../sdk/model/NotificationWithData.java | 65 +- ...dFailedNotificationsJobStatusResponse.java | 304 +++++++ .../ResendFailedNotificationsRequest.java | 208 +++++ .../ResendFailedNotificationsResponse.java | 141 +++ .../model/SourceTransferPeerPathResponse.java | 13 +- .../sdk/model/TransactionRequest.java | 46 + .../model/TransactionRequestDestination.java | 94 +- .../fireblocks/sdk/model/WebhookEvent.java | 19 +- .../com/fireblocks/sdk/FireblocksTest.java | 8 +- ...etaApiTest.java => WebhooksV2ApiTest.java} | 108 ++- .../sdk/model/EstimatedFeeDetailsTest.java | 45 + .../EstimatedTransactionFeeResponseTest.java | 6 + .../sdk/model/FeeBreakdownOneOf1Test.java | 45 + .../sdk/model/FeeBreakdownOneOfTest.java | 51 ++ .../sdk/model/FeeBreakdownTest.java | 51 ++ ...ficationAttemptsPaginatedResponseTest.java | 40 + .../sdk/model/NotificationTest.java | 6 - .../sdk/model/NotificationWithDataTest.java | 6 - ...ledNotificationsJobStatusResponseTest.java | 52 ++ .../ResendFailedNotificationsRequestTest.java | 39 + ...ResendFailedNotificationsResponseTest.java | 33 + .../TransactionRequestDestinationTest.java | 12 + .../sdk/model/TransactionRequestTest.java | 6 + 57 files changed, 3968 insertions(+), 595 deletions(-) create mode 100644 docs/EstimatedFeeDetails.md create mode 100644 docs/FeeBreakdown.md create mode 100644 docs/FeeBreakdownOneOf.md create mode 100644 docs/FeeBreakdownOneOf1.md create mode 100644 docs/NotificationAttemptsPaginatedResponse.md create mode 100644 docs/ResendFailedNotificationsJobStatusResponse.md create mode 100644 docs/ResendFailedNotificationsRequest.md create mode 100644 docs/ResendFailedNotificationsResponse.md rename docs/{WebhooksV2BetaApi.md => WebhooksV2Api.md} (65%) rename src/main/java/com/fireblocks/sdk/api/{WebhooksV2BetaApi.java => WebhooksV2Api.java} (71%) create mode 100644 src/main/java/com/fireblocks/sdk/model/EstimatedFeeDetails.java create mode 100644 src/main/java/com/fireblocks/sdk/model/FeeBreakdown.java create mode 100644 src/main/java/com/fireblocks/sdk/model/FeeBreakdownOneOf.java create mode 100644 src/main/java/com/fireblocks/sdk/model/FeeBreakdownOneOf1.java create mode 100644 src/main/java/com/fireblocks/sdk/model/NotificationAttemptsPaginatedResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ResendFailedNotificationsJobStatusResponse.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ResendFailedNotificationsRequest.java create mode 100644 src/main/java/com/fireblocks/sdk/model/ResendFailedNotificationsResponse.java rename src/test/java/com/fireblocks/sdk/api/{WebhooksV2BetaApiTest.java => WebhooksV2ApiTest.java} (62%) create mode 100644 src/test/java/com/fireblocks/sdk/model/EstimatedFeeDetailsTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/FeeBreakdownOneOf1Test.java create mode 100644 src/test/java/com/fireblocks/sdk/model/FeeBreakdownOneOfTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/FeeBreakdownTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/NotificationAttemptsPaginatedResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ResendFailedNotificationsJobStatusResponseTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ResendFailedNotificationsRequestTest.java create mode 100644 src/test/java/com/fireblocks/sdk/model/ResendFailedNotificationsResponseTest.java diff --git a/.github/workflows/create-pr.yml b/.github/workflows/create-pr.yml index f92a653f..2c0a0625 100644 --- a/.github/workflows/create-pr.yml +++ b/.github/workflows/create-pr.yml @@ -20,6 +20,6 @@ jobs: --body "This PR was automatically generated." \ --base master \ --head ${{ github.ref }} \ - --reviewer asafs932,zoharsf,YoavBZ + --reviewer asafs932,sharonasw,YoavBZ env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index d9996178..1102415b 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -243,6 +243,7 @@ docs/EmbeddedWalletsApi.md docs/ErrorResponse.md docs/ErrorResponseError.md docs/ErrorSchema.md +docs/EstimatedFeeDetails.md docs/EstimatedNetworkFeeResponse.md docs/EstimatedTransactionFeeResponse.md docs/ExchangeAccount.md @@ -260,6 +261,9 @@ docs/ExecutionScreeningOperation.md docs/ExecutionTransferOperation.md docs/ExternalWalletAsset.md docs/ExternalWalletsApi.md +docs/FeeBreakdown.md +docs/FeeBreakdownOneOf.md +docs/FeeBreakdownOneOf1.md docs/FeeInfo.md docs/FeeLevel.md docs/FetchAbiRequestDto.md @@ -339,6 +343,7 @@ docs/NoneNetworkRoutingDest.md docs/NotFoundException.md docs/Notification.md docs/NotificationAttempt.md +docs/NotificationAttemptsPaginatedResponse.md docs/NotificationPaginatedResponse.md docs/NotificationStatus.md docs/NotificationWithData.md @@ -417,6 +422,9 @@ docs/RemoveCollateralRequestBody.md docs/RenameCosigner.md docs/RenameVaultAccountResponse.md docs/RescanTransaction.md +docs/ResendFailedNotificationsJobStatusResponse.md +docs/ResendFailedNotificationsRequest.md +docs/ResendFailedNotificationsResponse.md docs/ResendNotificationsByResourceIdRequest.md docs/ResendTransactionWebhooksRequest.md docs/ResendWebhooksByTransactionIdResponse.md @@ -654,7 +662,7 @@ docs/Webhook.md docs/WebhookEvent.md docs/WebhookPaginatedResponse.md docs/WebhooksApi.md -docs/WebhooksV2BetaApi.md +docs/WebhooksV2Api.md docs/WhitelistIpAddressesApi.md docs/WithdrawRequest.md docs/WorkflowConfigStatus.md @@ -731,7 +739,7 @@ src/main/java/com/fireblocks/sdk/api/UsersApi.java src/main/java/com/fireblocks/sdk/api/VaultsApi.java src/main/java/com/fireblocks/sdk/api/Web3ConnectionsApi.java src/main/java/com/fireblocks/sdk/api/WebhooksApi.java -src/main/java/com/fireblocks/sdk/api/WebhooksV2BetaApi.java +src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java src/main/java/com/fireblocks/sdk/api/WhitelistIpAddressesApi.java src/main/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApi.java src/main/java/com/fireblocks/sdk/model/APIUser.java @@ -957,6 +965,7 @@ src/main/java/com/fireblocks/sdk/model/EmbeddedWalletSetUpStatus.java src/main/java/com/fireblocks/sdk/model/ErrorResponse.java src/main/java/com/fireblocks/sdk/model/ErrorResponseError.java src/main/java/com/fireblocks/sdk/model/ErrorSchema.java +src/main/java/com/fireblocks/sdk/model/EstimatedFeeDetails.java src/main/java/com/fireblocks/sdk/model/EstimatedNetworkFeeResponse.java src/main/java/com/fireblocks/sdk/model/EstimatedTransactionFeeResponse.java src/main/java/com/fireblocks/sdk/model/ExchangeAccount.java @@ -972,6 +981,9 @@ src/main/java/com/fireblocks/sdk/model/ExecutionOperationStatus.java src/main/java/com/fireblocks/sdk/model/ExecutionScreeningOperation.java src/main/java/com/fireblocks/sdk/model/ExecutionTransferOperation.java src/main/java/com/fireblocks/sdk/model/ExternalWalletAsset.java +src/main/java/com/fireblocks/sdk/model/FeeBreakdown.java +src/main/java/com/fireblocks/sdk/model/FeeBreakdownOneOf.java +src/main/java/com/fireblocks/sdk/model/FeeBreakdownOneOf1.java src/main/java/com/fireblocks/sdk/model/FeeInfo.java src/main/java/com/fireblocks/sdk/model/FeeLevel.java src/main/java/com/fireblocks/sdk/model/FetchAbiRequestDto.java @@ -1043,6 +1055,7 @@ src/main/java/com/fireblocks/sdk/model/NoneNetworkRoutingDest.java src/main/java/com/fireblocks/sdk/model/NotFoundException.java src/main/java/com/fireblocks/sdk/model/Notification.java src/main/java/com/fireblocks/sdk/model/NotificationAttempt.java +src/main/java/com/fireblocks/sdk/model/NotificationAttemptsPaginatedResponse.java src/main/java/com/fireblocks/sdk/model/NotificationPaginatedResponse.java src/main/java/com/fireblocks/sdk/model/NotificationStatus.java src/main/java/com/fireblocks/sdk/model/NotificationWithData.java @@ -1117,6 +1130,9 @@ src/main/java/com/fireblocks/sdk/model/RemoveCollateralRequestBody.java src/main/java/com/fireblocks/sdk/model/RenameCosigner.java src/main/java/com/fireblocks/sdk/model/RenameVaultAccountResponse.java src/main/java/com/fireblocks/sdk/model/RescanTransaction.java +src/main/java/com/fireblocks/sdk/model/ResendFailedNotificationsJobStatusResponse.java +src/main/java/com/fireblocks/sdk/model/ResendFailedNotificationsRequest.java +src/main/java/com/fireblocks/sdk/model/ResendFailedNotificationsResponse.java src/main/java/com/fireblocks/sdk/model/ResendNotificationsByResourceIdRequest.java src/main/java/com/fireblocks/sdk/model/ResendTransactionWebhooksRequest.java src/main/java/com/fireblocks/sdk/model/ResendWebhooksByTransactionIdResponse.java @@ -1396,7 +1412,7 @@ src/test/java/com/fireblocks/sdk/api/UsersApiTest.java src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java src/test/java/com/fireblocks/sdk/api/Web3ConnectionsApiTest.java src/test/java/com/fireblocks/sdk/api/WebhooksApiTest.java -src/test/java/com/fireblocks/sdk/api/WebhooksV2BetaApiTest.java +src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java src/test/java/com/fireblocks/sdk/api/WhitelistIpAddressesApiTest.java src/test/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApiTest.java src/test/java/com/fireblocks/sdk/model/APIUserTest.java @@ -1621,6 +1637,7 @@ src/test/java/com/fireblocks/sdk/model/EmbeddedWalletTest.java src/test/java/com/fireblocks/sdk/model/ErrorResponseErrorTest.java src/test/java/com/fireblocks/sdk/model/ErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/ErrorSchemaTest.java +src/test/java/com/fireblocks/sdk/model/EstimatedFeeDetailsTest.java src/test/java/com/fireblocks/sdk/model/EstimatedNetworkFeeResponseTest.java src/test/java/com/fireblocks/sdk/model/EstimatedTransactionFeeResponseTest.java src/test/java/com/fireblocks/sdk/model/ExchangeAccountTest.java @@ -1636,6 +1653,9 @@ src/test/java/com/fireblocks/sdk/model/ExecutionOperationStatusTest.java src/test/java/com/fireblocks/sdk/model/ExecutionScreeningOperationTest.java src/test/java/com/fireblocks/sdk/model/ExecutionTransferOperationTest.java src/test/java/com/fireblocks/sdk/model/ExternalWalletAssetTest.java +src/test/java/com/fireblocks/sdk/model/FeeBreakdownOneOf1Test.java +src/test/java/com/fireblocks/sdk/model/FeeBreakdownOneOfTest.java +src/test/java/com/fireblocks/sdk/model/FeeBreakdownTest.java src/test/java/com/fireblocks/sdk/model/FeeInfoTest.java src/test/java/com/fireblocks/sdk/model/FeeLevelTest.java src/test/java/com/fireblocks/sdk/model/FetchAbiRequestDtoTest.java @@ -1706,6 +1726,7 @@ src/test/java/com/fireblocks/sdk/model/NonWalletQuoteResponseTest.java src/test/java/com/fireblocks/sdk/model/NoneNetworkRoutingDestTest.java src/test/java/com/fireblocks/sdk/model/NotFoundExceptionTest.java src/test/java/com/fireblocks/sdk/model/NotificationAttemptTest.java +src/test/java/com/fireblocks/sdk/model/NotificationAttemptsPaginatedResponseTest.java src/test/java/com/fireblocks/sdk/model/NotificationPaginatedResponseTest.java src/test/java/com/fireblocks/sdk/model/NotificationStatusTest.java src/test/java/com/fireblocks/sdk/model/NotificationTest.java @@ -1781,6 +1802,9 @@ src/test/java/com/fireblocks/sdk/model/RemoveCollateralRequestBodyTest.java src/test/java/com/fireblocks/sdk/model/RenameCosignerTest.java src/test/java/com/fireblocks/sdk/model/RenameVaultAccountResponseTest.java src/test/java/com/fireblocks/sdk/model/RescanTransactionTest.java +src/test/java/com/fireblocks/sdk/model/ResendFailedNotificationsJobStatusResponseTest.java +src/test/java/com/fireblocks/sdk/model/ResendFailedNotificationsRequestTest.java +src/test/java/com/fireblocks/sdk/model/ResendFailedNotificationsResponseTest.java src/test/java/com/fireblocks/sdk/model/ResendNotificationsByResourceIdRequestTest.java src/test/java/com/fireblocks/sdk/model/ResendTransactionWebhooksRequestTest.java src/test/java/com/fireblocks/sdk/model/ResendWebhooksByTransactionIdResponseTest.java diff --git a/README.md b/README.md index bcde6e03..f8c27d9f 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 11.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:11.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-11.0.0.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` @@ -427,15 +427,18 @@ Class | Method | HTTP request | Description *Web3ConnectionsApi* | [**submit**](docs/Web3ConnectionsApi.md#submit) | **PUT** /connections/wc/{id} | Respond to a pending Web3 connection request. *WebhooksApi* | [**resendTransactionWebhooks**](docs/WebhooksApi.md#resendTransactionWebhooks) | **POST** /webhooks/resend/{txId} | Resend failed webhooks for a transaction by ID *WebhooksApi* | [**resendWebhooks**](docs/WebhooksApi.md#resendWebhooks) | **POST** /webhooks/resend | Resend failed webhooks -*WebhooksV2BetaApi* | [**createWebhook**](docs/WebhooksV2BetaApi.md#createWebhook) | **POST** /webhooks | Create new webhook -*WebhooksV2BetaApi* | [**deleteWebhook**](docs/WebhooksV2BetaApi.md#deleteWebhook) | **DELETE** /webhooks/{webhookId} | Delete webhook -*WebhooksV2BetaApi* | [**getNotification**](docs/WebhooksV2BetaApi.md#getNotification) | **GET** /webhooks/{webhookId}/notifications/{notificationId} | Get notification by id -*WebhooksV2BetaApi* | [**getNotifications**](docs/WebhooksV2BetaApi.md#getNotifications) | **GET** /webhooks/{webhookId}/notifications | Get all notifications by webhook id -*WebhooksV2BetaApi* | [**getWebhook**](docs/WebhooksV2BetaApi.md#getWebhook) | **GET** /webhooks/{webhookId} | Get webhook by id -*WebhooksV2BetaApi* | [**getWebhooks**](docs/WebhooksV2BetaApi.md#getWebhooks) | **GET** /webhooks | Get all webhooks -*WebhooksV2BetaApi* | [**resendNotificationById**](docs/WebhooksV2BetaApi.md#resendNotificationById) | **POST** /webhooks/{webhookId}/notifications/{notificationId}/resend | Resend notification by id -*WebhooksV2BetaApi* | [**resendNotificationsByResourceId**](docs/WebhooksV2BetaApi.md#resendNotificationsByResourceId) | **POST** /webhooks/{webhookId}/notifications/resend_by_resource | Resend notifications by resource Id -*WebhooksV2BetaApi* | [**updateWebhook**](docs/WebhooksV2BetaApi.md#updateWebhook) | **PATCH** /webhooks/{webhookId} | Update webhook +*WebhooksV2Api* | [**createWebhook**](docs/WebhooksV2Api.md#createWebhook) | **POST** /webhooks | Create new webhook +*WebhooksV2Api* | [**deleteWebhook**](docs/WebhooksV2Api.md#deleteWebhook) | **DELETE** /webhooks/{webhookId} | Delete webhook +*WebhooksV2Api* | [**getNotification**](docs/WebhooksV2Api.md#getNotification) | **GET** /webhooks/{webhookId}/notifications/{notificationId} | Get notification by id +*WebhooksV2Api* | [**getNotificationAttempts**](docs/WebhooksV2Api.md#getNotificationAttempts) | **GET** /webhooks/{webhookId}/notifications/{notificationId}/attempts | Get notification attempts +*WebhooksV2Api* | [**getNotifications**](docs/WebhooksV2Api.md#getNotifications) | **GET** /webhooks/{webhookId}/notifications | Get all notifications by webhook id +*WebhooksV2Api* | [**getResendJobStatus**](docs/WebhooksV2Api.md#getResendJobStatus) | **GET** /webhooks/{webhookId}/notifications/resend_failed/jobs/{jobId} | Get resend job status +*WebhooksV2Api* | [**getWebhook**](docs/WebhooksV2Api.md#getWebhook) | **GET** /webhooks/{webhookId} | Get webhook by id +*WebhooksV2Api* | [**getWebhooks**](docs/WebhooksV2Api.md#getWebhooks) | **GET** /webhooks | Get all webhooks +*WebhooksV2Api* | [**resendFailedNotifications**](docs/WebhooksV2Api.md#resendFailedNotifications) | **POST** /webhooks/{webhookId}/notifications/resend_failed | Resend failed notifications +*WebhooksV2Api* | [**resendNotificationById**](docs/WebhooksV2Api.md#resendNotificationById) | **POST** /webhooks/{webhookId}/notifications/{notificationId}/resend | Resend notification by id +*WebhooksV2Api* | [**resendNotificationsByResourceId**](docs/WebhooksV2Api.md#resendNotificationsByResourceId) | **POST** /webhooks/{webhookId}/notifications/resend_by_resource | Resend notifications by resource Id +*WebhooksV2Api* | [**updateWebhook**](docs/WebhooksV2Api.md#updateWebhook) | **PATCH** /webhooks/{webhookId} | Update webhook *WhitelistIpAddressesApi* | [**getWhitelistIpAddresses**](docs/WhitelistIpAddressesApi.md#getWhitelistIpAddresses) | **GET** /management/api_users/{userId}/whitelist_ip_addresses | Gets whitelisted ip addresses *WorkspaceStatusBetaApi* | [**getWorkspaceStatus**](docs/WorkspaceStatusBetaApi.md#getWorkspaceStatus) | **GET** /management/workspace_status | Returns current workspace status @@ -664,6 +667,7 @@ Class | Method | HTTP request | Description - [ErrorResponse](docs/ErrorResponse.md) - [ErrorResponseError](docs/ErrorResponseError.md) - [ErrorSchema](docs/ErrorSchema.md) + - [EstimatedFeeDetails](docs/EstimatedFeeDetails.md) - [EstimatedNetworkFeeResponse](docs/EstimatedNetworkFeeResponse.md) - [EstimatedTransactionFeeResponse](docs/EstimatedTransactionFeeResponse.md) - [ExchangeAccount](docs/ExchangeAccount.md) @@ -679,6 +683,9 @@ Class | Method | HTTP request | Description - [ExecutionScreeningOperation](docs/ExecutionScreeningOperation.md) - [ExecutionTransferOperation](docs/ExecutionTransferOperation.md) - [ExternalWalletAsset](docs/ExternalWalletAsset.md) + - [FeeBreakdown](docs/FeeBreakdown.md) + - [FeeBreakdownOneOf](docs/FeeBreakdownOneOf.md) + - [FeeBreakdownOneOf1](docs/FeeBreakdownOneOf1.md) - [FeeInfo](docs/FeeInfo.md) - [FeeLevel](docs/FeeLevel.md) - [FetchAbiRequestDto](docs/FetchAbiRequestDto.md) @@ -750,6 +757,7 @@ Class | Method | HTTP request | Description - [NotFoundException](docs/NotFoundException.md) - [Notification](docs/Notification.md) - [NotificationAttempt](docs/NotificationAttempt.md) + - [NotificationAttemptsPaginatedResponse](docs/NotificationAttemptsPaginatedResponse.md) - [NotificationPaginatedResponse](docs/NotificationPaginatedResponse.md) - [NotificationStatus](docs/NotificationStatus.md) - [NotificationWithData](docs/NotificationWithData.md) @@ -824,6 +832,9 @@ Class | Method | HTTP request | Description - [RenameCosigner](docs/RenameCosigner.md) - [RenameVaultAccountResponse](docs/RenameVaultAccountResponse.md) - [RescanTransaction](docs/RescanTransaction.md) + - [ResendFailedNotificationsJobStatusResponse](docs/ResendFailedNotificationsJobStatusResponse.md) + - [ResendFailedNotificationsRequest](docs/ResendFailedNotificationsRequest.md) + - [ResendFailedNotificationsResponse](docs/ResendFailedNotificationsResponse.md) - [ResendNotificationsByResourceIdRequest](docs/ResendNotificationsByResourceIdRequest.md) - [ResendTransactionWebhooksRequest](docs/ResendTransactionWebhooksRequest.md) - [ResendWebhooksByTransactionIdResponse](docs/ResendWebhooksByTransactionIdResponse.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 8db37290..8eebc7d7 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -12874,7 +12874,6 @@ paths: get: description: | Get all webhooks (paginated) - **Note:** These endpoints are currently in beta and might be subject to changes. operationId: getWebhooks parameters: - description: ASC / DESC ordering (default DESC) @@ -12931,37 +12930,38 @@ paths: $ref: '#/components/headers/X-Request-ID' summary: Get all webhooks tags: - - Webhooks V2 (Beta) + - Webhooks V2 x-rate-limit-category: query x-readme: code-samples: - language: typescript code: "const response: Promise>\ - \ = fireblocks.webhooksV2Beta.getWebhooks(webhooksV2BetaApiGetWebhooksRequest);" + \ = fireblocks.webhooksV2.getWebhooks(webhooksV2ApiGetWebhooksRequest);" name: Fireblocks SDK TypeScript example - language: java code: "CompletableFuture> response\ - \ = fireblocks.webhooksV2Beta().getWebhooks(order, pageCursor, pageSize);" + \ = fireblocks.webhooksV2().getWebhooks(order, pageCursor, pageSize);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.webhooks_v2_beta.get_webhooks(order, page_cursor,\ + code: "response = fireblocks.webhooks_v2.get_webhooks(order, page_cursor,\ \ page_size);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript source: "const response: Promise>\ - \ = fireblocks.webhooksV2Beta.getWebhooks(webhooksV2BetaApiGetWebhooksRequest);" + \ = fireblocks.webhooksV2.getWebhooks(webhooksV2ApiGetWebhooksRequest);" - lang: Java source: "CompletableFuture> response\ - \ = fireblocks.webhooksV2Beta().getWebhooks(order, pageCursor, pageSize);" + \ = fireblocks.webhooksV2().getWebhooks(order, pageCursor, pageSize);" - lang: Python - source: "response = fireblocks.webhooks_v2_beta.get_webhooks(order, page_cursor,\ + source: "response = fireblocks.webhooks_v2.get_webhooks(order, page_cursor,\ \ page_size);" x-accepts: application/json post: description: | Creates a new webhook, which will be triggered on the specified events - **Note:** These endpoints are currently in beta and might be subject to changes. + + Endpoint Permission: Owner, Admin, Non-Signing Admin. operationId: createWebhook parameters: - description: "A unique identifier for the request. If the request is sent\ @@ -13002,29 +13002,29 @@ paths: $ref: '#/components/headers/X-Request-ID' summary: Create new webhook tags: - - Webhooks V2 (Beta) + - Webhooks V2 x-rate-limit-category: write x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.webhooksV2Beta.createWebhook(webhooksV2BetaApiCreateWebhookRequest);" + code: "const response: Promise> = fireblocks.webhooksV2.createWebhook(webhooksV2ApiCreateWebhookRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.webhooksV2Beta().createWebhook(createWebhookRequest,\ + code: "CompletableFuture> response = fireblocks.webhooksV2().createWebhook(createWebhookRequest,\ \ idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.webhooks_v2_beta.create_webhook(create_webhook_request,\ + code: "response = fireblocks.webhooks_v2.create_webhook(create_webhook_request,\ \ idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.webhooksV2Beta.createWebhook(webhooksV2BetaApiCreateWebhookRequest);" + source: "const response: Promise> = fireblocks.webhooksV2.createWebhook(webhooksV2ApiCreateWebhookRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.webhooksV2Beta().createWebhook(createWebhookRequest,\ + source: "CompletableFuture> response = fireblocks.webhooksV2().createWebhook(createWebhookRequest,\ \ idempotencyKey);" - lang: Python - source: "response = fireblocks.webhooks_v2_beta.create_webhook(create_webhook_request,\ + source: "response = fireblocks.webhooks_v2.create_webhook(create_webhook_request,\ \ idempotency_key);" x-content-type: application/json x-accepts: application/json @@ -13032,7 +13032,8 @@ paths: delete: description: | Delete a webhook by its id - **Note:** These endpoints are currently in beta and might be subject to changes. + + Endpoint Permission: Owner, Admin, Non-Signing Admin. operationId: deleteWebhook parameters: - description: The unique identifier of the webhook @@ -13066,31 +13067,30 @@ paths: $ref: '#/components/headers/X-Request-ID' summary: Delete webhook tags: - - Webhooks V2 (Beta) + - Webhooks V2 x-rate-limit-category: write x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.webhooksV2Beta.deleteWebhook(webhooksV2BetaApiDeleteWebhookRequest);" + code: "const response: Promise> = fireblocks.webhooksV2.deleteWebhook(webhooksV2ApiDeleteWebhookRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.webhooksV2Beta().deleteWebhook(webhookId); + code: CompletableFuture> response = fireblocks.webhooksV2().deleteWebhook(webhookId); name: Fireblocks SDK Java example - language: python - code: response = fireblocks.webhooks_v2_beta.delete_webhook(webhook_id); + code: response = fireblocks.webhooks_v2.delete_webhook(webhook_id); name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.webhooksV2Beta.deleteWebhook(webhooksV2BetaApiDeleteWebhookRequest);" + source: "const response: Promise> = fireblocks.webhooksV2.deleteWebhook(webhooksV2ApiDeleteWebhookRequest);" - lang: Java - source: CompletableFuture> response = fireblocks.webhooksV2Beta().deleteWebhook(webhookId); + source: CompletableFuture> response = fireblocks.webhooksV2().deleteWebhook(webhookId); - lang: Python - source: response = fireblocks.webhooks_v2_beta.delete_webhook(webhook_id); + source: response = fireblocks.webhooks_v2.delete_webhook(webhook_id); x-accepts: application/json get: description: | Retrieve a webhook by its id - **Note:** These endpoints are currently in beta and might be subject to changes. operationId: getWebhook parameters: - description: The unique identifier of the webhook @@ -13124,31 +13124,32 @@ paths: $ref: '#/components/headers/X-Request-ID' summary: Get webhook by id tags: - - Webhooks V2 (Beta) + - Webhooks V2 x-rate-limit-category: read x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.webhooksV2Beta.getWebhook(webhooksV2BetaApiGetWebhookRequest);" + code: "const response: Promise> = fireblocks.webhooksV2.getWebhook(webhooksV2ApiGetWebhookRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.webhooksV2Beta().getWebhook(webhookId); + code: CompletableFuture> response = fireblocks.webhooksV2().getWebhook(webhookId); name: Fireblocks SDK Java example - language: python - code: response = fireblocks.webhooks_v2_beta.get_webhook(webhook_id); + code: response = fireblocks.webhooks_v2.get_webhook(webhook_id); name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.webhooksV2Beta.getWebhook(webhooksV2BetaApiGetWebhookRequest);" + source: "const response: Promise> = fireblocks.webhooksV2.getWebhook(webhooksV2ApiGetWebhookRequest);" - lang: Java - source: CompletableFuture> response = fireblocks.webhooksV2Beta().getWebhook(webhookId); + source: CompletableFuture> response = fireblocks.webhooksV2().getWebhook(webhookId); - lang: Python - source: response = fireblocks.webhooks_v2_beta.get_webhook(webhook_id); + source: response = fireblocks.webhooks_v2.get_webhook(webhook_id); x-accepts: application/json patch: description: | Update a webhook by its id - **Note:** These endpoints are currently in beta and might be subject to changes. + + Endpoint Permission: Owner, Admin, Non-Signing Admin. operationId: updateWebhook parameters: - description: The unique identifier of the webhook @@ -13188,29 +13189,29 @@ paths: $ref: '#/components/headers/X-Request-ID' summary: Update webhook tags: - - Webhooks V2 (Beta) + - Webhooks V2 x-rate-limit-category: write x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.webhooksV2Beta.updateWebhook(webhooksV2BetaApiUpdateWebhookRequest);" + code: "const response: Promise> = fireblocks.webhooksV2.updateWebhook(webhooksV2ApiUpdateWebhookRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.webhooksV2Beta().updateWebhook(updateWebhookRequest,\ + code: "CompletableFuture> response = fireblocks.webhooksV2().updateWebhook(updateWebhookRequest,\ \ webhookId);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.webhooks_v2_beta.update_webhook(update_webhook_request,\ + code: "response = fireblocks.webhooks_v2.update_webhook(update_webhook_request,\ \ webhook_id);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.webhooksV2Beta.updateWebhook(webhooksV2BetaApiUpdateWebhookRequest);" + source: "const response: Promise> = fireblocks.webhooksV2.updateWebhook(webhooksV2ApiUpdateWebhookRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.webhooksV2Beta().updateWebhook(updateWebhookRequest,\ + source: "CompletableFuture> response = fireblocks.webhooksV2().updateWebhook(updateWebhookRequest,\ \ webhookId);" - lang: Python - source: "response = fireblocks.webhooks_v2_beta.update_webhook(update_webhook_request,\ + source: "response = fireblocks.webhooks_v2.update_webhook(update_webhook_request,\ \ webhook_id);" x-content-type: application/json x-accepts: application/json @@ -13218,7 +13219,6 @@ paths: get: description: | Get all notifications by webhook id (paginated) - **Note:** These endpoints are currently in beta and might be subject to changes. operationId: getNotifications parameters: - explode: false @@ -13243,6 +13243,23 @@ paths: example: ASC type: string style: form + - description: Sort by field + explode: true + in: query + name: sortBy + required: false + schema: + default: updatedAt + enum: + - id + - createdAt + - updatedAt + - status + - eventType + - resourceId + example: id + type: string + style: form - description: Cursor of the required page explode: true in: query @@ -13263,56 +13280,6 @@ paths: minimum: 1 type: number style: form - - description: sort by start date - explode: true - in: query - name: createdStartDate - required: false - schema: - example: 2024-09-24T09:14:38.356Z - type: string - style: form - - description: sort by end date - explode: true - in: query - name: createdEndDate - required: false - schema: - example: 2024-09-24T09:14:38.356Z - type: string - style: form - - description: Filter by Notification statues - explode: true - in: query - name: statuses - required: false - schema: - example: COMPLETED - items: - $ref: '#/components/schemas/NotificationStatus' - type: array - style: form - - description: Filter by Notification eventTypes - explode: true - in: query - name: eventTypes - required: false - schema: - example: - - transaction.created - - transaction.status.updated - items: - $ref: '#/components/schemas/WebhookEvent' - type: array - style: form - - description: Filter by resourceId - explode: true - in: query - name: resourceId - required: false - schema: - type: string - style: form responses: "200": content: @@ -13334,42 +13301,39 @@ paths: $ref: '#/components/headers/X-Request-ID' summary: Get all notifications by webhook id tags: - - Webhooks V2 (Beta) + - Webhooks V2 x-rate-limit-category: query x-readme: code-samples: - language: typescript code: "const response: Promise>\ - \ = fireblocks.webhooksV2Beta.getNotifications(webhooksV2BetaApiGetNotificationsRequest);" + \ = fireblocks.webhooksV2.getNotifications(webhooksV2ApiGetNotificationsRequest);" name: Fireblocks SDK TypeScript example - language: java code: "CompletableFuture> response\ - \ = fireblocks.webhooksV2Beta().getNotifications(webhookId, order, pageCursor,\ - \ pageSize, createdStartDate, createdEndDate, statuses, eventTypes, resourceId);" + \ = fireblocks.webhooksV2().getNotifications(webhookId, order, sortBy,\ + \ pageCursor, pageSize);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.webhooks_v2_beta.get_notifications(webhook_id,\ - \ order, page_cursor, page_size, created_start_date, created_end_date,\ - \ statuses, event_types, resource_id);" + code: "response = fireblocks.webhooks_v2.get_notifications(webhook_id, order,\ + \ sort_by, page_cursor, page_size);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript source: "const response: Promise>\ - \ = fireblocks.webhooksV2Beta.getNotifications(webhooksV2BetaApiGetNotificationsRequest);" + \ = fireblocks.webhooksV2.getNotifications(webhooksV2ApiGetNotificationsRequest);" - lang: Java source: "CompletableFuture> response\ - \ = fireblocks.webhooksV2Beta().getNotifications(webhookId, order, pageCursor,\ - \ pageSize, createdStartDate, createdEndDate, statuses, eventTypes, resourceId);" + \ = fireblocks.webhooksV2().getNotifications(webhookId, order, sortBy, pageCursor,\ + \ pageSize);" - lang: Python - source: "response = fireblocks.webhooks_v2_beta.get_notifications(webhook_id,\ - \ order, page_cursor, page_size, created_start_date, created_end_date, statuses,\ - \ event_types, resource_id);" + source: "response = fireblocks.webhooks_v2.get_notifications(webhook_id, order,\ + \ sort_by, page_cursor, page_size);" x-accepts: application/json /webhooks/{webhookId}/notifications/{notificationId}: get: description: | Get notification by id - **Note:** These endpoints are currently in beta and might be subject to changes. operationId: getNotification parameters: - description: Include the data of the notification @@ -13417,38 +13381,131 @@ paths: $ref: '#/components/headers/X-Request-ID' summary: Get notification by id tags: - - Webhooks V2 (Beta) + - Webhooks V2 x-rate-limit-category: read x-readme: code-samples: - language: typescript code: "const response: Promise>\ - \ = fireblocks.webhooksV2Beta.getNotification(webhooksV2BetaApiGetNotificationRequest);" + \ = fireblocks.webhooksV2.getNotification(webhooksV2ApiGetNotificationRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.webhooksV2Beta().getNotification(webhookId,\ + code: "CompletableFuture> response = fireblocks.webhooksV2().getNotification(webhookId,\ \ notificationId, includeData);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.webhooks_v2_beta.get_notification(webhook_id,\ - \ notification_id, include_data);" + code: "response = fireblocks.webhooks_v2.get_notification(webhook_id, notification_id,\ + \ include_data);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript source: "const response: Promise>\ - \ = fireblocks.webhooksV2Beta.getNotification(webhooksV2BetaApiGetNotificationRequest);" + \ = fireblocks.webhooksV2.getNotification(webhooksV2ApiGetNotificationRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.webhooksV2Beta().getNotification(webhookId,\ + source: "CompletableFuture> response = fireblocks.webhooksV2().getNotification(webhookId,\ \ notificationId, includeData);" - lang: Python - source: "response = fireblocks.webhooks_v2_beta.get_notification(webhook_id,\ - \ notification_id, include_data);" + source: "response = fireblocks.webhooks_v2.get_notification(webhook_id, notification_id,\ + \ include_data);" + x-accepts: application/json + /webhooks/{webhookId}/notifications/{notificationId}/attempts: + get: + description: | + Get notification attempts by notification id + operationId: getNotificationAttempts + parameters: + - description: The ID of the webhook to fetch + explode: false + in: path + name: webhookId + required: true + schema: + type: string + style: simple + - description: The ID of the notification to fetch + explode: false + in: path + name: notificationId + required: true + schema: + type: string + style: simple + - description: Cursor of the required page + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + - description: Maximum number of items in the page + explode: true + in: query + name: pageSize + required: false + schema: + default: 10 + example: 10 + maximum: 100 + minimum: 1 + type: number + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationAttemptsPaginatedResponse' + description: OK + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get notification attempts + tags: + - Webhooks V2 + x-rate-limit-category: query + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.webhooksV2.getNotificationAttempts(webhooksV2ApiGetNotificationAttemptsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>\ + \ response = fireblocks.webhooksV2().getNotificationAttempts(webhookId,\ + \ notificationId, pageCursor, pageSize);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.webhooks_v2.get_notification_attempts(webhook_id,\ + \ notification_id, page_cursor, page_size);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.webhooksV2.getNotificationAttempts(webhooksV2ApiGetNotificationAttemptsRequest);" + - lang: Java + source: "CompletableFuture>\ + \ response = fireblocks.webhooksV2().getNotificationAttempts(webhookId,\ + \ notificationId, pageCursor, pageSize);" + - lang: Python + source: "response = fireblocks.webhooks_v2.get_notification_attempts(webhook_id,\ + \ notification_id, page_cursor, page_size);" x-accepts: application/json /webhooks/{webhookId}/notifications/{notificationId}/resend: post: description: | Resend notification by ID - **Note:** These endpoints are currently in beta and might be subject to changes. + + Endpoint Permission: Owner, Admin, Non-Signing Admin. operationId: resendNotificationById parameters: - description: The ID of the webhook @@ -13495,36 +13552,37 @@ paths: $ref: '#/components/headers/X-Request-ID' summary: Resend notification by id tags: - - Webhooks V2 (Beta) + - Webhooks V2 x-rate-limit-category: async x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.webhooksV2Beta.resendNotificationById(webhooksV2BetaApiResendNotificationByIdRequest);" + code: "const response: Promise> = fireblocks.webhooksV2.resendNotificationById(webhooksV2ApiResendNotificationByIdRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.webhooksV2Beta().resendNotificationById(webhookId,\ + code: "CompletableFuture> response = fireblocks.webhooksV2().resendNotificationById(webhookId,\ \ notificationId, idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.webhooks_v2_beta.resend_notification_by_id(webhook_id,\ + code: "response = fireblocks.webhooks_v2.resend_notification_by_id(webhook_id,\ \ notification_id, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.webhooksV2Beta.resendNotificationById(webhooksV2BetaApiResendNotificationByIdRequest);" + source: "const response: Promise> = fireblocks.webhooksV2.resendNotificationById(webhooksV2ApiResendNotificationByIdRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.webhooksV2Beta().resendNotificationById(webhookId,\ + source: "CompletableFuture> response = fireblocks.webhooksV2().resendNotificationById(webhookId,\ \ notificationId, idempotencyKey);" - lang: Python - source: "response = fireblocks.webhooks_v2_beta.resend_notification_by_id(webhook_id,\ + source: "response = fireblocks.webhooks_v2.resend_notification_by_id(webhook_id,\ \ notification_id, idempotency_key);" x-accepts: application/json /webhooks/{webhookId}/notifications/resend_by_resource: post: description: | Resend notifications by resource Id - **Note:** These endpoints are currently in beta and might be subject to changes. + + Endpoint Permission: Owner, Admin, Non-Signing Admin. operationId: resendNotificationsByResourceId parameters: - description: "A unique identifier for the request. If the request is sent\ @@ -13570,32 +13628,198 @@ paths: $ref: '#/components/headers/X-Request-ID' summary: Resend notifications by resource Id tags: - - Webhooks V2 (Beta) + - Webhooks V2 x-rate-limit-category: async x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.webhooksV2Beta.resendNotificationsByResourceId(webhooksV2BetaApiResendNotificationsByResourceIdRequest);" + code: "const response: Promise> = fireblocks.webhooksV2.resendNotificationsByResourceId(webhooksV2ApiResendNotificationsByResourceIdRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.webhooksV2Beta().resendNotificationsByResourceId(resendNotificationsByResourceIdRequest,\ + code: "CompletableFuture> response = fireblocks.webhooksV2().resendNotificationsByResourceId(resendNotificationsByResourceIdRequest,\ \ webhookId, idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.webhooks_v2_beta.resend_notifications_by_resource_id(resend_notifications_by_resource_id_request,\ + code: "response = fireblocks.webhooks_v2.resend_notifications_by_resource_id(resend_notifications_by_resource_id_request,\ \ webhook_id, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.webhooksV2Beta.resendNotificationsByResourceId(webhooksV2BetaApiResendNotificationsByResourceIdRequest);" + source: "const response: Promise> = fireblocks.webhooksV2.resendNotificationsByResourceId(webhooksV2ApiResendNotificationsByResourceIdRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.webhooksV2Beta().resendNotificationsByResourceId(resendNotificationsByResourceIdRequest,\ + source: "CompletableFuture> response = fireblocks.webhooksV2().resendNotificationsByResourceId(resendNotificationsByResourceIdRequest,\ \ webhookId, idempotencyKey);" - lang: Python - source: "response = fireblocks.webhooks_v2_beta.resend_notifications_by_resource_id(resend_notifications_by_resource_id_request,\ + source: "response = fireblocks.webhooks_v2.resend_notifications_by_resource_id(resend_notifications_by_resource_id_request,\ \ webhook_id, idempotency_key);" x-content-type: application/json x-accepts: application/json + /webhooks/{webhookId}/notifications/resend_failed: + post: + description: | + Resend all failed notifications for a webhook in the last 24 hours + + Endpoint Permission: Owner, Admin, Non-Signing Admin. + operationId: resendFailedNotifications + parameters: + - description: "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." + explode: false + in: header + name: Idempotency-Key + required: false + schema: + type: string + style: simple + - description: The ID of the webhook + explode: false + in: path + name: webhookId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ResendFailedNotificationsRequest' + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResendFailedNotificationsResponse' + description: No failed notifications to resend + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/ResendFailedNotificationsResponse' + description: Resend failed notifications request was accepted and is being + processed + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + Location: + $ref: '#/components/headers/Location' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Resend failed notifications + tags: + - Webhooks V2 + x-rate-limit-category: high_compute + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.webhooksV2.resendFailedNotifications(webhooksV2ApiResendFailedNotificationsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>\ + \ response = fireblocks.webhooksV2().resendFailedNotifications(resendFailedNotificationsRequest,\ + \ webhookId, idempotencyKey);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.webhooks_v2.resend_failed_notifications(resend_failed_notifications_request,\ + \ webhook_id, idempotency_key);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.webhooksV2.resendFailedNotifications(webhooksV2ApiResendFailedNotificationsRequest);" + - lang: Java + source: "CompletableFuture>\ + \ response = fireblocks.webhooksV2().resendFailedNotifications(resendFailedNotificationsRequest,\ + \ webhookId, idempotencyKey);" + - lang: Python + source: "response = fireblocks.webhooks_v2.resend_failed_notifications(resend_failed_notifications_request,\ + \ webhook_id, idempotency_key);" + x-content-type: application/json + x-accepts: application/json + /webhooks/{webhookId}/notifications/resend_failed/jobs/{jobId}: + get: + description: | + Get the status of a resend job + operationId: getResendJobStatus + parameters: + - description: The ID of the webhook + explode: false + in: path + name: webhookId + required: true + schema: + type: string + style: simple + - description: The ID of the resend job + explode: false + in: path + name: jobId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ResendFailedNotificationsJobStatusResponse' + description: Job status + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + default: + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorSchema' + description: Error Response + headers: + X-Request-ID: + $ref: '#/components/headers/X-Request-ID' + summary: Get resend job status + tags: + - Webhooks V2 + x-rate-limit-category: read + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.webhooksV2.getResendJobStatus(webhooksV2ApiGetResendJobStatusRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>\ + \ response = fireblocks.webhooksV2().getResendJobStatus(webhookId, jobId);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.webhooks_v2.get_resend_job_status(webhook_id,\ + \ job_id);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.webhooksV2.getResendJobStatus(webhooksV2ApiGetResendJobStatusRequest);" + - lang: Java + source: "CompletableFuture>\ + \ response = fireblocks.webhooksV2().getResendJobStatus(webhookId, jobId);" + - lang: Python + source: "response = fireblocks.webhooks_v2.get_resend_job_status(webhook_id,\ + \ job_id);" + x-accepts: application/json /tokenization/templates: get: description: Return minimal representation of all the contract templates available @@ -24179,7 +24403,6 @@ components: style: simple Location: description: The location URL of the request status - example: /v1/cosigners/7cd3c3d2-611b-43fe-98da-1e0bfe893e2f/api_keys/ec1ca5d4-3824-4c67-9bea-7f3f636b9f40/123456789 explode: false schema: type: string @@ -28283,12 +28506,12 @@ components: type: string id: description: "The ID of the peer. You can retrieve the ID of each venue\ - \ object using the endpoints for [listing vault accounts](https://developers.fireblocks.com/reference/get_vault-accounts-paged),\ - \ [listing exchange account](https://developers.fireblocks.com/reference/get_exchange-accounts),\ - \ [listing fiat accounts](https://developers.fireblocks.com/reference/get_fiat-accounts),\ - \ [listing internal wallets](https://developers.fireblocks.com/reference/get_internal-wallets),\ - \ [listing external wallets](https://developers.fireblocks.com/reference/get_external-wallets),\ - \ [listing network connections](https://developers.fireblocks.com/reference/get_network-connections).\ + \ object using the endpoints for [listing vault accounts](https://developers.fireblocks.com/reference/getpagedvaultaccounts),\ + \ [listing exchange account](https://developers.fireblocks.com/reference/getexchangeaccounts),\ + \ [listing fiat accounts](https://developers.fireblocks.com/reference/getfiataccounts),\ + \ [listing internal wallets](https://developers.fireblocks.com/reference/getinternalwallets),\ + \ [listing external wallets](https://developers.fireblocks.com/reference/getexternalwallets),\ + \ [listing network connections](https://developers.fireblocks.com/reference/getnetworkconnections).\ \ For the other types, this parameter is not needed." nullable: true type: string @@ -28329,12 +28552,12 @@ components: type: string id: description: "The ID of the peer. You can retrieve the ID of each venue\ - \ object using the endpoints for [listing vault accounts](https://developers.fireblocks.com/reference/get_vault-accounts-paged),\ - \ [listing exchange account](https://developers.fireblocks.com/reference/get_exchange-accounts),\ - \ [listing fiat accounts](https://developers.fireblocks.com/reference/get_fiat-accounts),\ - \ [listing internal wallets](https://developers.fireblocks.com/reference/get_internal-wallets),\ - \ [listing external wallets](https://developers.fireblocks.com/reference/get_external-wallets),\ - \ [listing network connections](https://developers.fireblocks.com/reference/get_network-connections).\ + \ object using the endpoints for [listing vault accounts](https://developers.fireblocks.com/reference/getpagedvaultaccounts),\ + \ [listing exchange account](https://developers.fireblocks.com/reference/getexchangeaccounts),\ + \ [listing fiat accounts](https://developers.fireblocks.com/reference/getfiataccounts),\ + \ [listing internal wallets](https://developers.fireblocks.com/reference/getinternalwallets),\ + \ [listing external wallets](https://developers.fireblocks.com/reference/getexternalwallets),\ + \ [listing network connections](https://developers.fireblocks.com/reference/getnetworkconnections).\ \ For the other types, this parameter is not needed." nullable: true type: string @@ -29394,11 +29617,24 @@ components: subType: null id: id type: null + customerRefId: abcdef + travelRuleMessageId: trm_12345678-1234-1234-1234-123456789012 properties: amount: type: string destination: $ref: '#/components/schemas/DestinationTransferPeerPath' + travelRuleMessageId: + description: The ID of the travel rule message from any travel rule provider. + Used for travel rule linking functionality to associate transactions with + existing travel rule messages. + example: trm_12345678-1234-1234-1234-123456789012 + type: string + customerRefId: + description: The ID for AML providers to associate the owner of funds with + transactions. + example: abcdef + type: string type: object TravelRuleTransactionBlockchainInfo: description: Information about the blockchain transaction. @@ -31888,6 +32124,7 @@ components: id: id type: null maxFee: "120" + travelRuleMessageId: trm_12345678-1234-1234-1234-123456789012 externalTxId: 00000000-0000-0000-0000-000000000000 cpuStaking: null gasLimit: "21000" @@ -31910,6 +32147,8 @@ components: subType: null id: id type: null + customerRefId: abcdef + travelRuleMessageId: trm_12345678-1234-1234-1234-123456789012 - amount: amount destination: oneTimeAddress: @@ -31921,6 +32160,8 @@ components: subType: null id: id type: null + customerRefId: abcdef + travelRuleMessageId: trm_12345678-1234-1234-1234-123456789012 useGasless: true travelRuleMessage: originatorRef: ORG123456 @@ -33189,6 +33430,12 @@ components: type: string travelRuleMessage: $ref: '#/components/schemas/TravelRuleCreateTransactionRequest' + travelRuleMessageId: + description: The ID of the travel rule message from any travel rule provider. + Used for travel rule linking functionality to associate transactions with + existing travel rule messages. + example: trm_12345678-1234-1234-1234-123456789012 + type: string autoStaking: deprecated: true description: This feature is no longer supported. @@ -33251,6 +33498,28 @@ components: description: Layer 1 fee for Layer 2 chains type: string type: object + FeeBreakdown: + oneOf: + - $ref: '#/components/schemas/FeeBreakdown_oneOf' + - $ref: '#/components/schemas/FeeBreakdown_oneOf_1' + EstimatedFeeDetails: + description: Optional detailed fee breakdown for high/medium/low estimates + example: + high: null + low: + totalFee: totalFee + priorityFee: priorityFee + baseFee: baseFee + rent: rent + medium: null + properties: + low: + $ref: '#/components/schemas/FeeBreakdown' + medium: + $ref: '#/components/schemas/FeeBreakdown' + high: + $ref: '#/components/schemas/FeeBreakdown' + type: object EstimatedTransactionFeeResponse: example: high: @@ -33271,6 +33540,14 @@ components: baseFee: 6.027456183070403 gasPrice: 0.8008281904610115 maxFeePerGasDelta: maxFeePerGasDelta + feeDetails: + high: null + low: + totalFee: totalFee + priorityFee: priorityFee + baseFee: baseFee + rent: rent + medium: null medium: gasLimit: gasLimit feePerByte: feePerByte @@ -33287,6 +33564,8 @@ components: $ref: '#/components/schemas/TransactionFee' high: $ref: '#/components/schemas/TransactionFee' + feeDetails: + $ref: '#/components/schemas/EstimatedFeeDetails' required: - high - low @@ -35023,6 +35302,7 @@ components: id: id type: null maxFee: "120" + travelRuleMessageId: trm_12345678-1234-1234-1234-123456789012 externalTxId: 00000000-0000-0000-0000-000000000000 cpuStaking: null gasLimit: "21000" @@ -35045,6 +35325,8 @@ components: subType: null id: id type: null + customerRefId: abcdef + travelRuleMessageId: trm_12345678-1234-1234-1234-123456789012 - amount: amount destination: oneTimeAddress: @@ -35056,6 +35338,8 @@ components: subType: null id: id type: null + customerRefId: abcdef + travelRuleMessageId: trm_12345678-1234-1234-1234-123456789012 useGasless: true travelRuleMessage: originatorRef: ORG123456 @@ -36241,6 +36525,7 @@ components: id: id type: null maxFee: "120" + travelRuleMessageId: trm_12345678-1234-1234-1234-123456789012 externalTxId: 00000000-0000-0000-0000-000000000000 cpuStaking: null gasLimit: "21000" @@ -36263,6 +36548,8 @@ components: subType: null id: id type: null + customerRefId: abcdef + travelRuleMessageId: trm_12345678-1234-1234-1234-123456789012 - amount: amount destination: oneTimeAddress: @@ -36274,6 +36561,8 @@ components: subType: null id: id type: null + customerRefId: abcdef + travelRuleMessageId: trm_12345678-1234-1234-1234-123456789012 useGasless: true travelRuleMessage: originatorRef: ORG123456 @@ -37582,6 +37871,7 @@ components: - transaction.created - transaction.status.updated - transaction.approval_status.updated + - transaction.network_records.processing_completed - external_wallet.asset.added - external_wallet.asset.removed - internal_wallet.asset.added @@ -37589,14 +37879,19 @@ components: - contract_wallet.asset.added - contract_wallet.asset.removed - vault_account.created - - vault_account.asset.listed + - vault_account.asset.added - vault_account.asset.balance_updated - embedded_wallet.status.updated - embedded_wallet.created - embedded_wallet.asset.balance_updated - - embedded_wallet.asset.listed + - embedded_wallet.asset.added - embedded_wallet.account.created - embedded_wallet.device.added + - onchain_data.updated + - connection.added + - connection.removed + - connection.request.waiting_peer_approval + - connection.request.rejected_by_peer type: string Webhook: example: @@ -37777,37 +38072,6 @@ components: - ON_HOLD example: COMPLETED type: string - NotificationAttempt: - example: - duration: 130 - failureReason: TIMED_OUT - sentTime: 1625126400000 - responseCode: 200 - properties: - sentTime: - description: The time when the attempt was sent in milliseconds. - example: 1625126400000 - format: int64 - type: integer - duration: - description: The duration of the attempt in milliseconds. - example: 130 - type: integer - responseCode: - description: "The response code of the attempt, when missing refer to failureReason." - example: 200 - type: integer - failureReason: - description: The request failure reason in case responseCode is missing. - enum: - - TIMED_OUT - - NO_RESPONSE - example: TIMED_OUT - type: string - required: - - duration - - sentTime - type: object Notification: example: createdAt: 1625126400000 @@ -37816,15 +38080,6 @@ components: eventType: null updatedAt: 1625126400000 status: COMPLETED - attempts: - - duration: 130 - failureReason: TIMED_OUT - sentTime: 1625126400000 - responseCode: 200 - - duration: 130 - failureReason: TIMED_OUT - sentTime: 1625126400000 - responseCode: 200 properties: id: description: The id of the Notification @@ -37852,14 +38107,7 @@ components: format: uuid nullable: true type: string - attempts: - default: [] - description: The attempts related to Notification - items: - $ref: '#/components/schemas/NotificationAttempt' - type: array required: - - attempts - createdAt - eventType - id @@ -37876,30 +38124,12 @@ components: eventType: null updatedAt: 1625126400000 status: COMPLETED - attempts: - - duration: 130 - failureReason: TIMED_OUT - sentTime: 1625126400000 - responseCode: 200 - - duration: 130 - failureReason: TIMED_OUT - sentTime: 1625126400000 - responseCode: 200 - createdAt: 1625126400000 resourceId: 44fcead0-7053-4831-a53a-df7fb90d440f id: 44fcead0-7053-4831-a53a-df7fb90d440f eventType: null updatedAt: 1625126400000 status: COMPLETED - attempts: - - duration: 130 - failureReason: TIMED_OUT - sentTime: 1625126400000 - responseCode: 200 - - duration: 130 - failureReason: TIMED_OUT - sentTime: 1625126400000 - responseCode: 200 properties: data: description: The data of the current page @@ -37923,15 +38153,6 @@ components: eventType: null updatedAt: 1625126400000 status: COMPLETED - attempts: - - duration: 130 - failureReason: TIMED_OUT - sentTime: 1625126400000 - responseCode: 200 - - duration: 130 - failureReason: TIMED_OUT - sentTime: 1625126400000 - responseCode: 200 properties: id: example: 44fcead0-7053-4831-a53a-df7fb90d440f @@ -37958,23 +38179,73 @@ components: format: uuid nullable: true type: string - attempts: - default: [] - description: The attempts related to Notification - items: - $ref: '#/components/schemas/NotificationAttempt' - type: array data: description: notification data type: object required: - - attempts - createdAt - eventType - id - status - updatedAt type: object + NotificationAttempt: + example: + duration: 130 + failureReason: TIMED_OUT + sentTime: 1625126400000 + responseCode: 200 + properties: + sentTime: + description: The time when the attempt was sent in milliseconds. + example: 1625126400000 + format: int64 + type: integer + duration: + description: The duration of the attempt in milliseconds. + example: 130 + type: integer + responseCode: + description: "The response code of the attempt, when missing refer to failureReason." + example: 200 + type: integer + failureReason: + description: The request failure reason in case responseCode is missing. + enum: + - TIMED_OUT + - NO_RESPONSE + example: TIMED_OUT + type: string + required: + - duration + - sentTime + type: object + NotificationAttemptsPaginatedResponse: + example: + next: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + data: + - duration: 130 + failureReason: TIMED_OUT + sentTime: 1625126400000 + responseCode: 200 + - duration: 130 + failureReason: TIMED_OUT + sentTime: 1625126400000 + responseCode: 200 + properties: + data: + description: The data of the current page + items: + $ref: '#/components/schemas/NotificationAttempt' + type: array + next: + description: The ID of the next page + example: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9 + nullable: true + type: string + required: + - data + type: object ResendNotificationsByResourceIdRequest: example: resourceId: 44fcead0-7053-4831-a53a-df7fb90d440f @@ -38002,6 +38273,74 @@ components: required: - resourceId type: object + ResendFailedNotificationsRequest: + example: + startTime: 1625097600000 + events: + - transaction.created + - transaction.status.updated + properties: + startTime: + description: | + (optional) Start time for the resend window in milliseconds since epoch up to 24 hours before the current time - Default if missing means 24 hours before the current time in milliseconds since epoch - Maximum value is current time in milliseconds since epoch - Minimum value is 24 hours before the current time in milliseconds since epoch + example: 1625097600000 + type: number + events: + description: | + (optional) Event types to resend, default is all event types + - Default if missing means all events will be included + - Empty array means all events will be included + example: + - transaction.created + - transaction.status.updated + items: + $ref: '#/components/schemas/WebhookEvent' + type: array + type: object + ResendFailedNotificationsResponse: + example: + total: 10 + properties: + total: + description: The total number of failed notifications that are scheduled + to be resent. + example: 10 + type: number + type: object + ResendFailedNotificationsJobStatusResponse: + example: + jobId: 123e4567-e89b-12d3-a456-426614174000 + processed: 100 + total: 1000 + status: COMPLETED + properties: + jobId: + description: Bulk resend job ID + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + status: + description: Bulk resend job status + enum: + - QUEUED + - IN_PROGRESS + - COMPLETED + - FAILED + example: COMPLETED + type: string + processed: + description: Number of notifications processed + example: 100 + type: number + total: + description: Total number of notifications to process + example: 1000 + type: number + required: + - jobId + - processed + - status + - total + type: object AuditorData: properties: name: @@ -51413,6 +51752,40 @@ components: type: string - description: Number (deprecated) type: number + FeeBreakdown_oneOf: + description: Solana-specific fee breakdown + example: + totalFee: totalFee + priorityFee: priorityFee + baseFee: baseFee + rent: rent + properties: + baseFee: + description: Base fee for Solana transaction + type: string + priorityFee: + description: Priority fee for Solana transaction + type: string + rent: + description: Rent fee for Solana account creation/storage + type: string + totalFee: + description: Total fee amount + type: string + type: object + FeeBreakdown_oneOf_1: + description: Generic fee breakdown for other blockchains + properties: + baseFee: + description: Base fee component + type: string + priorityFee: + description: Priority fee component + type: string + totalFee: + description: Total fee amount + type: string + type: object ErrorResponse_error: example: type: INTERNAL diff --git a/build.gradle b/build.gradle index 07db06f0..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 = '11.0.0' +version = '0.0.0' buildscript { repositories { diff --git a/docs/DestinationTransferPeerPathResponse.md b/docs/DestinationTransferPeerPathResponse.md index 115e6a9e..34f5e756 100644 --- a/docs/DestinationTransferPeerPathResponse.md +++ b/docs/DestinationTransferPeerPathResponse.md @@ -10,7 +10,7 @@ Destination of the transaction. **Note:** In case the transaction is sent to mu |------------ | ------------- | ------------- | -------------| |**type** | **TransferPeerPathType** | | | |**subType** | **String** | In case the type is set to `EXCHANGE_ACCOUNT` or `FIAT_ACCOUNT`, the specific exchange vendor name or fiat vendor name.In case the type is set to `INTERNAL_WALLET` or `EXTERNAL_WALLET`, the subType is set to `Internal` or `External`. | [optional] | -|**id** | **String** | The ID of the peer. You can retrieve the ID of each venue object using the endpoints for [listing vault accounts](https://developers.fireblocks.com/reference/get_vault-accounts-paged), [listing exchange account](https://developers.fireblocks.com/reference/get_exchange-accounts), [listing fiat accounts](https://developers.fireblocks.com/reference/get_fiat-accounts), [listing internal wallets](https://developers.fireblocks.com/reference/get_internal-wallets), [listing external wallets](https://developers.fireblocks.com/reference/get_external-wallets), [listing network connections](https://developers.fireblocks.com/reference/get_network-connections). For the other types, this parameter is not needed. | [optional] | +|**id** | **String** | The ID of the peer. You can retrieve the ID of each venue object using the endpoints for [listing vault accounts](https://developers.fireblocks.com/reference/getpagedvaultaccounts), [listing exchange account](https://developers.fireblocks.com/reference/getexchangeaccounts), [listing fiat accounts](https://developers.fireblocks.com/reference/getfiataccounts), [listing internal wallets](https://developers.fireblocks.com/reference/getinternalwallets), [listing external wallets](https://developers.fireblocks.com/reference/getexternalwallets), [listing network connections](https://developers.fireblocks.com/reference/getnetworkconnections). For the other types, this parameter is not needed. | [optional] | |**name** | **String** | The name of the peer. | [optional] | |**walletId** | **UUID** | | [optional] | |**tradingAccount** | **String** | If this transaction is an exchange internal transfer, this field will be populated with the type of that trading account. | [optional] | diff --git a/docs/EstimatedFeeDetails.md b/docs/EstimatedFeeDetails.md new file mode 100644 index 00000000..0918d858 --- /dev/null +++ b/docs/EstimatedFeeDetails.md @@ -0,0 +1,16 @@ + + +# EstimatedFeeDetails + +Optional detailed fee breakdown for high/medium/low estimates + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**low** | [**FeeBreakdown**](FeeBreakdown.md) | | [optional] | +|**medium** | [**FeeBreakdown**](FeeBreakdown.md) | | [optional] | +|**high** | [**FeeBreakdown**](FeeBreakdown.md) | | [optional] | + + + diff --git a/docs/EstimatedTransactionFeeResponse.md b/docs/EstimatedTransactionFeeResponse.md index 60a46ef0..d71ff40c 100644 --- a/docs/EstimatedTransactionFeeResponse.md +++ b/docs/EstimatedTransactionFeeResponse.md @@ -10,6 +10,7 @@ |**low** | [**TransactionFee**](TransactionFee.md) | | | |**medium** | [**TransactionFee**](TransactionFee.md) | | | |**high** | [**TransactionFee**](TransactionFee.md) | | | +|**feeDetails** | [**EstimatedFeeDetails**](EstimatedFeeDetails.md) | | [optional] | diff --git a/docs/FeeBreakdown.md b/docs/FeeBreakdown.md new file mode 100644 index 00000000..58bc06b3 --- /dev/null +++ b/docs/FeeBreakdown.md @@ -0,0 +1,37 @@ + + +# FeeBreakdown + +## oneOf schemas +* [FeeBreakdownOneOf](FeeBreakdownOneOf.md) +* [FeeBreakdownOneOf1](FeeBreakdownOneOf1.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.FeeBreakdown; +import com.fireblocks.sdk.model.FeeBreakdownOneOf; +import com.fireblocks.sdk.model.FeeBreakdownOneOf1; + +public class Example { + public static void main(String[] args) { + FeeBreakdown exampleFeeBreakdown = new FeeBreakdown(); + + // create a new FeeBreakdownOneOf + FeeBreakdownOneOf exampleFeeBreakdownOneOf = new FeeBreakdownOneOf(); + // set FeeBreakdown to FeeBreakdownOneOf + exampleFeeBreakdown.setActualInstance(exampleFeeBreakdownOneOf); + // to get back the FeeBreakdownOneOf set earlier + FeeBreakdownOneOf testFeeBreakdownOneOf = (FeeBreakdownOneOf) exampleFeeBreakdown.getActualInstance(); + + // create a new FeeBreakdownOneOf1 + FeeBreakdownOneOf1 exampleFeeBreakdownOneOf1 = new FeeBreakdownOneOf1(); + // set FeeBreakdown to FeeBreakdownOneOf1 + exampleFeeBreakdown.setActualInstance(exampleFeeBreakdownOneOf1); + // to get back the FeeBreakdownOneOf1 set earlier + FeeBreakdownOneOf1 testFeeBreakdownOneOf1 = (FeeBreakdownOneOf1) exampleFeeBreakdown.getActualInstance(); + } +} +``` + + diff --git a/docs/FeeBreakdownOneOf.md b/docs/FeeBreakdownOneOf.md new file mode 100644 index 00000000..7e7f1250 --- /dev/null +++ b/docs/FeeBreakdownOneOf.md @@ -0,0 +1,17 @@ + + +# FeeBreakdownOneOf + +Solana-specific fee breakdown + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**baseFee** | **String** | Base fee for Solana transaction | [optional] | +|**priorityFee** | **String** | Priority fee for Solana transaction | [optional] | +|**rent** | **String** | Rent fee for Solana account creation/storage | [optional] | +|**totalFee** | **String** | Total fee amount | [optional] | + + + diff --git a/docs/FeeBreakdownOneOf1.md b/docs/FeeBreakdownOneOf1.md new file mode 100644 index 00000000..3bc4ba7c --- /dev/null +++ b/docs/FeeBreakdownOneOf1.md @@ -0,0 +1,16 @@ + + +# FeeBreakdownOneOf1 + +Generic fee breakdown for other blockchains + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**baseFee** | **String** | Base fee component | [optional] | +|**priorityFee** | **String** | Priority fee component | [optional] | +|**totalFee** | **String** | Total fee amount | [optional] | + + + diff --git a/docs/Notification.md b/docs/Notification.md index 5ecd1c54..d414e684 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -13,7 +13,6 @@ |**status** | **NotificationStatus** | | | |**eventType** | **WebhookEvent** | | | |**resourceId** | **UUID** | The resource id of the event which the Notification is listen to | [optional] | -|**attempts** | [**List<NotificationAttempt>**](NotificationAttempt.md) | The attempts related to Notification | | diff --git a/docs/NotificationAttemptsPaginatedResponse.md b/docs/NotificationAttemptsPaginatedResponse.md new file mode 100644 index 00000000..09d02a5e --- /dev/null +++ b/docs/NotificationAttemptsPaginatedResponse.md @@ -0,0 +1,14 @@ + + +# NotificationAttemptsPaginatedResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<NotificationAttempt>**](NotificationAttempt.md) | The data of the current page | | +|**next** | **String** | The ID of the next page | [optional] | + + + diff --git a/docs/NotificationWithData.md b/docs/NotificationWithData.md index f1cbbf4d..0aafc304 100644 --- a/docs/NotificationWithData.md +++ b/docs/NotificationWithData.md @@ -13,7 +13,6 @@ |**status** | **NotificationStatus** | | | |**eventType** | **WebhookEvent** | | | |**resourceId** | **UUID** | The resource id of the event which the Notification is listen to | [optional] | -|**attempts** | [**List<NotificationAttempt>**](NotificationAttempt.md) | The attempts related to Notification | | |**data** | **Object** | notification data | [optional] | diff --git a/docs/ResendFailedNotificationsJobStatusResponse.md b/docs/ResendFailedNotificationsJobStatusResponse.md new file mode 100644 index 00000000..e70d632b --- /dev/null +++ b/docs/ResendFailedNotificationsJobStatusResponse.md @@ -0,0 +1,27 @@ + + +# ResendFailedNotificationsJobStatusResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**jobId** | **String** | Bulk resend job ID | | +|**status** | [**StatusEnum**](#StatusEnum) | Bulk resend job status | | +|**processed** | **BigDecimal** | Number of notifications processed | | +|**total** | **BigDecimal** | Total number of notifications to process | | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| QUEUED | "QUEUED" | +| IN_PROGRESS | "IN_PROGRESS" | +| COMPLETED | "COMPLETED" | +| FAILED | "FAILED" | + + + diff --git a/docs/ResendFailedNotificationsRequest.md b/docs/ResendFailedNotificationsRequest.md new file mode 100644 index 00000000..de2fe175 --- /dev/null +++ b/docs/ResendFailedNotificationsRequest.md @@ -0,0 +1,14 @@ + + +# ResendFailedNotificationsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**startTime** | **BigDecimal** | (optional) Start time for the resend window in milliseconds since epoch up to 24 hours before the current time - Default if missing means 24 hours before the current time in milliseconds since epoch - Maximum value is current time in milliseconds since epoch - Minimum value is 24 hours before the current time in milliseconds since epoch | [optional] | +|**events** | **List<WebhookEvent>** | (optional) Event types to resend, default is all event types - Default if missing means all events will be included - Empty array means all events will be included | [optional] | + + + diff --git a/docs/ResendFailedNotificationsResponse.md b/docs/ResendFailedNotificationsResponse.md new file mode 100644 index 00000000..28ee1df2 --- /dev/null +++ b/docs/ResendFailedNotificationsResponse.md @@ -0,0 +1,13 @@ + + +# ResendFailedNotificationsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**total** | **BigDecimal** | The total number of failed notifications that are scheduled to be resent. | [optional] | + + + diff --git a/docs/SourceTransferPeerPathResponse.md b/docs/SourceTransferPeerPathResponse.md index 96114dbd..f1d4ea45 100644 --- a/docs/SourceTransferPeerPathResponse.md +++ b/docs/SourceTransferPeerPathResponse.md @@ -10,7 +10,7 @@ Source of the transaction. |------------ | ------------- | ------------- | -------------| |**type** | **TransferPeerPathType** | | | |**subType** | **String** | In case the type is set to `EXCHANGE_ACCOUNT` or `FIAT_ACCOUNT`, the specific exchange vendor name or fiat vendor name. In case the type is set to `INTERNAL_WALLET` or `EXTERNAL_WALLET`, the subType is set to `Internal` or `External`. | [optional] | -|**id** | **String** | The ID of the peer. You can retrieve the ID of each venue object using the endpoints for [listing vault accounts](https://developers.fireblocks.com/reference/get_vault-accounts-paged), [listing exchange account](https://developers.fireblocks.com/reference/get_exchange-accounts), [listing fiat accounts](https://developers.fireblocks.com/reference/get_fiat-accounts), [listing internal wallets](https://developers.fireblocks.com/reference/get_internal-wallets), [listing external wallets](https://developers.fireblocks.com/reference/get_external-wallets), [listing network connections](https://developers.fireblocks.com/reference/get_network-connections). For the other types, this parameter is not needed. | [optional] | +|**id** | **String** | The ID of the peer. You can retrieve the ID of each venue object using the endpoints for [listing vault accounts](https://developers.fireblocks.com/reference/getpagedvaultaccounts), [listing exchange account](https://developers.fireblocks.com/reference/getexchangeaccounts), [listing fiat accounts](https://developers.fireblocks.com/reference/getfiataccounts), [listing internal wallets](https://developers.fireblocks.com/reference/getinternalwallets), [listing external wallets](https://developers.fireblocks.com/reference/getexternalwallets), [listing network connections](https://developers.fireblocks.com/reference/getnetworkconnections). For the other types, this parameter is not needed. | [optional] | |**name** | **String** | The name of the peer. | [optional] | |**walletId** | **UUID** | | [optional] | |**tradingAccount** | **String** | If this transaction is an exchange internal transfer, this field will be populated with the type of that trading account. | [optional] | diff --git a/docs/TransactionRequest.md b/docs/TransactionRequest.md index c9505fcd..526c4da3 100644 --- a/docs/TransactionRequest.md +++ b/docs/TransactionRequest.md @@ -30,6 +30,7 @@ |**extraParameters** | **Object** | Additional protocol / operation specific key-value parameters: For UTXO-based blockchain input selection, add the key `inputsSelection` with the value set the [input selection structure.](https://developers.fireblocks.com/reference/transaction-objects#inputsselection) The inputs can be retrieved from the [Retrieve Unspent Inputs endpoint.](https://developers.fireblocks.com/reference/get_vault-accounts-vaultaccountid-assetid-unspent-inputs) For `RAW` operations, add the key `rawMessageData` with the value set to the [raw message data structure.](https://developers.fireblocks.com/reference/raw-signing-objects#rawmessagedata) For `CONTRACT_CALL` operations, add the key `contractCallData` with the value set to the Ethereum smart contract Application Binary Interface (ABI) payload. The Fireblocks [development libraries](https://developers.fireblocks.com/docs/ethereum-development#convenience-libraries) are recommended for building contract call transactions. For **exchange compliance (e.g., Binance) and Travel Rule purposes**, include the key `piiData` containing a **custom JSON structure** with Personally Identifiable Information (PII) relevant to the transaction. This data must be fully **encrypted by the sender** before being submitted to the Fireblocks API. The recommended encryption method is **hybrid encryption** using AES-256-GCM for the payload and RSA-OAEP for key exchange, with the recipient exchange’s public key. [development libraries](https://developers.fireblocks.com/docs/a-developers-guide-to-constructing-encrypted-pii-messages-for-binance-via-fireblocks) | [optional] | |**customerRefId** | **String** | The ID for AML providers to associate the owner of funds with transactions. | [optional] | |**travelRuleMessage** | [**TravelRuleCreateTransactionRequest**](TravelRuleCreateTransactionRequest.md) | | [optional] | +|**travelRuleMessageId** | **String** | The ID of the travel rule message from any travel rule provider. Used for travel rule linking functionality to associate transactions with existing travel rule messages. | [optional] | |**autoStaking** | **Boolean** | This feature is no longer supported. | [optional] | |**networkStaking** | [**TransactionRequestNetworkStaking**](TransactionRequestNetworkStaking.md) | | [optional] | |**cpuStaking** | [**TransactionRequestNetworkStaking**](TransactionRequestNetworkStaking.md) | | [optional] | diff --git a/docs/TransactionRequestDestination.md b/docs/TransactionRequestDestination.md index 13a0099a..ff5488cf 100644 --- a/docs/TransactionRequestDestination.md +++ b/docs/TransactionRequestDestination.md @@ -9,6 +9,8 @@ |------------ | ------------- | ------------- | -------------| |**amount** | **String** | | [optional] | |**destination** | [**DestinationTransferPeerPath**](DestinationTransferPeerPath.md) | | [optional] | +|**travelRuleMessageId** | **String** | The ID of the travel rule message from any travel rule provider. Used for travel rule linking functionality to associate transactions with existing travel rule messages. | [optional] | +|**customerRefId** | **String** | The ID for AML providers to associate the owner of funds with transactions. | [optional] | diff --git a/docs/WebhookEvent.md b/docs/WebhookEvent.md index 545f2ddc..78f01547 100644 --- a/docs/WebhookEvent.md +++ b/docs/WebhookEvent.md @@ -11,6 +11,8 @@ * `TRANSACTION_APPROVAL_STATUS_UPDATED` (value: `"transaction.approval_status.updated"`) +* `TRANSACTION_NETWORK_RECORDS_PROCESSING_COMPLETED` (value: `"transaction.network_records.processing_completed"`) + * `EXTERNAL_WALLET_ASSET_ADDED` (value: `"external_wallet.asset.added"`) * `EXTERNAL_WALLET_ASSET_REMOVED` (value: `"external_wallet.asset.removed"`) @@ -25,7 +27,7 @@ * `VAULT_ACCOUNT_CREATED` (value: `"vault_account.created"`) -* `VAULT_ACCOUNT_ASSET_LISTED` (value: `"vault_account.asset.listed"`) +* `VAULT_ACCOUNT_ASSET_ADDED` (value: `"vault_account.asset.added"`) * `VAULT_ACCOUNT_ASSET_BALANCE_UPDATED` (value: `"vault_account.asset.balance_updated"`) @@ -35,11 +37,21 @@ * `EMBEDDED_WALLET_ASSET_BALANCE_UPDATED` (value: `"embedded_wallet.asset.balance_updated"`) -* `EMBEDDED_WALLET_ASSET_LISTED` (value: `"embedded_wallet.asset.listed"`) +* `EMBEDDED_WALLET_ASSET_ADDED` (value: `"embedded_wallet.asset.added"`) * `EMBEDDED_WALLET_ACCOUNT_CREATED` (value: `"embedded_wallet.account.created"`) * `EMBEDDED_WALLET_DEVICE_ADDED` (value: `"embedded_wallet.device.added"`) +* `ONCHAIN_DATA_UPDATED` (value: `"onchain_data.updated"`) + +* `CONNECTION_ADDED` (value: `"connection.added"`) + +* `CONNECTION_REMOVED` (value: `"connection.removed"`) + +* `CONNECTION_REQUEST_WAITING_PEER_APPROVAL` (value: `"connection.request.waiting_peer_approval"`) + +* `CONNECTION_REQUEST_REJECTED_BY_PEER` (value: `"connection.request.rejected_by_peer"`) + diff --git a/docs/WebhooksV2BetaApi.md b/docs/WebhooksV2Api.md similarity index 65% rename from docs/WebhooksV2BetaApi.md rename to docs/WebhooksV2Api.md index ec707ce0..efb262f0 100644 --- a/docs/WebhooksV2BetaApi.md +++ b/docs/WebhooksV2Api.md @@ -1,18 +1,21 @@ -# WebhooksV2BetaApi +# WebhooksV2Api All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createWebhook**](WebhooksV2BetaApi.md#createWebhook) | **POST** /webhooks | Create new webhook | -| [**deleteWebhook**](WebhooksV2BetaApi.md#deleteWebhook) | **DELETE** /webhooks/{webhookId} | Delete webhook | -| [**getNotification**](WebhooksV2BetaApi.md#getNotification) | **GET** /webhooks/{webhookId}/notifications/{notificationId} | Get notification by id | -| [**getNotifications**](WebhooksV2BetaApi.md#getNotifications) | **GET** /webhooks/{webhookId}/notifications | Get all notifications by webhook id | -| [**getWebhook**](WebhooksV2BetaApi.md#getWebhook) | **GET** /webhooks/{webhookId} | Get webhook by id | -| [**getWebhooks**](WebhooksV2BetaApi.md#getWebhooks) | **GET** /webhooks | Get all webhooks | -| [**resendNotificationById**](WebhooksV2BetaApi.md#resendNotificationById) | **POST** /webhooks/{webhookId}/notifications/{notificationId}/resend | Resend notification by id | -| [**resendNotificationsByResourceId**](WebhooksV2BetaApi.md#resendNotificationsByResourceId) | **POST** /webhooks/{webhookId}/notifications/resend_by_resource | Resend notifications by resource Id | -| [**updateWebhook**](WebhooksV2BetaApi.md#updateWebhook) | **PATCH** /webhooks/{webhookId} | Update webhook | +| [**createWebhook**](WebhooksV2Api.md#createWebhook) | **POST** /webhooks | Create new webhook | +| [**deleteWebhook**](WebhooksV2Api.md#deleteWebhook) | **DELETE** /webhooks/{webhookId} | Delete webhook | +| [**getNotification**](WebhooksV2Api.md#getNotification) | **GET** /webhooks/{webhookId}/notifications/{notificationId} | Get notification by id | +| [**getNotificationAttempts**](WebhooksV2Api.md#getNotificationAttempts) | **GET** /webhooks/{webhookId}/notifications/{notificationId}/attempts | Get notification attempts | +| [**getNotifications**](WebhooksV2Api.md#getNotifications) | **GET** /webhooks/{webhookId}/notifications | Get all notifications by webhook id | +| [**getResendJobStatus**](WebhooksV2Api.md#getResendJobStatus) | **GET** /webhooks/{webhookId}/notifications/resend_failed/jobs/{jobId} | Get resend job status | +| [**getWebhook**](WebhooksV2Api.md#getWebhook) | **GET** /webhooks/{webhookId} | Get webhook by id | +| [**getWebhooks**](WebhooksV2Api.md#getWebhooks) | **GET** /webhooks | Get all webhooks | +| [**resendFailedNotifications**](WebhooksV2Api.md#resendFailedNotifications) | **POST** /webhooks/{webhookId}/notifications/resend_failed | Resend failed notifications | +| [**resendNotificationById**](WebhooksV2Api.md#resendNotificationById) | **POST** /webhooks/{webhookId}/notifications/{notificationId}/resend | Resend notification by id | +| [**resendNotificationsByResourceId**](WebhooksV2Api.md#resendNotificationsByResourceId) | **POST** /webhooks/{webhookId}/notifications/resend_by_resource | Resend notifications by resource Id | +| [**updateWebhook**](WebhooksV2Api.md#updateWebhook) | **PATCH** /webhooks/{webhookId} | Update webhook | @@ -22,7 +25,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ Create new webhook -Creates a new webhook, which will be triggered on the specified events **Note:** These endpoints are currently in beta and might be subject to changes. +Creates a new webhook, which will be triggered on the specified events Endpoint Permission: Owner, Admin, Non-Signing Admin. ### Example @@ -35,7 +38,7 @@ 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.WebhooksV2BetaApi; +import com.fireblocks.sdk.api.WebhooksV2Api; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -50,19 +53,19 @@ public class Example { CreateWebhookRequest createWebhookRequest = new CreateWebhookRequest(); // CreateWebhookRequest | 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.webhooksV2Beta().createWebhook(createWebhookRequest, idempotencyKey); + CompletableFuture> response = fireblocks.webhooksV2().createWebhook(createWebhookRequest, 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 WebhooksV2BetaApi#createWebhook"); + System.err.println("Exception when calling WebhooksV2Api#createWebhook"); 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 WebhooksV2BetaApi#createWebhook"); + System.err.println("Exception when calling WebhooksV2Api#createWebhook"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -107,7 +110,7 @@ No authorization required Delete webhook -Delete a webhook by its id **Note:** These endpoints are currently in beta and might be subject to changes. +Delete a webhook by its id Endpoint Permission: Owner, Admin, Non-Signing Admin. ### Example @@ -120,7 +123,7 @@ 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.WebhooksV2BetaApi; +import com.fireblocks.sdk.api.WebhooksV2Api; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -134,19 +137,19 @@ public class Example { UUID webhookId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the webhook try { - CompletableFuture> response = fireblocks.webhooksV2Beta().deleteWebhook(webhookId); + CompletableFuture> response = fireblocks.webhooksV2().deleteWebhook(webhookId); 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 WebhooksV2BetaApi#deleteWebhook"); + System.err.println("Exception when calling WebhooksV2Api#deleteWebhook"); 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 WebhooksV2BetaApi#deleteWebhook"); + System.err.println("Exception when calling WebhooksV2Api#deleteWebhook"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -190,7 +193,7 @@ No authorization required Get notification by id -Get notification by id **Note:** These endpoints are currently in beta and might be subject to changes. +Get notification by id ### Example @@ -203,7 +206,7 @@ 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.WebhooksV2BetaApi; +import com.fireblocks.sdk.api.WebhooksV2Api; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -219,19 +222,19 @@ public class Example { String notificationId = "notificationId_example"; // String | The ID of the notification to fetch Boolean includeData = true; // Boolean | Include the data of the notification try { - CompletableFuture> response = fireblocks.webhooksV2Beta().getNotification(webhookId, notificationId, includeData); + CompletableFuture> response = fireblocks.webhooksV2().getNotification(webhookId, notificationId, includeData); 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 WebhooksV2BetaApi#getNotification"); + System.err.println("Exception when calling WebhooksV2Api#getNotification"); 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 WebhooksV2BetaApi#getNotification"); + System.err.println("Exception when calling WebhooksV2Api#getNotification"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -271,13 +274,102 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## getNotificationAttempts + +> CompletableFuture> getNotificationAttempts getNotificationAttempts(webhookId, notificationId, pageCursor, pageSize) + +Get notification attempts + +Get notification attempts by notification id + +### 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.WebhooksV2Api; +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 webhookId = "webhookId_example"; // String | The ID of the webhook to fetch + String notificationId = "notificationId_example"; // String | The ID of the notification to fetch + String pageCursor = "pageCursor_example"; // String | Cursor of the required page + BigDecimal pageSize = new BigDecimal("10"); // BigDecimal | Maximum number of items in the page + try { + CompletableFuture> response = fireblocks.webhooksV2().getNotificationAttempts(webhookId, notificationId, 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 WebhooksV2Api#getNotificationAttempts"); + 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 WebhooksV2Api#getNotificationAttempts"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **webhookId** | **String**| The ID of the webhook to fetch | | +| **notificationId** | **String**| The ID of the notification to fetch | | +| **pageCursor** | **String**| Cursor of the required page | [optional] | +| **pageSize** | **BigDecimal**| Maximum number of items in the page | [optional] [default to 10] | + +### 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** | OK | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## getNotifications -> CompletableFuture> getNotifications getNotifications(webhookId, order, pageCursor, pageSize, createdStartDate, createdEndDate, statuses, eventTypes, resourceId) +> CompletableFuture> getNotifications getNotifications(webhookId, order, sortBy, pageCursor, pageSize) Get all notifications by webhook id -Get all notifications by webhook id (paginated) **Note:** These endpoints are currently in beta and might be subject to changes. +Get all notifications by webhook id (paginated) ### Example @@ -290,7 +382,7 @@ 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.WebhooksV2BetaApi; +import com.fireblocks.sdk.api.WebhooksV2Api; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -304,27 +396,23 @@ public class Example { UUID webhookId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | String order = "ASC"; // String | ASC / DESC ordering (default DESC) + String sortBy = "id"; // String | Sort by field String pageCursor = "pageCursor_example"; // String | Cursor of the required page BigDecimal pageSize = new BigDecimal("100"); // BigDecimal | Maximum number of items in the page - String createdStartDate = "2024-09-24T09:14:38.356Z"; // String | sort by start date - String createdEndDate = "2024-09-24T09:14:38.356Z"; // String | sort by end date - List statuses = Arrays.asList(); // List | Filter by Notification statues - List eventTypes = Arrays.asList(); // List | Filter by Notification eventTypes - String resourceId = "resourceId_example"; // String | Filter by resourceId try { - CompletableFuture> response = fireblocks.webhooksV2Beta().getNotifications(webhookId, order, pageCursor, pageSize, createdStartDate, createdEndDate, statuses, eventTypes, resourceId); + CompletableFuture> response = fireblocks.webhooksV2().getNotifications(webhookId, order, sortBy, 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 WebhooksV2BetaApi#getNotifications"); + System.err.println("Exception when calling WebhooksV2Api#getNotifications"); 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 WebhooksV2BetaApi#getNotifications"); + System.err.println("Exception when calling WebhooksV2Api#getNotifications"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -341,13 +429,9 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **webhookId** | **UUID**| | | | **order** | **String**| ASC / DESC ordering (default DESC) | [optional] [default to DESC] [enum: ASC, DESC] | +| **sortBy** | **String**| Sort by field | [optional] [default to updatedAt] [enum: id, createdAt, updatedAt, status, eventType, resourceId] | | **pageCursor** | **String**| Cursor of the required page | [optional] | | **pageSize** | **BigDecimal**| Maximum number of items in the page | [optional] [default to 100] | -| **createdStartDate** | **String**| sort by start date | [optional] | -| **createdEndDate** | **String**| sort by end date | [optional] | -| **statuses** | [**List<NotificationStatus>**](NotificationStatus.md)| Filter by Notification statues | [optional] | -| **eventTypes** | [**List<WebhookEvent>**](WebhookEvent.md)| Filter by Notification eventTypes | [optional] | -| **resourceId** | **String**| Filter by resourceId | [optional] | ### Return type @@ -370,13 +454,98 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## getResendJobStatus + +> CompletableFuture> getResendJobStatus getResendJobStatus(webhookId, jobId) + +Get resend job status + +Get the status of a resend job + +### 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.WebhooksV2Api; +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 webhookId = "webhookId_example"; // String | The ID of the webhook + String jobId = "jobId_example"; // String | The ID of the resend job + try { + CompletableFuture> response = fireblocks.webhooksV2().getResendJobStatus(webhookId, jobId); + 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 WebhooksV2Api#getResendJobStatus"); + 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 WebhooksV2Api#getResendJobStatus"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **webhookId** | **String**| The ID of the webhook | | +| **jobId** | **String**| The ID of the resend job | | + +### 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** | Job status | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## getWebhook > CompletableFuture> getWebhook getWebhook(webhookId) Get webhook by id -Retrieve a webhook by its id **Note:** These endpoints are currently in beta and might be subject to changes. +Retrieve a webhook by its id ### Example @@ -389,7 +558,7 @@ 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.WebhooksV2BetaApi; +import com.fireblocks.sdk.api.WebhooksV2Api; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -403,19 +572,19 @@ public class Example { UUID webhookId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the webhook try { - CompletableFuture> response = fireblocks.webhooksV2Beta().getWebhook(webhookId); + CompletableFuture> response = fireblocks.webhooksV2().getWebhook(webhookId); 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 WebhooksV2BetaApi#getWebhook"); + System.err.println("Exception when calling WebhooksV2Api#getWebhook"); 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 WebhooksV2BetaApi#getWebhook"); + System.err.println("Exception when calling WebhooksV2Api#getWebhook"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -459,7 +628,7 @@ No authorization required Get all webhooks -Get all webhooks (paginated) **Note:** These endpoints are currently in beta and might be subject to changes. +Get all webhooks (paginated) ### Example @@ -472,7 +641,7 @@ 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.WebhooksV2BetaApi; +import com.fireblocks.sdk.api.WebhooksV2Api; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -488,19 +657,19 @@ public class Example { String pageCursor = "pageCursor_example"; // String | Cursor of the required page BigDecimal pageSize = new BigDecimal("10"); // BigDecimal | Maximum number of items in the page try { - CompletableFuture> response = fireblocks.webhooksV2Beta().getWebhooks(order, pageCursor, pageSize); + CompletableFuture> response = fireblocks.webhooksV2().getWebhooks(order, 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 WebhooksV2BetaApi#getWebhooks"); + System.err.println("Exception when calling WebhooksV2Api#getWebhooks"); 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 WebhooksV2BetaApi#getWebhooks"); + System.err.println("Exception when calling WebhooksV2Api#getWebhooks"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -540,13 +709,101 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## resendFailedNotifications + +> CompletableFuture> resendFailedNotifications resendFailedNotifications(resendFailedNotificationsRequest, webhookId, idempotencyKey) + +Resend failed notifications + +Resend all failed notifications for a webhook in the last 24 hours Endpoint Permission: Owner, Admin, Non-Signing Admin. + +### 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.WebhooksV2Api; +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); + + ResendFailedNotificationsRequest resendFailedNotificationsRequest = new ResendFailedNotificationsRequest(); // ResendFailedNotificationsRequest | + String webhookId = "webhookId_example"; // String | The ID of the webhook + 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.webhooksV2().resendFailedNotifications(resendFailedNotificationsRequest, webhookId, 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 WebhooksV2Api#resendFailedNotifications"); + 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 WebhooksV2Api#resendFailedNotifications"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **resendFailedNotificationsRequest** | [**ResendFailedNotificationsRequest**](ResendFailedNotificationsRequest.md)| | | +| **webhookId** | **String**| The ID of the webhook | | +| **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**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | No failed notifications to resend | * X-Request-ID -
| +| **202** | Resend failed notifications request was accepted and is being processed | * X-Request-ID -
* Location -
| +| **0** | Error Response | * X-Request-ID -
| + + ## resendNotificationById > CompletableFuture> resendNotificationById resendNotificationById(webhookId, notificationId, idempotencyKey) Resend notification by id -Resend notification by ID **Note:** These endpoints are currently in beta and might be subject to changes. +Resend notification by ID Endpoint Permission: Owner, Admin, Non-Signing Admin. ### Example @@ -559,7 +816,7 @@ 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.WebhooksV2BetaApi; +import com.fireblocks.sdk.api.WebhooksV2Api; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -575,18 +832,18 @@ public class Example { String notificationId = "notificationId_example"; // String | The ID of the notification 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.webhooksV2Beta().resendNotificationById(webhookId, notificationId, idempotencyKey); + CompletableFuture> response = fireblocks.webhooksV2().resendNotificationById(webhookId, notificationId, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling WebhooksV2BetaApi#resendNotificationById"); + System.err.println("Exception when calling WebhooksV2Api#resendNotificationById"); 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 WebhooksV2BetaApi#resendNotificationById"); + System.err.println("Exception when calling WebhooksV2Api#resendNotificationById"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -632,7 +889,7 @@ No authorization required Resend notifications by resource Id -Resend notifications by resource Id **Note:** These endpoints are currently in beta and might be subject to changes. +Resend notifications by resource Id Endpoint Permission: Owner, Admin, Non-Signing Admin. ### Example @@ -645,7 +902,7 @@ 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.WebhooksV2BetaApi; +import com.fireblocks.sdk.api.WebhooksV2Api; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -661,18 +918,18 @@ public class Example { String webhookId = "webhookId_example"; // String | The ID of the webhook 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.webhooksV2Beta().resendNotificationsByResourceId(resendNotificationsByResourceIdRequest, webhookId, idempotencyKey); + CompletableFuture> response = fireblocks.webhooksV2().resendNotificationsByResourceId(resendNotificationsByResourceIdRequest, webhookId, idempotencyKey); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling WebhooksV2BetaApi#resendNotificationsByResourceId"); + System.err.println("Exception when calling WebhooksV2Api#resendNotificationsByResourceId"); 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 WebhooksV2BetaApi#resendNotificationsByResourceId"); + System.err.println("Exception when calling WebhooksV2Api#resendNotificationsByResourceId"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -718,7 +975,7 @@ No authorization required Update webhook -Update a webhook by its id **Note:** These endpoints are currently in beta and might be subject to changes. +Update a webhook by its id Endpoint Permission: Owner, Admin, Non-Signing Admin. ### Example @@ -731,7 +988,7 @@ 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.WebhooksV2BetaApi; +import com.fireblocks.sdk.api.WebhooksV2Api; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -746,19 +1003,19 @@ public class Example { UpdateWebhookRequest updateWebhookRequest = new UpdateWebhookRequest(); // UpdateWebhookRequest | UUID webhookId = UUID.fromString("44fcead0-7053-4831-a53a-df7fb90d440f"); // UUID | The unique identifier of the webhook try { - CompletableFuture> response = fireblocks.webhooksV2Beta().updateWebhook(updateWebhookRequest, webhookId); + CompletableFuture> response = fireblocks.webhooksV2().updateWebhook(updateWebhookRequest, webhookId); 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 WebhooksV2BetaApi#updateWebhook"); + System.err.println("Exception when calling WebhooksV2Api#updateWebhook"); 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 WebhooksV2BetaApi#updateWebhook"); + System.err.println("Exception when calling WebhooksV2Api#updateWebhook"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); diff --git a/pom.xml b/pom.xml index e9d18363..94938f50 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 11.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 15867107..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 = "11.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 b2650772..997f028d 100644 --- a/src/main/java/com/fireblocks/sdk/Fireblocks.java +++ b/src/main/java/com/fireblocks/sdk/Fireblocks.java @@ -76,7 +76,7 @@ public class Fireblocks { private VaultsApi vaults; private Web3ConnectionsApi web3Connections; private WebhooksApi webhooks; - private WebhooksV2BetaApi webhooksV2Beta; + private WebhooksV2Api webhooksV2; private WhitelistIpAddressesApi whitelistIpAddresses; private WorkspaceStatusBetaApi workspaceStatusBeta; @@ -498,11 +498,11 @@ public WebhooksApi webhooks() { return webhooks; } - public WebhooksV2BetaApi webhooksV2Beta() { - if (webhooksV2Beta == null) { - webhooksV2Beta = new WebhooksV2BetaApi(apiClient); + public WebhooksV2Api webhooksV2() { + if (webhooksV2 == null) { + webhooksV2 = new WebhooksV2Api(apiClient); } - return webhooksV2Beta; + return webhooksV2; } public WhitelistIpAddressesApi whitelistIpAddresses() { diff --git a/src/main/java/com/fireblocks/sdk/api/WebhooksV2BetaApi.java b/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java similarity index 71% rename from src/main/java/com/fireblocks/sdk/api/WebhooksV2BetaApi.java rename to src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java index e974bd7f..d5b68469 100644 --- a/src/main/java/com/fireblocks/sdk/api/WebhooksV2BetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java @@ -21,13 +21,15 @@ import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; import com.fireblocks.sdk.model.CreateWebhookRequest; +import com.fireblocks.sdk.model.NotificationAttemptsPaginatedResponse; import com.fireblocks.sdk.model.NotificationPaginatedResponse; -import com.fireblocks.sdk.model.NotificationStatus; import com.fireblocks.sdk.model.NotificationWithData; +import com.fireblocks.sdk.model.ResendFailedNotificationsJobStatusResponse; +import com.fireblocks.sdk.model.ResendFailedNotificationsRequest; +import com.fireblocks.sdk.model.ResendFailedNotificationsResponse; import com.fireblocks.sdk.model.ResendNotificationsByResourceIdRequest; import com.fireblocks.sdk.model.UpdateWebhookRequest; import com.fireblocks.sdk.model.Webhook; -import com.fireblocks.sdk.model.WebhookEvent; import com.fireblocks.sdk.model.WebhookPaginatedResponse; import java.io.IOException; import java.io.InputStream; @@ -45,7 +47,7 @@ import java.util.function.Consumer; @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class WebhooksV2BetaApi { +public class WebhooksV2Api { private final HttpClient memberVarHttpClient; private final ObjectMapper memberVarObjectMapper; private final String memberVarBaseUri; @@ -54,11 +56,11 @@ public class WebhooksV2BetaApi { private final Consumer> memberVarResponseInterceptor; private final Consumer> memberVarAsyncResponseInterceptor; - public WebhooksV2BetaApi() { + public WebhooksV2Api() { this(new ApiClient()); } - public WebhooksV2BetaApi(ApiClient apiClient) { + public WebhooksV2Api(ApiClient apiClient) { memberVarHttpClient = apiClient.getHttpClient(); memberVarObjectMapper = apiClient.getObjectMapper(); memberVarBaseUri = apiClient.getBaseUri(); @@ -84,7 +86,7 @@ private String formatExceptionMessage(String operationId, int statusCode, String /** * Create new webhook Creates a new webhook, which will be triggered on the specified events - * **Note:** These endpoints are currently in beta and might be subject to changes. + * Endpoint Permission: Owner, Admin, Non-Signing Admin. * * @param createWebhookRequest (required) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple @@ -163,8 +165,8 @@ private HttpRequest.Builder createWebhookRequestBuilder( return localVarRequestBuilder; } /** - * Delete webhook Delete a webhook by its id **Note:** These endpoints are currently in beta and - * might be subject to changes. + * Delete webhook Delete a webhook by its id Endpoint Permission: Owner, Admin, Non-Signing + * Admin. * * @param webhookId The unique identifier of the webhook (required) * @return CompletableFuture<ApiResponse<Webhook>> @@ -230,8 +232,7 @@ private HttpRequest.Builder deleteWebhookRequestBuilder(UUID webhookId) throws A return localVarRequestBuilder; } /** - * Get notification by id Get notification by id **Note:** These endpoints are currently in beta - * and might be subject to changes. + * Get notification by id Get notification by id * * @param webhookId The ID of the webhook to fetch (required) * @param notificationId The ID of the notification to fetch (required) @@ -320,44 +321,120 @@ private HttpRequest.Builder getNotificationRequestBuilder( return localVarRequestBuilder; } /** - * Get all notifications by webhook id Get all notifications by webhook id (paginated) **Note:** - * These endpoints are currently in beta and might be subject to changes. + * Get notification attempts Get notification attempts by notification id + * + * @param webhookId The ID of the webhook to fetch (required) + * @param notificationId The ID of the notification to fetch (required) + * @param pageCursor Cursor of the required page (optional) + * @param pageSize Maximum number of items in the page (optional, default to 10) + * @return CompletableFuture<ApiResponse<NotificationAttemptsPaginatedResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> + getNotificationAttempts( + String webhookId, String notificationId, String pageCursor, BigDecimal pageSize) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getNotificationAttemptsRequestBuilder( + webhookId, notificationId, 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( + "getNotificationAttempts", 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< + NotificationAttemptsPaginatedResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getNotificationAttemptsRequestBuilder( + String webhookId, String notificationId, String pageCursor, BigDecimal pageSize) + throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "getNotificationAttempts", "webhookId", webhookId); + ValidationUtils.assertParamExistsAndNotEmpty( + "getNotificationAttempts", "notificationId", notificationId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/webhooks/{webhookId}/notifications/{notificationId}/attempts" + .replace("{webhookId}", ApiClient.urlEncode(webhookId.toString())) + .replace( + "{notificationId}", ApiClient.urlEncode(notificationId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + + 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; + } + /** + * Get all notifications by webhook id Get all notifications by webhook id (paginated) * * @param webhookId (required) * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) + * @param sortBy Sort by field (optional, default to updatedAt) * @param pageCursor Cursor of the required page (optional) * @param pageSize Maximum number of items in the page (optional, default to 100) - * @param createdStartDate sort by start date (optional) - * @param createdEndDate sort by end date (optional) - * @param statuses Filter by Notification statues (optional - * @param eventTypes Filter by Notification eventTypes (optional - * @param resourceId Filter by resourceId (optional) * @return CompletableFuture<ApiResponse<NotificationPaginatedResponse>> * @throws ApiException if fails to make API call */ public CompletableFuture> getNotifications( - UUID webhookId, - String order, - String pageCursor, - BigDecimal pageSize, - String createdStartDate, - String createdEndDate, - List statuses, - List eventTypes, - String resourceId) + UUID webhookId, String order, String sortBy, String pageCursor, BigDecimal pageSize) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = - getNotificationsRequestBuilder( - webhookId, - order, - pageCursor, - pageSize, - createdStartDate, - createdEndDate, - statuses, - eventTypes, - resourceId); + getNotificationsRequestBuilder(webhookId, order, sortBy, pageCursor, pageSize); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -391,15 +468,7 @@ public CompletableFuture> getNotifica } private HttpRequest.Builder getNotificationsRequestBuilder( - UUID webhookId, - String order, - String pageCursor, - BigDecimal pageSize, - String createdStartDate, - String createdEndDate, - List statuses, - List eventTypes, - String resourceId) + UUID webhookId, String order, String sortBy, String pageCursor, BigDecimal pageSize) throws ApiException { ValidationUtils.assertParamExistsAndNotEmpty( "getNotifications", "webhookId", webhookId.toString()); @@ -415,21 +484,12 @@ private HttpRequest.Builder getNotificationsRequestBuilder( String localVarQueryParameterBaseName; localVarQueryParameterBaseName = "order"; localVarQueryParams.addAll(ApiClient.parameterToPairs("order", order)); + localVarQueryParameterBaseName = "sortBy"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("sortBy", sortBy)); localVarQueryParameterBaseName = "pageCursor"; localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); localVarQueryParameterBaseName = "pageSize"; localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); - localVarQueryParameterBaseName = "createdStartDate"; - localVarQueryParams.addAll( - ApiClient.parameterToPairs("createdStartDate", createdStartDate)); - localVarQueryParameterBaseName = "createdEndDate"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("createdEndDate", createdEndDate)); - localVarQueryParameterBaseName = "statuses"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "statuses", statuses)); - localVarQueryParameterBaseName = "eventTypes"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "eventTypes", eventTypes)); - localVarQueryParameterBaseName = "resourceId"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("resourceId", resourceId)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); @@ -455,8 +515,80 @@ private HttpRequest.Builder getNotificationsRequestBuilder( return localVarRequestBuilder; } /** - * Get webhook by id Retrieve a webhook by its id **Note:** These endpoints are currently in - * beta and might be subject to changes. + * Get resend job status Get the status of a resend job + * + * @param webhookId The ID of the webhook (required) + * @param jobId The ID of the resend job (required) + * @return + * CompletableFuture<ApiResponse<ResendFailedNotificationsJobStatusResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> + getResendJobStatus(String webhookId, String jobId) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getResendJobStatusRequestBuilder(webhookId, jobId); + 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( + "getResendJobStatus", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse< + ResendFailedNotificationsJobStatusResponse>( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() + ? null + : memberVarObjectMapper.readValue( + responseBody, + new TypeReference< + ResendFailedNotificationsJobStatusResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getResendJobStatusRequestBuilder(String webhookId, String jobId) + throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("getResendJobStatus", "webhookId", webhookId); + ValidationUtils.assertParamExistsAndNotEmpty("getResendJobStatus", "jobId", jobId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/webhooks/{webhookId}/notifications/resend_failed/jobs/{jobId}" + .replace("{webhookId}", ApiClient.urlEncode(webhookId.toString())) + .replace("{jobId}", ApiClient.urlEncode(jobId.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; + } + /** + * Get webhook by id Retrieve a webhook by its id * * @param webhookId The unique identifier of the webhook (required) * @return CompletableFuture<ApiResponse<Webhook>> @@ -521,8 +653,7 @@ private HttpRequest.Builder getWebhookRequestBuilder(UUID webhookId) throws ApiE return localVarRequestBuilder; } /** - * Get all webhooks Get all webhooks (paginated) **Note:** These endpoints are currently in beta - * and might be subject to changes. + * Get all webhooks Get all webhooks (paginated) * * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) * @param pageCursor Cursor of the required page (optional) @@ -608,8 +739,105 @@ private HttpRequest.Builder getWebhooksRequestBuilder( return localVarRequestBuilder; } /** - * Resend notification by id Resend notification by ID **Note:** These endpoints are currently - * in beta and might be subject to changes. + * Resend failed notifications Resend all failed notifications for a webhook in the last 24 + * hours Endpoint Permission: Owner, Admin, Non-Signing Admin. + * + * @param resendFailedNotificationsRequest (required) + * @param webhookId The ID of the webhook (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<ResendFailedNotificationsResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> + resendFailedNotifications( + ResendFailedNotificationsRequest resendFailedNotificationsRequest, + String webhookId, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + resendFailedNotificationsRequestBuilder( + resendFailedNotificationsRequest, webhookId, 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( + "resendFailedNotifications", 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< + ResendFailedNotificationsResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder resendFailedNotificationsRequestBuilder( + ResendFailedNotificationsRequest resendFailedNotificationsRequest, + String webhookId, + String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "resendFailedNotifications", + "resendFailedNotificationsRequest", + resendFailedNotificationsRequest); + ValidationUtils.assertParamExistsAndNotEmpty( + "resendFailedNotifications", "webhookId", webhookId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/webhooks/{webhookId}/notifications/resend_failed" + .replace("{webhookId}", ApiClient.urlEncode(webhookId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + if (idempotencyKey != null) { + localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = + memberVarObjectMapper.writeValueAsBytes(resendFailedNotificationsRequest); + localVarRequestBuilder.method( + "POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Resend notification by id Resend notification by ID Endpoint Permission: Owner, Admin, + * Non-Signing Admin. * * @param webhookId The ID of the webhook (required) * @param notificationId The ID of the notification (required) @@ -679,8 +907,8 @@ private HttpRequest.Builder resendNotificationByIdRequestBuilder( return localVarRequestBuilder; } /** - * Resend notifications by resource Id Resend notifications by resource Id **Note:** These - * endpoints are currently in beta and might be subject to changes. + * Resend notifications by resource Id Resend notifications by resource Id Endpoint Permission: + * Owner, Admin, Non-Signing Admin. * * @param resendNotificationsByResourceIdRequest (required) * @param webhookId The ID of the webhook (required) @@ -766,8 +994,8 @@ private HttpRequest.Builder resendNotificationsByResourceIdRequestBuilder( return localVarRequestBuilder; } /** - * Update webhook Update a webhook by its id **Note:** These endpoints are currently in beta and - * might be subject to changes. + * Update webhook Update a webhook by its id Endpoint Permission: Owner, Admin, Non-Signing + * Admin. * * @param updateWebhookRequest (required) * @param webhookId The unique identifier of the webhook (required) diff --git a/src/main/java/com/fireblocks/sdk/model/DestinationTransferPeerPathResponse.java b/src/main/java/com/fireblocks/sdk/model/DestinationTransferPeerPathResponse.java index 733c0ac2..d8db5c26 100644 --- a/src/main/java/com/fireblocks/sdk/model/DestinationTransferPeerPathResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/DestinationTransferPeerPathResponse.java @@ -112,14 +112,13 @@ public DestinationTransferPeerPathResponse id(String id) { /** * The ID of the peer. You can retrieve the ID of each venue object using the endpoints for - * [listing vault - * accounts](https://developers.fireblocks.com/reference/get_vault-accounts-paged), [listing - * exchange account](https://developers.fireblocks.com/reference/get_exchange-accounts), - * [listing fiat accounts](https://developers.fireblocks.com/reference/get_fiat-accounts), - * [listing internal wallets](https://developers.fireblocks.com/reference/get_internal-wallets), - * [listing external wallets](https://developers.fireblocks.com/reference/get_external-wallets), + * [listing vault accounts](https://developers.fireblocks.com/reference/getpagedvaultaccounts), + * [listing exchange account](https://developers.fireblocks.com/reference/getexchangeaccounts), + * [listing fiat accounts](https://developers.fireblocks.com/reference/getfiataccounts), + * [listing internal wallets](https://developers.fireblocks.com/reference/getinternalwallets), + * [listing external wallets](https://developers.fireblocks.com/reference/getexternalwallets), * [listing network - * connections](https://developers.fireblocks.com/reference/get_network-connections). For the + * connections](https://developers.fireblocks.com/reference/getnetworkconnections). For the * other types, this parameter is not needed. * * @return id diff --git a/src/main/java/com/fireblocks/sdk/model/EstimatedFeeDetails.java b/src/main/java/com/fireblocks/sdk/model/EstimatedFeeDetails.java new file mode 100644 index 00000000..1cd9dd0e --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/EstimatedFeeDetails.java @@ -0,0 +1,201 @@ +/* + * 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.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; +import java.util.StringJoiner; + +/** Optional detailed fee breakdown for high/medium/low estimates */ +@JsonPropertyOrder({ + EstimatedFeeDetails.JSON_PROPERTY_LOW, + EstimatedFeeDetails.JSON_PROPERTY_MEDIUM, + EstimatedFeeDetails.JSON_PROPERTY_HIGH +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class EstimatedFeeDetails { + public static final String JSON_PROPERTY_LOW = "low"; + private FeeBreakdown low; + + public static final String JSON_PROPERTY_MEDIUM = "medium"; + private FeeBreakdown medium; + + public static final String JSON_PROPERTY_HIGH = "high"; + private FeeBreakdown high; + + public EstimatedFeeDetails() {} + + public EstimatedFeeDetails low(FeeBreakdown low) { + this.low = low; + return this; + } + + /** + * Get low + * + * @return low + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FeeBreakdown getLow() { + return low; + } + + @JsonProperty(JSON_PROPERTY_LOW) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLow(FeeBreakdown low) { + this.low = low; + } + + public EstimatedFeeDetails medium(FeeBreakdown medium) { + this.medium = medium; + return this; + } + + /** + * Get medium + * + * @return medium + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MEDIUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FeeBreakdown getMedium() { + return medium; + } + + @JsonProperty(JSON_PROPERTY_MEDIUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMedium(FeeBreakdown medium) { + this.medium = medium; + } + + public EstimatedFeeDetails high(FeeBreakdown high) { + this.high = high; + return this; + } + + /** + * Get high + * + * @return high + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HIGH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FeeBreakdown getHigh() { + return high; + } + + @JsonProperty(JSON_PROPERTY_HIGH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setHigh(FeeBreakdown high) { + this.high = high; + } + + /** Return true if this EstimatedFeeDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EstimatedFeeDetails estimatedFeeDetails = (EstimatedFeeDetails) o; + return Objects.equals(this.low, estimatedFeeDetails.low) + && Objects.equals(this.medium, estimatedFeeDetails.medium) + && Objects.equals(this.high, estimatedFeeDetails.high); + } + + @Override + public int hashCode() { + return Objects.hash(low, medium, high); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EstimatedFeeDetails {\n"); + sb.append(" low: ").append(toIndentedString(low)).append("\n"); + sb.append(" medium: ").append(toIndentedString(medium)).append("\n"); + sb.append(" high: ").append(toIndentedString(high)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `low` to the URL query string + if (getLow() != null) { + joiner.add(getLow().toUrlQueryString(prefix + "low" + suffix)); + } + + // add `medium` to the URL query string + if (getMedium() != null) { + joiner.add(getMedium().toUrlQueryString(prefix + "medium" + suffix)); + } + + // add `high` to the URL query string + if (getHigh() != null) { + joiner.add(getHigh().toUrlQueryString(prefix + "high" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/EstimatedTransactionFeeResponse.java b/src/main/java/com/fireblocks/sdk/model/EstimatedTransactionFeeResponse.java index e0dfc818..c184aa06 100644 --- a/src/main/java/com/fireblocks/sdk/model/EstimatedTransactionFeeResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/EstimatedTransactionFeeResponse.java @@ -23,7 +23,8 @@ @JsonPropertyOrder({ EstimatedTransactionFeeResponse.JSON_PROPERTY_LOW, EstimatedTransactionFeeResponse.JSON_PROPERTY_MEDIUM, - EstimatedTransactionFeeResponse.JSON_PROPERTY_HIGH + EstimatedTransactionFeeResponse.JSON_PROPERTY_HIGH, + EstimatedTransactionFeeResponse.JSON_PROPERTY_FEE_DETAILS }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class EstimatedTransactionFeeResponse { @@ -36,6 +37,9 @@ public class EstimatedTransactionFeeResponse { public static final String JSON_PROPERTY_HIGH = "high"; private TransactionFee high; + public static final String JSON_PROPERTY_FEE_DETAILS = "feeDetails"; + private EstimatedFeeDetails feeDetails; + public EstimatedTransactionFeeResponse() {} public EstimatedTransactionFeeResponse low(TransactionFee low) { @@ -107,6 +111,29 @@ public void setHigh(TransactionFee high) { this.high = high; } + public EstimatedTransactionFeeResponse feeDetails(EstimatedFeeDetails feeDetails) { + this.feeDetails = feeDetails; + return this; + } + + /** + * Get feeDetails + * + * @return feeDetails + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EstimatedFeeDetails getFeeDetails() { + return feeDetails; + } + + @JsonProperty(JSON_PROPERTY_FEE_DETAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFeeDetails(EstimatedFeeDetails feeDetails) { + this.feeDetails = feeDetails; + } + /** Return true if this EstimatedTransactionFeeResponse object is equal to o. */ @Override public boolean equals(Object o) { @@ -120,12 +147,13 @@ public boolean equals(Object o) { (EstimatedTransactionFeeResponse) o; return Objects.equals(this.low, estimatedTransactionFeeResponse.low) && Objects.equals(this.medium, estimatedTransactionFeeResponse.medium) - && Objects.equals(this.high, estimatedTransactionFeeResponse.high); + && Objects.equals(this.high, estimatedTransactionFeeResponse.high) + && Objects.equals(this.feeDetails, estimatedTransactionFeeResponse.feeDetails); } @Override public int hashCode() { - return Objects.hash(low, medium, high); + return Objects.hash(low, medium, high, feeDetails); } @Override @@ -135,6 +163,7 @@ public String toString() { sb.append(" low: ").append(toIndentedString(low)).append("\n"); sb.append(" medium: ").append(toIndentedString(medium)).append("\n"); sb.append(" high: ").append(toIndentedString(high)).append("\n"); + sb.append(" feeDetails: ").append(toIndentedString(feeDetails)).append("\n"); sb.append("}"); return sb.toString(); } @@ -197,6 +226,11 @@ public String toUrlQueryString(String prefix) { joiner.add(getHigh().toUrlQueryString(prefix + "high" + suffix)); } + // add `feeDetails` to the URL query string + if (getFeeDetails() != null) { + joiner.add(getFeeDetails().toUrlQueryString(prefix + "feeDetails" + suffix)); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/FeeBreakdown.java b/src/main/java/com/fireblocks/sdk/model/FeeBreakdown.java new file mode 100644 index 00000000..1c280a2f --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/FeeBreakdown.java @@ -0,0 +1,316 @@ +/* + * 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.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.fireblocks.sdk.JSON; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.StringJoiner; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = FeeBreakdown.FeeBreakdownDeserializer.class) +@JsonSerialize(using = FeeBreakdown.FeeBreakdownSerializer.class) +public class FeeBreakdown extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(FeeBreakdown.class.getName()); + + public static class FeeBreakdownSerializer extends StdSerializer { + public FeeBreakdownSerializer(Class t) { + super(t); + } + + public FeeBreakdownSerializer() { + this(null); + } + + @Override + public void serialize(FeeBreakdown value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class FeeBreakdownDeserializer extends StdDeserializer { + public FeeBreakdownDeserializer() { + this(FeeBreakdown.class); + } + + public FeeBreakdownDeserializer(Class vc) { + super(vc); + } + + @Override + public FeeBreakdown deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize FeeBreakdownOneOf + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (FeeBreakdownOneOf.class.equals(Integer.class) + || FeeBreakdownOneOf.class.equals(Long.class) + || FeeBreakdownOneOf.class.equals(Float.class) + || FeeBreakdownOneOf.class.equals(Double.class) + || FeeBreakdownOneOf.class.equals(Boolean.class) + || FeeBreakdownOneOf.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((FeeBreakdownOneOf.class.equals(Integer.class) + || FeeBreakdownOneOf.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((FeeBreakdownOneOf.class.equals(Float.class) + || FeeBreakdownOneOf.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (FeeBreakdownOneOf.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (FeeBreakdownOneOf.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(FeeBreakdownOneOf.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'FeeBreakdownOneOf'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'FeeBreakdownOneOf'", e); + } + + // deserialize FeeBreakdownOneOf1 + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (FeeBreakdownOneOf1.class.equals(Integer.class) + || FeeBreakdownOneOf1.class.equals(Long.class) + || FeeBreakdownOneOf1.class.equals(Float.class) + || FeeBreakdownOneOf1.class.equals(Double.class) + || FeeBreakdownOneOf1.class.equals(Boolean.class) + || FeeBreakdownOneOf1.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((FeeBreakdownOneOf1.class.equals(Integer.class) + || FeeBreakdownOneOf1.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((FeeBreakdownOneOf1.class.equals(Float.class) + || FeeBreakdownOneOf1.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (FeeBreakdownOneOf1.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (FeeBreakdownOneOf1.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(FeeBreakdownOneOf1.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'FeeBreakdownOneOf1'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'FeeBreakdownOneOf1'", e); + } + + if (match == 1) { + FeeBreakdown ret = new FeeBreakdown(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for FeeBreakdown: %d classes match result," + + " expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public FeeBreakdown getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "FeeBreakdown cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public FeeBreakdown() { + super("oneOf", Boolean.FALSE); + } + + public FeeBreakdown(FeeBreakdownOneOf o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public FeeBreakdown(FeeBreakdownOneOf1 o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("FeeBreakdownOneOf", FeeBreakdownOneOf.class); + schemas.put("FeeBreakdownOneOf1", FeeBreakdownOneOf1.class); + JSON.registerDescendants(FeeBreakdown.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return FeeBreakdown.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: FeeBreakdownOneOf, FeeBreakdownOneOf1 + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be + * a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(FeeBreakdownOneOf.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(FeeBreakdownOneOf1.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be FeeBreakdownOneOf, FeeBreakdownOneOf1"); + } + + /** + * Get the actual instance, which can be the following: FeeBreakdownOneOf, FeeBreakdownOneOf1 + * + * @return The actual instance (FeeBreakdownOneOf, FeeBreakdownOneOf1) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `FeeBreakdownOneOf`. If the actual instance is not + * `FeeBreakdownOneOf`, the ClassCastException will be thrown. + * + * @return The actual instance of `FeeBreakdownOneOf` + * @throws ClassCastException if the instance is not `FeeBreakdownOneOf` + */ + public FeeBreakdownOneOf getFeeBreakdownOneOf() throws ClassCastException { + return (FeeBreakdownOneOf) super.getActualInstance(); + } + + /** + * Get the actual instance of `FeeBreakdownOneOf1`. If the actual instance is not + * `FeeBreakdownOneOf1`, the ClassCastException will be thrown. + * + * @return The actual instance of `FeeBreakdownOneOf1` + * @throws ClassCastException if the instance is not `FeeBreakdownOneOf1` + */ + public FeeBreakdownOneOf1 getFeeBreakdownOneOf1() throws ClassCastException { + return (FeeBreakdownOneOf1) super.getActualInstance(); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof FeeBreakdownOneOf) { + if (getActualInstance() != null) { + joiner.add( + ((FeeBreakdownOneOf) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof FeeBreakdownOneOf1) { + if (getActualInstance() != null) { + joiner.add( + ((FeeBreakdownOneOf1) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/FeeBreakdownOneOf.java b/src/main/java/com/fireblocks/sdk/model/FeeBreakdownOneOf.java new file mode 100644 index 00000000..6569852f --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/FeeBreakdownOneOf.java @@ -0,0 +1,263 @@ +/* + * 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.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** Solana-specific fee breakdown */ +@JsonPropertyOrder({ + FeeBreakdownOneOf.JSON_PROPERTY_BASE_FEE, + FeeBreakdownOneOf.JSON_PROPERTY_PRIORITY_FEE, + FeeBreakdownOneOf.JSON_PROPERTY_RENT, + FeeBreakdownOneOf.JSON_PROPERTY_TOTAL_FEE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FeeBreakdownOneOf { + public static final String JSON_PROPERTY_BASE_FEE = "baseFee"; + private String baseFee; + + public static final String JSON_PROPERTY_PRIORITY_FEE = "priorityFee"; + private String priorityFee; + + public static final String JSON_PROPERTY_RENT = "rent"; + private String rent; + + public static final String JSON_PROPERTY_TOTAL_FEE = "totalFee"; + private String totalFee; + + public FeeBreakdownOneOf() {} + + public FeeBreakdownOneOf baseFee(String baseFee) { + this.baseFee = baseFee; + return this; + } + + /** + * Base fee for Solana transaction + * + * @return baseFee + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BASE_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBaseFee() { + return baseFee; + } + + @JsonProperty(JSON_PROPERTY_BASE_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBaseFee(String baseFee) { + this.baseFee = baseFee; + } + + public FeeBreakdownOneOf priorityFee(String priorityFee) { + this.priorityFee = priorityFee; + return this; + } + + /** + * Priority fee for Solana transaction + * + * @return priorityFee + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIORITY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPriorityFee() { + return priorityFee; + } + + @JsonProperty(JSON_PROPERTY_PRIORITY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPriorityFee(String priorityFee) { + this.priorityFee = priorityFee; + } + + public FeeBreakdownOneOf rent(String rent) { + this.rent = rent; + return this; + } + + /** + * Rent fee for Solana account creation/storage + * + * @return rent + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRent() { + return rent; + } + + @JsonProperty(JSON_PROPERTY_RENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRent(String rent) { + this.rent = rent; + } + + public FeeBreakdownOneOf totalFee(String totalFee) { + this.totalFee = totalFee; + return this; + } + + /** + * Total fee amount + * + * @return totalFee + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTotalFee() { + return totalFee; + } + + @JsonProperty(JSON_PROPERTY_TOTAL_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalFee(String totalFee) { + this.totalFee = totalFee; + } + + /** Return true if this FeeBreakdown_oneOf object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeeBreakdownOneOf feeBreakdownOneOf = (FeeBreakdownOneOf) o; + return Objects.equals(this.baseFee, feeBreakdownOneOf.baseFee) + && Objects.equals(this.priorityFee, feeBreakdownOneOf.priorityFee) + && Objects.equals(this.rent, feeBreakdownOneOf.rent) + && Objects.equals(this.totalFee, feeBreakdownOneOf.totalFee); + } + + @Override + public int hashCode() { + return Objects.hash(baseFee, priorityFee, rent, totalFee); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeeBreakdownOneOf {\n"); + sb.append(" baseFee: ").append(toIndentedString(baseFee)).append("\n"); + sb.append(" priorityFee: ").append(toIndentedString(priorityFee)).append("\n"); + sb.append(" rent: ").append(toIndentedString(rent)).append("\n"); + sb.append(" totalFee: ").append(toIndentedString(totalFee)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `baseFee` to the URL query string + if (getBaseFee() != null) { + joiner.add( + String.format( + "%sbaseFee%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getBaseFee()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `priorityFee` to the URL query string + if (getPriorityFee() != null) { + joiner.add( + String.format( + "%spriorityFee%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getPriorityFee()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `rent` to the URL query string + if (getRent() != null) { + joiner.add( + String.format( + "%srent%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getRent()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `totalFee` to the URL query string + if (getTotalFee() != null) { + joiner.add( + String.format( + "%stotalFee%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTotalFee()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/FeeBreakdownOneOf1.java b/src/main/java/com/fireblocks/sdk/model/FeeBreakdownOneOf1.java new file mode 100644 index 00000000..7950d697 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/FeeBreakdownOneOf1.java @@ -0,0 +1,223 @@ +/* + * 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.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** Generic fee breakdown for other blockchains */ +@JsonPropertyOrder({ + FeeBreakdownOneOf1.JSON_PROPERTY_BASE_FEE, + FeeBreakdownOneOf1.JSON_PROPERTY_PRIORITY_FEE, + FeeBreakdownOneOf1.JSON_PROPERTY_TOTAL_FEE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FeeBreakdownOneOf1 { + public static final String JSON_PROPERTY_BASE_FEE = "baseFee"; + private String baseFee; + + public static final String JSON_PROPERTY_PRIORITY_FEE = "priorityFee"; + private String priorityFee; + + public static final String JSON_PROPERTY_TOTAL_FEE = "totalFee"; + private String totalFee; + + public FeeBreakdownOneOf1() {} + + public FeeBreakdownOneOf1 baseFee(String baseFee) { + this.baseFee = baseFee; + return this; + } + + /** + * Base fee component + * + * @return baseFee + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BASE_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBaseFee() { + return baseFee; + } + + @JsonProperty(JSON_PROPERTY_BASE_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBaseFee(String baseFee) { + this.baseFee = baseFee; + } + + public FeeBreakdownOneOf1 priorityFee(String priorityFee) { + this.priorityFee = priorityFee; + return this; + } + + /** + * Priority fee component + * + * @return priorityFee + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIORITY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPriorityFee() { + return priorityFee; + } + + @JsonProperty(JSON_PROPERTY_PRIORITY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPriorityFee(String priorityFee) { + this.priorityFee = priorityFee; + } + + public FeeBreakdownOneOf1 totalFee(String totalFee) { + this.totalFee = totalFee; + return this; + } + + /** + * Total fee amount + * + * @return totalFee + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTotalFee() { + return totalFee; + } + + @JsonProperty(JSON_PROPERTY_TOTAL_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotalFee(String totalFee) { + this.totalFee = totalFee; + } + + /** Return true if this FeeBreakdown_oneOf_1 object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeeBreakdownOneOf1 feeBreakdownOneOf1 = (FeeBreakdownOneOf1) o; + return Objects.equals(this.baseFee, feeBreakdownOneOf1.baseFee) + && Objects.equals(this.priorityFee, feeBreakdownOneOf1.priorityFee) + && Objects.equals(this.totalFee, feeBreakdownOneOf1.totalFee); + } + + @Override + public int hashCode() { + return Objects.hash(baseFee, priorityFee, totalFee); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeeBreakdownOneOf1 {\n"); + sb.append(" baseFee: ").append(toIndentedString(baseFee)).append("\n"); + sb.append(" priorityFee: ").append(toIndentedString(priorityFee)).append("\n"); + sb.append(" totalFee: ").append(toIndentedString(totalFee)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `baseFee` to the URL query string + if (getBaseFee() != null) { + joiner.add( + String.format( + "%sbaseFee%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getBaseFee()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `priorityFee` to the URL query string + if (getPriorityFee() != null) { + joiner.add( + String.format( + "%spriorityFee%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getPriorityFee()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `totalFee` to the URL query string + if (getTotalFee() != null) { + joiner.add( + String.format( + "%stotalFee%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTotalFee()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/Notification.java b/src/main/java/com/fireblocks/sdk/model/Notification.java index b7a9deff..9e3bff66 100644 --- a/src/main/java/com/fireblocks/sdk/model/Notification.java +++ b/src/main/java/com/fireblocks/sdk/model/Notification.java @@ -18,8 +18,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.List; import java.util.Objects; import java.util.StringJoiner; import java.util.UUID; @@ -31,8 +29,7 @@ Notification.JSON_PROPERTY_UPDATED_AT, Notification.JSON_PROPERTY_STATUS, Notification.JSON_PROPERTY_EVENT_TYPE, - Notification.JSON_PROPERTY_RESOURCE_ID, - Notification.JSON_PROPERTY_ATTEMPTS + Notification.JSON_PROPERTY_RESOURCE_ID }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Notification { @@ -54,9 +51,6 @@ public class Notification { public static final String JSON_PROPERTY_RESOURCE_ID = "resourceId"; private UUID resourceId; - public static final String JSON_PROPERTY_ATTEMPTS = "attempts"; - private List attempts = new ArrayList<>(); - public Notification() {} public Notification id(UUID id) { @@ -197,37 +191,6 @@ public void setResourceId(UUID resourceId) { this.resourceId = resourceId; } - public Notification attempts(List attempts) { - this.attempts = attempts; - return this; - } - - public Notification addAttemptsItem(NotificationAttempt attemptsItem) { - if (this.attempts == null) { - this.attempts = new ArrayList<>(); - } - this.attempts.add(attemptsItem); - return this; - } - - /** - * The attempts related to Notification - * - * @return attempts - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ATTEMPTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getAttempts() { - return attempts; - } - - @JsonProperty(JSON_PROPERTY_ATTEMPTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAttempts(List attempts) { - this.attempts = attempts; - } - /** Return true if this Notification object is equal to o. */ @Override public boolean equals(Object o) { @@ -243,13 +206,12 @@ public boolean equals(Object o) { && Objects.equals(this.updatedAt, notification.updatedAt) && Objects.equals(this.status, notification.status) && Objects.equals(this.eventType, notification.eventType) - && Objects.equals(this.resourceId, notification.resourceId) - && Objects.equals(this.attempts, notification.attempts); + && Objects.equals(this.resourceId, notification.resourceId); } @Override public int hashCode() { - return Objects.hash(id, createdAt, updatedAt, status, eventType, resourceId, attempts); + return Objects.hash(id, createdAt, updatedAt, status, eventType, resourceId); } @Override @@ -262,7 +224,6 @@ public String toString() { sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n"); - sb.append(" attempts: ").append(toIndentedString(attempts)).append("\n"); sb.append("}"); return sb.toString(); } @@ -380,29 +341,6 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } - // add `attempts` to the URL query string - if (getAttempts() != null) { - for (int i = 0; i < getAttempts().size(); i++) { - if (getAttempts().get(i) != null) { - joiner.add( - getAttempts() - .get(i) - .toUrlQueryString( - String.format( - "%sattempts%s%s", - prefix, - suffix, - "".equals(suffix) - ? "" - : String.format( - "%s%d%s", - containerPrefix, - i, - containerSuffix)))); - } - } - } - return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/NotificationAttemptsPaginatedResponse.java b/src/main/java/com/fireblocks/sdk/model/NotificationAttemptsPaginatedResponse.java new file mode 100644 index 00000000..6adae358 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/NotificationAttemptsPaginatedResponse.java @@ -0,0 +1,204 @@ +/* + * 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.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** NotificationAttemptsPaginatedResponse */ +@JsonPropertyOrder({ + NotificationAttemptsPaginatedResponse.JSON_PROPERTY_DATA, + NotificationAttemptsPaginatedResponse.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NotificationAttemptsPaginatedResponse { + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_NEXT = "next"; + private String next; + + public NotificationAttemptsPaginatedResponse() {} + + public NotificationAttemptsPaginatedResponse data(List data) { + this.data = data; + return this; + } + + public NotificationAttemptsPaginatedResponse addDataItem(NotificationAttempt dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * The data of the current page + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(List data) { + this.data = data; + } + + public NotificationAttemptsPaginatedResponse next(String next) { + this.next = next; + return this; + } + + /** + * The ID of the next page + * + * @return next + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNext(String next) { + this.next = next; + } + + /** Return true if this NotificationAttemptsPaginatedResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationAttemptsPaginatedResponse notificationAttemptsPaginatedResponse = + (NotificationAttemptsPaginatedResponse) o; + return Objects.equals(this.data, notificationAttemptsPaginatedResponse.data) + && Objects.equals(this.next, notificationAttemptsPaginatedResponse.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationAttemptsPaginatedResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add( + String.format( + "%snext%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getNext()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/NotificationWithData.java b/src/main/java/com/fireblocks/sdk/model/NotificationWithData.java index 3d0644fb..e1b38b46 100644 --- a/src/main/java/com/fireblocks/sdk/model/NotificationWithData.java +++ b/src/main/java/com/fireblocks/sdk/model/NotificationWithData.java @@ -18,8 +18,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.List; import java.util.Objects; import java.util.StringJoiner; import java.util.UUID; @@ -32,7 +30,6 @@ NotificationWithData.JSON_PROPERTY_STATUS, NotificationWithData.JSON_PROPERTY_EVENT_TYPE, NotificationWithData.JSON_PROPERTY_RESOURCE_ID, - NotificationWithData.JSON_PROPERTY_ATTEMPTS, NotificationWithData.JSON_PROPERTY_DATA }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -55,9 +52,6 @@ public class NotificationWithData { public static final String JSON_PROPERTY_RESOURCE_ID = "resourceId"; private UUID resourceId; - public static final String JSON_PROPERTY_ATTEMPTS = "attempts"; - private List attempts = new ArrayList<>(); - public static final String JSON_PROPERTY_DATA = "data"; private Object data; @@ -201,37 +195,6 @@ public void setResourceId(UUID resourceId) { this.resourceId = resourceId; } - public NotificationWithData attempts(List attempts) { - this.attempts = attempts; - return this; - } - - public NotificationWithData addAttemptsItem(NotificationAttempt attemptsItem) { - if (this.attempts == null) { - this.attempts = new ArrayList<>(); - } - this.attempts.add(attemptsItem); - return this; - } - - /** - * The attempts related to Notification - * - * @return attempts - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ATTEMPTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getAttempts() { - return attempts; - } - - @JsonProperty(JSON_PROPERTY_ATTEMPTS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAttempts(List attempts) { - this.attempts = attempts; - } - public NotificationWithData data(Object data) { this.data = data; return this; @@ -271,14 +234,12 @@ public boolean equals(Object o) { && Objects.equals(this.status, notificationWithData.status) && Objects.equals(this.eventType, notificationWithData.eventType) && Objects.equals(this.resourceId, notificationWithData.resourceId) - && Objects.equals(this.attempts, notificationWithData.attempts) && Objects.equals(this.data, notificationWithData.data); } @Override public int hashCode() { - return Objects.hash( - id, createdAt, updatedAt, status, eventType, resourceId, attempts, data); + return Objects.hash(id, createdAt, updatedAt, status, eventType, resourceId, data); } @Override @@ -291,7 +252,6 @@ public String toString() { sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n"); - sb.append(" attempts: ").append(toIndentedString(attempts)).append("\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append("}"); return sb.toString(); @@ -410,29 +370,6 @@ public String toUrlQueryString(String prefix) { .replaceAll("\\+", "%20"))); } - // add `attempts` to the URL query string - if (getAttempts() != null) { - for (int i = 0; i < getAttempts().size(); i++) { - if (getAttempts().get(i) != null) { - joiner.add( - getAttempts() - .get(i) - .toUrlQueryString( - String.format( - "%sattempts%s%s", - prefix, - suffix, - "".equals(suffix) - ? "" - : String.format( - "%s%d%s", - containerPrefix, - i, - containerSuffix)))); - } - } - } - // add `data` to the URL query string if (getData() != null) { joiner.add( diff --git a/src/main/java/com/fireblocks/sdk/model/ResendFailedNotificationsJobStatusResponse.java b/src/main/java/com/fireblocks/sdk/model/ResendFailedNotificationsJobStatusResponse.java new file mode 100644 index 00000000..293805b2 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ResendFailedNotificationsJobStatusResponse.java @@ -0,0 +1,304 @@ +/* + * 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.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ResendFailedNotificationsJobStatusResponse */ +@JsonPropertyOrder({ + ResendFailedNotificationsJobStatusResponse.JSON_PROPERTY_JOB_ID, + ResendFailedNotificationsJobStatusResponse.JSON_PROPERTY_STATUS, + ResendFailedNotificationsJobStatusResponse.JSON_PROPERTY_PROCESSED, + ResendFailedNotificationsJobStatusResponse.JSON_PROPERTY_TOTAL +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResendFailedNotificationsJobStatusResponse { + public static final String JSON_PROPERTY_JOB_ID = "jobId"; + private String jobId; + + /** Bulk resend job status */ + public enum StatusEnum { + QUEUED("QUEUED"), + + IN_PROGRESS("IN_PROGRESS"), + + COMPLETED("COMPLETED"), + + FAILED("FAILED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public static final String JSON_PROPERTY_PROCESSED = "processed"; + private BigDecimal processed; + + public static final String JSON_PROPERTY_TOTAL = "total"; + private BigDecimal total; + + public ResendFailedNotificationsJobStatusResponse() {} + + public ResendFailedNotificationsJobStatusResponse jobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * Bulk resend job ID + * + * @return jobId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_JOB_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getJobId() { + return jobId; + } + + @JsonProperty(JSON_PROPERTY_JOB_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setJobId(String jobId) { + this.jobId = jobId; + } + + public ResendFailedNotificationsJobStatusResponse status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Bulk resend job status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StatusEnum getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + public ResendFailedNotificationsJobStatusResponse processed(BigDecimal processed) { + this.processed = processed; + return this; + } + + /** + * Number of notifications processed + * + * @return processed + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROCESSED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getProcessed() { + return processed; + } + + @JsonProperty(JSON_PROPERTY_PROCESSED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProcessed(BigDecimal processed) { + this.processed = processed; + } + + public ResendFailedNotificationsJobStatusResponse total(BigDecimal total) { + this.total = total; + return this; + } + + /** + * Total number of notifications to process + * + * @return total + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getTotal() { + return total; + } + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotal(BigDecimal total) { + this.total = total; + } + + /** Return true if this ResendFailedNotificationsJobStatusResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResendFailedNotificationsJobStatusResponse resendFailedNotificationsJobStatusResponse = + (ResendFailedNotificationsJobStatusResponse) o; + return Objects.equals(this.jobId, resendFailedNotificationsJobStatusResponse.jobId) + && Objects.equals(this.status, resendFailedNotificationsJobStatusResponse.status) + && Objects.equals( + this.processed, resendFailedNotificationsJobStatusResponse.processed) + && Objects.equals(this.total, resendFailedNotificationsJobStatusResponse.total); + } + + @Override + public int hashCode() { + return Objects.hash(jobId, status, processed, total); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResendFailedNotificationsJobStatusResponse {\n"); + sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" processed: ").append(toIndentedString(processed)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `jobId` to the URL query string + if (getJobId() != null) { + joiner.add( + String.format( + "%sjobId%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getJobId()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getStatus()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `processed` to the URL query string + if (getProcessed() != null) { + joiner.add( + String.format( + "%sprocessed%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getProcessed()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add( + String.format( + "%stotal%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTotal()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ResendFailedNotificationsRequest.java b/src/main/java/com/fireblocks/sdk/model/ResendFailedNotificationsRequest.java new file mode 100644 index 00000000..ea62b0a8 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ResendFailedNotificationsRequest.java @@ -0,0 +1,208 @@ +/* + * 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.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ResendFailedNotificationsRequest */ +@JsonPropertyOrder({ + ResendFailedNotificationsRequest.JSON_PROPERTY_START_TIME, + ResendFailedNotificationsRequest.JSON_PROPERTY_EVENTS +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResendFailedNotificationsRequest { + public static final String JSON_PROPERTY_START_TIME = "startTime"; + private BigDecimal startTime; + + public static final String JSON_PROPERTY_EVENTS = "events"; + private List events; + + public ResendFailedNotificationsRequest() {} + + public ResendFailedNotificationsRequest startTime(BigDecimal startTime) { + this.startTime = startTime; + return this; + } + + /** + * (optional) Start time for the resend window in milliseconds since epoch up to 24 hours before + * the current time - Default if missing means 24 hours before the current time in milliseconds + * since epoch - Maximum value is current time in milliseconds since epoch - Minimum value is 24 + * hours before the current time in milliseconds since epoch + * + * @return startTime + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getStartTime() { + return startTime; + } + + @JsonProperty(JSON_PROPERTY_START_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStartTime(BigDecimal startTime) { + this.startTime = startTime; + } + + public ResendFailedNotificationsRequest events(List events) { + this.events = events; + return this; + } + + public ResendFailedNotificationsRequest addEventsItem(WebhookEvent eventsItem) { + if (this.events == null) { + this.events = new ArrayList<>(); + } + this.events.add(eventsItem); + return this; + } + + /** + * (optional) Event types to resend, default is all event types - Default if missing means all + * events will be included - Empty array means all events will be included + * + * @return events + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEvents() { + return events; + } + + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEvents(List events) { + this.events = events; + } + + /** Return true if this ResendFailedNotificationsRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResendFailedNotificationsRequest resendFailedNotificationsRequest = + (ResendFailedNotificationsRequest) o; + return Objects.equals(this.startTime, resendFailedNotificationsRequest.startTime) + && Objects.equals(this.events, resendFailedNotificationsRequest.events); + } + + @Override + public int hashCode() { + return Objects.hash(startTime, events); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResendFailedNotificationsRequest {\n"); + sb.append(" startTime: ").append(toIndentedString(startTime)).append("\n"); + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `startTime` to the URL query string + if (getStartTime() != null) { + joiner.add( + String.format( + "%sstartTime%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getStartTime()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `events` to the URL query string + if (getEvents() != null) { + for (int i = 0; i < getEvents().size(); i++) { + if (getEvents().get(i) != null) { + joiner.add( + String.format( + "%sevents%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + URLEncoder.encode( + String.valueOf(getEvents().get(i)), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ResendFailedNotificationsResponse.java b/src/main/java/com/fireblocks/sdk/model/ResendFailedNotificationsResponse.java new file mode 100644 index 00000000..74aac8fc --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ResendFailedNotificationsResponse.java @@ -0,0 +1,141 @@ +/* + * 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.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.math.BigDecimal; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.StringJoiner; + +/** ResendFailedNotificationsResponse */ +@JsonPropertyOrder({ResendFailedNotificationsResponse.JSON_PROPERTY_TOTAL}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ResendFailedNotificationsResponse { + public static final String JSON_PROPERTY_TOTAL = "total"; + private BigDecimal total; + + public ResendFailedNotificationsResponse() {} + + public ResendFailedNotificationsResponse total(BigDecimal total) { + this.total = total; + return this; + } + + /** + * The total number of failed notifications that are scheduled to be resent. + * + * @return total + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getTotal() { + return total; + } + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotal(BigDecimal total) { + this.total = total; + } + + /** Return true if this ResendFailedNotificationsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResendFailedNotificationsResponse resendFailedNotificationsResponse = + (ResendFailedNotificationsResponse) o; + return Objects.equals(this.total, resendFailedNotificationsResponse.total); + } + + @Override + public int hashCode() { + return Objects.hash(total); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResendFailedNotificationsResponse {\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add( + String.format( + "%stotal%s=%s", + prefix, + suffix, + URLEncoder.encode(String.valueOf(getTotal()), StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SourceTransferPeerPathResponse.java b/src/main/java/com/fireblocks/sdk/model/SourceTransferPeerPathResponse.java index 9a2e913d..d3db6831 100644 --- a/src/main/java/com/fireblocks/sdk/model/SourceTransferPeerPathResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/SourceTransferPeerPathResponse.java @@ -109,14 +109,13 @@ public SourceTransferPeerPathResponse id(String id) { /** * The ID of the peer. You can retrieve the ID of each venue object using the endpoints for - * [listing vault - * accounts](https://developers.fireblocks.com/reference/get_vault-accounts-paged), [listing - * exchange account](https://developers.fireblocks.com/reference/get_exchange-accounts), - * [listing fiat accounts](https://developers.fireblocks.com/reference/get_fiat-accounts), - * [listing internal wallets](https://developers.fireblocks.com/reference/get_internal-wallets), - * [listing external wallets](https://developers.fireblocks.com/reference/get_external-wallets), + * [listing vault accounts](https://developers.fireblocks.com/reference/getpagedvaultaccounts), + * [listing exchange account](https://developers.fireblocks.com/reference/getexchangeaccounts), + * [listing fiat accounts](https://developers.fireblocks.com/reference/getfiataccounts), + * [listing internal wallets](https://developers.fireblocks.com/reference/getinternalwallets), + * [listing external wallets](https://developers.fireblocks.com/reference/getexternalwallets), * [listing network - * connections](https://developers.fireblocks.com/reference/get_network-connections). For the + * connections](https://developers.fireblocks.com/reference/getnetworkconnections). For the * other types, this parameter is not needed. * * @return id diff --git a/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java b/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java index f792588e..a09c0fc2 100644 --- a/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java @@ -50,6 +50,7 @@ TransactionRequest.JSON_PROPERTY_EXTRA_PARAMETERS, TransactionRequest.JSON_PROPERTY_CUSTOMER_REF_ID, TransactionRequest.JSON_PROPERTY_TRAVEL_RULE_MESSAGE, + TransactionRequest.JSON_PROPERTY_TRAVEL_RULE_MESSAGE_ID, TransactionRequest.JSON_PROPERTY_AUTO_STAKING, TransactionRequest.JSON_PROPERTY_NETWORK_STAKING, TransactionRequest.JSON_PROPERTY_CPU_STAKING, @@ -164,6 +165,9 @@ public static FeeLevelEnum fromValue(String value) { public static final String JSON_PROPERTY_TRAVEL_RULE_MESSAGE = "travelRuleMessage"; private TravelRuleCreateTransactionRequest travelRuleMessage; + public static final String JSON_PROPERTY_TRAVEL_RULE_MESSAGE_ID = "travelRuleMessageId"; + private String travelRuleMessageId; + public static final String JSON_PROPERTY_AUTO_STAKING = "autoStaking"; private Boolean autoStaking; @@ -761,6 +765,30 @@ public void setTravelRuleMessage(TravelRuleCreateTransactionRequest travelRuleMe this.travelRuleMessage = travelRuleMessage; } + public TransactionRequest travelRuleMessageId(String travelRuleMessageId) { + this.travelRuleMessageId = travelRuleMessageId; + return this; + } + + /** + * The ID of the travel rule message from any travel rule provider. Used for travel rule linking + * functionality to associate transactions with existing travel rule messages. + * + * @return travelRuleMessageId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRAVEL_RULE_MESSAGE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTravelRuleMessageId() { + return travelRuleMessageId; + } + + @JsonProperty(JSON_PROPERTY_TRAVEL_RULE_MESSAGE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTravelRuleMessageId(String travelRuleMessageId) { + this.travelRuleMessageId = travelRuleMessageId; + } + public TransactionRequest autoStaking(Boolean autoStaking) { this.autoStaking = autoStaking; return this; @@ -892,6 +920,7 @@ public boolean equals(Object o) { && Objects.equals(this.extraParameters, transactionRequest.extraParameters) && Objects.equals(this.customerRefId, transactionRequest.customerRefId) && Objects.equals(this.travelRuleMessage, transactionRequest.travelRuleMessage) + && Objects.equals(this.travelRuleMessageId, transactionRequest.travelRuleMessageId) && Objects.equals(this.autoStaking, transactionRequest.autoStaking) && Objects.equals(this.networkStaking, transactionRequest.networkStaking) && Objects.equals(this.cpuStaking, transactionRequest.cpuStaking) @@ -924,6 +953,7 @@ public int hashCode() { extraParameters, customerRefId, travelRuleMessage, + travelRuleMessageId, autoStaking, networkStaking, cpuStaking, @@ -961,6 +991,9 @@ public String toString() { sb.append(" travelRuleMessage: ") .append(toIndentedString(travelRuleMessage)) .append("\n"); + sb.append(" travelRuleMessageId: ") + .append(toIndentedString(travelRuleMessageId)) + .append("\n"); sb.append(" autoStaking: ").append(toIndentedString(autoStaking)).append("\n"); sb.append(" networkStaking: ").append(toIndentedString(networkStaking)).append("\n"); sb.append(" cpuStaking: ").append(toIndentedString(cpuStaking)).append("\n"); @@ -1240,6 +1273,19 @@ public String toUrlQueryString(String prefix) { getTravelRuleMessage().toUrlQueryString(prefix + "travelRuleMessage" + suffix)); } + // add `travelRuleMessageId` to the URL query string + if (getTravelRuleMessageId() != null) { + joiner.add( + String.format( + "%stravelRuleMessageId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTravelRuleMessageId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + // add `autoStaking` to the URL query string if (getAutoStaking() != null) { joiner.add( diff --git a/src/main/java/com/fireblocks/sdk/model/TransactionRequestDestination.java b/src/main/java/com/fireblocks/sdk/model/TransactionRequestDestination.java index 59e12836..3ede58fd 100644 --- a/src/main/java/com/fireblocks/sdk/model/TransactionRequestDestination.java +++ b/src/main/java/com/fireblocks/sdk/model/TransactionRequestDestination.java @@ -24,7 +24,9 @@ /** TransactionRequestDestination */ @JsonPropertyOrder({ TransactionRequestDestination.JSON_PROPERTY_AMOUNT, - TransactionRequestDestination.JSON_PROPERTY_DESTINATION + TransactionRequestDestination.JSON_PROPERTY_DESTINATION, + TransactionRequestDestination.JSON_PROPERTY_TRAVEL_RULE_MESSAGE_ID, + TransactionRequestDestination.JSON_PROPERTY_CUSTOMER_REF_ID }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class TransactionRequestDestination { @@ -34,6 +36,12 @@ public class TransactionRequestDestination { public static final String JSON_PROPERTY_DESTINATION = "destination"; private DestinationTransferPeerPath destination; + public static final String JSON_PROPERTY_TRAVEL_RULE_MESSAGE_ID = "travelRuleMessageId"; + private String travelRuleMessageId; + + public static final String JSON_PROPERTY_CUSTOMER_REF_ID = "customerRefId"; + private String customerRefId; + public TransactionRequestDestination() {} public TransactionRequestDestination amount(String amount) { @@ -82,6 +90,53 @@ public void setDestination(DestinationTransferPeerPath destination) { this.destination = destination; } + public TransactionRequestDestination travelRuleMessageId(String travelRuleMessageId) { + this.travelRuleMessageId = travelRuleMessageId; + return this; + } + + /** + * The ID of the travel rule message from any travel rule provider. Used for travel rule linking + * functionality to associate transactions with existing travel rule messages. + * + * @return travelRuleMessageId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRAVEL_RULE_MESSAGE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTravelRuleMessageId() { + return travelRuleMessageId; + } + + @JsonProperty(JSON_PROPERTY_TRAVEL_RULE_MESSAGE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTravelRuleMessageId(String travelRuleMessageId) { + this.travelRuleMessageId = travelRuleMessageId; + } + + public TransactionRequestDestination customerRefId(String customerRefId) { + this.customerRefId = customerRefId; + return this; + } + + /** + * The ID for AML providers to associate the owner of funds with transactions. + * + * @return customerRefId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_REF_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomerRefId() { + return customerRefId; + } + + @JsonProperty(JSON_PROPERTY_CUSTOMER_REF_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerRefId(String customerRefId) { + this.customerRefId = customerRefId; + } + /** Return true if this TransactionRequestDestination object is equal to o. */ @Override public boolean equals(Object o) { @@ -94,12 +149,15 @@ public boolean equals(Object o) { TransactionRequestDestination transactionRequestDestination = (TransactionRequestDestination) o; return Objects.equals(this.amount, transactionRequestDestination.amount) - && Objects.equals(this.destination, transactionRequestDestination.destination); + && Objects.equals(this.destination, transactionRequestDestination.destination) + && Objects.equals( + this.travelRuleMessageId, transactionRequestDestination.travelRuleMessageId) + && Objects.equals(this.customerRefId, transactionRequestDestination.customerRefId); } @Override public int hashCode() { - return Objects.hash(amount, destination); + return Objects.hash(amount, destination, travelRuleMessageId, customerRefId); } @Override @@ -108,6 +166,10 @@ public String toString() { sb.append("class TransactionRequestDestination {\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); sb.append(" destination: ").append(toIndentedString(destination)).append("\n"); + sb.append(" travelRuleMessageId: ") + .append(toIndentedString(travelRuleMessageId)) + .append("\n"); + sb.append(" customerRefId: ").append(toIndentedString(customerRefId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -171,6 +233,32 @@ public String toUrlQueryString(String prefix) { joiner.add(getDestination().toUrlQueryString(prefix + "destination" + suffix)); } + // add `travelRuleMessageId` to the URL query string + if (getTravelRuleMessageId() != null) { + joiner.add( + String.format( + "%stravelRuleMessageId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getTravelRuleMessageId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + + // add `customerRefId` to the URL query string + if (getCustomerRefId() != null) { + joiner.add( + String.format( + "%scustomerRefId%s=%s", + prefix, + suffix, + URLEncoder.encode( + String.valueOf(getCustomerRefId()), + StandardCharsets.UTF_8) + .replaceAll("\\+", "%20"))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/WebhookEvent.java b/src/main/java/com/fireblocks/sdk/model/WebhookEvent.java index 309578ba..1347f151 100644 --- a/src/main/java/com/fireblocks/sdk/model/WebhookEvent.java +++ b/src/main/java/com/fireblocks/sdk/model/WebhookEvent.java @@ -24,6 +24,9 @@ public enum WebhookEvent { TRANSACTION_APPROVAL_STATUS_UPDATED("transaction.approval_status.updated"), + TRANSACTION_NETWORK_RECORDS_PROCESSING_COMPLETED( + "transaction.network_records.processing_completed"), + EXTERNAL_WALLET_ASSET_ADDED("external_wallet.asset.added"), EXTERNAL_WALLET_ASSET_REMOVED("external_wallet.asset.removed"), @@ -38,7 +41,7 @@ public enum WebhookEvent { VAULT_ACCOUNT_CREATED("vault_account.created"), - VAULT_ACCOUNT_ASSET_LISTED("vault_account.asset.listed"), + VAULT_ACCOUNT_ASSET_ADDED("vault_account.asset.added"), VAULT_ACCOUNT_ASSET_BALANCE_UPDATED("vault_account.asset.balance_updated"), @@ -48,11 +51,21 @@ public enum WebhookEvent { EMBEDDED_WALLET_ASSET_BALANCE_UPDATED("embedded_wallet.asset.balance_updated"), - EMBEDDED_WALLET_ASSET_LISTED("embedded_wallet.asset.listed"), + EMBEDDED_WALLET_ASSET_ADDED("embedded_wallet.asset.added"), EMBEDDED_WALLET_ACCOUNT_CREATED("embedded_wallet.account.created"), - EMBEDDED_WALLET_DEVICE_ADDED("embedded_wallet.device.added"); + EMBEDDED_WALLET_DEVICE_ADDED("embedded_wallet.device.added"), + + ONCHAIN_DATA_UPDATED("onchain_data.updated"), + + CONNECTION_ADDED("connection.added"), + + CONNECTION_REMOVED("connection.removed"), + + CONNECTION_REQUEST_WAITING_PEER_APPROVAL("connection.request.waiting_peer_approval"), + + CONNECTION_REQUEST_REJECTED_BY_PEER("connection.request.rejected_by_peer"); private String value; diff --git a/src/test/java/com/fireblocks/sdk/FireblocksTest.java b/src/test/java/com/fireblocks/sdk/FireblocksTest.java index d3aec3a3..e13a25d1 100644 --- a/src/test/java/com/fireblocks/sdk/FireblocksTest.java +++ b/src/test/java/com/fireblocks/sdk/FireblocksTest.java @@ -678,11 +678,11 @@ public void testGetWebhooksApi() { } @Test - public void testGetWebhooksV2BetaApi() { + public void testGetWebhooksV2Api() { setupFireblocks(true, null, null); - WebhooksV2BetaApi webhooksV2Beta = fireblocks.webhooksV2Beta(); - Assert.assertNotNull(webhooksV2Beta); - Assert.assertSame(webhooksV2Beta, fireblocks.webhooksV2Beta()); + WebhooksV2Api webhooksV2 = fireblocks.webhooksV2(); + Assert.assertNotNull(webhooksV2); + Assert.assertSame(webhooksV2, fireblocks.webhooksV2()); } @Test diff --git a/src/test/java/com/fireblocks/sdk/api/WebhooksV2BetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java similarity index 62% rename from src/test/java/com/fireblocks/sdk/api/WebhooksV2BetaApiTest.java rename to src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java index 6dda5ef6..96fd6c09 100644 --- a/src/test/java/com/fireblocks/sdk/api/WebhooksV2BetaApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java @@ -16,32 +16,33 @@ import com.fireblocks.sdk.ApiException; import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.model.CreateWebhookRequest; +import com.fireblocks.sdk.model.NotificationAttemptsPaginatedResponse; import com.fireblocks.sdk.model.NotificationPaginatedResponse; -import com.fireblocks.sdk.model.NotificationStatus; import com.fireblocks.sdk.model.NotificationWithData; +import com.fireblocks.sdk.model.ResendFailedNotificationsJobStatusResponse; +import com.fireblocks.sdk.model.ResendFailedNotificationsRequest; +import com.fireblocks.sdk.model.ResendFailedNotificationsResponse; import com.fireblocks.sdk.model.ResendNotificationsByResourceIdRequest; import com.fireblocks.sdk.model.UpdateWebhookRequest; import com.fireblocks.sdk.model.Webhook; -import com.fireblocks.sdk.model.WebhookEvent; import com.fireblocks.sdk.model.WebhookPaginatedResponse; import java.math.BigDecimal; -import java.util.List; import java.util.UUID; import java.util.concurrent.CompletableFuture; import org.junit.Ignore; import org.junit.Test; -/** API tests for WebhooksV2BetaApi */ +/** API tests for WebhooksV2Api */ @Ignore -public class WebhooksV2BetaApiTest { +public class WebhooksV2ApiTest { - private final WebhooksV2BetaApi api = new WebhooksV2BetaApi(); + private final WebhooksV2Api api = new WebhooksV2Api(); /** * Create new webhook * - *

Creates a new webhook, which will be triggered on the specified events **Note:** These - * endpoints are currently in beta and might be subject to changes. + *

Creates a new webhook, which will be triggered on the specified events Endpoint + * Permission: Owner, Admin, Non-Signing Admin. * * @throws ApiException if the Api call fails */ @@ -56,8 +57,7 @@ public void createWebhookTest() throws ApiException { /** * Delete webhook * - *

Delete a webhook by its id **Note:** These endpoints are currently in beta and might be - * subject to changes. + *

Delete a webhook by its id Endpoint Permission: Owner, Admin, Non-Signing Admin. * * @throws ApiException if the Api call fails */ @@ -70,8 +70,7 @@ public void deleteWebhookTest() throws ApiException { /** * Get notification by id * - *

Get notification by id **Note:** These endpoints are currently in beta and might be - * subject to changes. + *

Get notification by id * * @throws ApiException if the Api call fails */ @@ -84,11 +83,27 @@ public void getNotificationTest() throws ApiException { api.getNotification(webhookId, notificationId, includeData); } + /** + * Get notification attempts + * + *

Get notification attempts by notification id + * + * @throws ApiException if the Api call fails + */ + @Test + public void getNotificationAttemptsTest() throws ApiException { + String webhookId = null; + String notificationId = null; + String pageCursor = null; + BigDecimal pageSize = null; + CompletableFuture> response = + api.getNotificationAttempts(webhookId, notificationId, pageCursor, pageSize); + } + /** * Get all notifications by webhook id * - *

Get all notifications by webhook id (paginated) **Note:** These endpoints are currently in - * beta and might be subject to changes. + *

Get all notifications by webhook id (paginated) * * @throws ApiException if the Api call fails */ @@ -96,31 +111,32 @@ public void getNotificationTest() throws ApiException { public void getNotificationsTest() throws ApiException { UUID webhookId = null; String order = null; + String sortBy = null; String pageCursor = null; BigDecimal pageSize = null; - String createdStartDate = null; - String createdEndDate = null; - List statuses = null; - List eventTypes = null; - String resourceId = null; CompletableFuture> response = - api.getNotifications( - webhookId, - order, - pageCursor, - pageSize, - createdStartDate, - createdEndDate, - statuses, - eventTypes, - resourceId); + api.getNotifications(webhookId, order, sortBy, pageCursor, pageSize); + } + + /** + * Get resend job status + * + *

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

Retrieve a webhook by its id **Note:** These endpoints are currently in beta and might be - * subject to changes. + *

Retrieve a webhook by its id * * @throws ApiException if the Api call fails */ @@ -133,8 +149,7 @@ public void getWebhookTest() throws ApiException { /** * Get all webhooks * - *

Get all webhooks (paginated) **Note:** These endpoints are currently in beta and might be - * subject to changes. + *

Get all webhooks (paginated) * * @throws ApiException if the Api call fails */ @@ -147,11 +162,28 @@ public void getWebhooksTest() throws ApiException { api.getWebhooks(order, pageCursor, pageSize); } + /** + * Resend failed notifications + * + *

Resend all failed notifications for a webhook in the last 24 hours Endpoint Permission: + * Owner, Admin, Non-Signing Admin. + * + * @throws ApiException if the Api call fails + */ + @Test + public void resendFailedNotificationsTest() throws ApiException { + ResendFailedNotificationsRequest resendFailedNotificationsRequest = null; + String webhookId = null; + String idempotencyKey = null; + CompletableFuture> response = + api.resendFailedNotifications( + resendFailedNotificationsRequest, webhookId, idempotencyKey); + } + /** * Resend notification by id * - *

Resend notification by ID **Note:** These endpoints are currently in beta and might be - * subject to changes. + *

Resend notification by ID Endpoint Permission: Owner, Admin, Non-Signing Admin. * * @throws ApiException if the Api call fails */ @@ -168,8 +200,7 @@ public void resendNotificationByIdTest() throws ApiException { /** * Resend notifications by resource Id * - *

Resend notifications by resource Id **Note:** These endpoints are currently in beta and - * might be subject to changes. + *

Resend notifications by resource Id Endpoint Permission: Owner, Admin, Non-Signing Admin. * * @throws ApiException if the Api call fails */ @@ -187,8 +218,7 @@ public void resendNotificationsByResourceIdTest() throws ApiException { /** * Update webhook * - *

Update a webhook by its id **Note:** These endpoints are currently in beta and might be - * subject to changes. + *

Update a webhook by its id Endpoint Permission: Owner, Admin, Non-Signing Admin. * * @throws ApiException if the Api call fails */ diff --git a/src/test/java/com/fireblocks/sdk/model/EstimatedFeeDetailsTest.java b/src/test/java/com/fireblocks/sdk/model/EstimatedFeeDetailsTest.java new file mode 100644 index 00000000..e5183638 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/EstimatedFeeDetailsTest.java @@ -0,0 +1,45 @@ +/* + * 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 EstimatedFeeDetails */ +public class EstimatedFeeDetailsTest { + private final EstimatedFeeDetails model = new EstimatedFeeDetails(); + + /** Model tests for EstimatedFeeDetails */ + @Test + public void testEstimatedFeeDetails() { + // TODO: test EstimatedFeeDetails + } + + /** Test the property 'low' */ + @Test + public void lowTest() { + // TODO: test low + } + + /** Test the property 'medium' */ + @Test + public void mediumTest() { + // TODO: test medium + } + + /** Test the property 'high' */ + @Test + public void highTest() { + // TODO: test high + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/EstimatedTransactionFeeResponseTest.java b/src/test/java/com/fireblocks/sdk/model/EstimatedTransactionFeeResponseTest.java index d0a206c4..f0387ce1 100644 --- a/src/test/java/com/fireblocks/sdk/model/EstimatedTransactionFeeResponseTest.java +++ b/src/test/java/com/fireblocks/sdk/model/EstimatedTransactionFeeResponseTest.java @@ -42,4 +42,10 @@ public void mediumTest() { public void highTest() { // TODO: test high } + + /** Test the property 'feeDetails' */ + @Test + public void feeDetailsTest() { + // TODO: test feeDetails + } } diff --git a/src/test/java/com/fireblocks/sdk/model/FeeBreakdownOneOf1Test.java b/src/test/java/com/fireblocks/sdk/model/FeeBreakdownOneOf1Test.java new file mode 100644 index 00000000..73c8db80 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/FeeBreakdownOneOf1Test.java @@ -0,0 +1,45 @@ +/* + * 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 FeeBreakdownOneOf1 */ +public class FeeBreakdownOneOf1Test { + private final FeeBreakdownOneOf1 model = new FeeBreakdownOneOf1(); + + /** Model tests for FeeBreakdownOneOf1 */ + @Test + public void testFeeBreakdownOneOf1() { + // TODO: test FeeBreakdownOneOf1 + } + + /** Test the property 'baseFee' */ + @Test + public void baseFeeTest() { + // TODO: test baseFee + } + + /** Test the property 'priorityFee' */ + @Test + public void priorityFeeTest() { + // TODO: test priorityFee + } + + /** Test the property 'totalFee' */ + @Test + public void totalFeeTest() { + // TODO: test totalFee + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/FeeBreakdownOneOfTest.java b/src/test/java/com/fireblocks/sdk/model/FeeBreakdownOneOfTest.java new file mode 100644 index 00000000..c73686b2 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/FeeBreakdownOneOfTest.java @@ -0,0 +1,51 @@ +/* + * 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 FeeBreakdownOneOf */ +public class FeeBreakdownOneOfTest { + private final FeeBreakdownOneOf model = new FeeBreakdownOneOf(); + + /** Model tests for FeeBreakdownOneOf */ + @Test + public void testFeeBreakdownOneOf() { + // TODO: test FeeBreakdownOneOf + } + + /** Test the property 'baseFee' */ + @Test + public void baseFeeTest() { + // TODO: test baseFee + } + + /** Test the property 'priorityFee' */ + @Test + public void priorityFeeTest() { + // TODO: test priorityFee + } + + /** Test the property 'rent' */ + @Test + public void rentTest() { + // TODO: test rent + } + + /** Test the property 'totalFee' */ + @Test + public void totalFeeTest() { + // TODO: test totalFee + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/FeeBreakdownTest.java b/src/test/java/com/fireblocks/sdk/model/FeeBreakdownTest.java new file mode 100644 index 00000000..5dbc1bc8 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/FeeBreakdownTest.java @@ -0,0 +1,51 @@ +/* + * 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 FeeBreakdown */ +public class FeeBreakdownTest { + private final FeeBreakdown model = new FeeBreakdown(); + + /** Model tests for FeeBreakdown */ + @Test + public void testFeeBreakdown() { + // TODO: test FeeBreakdown + } + + /** Test the property 'baseFee' */ + @Test + public void baseFeeTest() { + // TODO: test baseFee + } + + /** Test the property 'priorityFee' */ + @Test + public void priorityFeeTest() { + // TODO: test priorityFee + } + + /** Test the property 'rent' */ + @Test + public void rentTest() { + // TODO: test rent + } + + /** Test the property 'totalFee' */ + @Test + public void totalFeeTest() { + // TODO: test totalFee + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/NotificationAttemptsPaginatedResponseTest.java b/src/test/java/com/fireblocks/sdk/model/NotificationAttemptsPaginatedResponseTest.java new file mode 100644 index 00000000..8a02da6a --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/NotificationAttemptsPaginatedResponseTest.java @@ -0,0 +1,40 @@ +/* + * 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 NotificationAttemptsPaginatedResponse */ +public class NotificationAttemptsPaginatedResponseTest { + private final NotificationAttemptsPaginatedResponse model = + new NotificationAttemptsPaginatedResponse(); + + /** Model tests for NotificationAttemptsPaginatedResponse */ + @Test + public void testNotificationAttemptsPaginatedResponse() { + // TODO: test NotificationAttemptsPaginatedResponse + } + + /** Test the property 'data' */ + @Test + public void dataTest() { + // TODO: test data + } + + /** Test the property 'next' */ + @Test + public void nextTest() { + // TODO: test next + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/NotificationTest.java b/src/test/java/com/fireblocks/sdk/model/NotificationTest.java index 04805353..5531beba 100644 --- a/src/test/java/com/fireblocks/sdk/model/NotificationTest.java +++ b/src/test/java/com/fireblocks/sdk/model/NotificationTest.java @@ -60,10 +60,4 @@ public void eventTypeTest() { public void resourceIdTest() { // TODO: test resourceId } - - /** Test the property 'attempts' */ - @Test - public void attemptsTest() { - // TODO: test attempts - } } diff --git a/src/test/java/com/fireblocks/sdk/model/NotificationWithDataTest.java b/src/test/java/com/fireblocks/sdk/model/NotificationWithDataTest.java index b1b77f61..170f46af 100644 --- a/src/test/java/com/fireblocks/sdk/model/NotificationWithDataTest.java +++ b/src/test/java/com/fireblocks/sdk/model/NotificationWithDataTest.java @@ -61,12 +61,6 @@ public void resourceIdTest() { // TODO: test resourceId } - /** Test the property 'attempts' */ - @Test - public void attemptsTest() { - // TODO: test attempts - } - /** Test the property 'data' */ @Test public void dataTest() { diff --git a/src/test/java/com/fireblocks/sdk/model/ResendFailedNotificationsJobStatusResponseTest.java b/src/test/java/com/fireblocks/sdk/model/ResendFailedNotificationsJobStatusResponseTest.java new file mode 100644 index 00000000..8f2c52cb --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ResendFailedNotificationsJobStatusResponseTest.java @@ -0,0 +1,52 @@ +/* + * 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 ResendFailedNotificationsJobStatusResponse */ +public class ResendFailedNotificationsJobStatusResponseTest { + private final ResendFailedNotificationsJobStatusResponse model = + new ResendFailedNotificationsJobStatusResponse(); + + /** Model tests for ResendFailedNotificationsJobStatusResponse */ + @Test + public void testResendFailedNotificationsJobStatusResponse() { + // TODO: test ResendFailedNotificationsJobStatusResponse + } + + /** Test the property 'jobId' */ + @Test + public void jobIdTest() { + // TODO: test jobId + } + + /** Test the property 'status' */ + @Test + public void statusTest() { + // TODO: test status + } + + /** Test the property 'processed' */ + @Test + public void processedTest() { + // TODO: test processed + } + + /** Test the property 'total' */ + @Test + public void totalTest() { + // TODO: test total + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ResendFailedNotificationsRequestTest.java b/src/test/java/com/fireblocks/sdk/model/ResendFailedNotificationsRequestTest.java new file mode 100644 index 00000000..1b06c9e7 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ResendFailedNotificationsRequestTest.java @@ -0,0 +1,39 @@ +/* + * 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 ResendFailedNotificationsRequest */ +public class ResendFailedNotificationsRequestTest { + private final ResendFailedNotificationsRequest model = new ResendFailedNotificationsRequest(); + + /** Model tests for ResendFailedNotificationsRequest */ + @Test + public void testResendFailedNotificationsRequest() { + // TODO: test ResendFailedNotificationsRequest + } + + /** Test the property 'startTime' */ + @Test + public void startTimeTest() { + // TODO: test startTime + } + + /** Test the property 'events' */ + @Test + public void eventsTest() { + // TODO: test events + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ResendFailedNotificationsResponseTest.java b/src/test/java/com/fireblocks/sdk/model/ResendFailedNotificationsResponseTest.java new file mode 100644 index 00000000..fdb8c6cc --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ResendFailedNotificationsResponseTest.java @@ -0,0 +1,33 @@ +/* + * 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 ResendFailedNotificationsResponse */ +public class ResendFailedNotificationsResponseTest { + private final ResendFailedNotificationsResponse model = new ResendFailedNotificationsResponse(); + + /** Model tests for ResendFailedNotificationsResponse */ + @Test + public void testResendFailedNotificationsResponse() { + // TODO: test ResendFailedNotificationsResponse + } + + /** Test the property 'total' */ + @Test + public void totalTest() { + // TODO: test total + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransactionRequestDestinationTest.java b/src/test/java/com/fireblocks/sdk/model/TransactionRequestDestinationTest.java index d742b6a1..3889d16b 100644 --- a/src/test/java/com/fireblocks/sdk/model/TransactionRequestDestinationTest.java +++ b/src/test/java/com/fireblocks/sdk/model/TransactionRequestDestinationTest.java @@ -36,4 +36,16 @@ public void amountTest() { public void destinationTest() { // TODO: test destination } + + /** Test the property 'travelRuleMessageId' */ + @Test + public void travelRuleMessageIdTest() { + // TODO: test travelRuleMessageId + } + + /** Test the property 'customerRefId' */ + @Test + public void customerRefIdTest() { + // TODO: test customerRefId + } } diff --git a/src/test/java/com/fireblocks/sdk/model/TransactionRequestTest.java b/src/test/java/com/fireblocks/sdk/model/TransactionRequestTest.java index 0139b4b9..28a9a8a8 100644 --- a/src/test/java/com/fireblocks/sdk/model/TransactionRequestTest.java +++ b/src/test/java/com/fireblocks/sdk/model/TransactionRequestTest.java @@ -163,6 +163,12 @@ public void travelRuleMessageTest() { // TODO: test travelRuleMessage } + /** Test the property 'travelRuleMessageId' */ + @Test + public void travelRuleMessageIdTest() { + // TODO: test travelRuleMessageId + } + /** Test the property 'autoStaking' */ @Test public void autoStakingTest() {