diff --git a/.auto-changelog b/.auto-changelog new file mode 100644 index 00000000..8fb54f02 --- /dev/null +++ b/.auto-changelog @@ -0,0 +1,11 @@ +{ + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": 0, + "backfillLimit": 3, + "hideCredit": true, + "replaceText": { + "\\[([^\\]]+)\\]\\(https://github.com/[^/]+/[^/]+/compare/[^)]+\\)": "[$1](https://github.com/fireblocks/ts-sdk/releases/tag/$1)" + } +} \ No newline at end of file diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index 197fe048..00000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,56 +0,0 @@ -name-template: 'v$RESOLVED_VERSION' -tag-template: 'v$RESOLVED_VERSION' -categories: - - title: '🚀 Features' - labels: - - 'feature' - - 'enhancement' - - title: '🐛 Bug Fixes' - labels: - - 'fix' - - 'bugfix' - - 'bug' - - title: '🧰 Maintenance' - label: 'chore' -change-template: '- $TITLE @$AUTHOR (#$NUMBER)' -change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. -version-resolver: - major: - labels: - - 'major' - - 'breaking' - minor: - labels: - - 'minor' - - 'enhancement' - patch: - labels: - - 'patch' - - 'bug' - default: patch -template: | - ## Changes - - $CHANGES -autolabeler: - - label: 'chore' - files: - - '*.md' - branch: - - '/docs{0,1}\/.+/' - - label: 'bug' - branch: - - '/fix\/.+/' - title: - - '/fix/i' - - '/bugfix/i' - - label: 'enhancement' - title: - - '/added/i' - - '/add/i' - - '/feature/i' - - '/feat/i' - - '/support/i' - - '/enable/i' - branch: - - '/feature\/.+/' diff --git a/.github/workflows/draft-release-from-pr.yml b/.github/workflows/draft-release-from-pr.yml new file mode 100644 index 00000000..f547cbcf --- /dev/null +++ b/.github/workflows/draft-release-from-pr.yml @@ -0,0 +1,91 @@ +name: Draft Release from PR + +on: + push: + branches: + - master_changelog_test + +permissions: + contents: write + pull-requests: read + +jobs: + draft-release: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Get last merged PR + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh pr list \ + --state merged \ + --base master_changelog_test \ + --limit 1 \ + --json number,title,body,labels \ + > pr.json + + PR_NUM=$(jq -r '.[0].number // "none"' pr.json) + PR_TITLE=$(jq -r '.[0].title // "none"' pr.json) + echo "Found merged PR: #$PR_NUM - $PR_TITLE" + + - name: Get latest release version + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + LAST_TAG=$(gh release list --limit 1 --json tagName -q '.[0].tagName') + + if [[ -z "$LAST_TAG" || "$LAST_TAG" == "null" ]]; then + echo "No existing release found, starting from v0.1.0" + echo "LAST_TAG=v0.1.0" >> $GITHUB_ENV + else + echo "Found latest release: $LAST_TAG" + echo "LAST_TAG=$LAST_TAG" >> $GITHUB_ENV + fi + + - name: Calculate next version from labels + run: | + V="${LAST_TAG#v}" + + MAJOR=$(echo $V | cut -d. -f1) + MINOR=$(echo $V | cut -d. -f2) + PATCH=$(echo $V | cut -d. -f3) + + LABELS=$(jq -r '.[0].labels[].name' pr.json) + echo "Found labels: $LABELS" + + if echo "$LABELS" | grep -q "major"; then + echo "Bumping MAJOR version" + MAJOR=$((MAJOR+1)) + MINOR=0 + PATCH=0 + elif echo "$LABELS" | grep -q "minor"; then + echo "Bumping MINOR version" + MINOR=$((MINOR+1)) + PATCH=0 + else + echo "Bumping PATCH version" + PATCH=$((PATCH+1)) + fi + + echo "Calculated next version: v$MAJOR.$MINOR.$PATCH" + echo "VERSION=v$MAJOR.$MINOR.$PATCH" >> $GITHUB_ENV + + - name: Create DRAFT release using PR BODY + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + PR_BODY=$(jq -r '.[0].body // ""' pr.json) + + echo "Creating draft release..." + echo "Version: $VERSION" + + gh release create "$VERSION" \ + --draft \ + --title "$VERSION" \ + --notes "$PR_BODY" + + echo "Draft release created successfully!" \ No newline at end of file diff --git a/.github/workflows/pr-auto-label.yml b/.github/workflows/pr-auto-label.yml new file mode 100644 index 00000000..e5df470a --- /dev/null +++ b/.github/workflows/pr-auto-label.yml @@ -0,0 +1,37 @@ +name: PR Auto Label + +on: + pull_request: + types: [opened, edited, reopened, synchronize] + +permissions: + pull-requests: write + contents: read + +jobs: + label: + runs-on: ubuntu-latest + steps: + - name: Label PR by title + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TITLE: ${{ github.event.pull_request.title }} + PR: ${{ github.event.pull_request.number }} + REPO: ${{ github.repository }} + run: | + label="" + + if [[ "$TITLE" =~ \(major\) ]]; then + label="major" + elif [[ "$TITLE" =~ \(minor\) ]]; then + label="minor" + elif [[ "$TITLE" =~ \(patch\) ]]; then + label="patch" + fi + + if [[ -n "$label" ]]; then + echo "Found label: $label" + gh pr edit "$PR" --repo "$REPO" --add-label "$label" + else + echo "No label found in title: $TITLE" + fi diff --git a/.github/workflows/pr-title-validation.yml b/.github/workflows/pr-title-validation.yml new file mode 100644 index 00000000..6cf926de --- /dev/null +++ b/.github/workflows/pr-title-validation.yml @@ -0,0 +1,12 @@ +name: PR Title Validation +on: + pull_request: + types: [opened, edited, synchronize, reopened] +jobs: + validate: + runs-on: ubuntu-latest + steps: + - uses: deepakputhraya/action-pr-title@master + with: + disallowed_prefixes: 'COR-' + prefix_case_sensitive: false diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml deleted file mode 100644 index ecba06c6..00000000 --- a/.github/workflows/release-drafter.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Release Drafter - -on: - push: - branches: - - master - pull_request: - types: [opened, reopened, synchronize] - -jobs: - update_release_draft: - runs-on: ubuntu-latest - steps: - - uses: release-drafter/release-drafter@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index a135a91d..de1507c6 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 14.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:14.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-14.0.0.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` @@ -485,6 +485,7 @@ Class | Method | HTTP request | Description *WebhooksApi* | [**resendTransactionWebhooks**](docs/WebhooksApi.md#resendTransactionWebhooks) | **POST** /webhooks/resend/{txId} | Resend webhooks for a transaction by ID *WebhooksApi* | [**resendWebhooks**](docs/WebhooksApi.md#resendWebhooks) | **POST** /webhooks/resend | Resend failed webhooks *WebhooksV2Api* | [**createWebhook**](docs/WebhooksV2Api.md#createWebhook) | **POST** /webhooks | Create a new webhook +*WebhooksV2Api* | [**deleteNotification**](docs/WebhooksV2Api.md#deleteNotification) | **DELETE** /webhooks/{webhookId}/notifications/{notificationId} | Delete notification by id *WebhooksV2Api* | [**deleteWebhook**](docs/WebhooksV2Api.md#deleteWebhook) | **DELETE** /webhooks/{webhookId} | Delete webhook *WebhooksV2Api* | [**getMetrics**](docs/WebhooksV2Api.md#getMetrics) | **GET** /webhooks/{webhookId}/metrics/{metricName} | Get webhook metrics *WebhooksV2Api* | [**getNotification**](docs/WebhooksV2Api.md#getNotification) | **GET** /webhooks/{webhookId}/notifications/{notificationId} | Get notification by id diff --git a/api/openapi.yaml b/api/openapi.yaml index d4759e09..6602e19e 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -13425,6 +13425,63 @@ paths: x-accepts: - application/json /webhooks/{webhookId}/notifications/{notificationId}: + delete: + description: | + Delete notification by id + operationId: deleteNotification + 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 + responses: + "204": + description: OK + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Delete notification by id + tags: + - Webhooks V2 + x-rate-limit-category: read + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.webhooksV2.deleteNotification(webhooksV2ApiDeleteNotificationRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response = fireblocks.webhooksV2().deleteNotification(webhookId,\ + \ notificationId);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.webhooks_v2.delete_notification(webhook_id,\ + \ notification_id);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.webhooksV2.deleteNotification(webhooksV2ApiDeleteNotificationRequest);" + - lang: Java + source: "CompletableFuture> response = fireblocks.webhooksV2().deleteNotification(webhookId,\ + \ notificationId);" + - lang: Python + source: "response = fireblocks.webhooks_v2.delete_notification(webhook_id,\ + \ notification_id);" + x-accepts: + - application/json get: description: | Get notification by id @@ -32215,7 +32272,7 @@ components: address: address balance: balance id: id - tag: tag + tag: true activationTime: activationTime status: WAITING_FOR_APPROVAL properties: @@ -32230,7 +32287,7 @@ components: address: type: string tag: - type: string + type: boolean activationTime: type: string type: object @@ -32241,16 +32298,17 @@ components: address: address balance: balance id: id - tag: tag + tag: true activationTime: activationTime status: WAITING_FOR_APPROVAL - lockedAmount: lockedAmount address: address balance: balance id: id - tag: tag + tag: true activationTime: activationTime status: WAITING_FOR_APPROVAL + test: true name: name id: id customerRefId: customerRefId @@ -32265,10 +32323,13 @@ components: items: $ref: "#/components/schemas/WalletAsset" type: array + test: + type: boolean required: - assets - id - name + - test type: object GetInternalWalletsResponse: items: @@ -32296,16 +32357,17 @@ components: address: address balance: balance id: id - tag: tag + tag: true activationTime: activationTime status: WAITING_FOR_APPROVAL - lockedAmount: lockedAmount address: address balance: balance id: id - tag: tag + tag: true activationTime: activationTime status: WAITING_FOR_APPROVAL + test: true name: name id: id customerRefId: customerRefId diff --git a/build.gradle b/build.gradle index 63b8a60c..62baedca 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'eclipse' apply plugin: 'com.diffplug.spotless' group = 'com.fireblocks.sdk' -version = '14.0.0' +version = '0.0.0' buildscript { repositories { diff --git a/docs/UnmanagedWallet.md b/docs/UnmanagedWallet.md index 7c647e5d..4f7fb9f6 100644 --- a/docs/UnmanagedWallet.md +++ b/docs/UnmanagedWallet.md @@ -11,6 +11,7 @@ |**name** | **String** | | | |**customerRefId** | **String** | | [optional] | |**assets** | [**List<WalletAsset>**](WalletAsset.md) | | | +|**test** | **Boolean** | | | diff --git a/docs/WalletAsset.md b/docs/WalletAsset.md index 3495bda4..00510d2e 100644 --- a/docs/WalletAsset.md +++ b/docs/WalletAsset.md @@ -12,7 +12,7 @@ |**lockedAmount** | **String** | | [optional] | |**status** | **ConfigChangeRequestStatus** | | [optional] | |**address** | **String** | | [optional] | -|**tag** | **String** | | [optional] | +|**tag** | **Boolean** | | [optional] | |**activationTime** | **String** | | [optional] | diff --git a/docs/WebhooksV2Api.md b/docs/WebhooksV2Api.md index 99b682b4..d2009a1b 100644 --- a/docs/WebhooksV2Api.md +++ b/docs/WebhooksV2Api.md @@ -5,6 +5,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**createWebhook**](WebhooksV2Api.md#createWebhook) | **POST** /webhooks | Create a new webhook | +| [**deleteNotification**](WebhooksV2Api.md#deleteNotification) | **DELETE** /webhooks/{webhookId}/notifications/{notificationId} | Delete notification by id | | [**deleteWebhook**](WebhooksV2Api.md#deleteWebhook) | **DELETE** /webhooks/{webhookId} | Delete webhook | | [**getMetrics**](WebhooksV2Api.md#getMetrics) | **GET** /webhooks/{webhookId}/metrics/{metricName} | Get webhook metrics | | [**getNotification**](WebhooksV2Api.md#getNotification) | **GET** /webhooks/{webhookId}/notifications/{notificationId} | Get notification by id | @@ -105,6 +106,90 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## deleteNotification + +> CompletableFuture> deleteNotification deleteNotification(webhookId, notificationId) + +Delete notification by id + +Delete notification by 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 + try { + CompletableFuture> response = fireblocks.webhooksV2().deleteNotification(webhookId, notificationId); + 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 WebhooksV2Api#deleteNotification"); + 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#deleteNotification"); + 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 | | + +### 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 | +|-------------|-------------|------------------| +| **204** | OK | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## deleteWebhook > CompletableFuture> deleteWebhook deleteWebhook(webhookId) diff --git a/git_push.sh b/git_push.sh index 7b0eed33..09be4cdc 100644 --- a/git_push.sh +++ b/git_push.sh @@ -19,7 +19,7 @@ if [ "$git_user_id" = "" ]; then fi if [ "$git_repo_id" = "" ]; then - git_repo_id="ts-sdk" + git_repo_id="java-sdk" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi diff --git a/pom.xml b/pom.xml index 4b1c2f9c..89176ce6 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 14.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 df893fca..aa53bae8 100644 --- a/src/main/java/com/fireblocks/sdk/Configuration.java +++ b/src/main/java/com/fireblocks/sdk/Configuration.java @@ -21,7 +21,7 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") public class Configuration { - public static final String VERSION = "14.0.0"; + public static final String VERSION = "0.0.0"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java b/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java index e131e9ee..a2344437 100644 --- a/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java +++ b/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java @@ -169,6 +169,69 @@ private HttpRequest.Builder createWebhookRequestBuilder( } return localVarRequestBuilder; } + /** + * Delete notification by id Delete notification by id + * + * @param webhookId The ID of the webhook to fetch (required) + * @param notificationId The ID of the notification to fetch (required) + * @return CompletableFuture<ApiResponse<Void>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> deleteNotification( + String webhookId, String notificationId) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + deleteNotificationRequestBuilder(webhookId, notificationId); + 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( + "deleteNotification", localVarResponse)); + } + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + null)); + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder deleteNotificationRequestBuilder( + String webhookId, String notificationId) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("deleteNotification", "webhookId", webhookId); + ValidationUtils.assertParamExistsAndNotEmpty( + "deleteNotification", "notificationId", notificationId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/webhooks/{webhookId}/notifications/{notificationId}" + .replace("{webhookId}", ApiClient.urlEncode(webhookId.toString())) + .replace( + "{notificationId}", ApiClient.urlEncode(notificationId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("DELETE", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } /** * Delete webhook Delete a webhook by its id Endpoint Permission: Owner, Admin, Non-Signing * Admin. diff --git a/src/main/java/com/fireblocks/sdk/model/UnmanagedWallet.java b/src/main/java/com/fireblocks/sdk/model/UnmanagedWallet.java index 2fe56452..904e4153 100644 --- a/src/main/java/com/fireblocks/sdk/model/UnmanagedWallet.java +++ b/src/main/java/com/fireblocks/sdk/model/UnmanagedWallet.java @@ -28,7 +28,8 @@ UnmanagedWallet.JSON_PROPERTY_ID, UnmanagedWallet.JSON_PROPERTY_NAME, UnmanagedWallet.JSON_PROPERTY_CUSTOMER_REF_ID, - UnmanagedWallet.JSON_PROPERTY_ASSETS + UnmanagedWallet.JSON_PROPERTY_ASSETS, + UnmanagedWallet.JSON_PROPERTY_TEST }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -46,16 +47,21 @@ public class UnmanagedWallet { public static final String JSON_PROPERTY_ASSETS = "assets"; @jakarta.annotation.Nonnull private List assets; + public static final String JSON_PROPERTY_TEST = "test"; + @jakarta.annotation.Nonnull private Boolean test; + public UnmanagedWallet() {} @JsonCreator public UnmanagedWallet( @JsonProperty(value = JSON_PROPERTY_ID, required = true) String id, @JsonProperty(value = JSON_PROPERTY_NAME, required = true) String name, - @JsonProperty(value = JSON_PROPERTY_ASSETS, required = true) List assets) { + @JsonProperty(value = JSON_PROPERTY_ASSETS, required = true) List assets, + @JsonProperty(value = JSON_PROPERTY_TEST, required = true) Boolean test) { this.id = id; this.name = name; this.assets = assets; + this.test = test; } public UnmanagedWallet id(@jakarta.annotation.Nonnull String id) { @@ -158,6 +164,29 @@ public void setAssets(@jakarta.annotation.Nonnull List assets) { this.assets = assets; } + public UnmanagedWallet test(@jakarta.annotation.Nonnull Boolean test) { + this.test = test; + return this; + } + + /** + * Get test + * + * @return test + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TEST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getTest() { + return test; + } + + @JsonProperty(JSON_PROPERTY_TEST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTest(@jakarta.annotation.Nonnull Boolean test) { + this.test = test; + } + /** Return true if this UnmanagedWallet object is equal to o. */ @Override public boolean equals(Object o) { @@ -171,12 +200,13 @@ public boolean equals(Object o) { return Objects.equals(this.id, unmanagedWallet.id) && Objects.equals(this.name, unmanagedWallet.name) && Objects.equals(this.customerRefId, unmanagedWallet.customerRefId) - && Objects.equals(this.assets, unmanagedWallet.assets); + && Objects.equals(this.assets, unmanagedWallet.assets) + && Objects.equals(this.test, unmanagedWallet.test); } @Override public int hashCode() { - return Objects.hash(id, name, customerRefId, assets); + return Objects.hash(id, name, customerRefId, assets, test); } @Override @@ -187,6 +217,7 @@ public String toString() { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" customerRefId: ").append(toIndentedString(customerRefId)).append("\n"); sb.append(" assets: ").append(toIndentedString(assets)).append("\n"); + sb.append(" test: ").append(toIndentedString(test)).append("\n"); sb.append("}"); return sb.toString(); } @@ -285,6 +316,16 @@ public String toUrlQueryString(String prefix) { } } + // add `test` to the URL query string + if (getTest() != null) { + joiner.add( + String.format( + "%stest%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTest())))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/WalletAsset.java b/src/main/java/com/fireblocks/sdk/model/WalletAsset.java index 94a834db..d0f3680d 100644 --- a/src/main/java/com/fireblocks/sdk/model/WalletAsset.java +++ b/src/main/java/com/fireblocks/sdk/model/WalletAsset.java @@ -50,7 +50,7 @@ public class WalletAsset { @jakarta.annotation.Nullable private String address; public static final String JSON_PROPERTY_TAG = "tag"; - @jakarta.annotation.Nullable private String tag; + @jakarta.annotation.Nullable private Boolean tag; public static final String JSON_PROPERTY_ACTIVATION_TIME = "activationTime"; @jakarta.annotation.Nullable private String activationTime; @@ -172,7 +172,7 @@ public void setAddress(@jakarta.annotation.Nullable String address) { this.address = address; } - public WalletAsset tag(@jakarta.annotation.Nullable String tag) { + public WalletAsset tag(@jakarta.annotation.Nullable Boolean tag) { this.tag = tag; return this; } @@ -185,13 +185,13 @@ public WalletAsset tag(@jakarta.annotation.Nullable String tag) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TAG) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTag() { + public Boolean getTag() { return tag; } @JsonProperty(JSON_PROPERTY_TAG) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTag(@jakarta.annotation.Nullable String tag) { + public void setTag(@jakarta.annotation.Nullable Boolean tag) { this.tag = tag; } diff --git a/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java b/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java index 5b4ed88f..2ac5fd34 100644 --- a/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java @@ -58,6 +58,22 @@ public void createWebhookTest() throws ApiException { api.createWebhook(createWebhookRequest, idempotencyKey); } + /** + * Delete notification by id + * + *

Delete notification by id + * + * @throws ApiException if the Api call fails + */ + @Test + public void deleteNotificationTest() throws ApiException { + String webhookId = null; + String notificationId = null; + + CompletableFuture> response = + api.deleteNotification(webhookId, notificationId); + } + /** * Delete webhook * diff --git a/src/test/java/com/fireblocks/sdk/model/UnmanagedWalletTest.java b/src/test/java/com/fireblocks/sdk/model/UnmanagedWalletTest.java index 5a3a0fca..056d5637 100644 --- a/src/test/java/com/fireblocks/sdk/model/UnmanagedWalletTest.java +++ b/src/test/java/com/fireblocks/sdk/model/UnmanagedWalletTest.java @@ -48,4 +48,10 @@ void customerRefIdTest() { void assetsTest() { // TODO: test assets } + + /** Test the property 'test' */ + @Test + void testTest() { + // TODO: test test + } }