diff --git a/.auto-changelog b/.auto-changelog new file mode 100644 index 00000000..05dc0059 --- /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/$2/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..ae3c2269 --- /dev/null +++ b/.github/workflows/draft-release-from-pr.yml @@ -0,0 +1,91 @@ +name: Draft Release from PR + +on: + push: + branches: + - master + +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 \ + --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. A release tag is required to calculate the next version." + exit 1 + fi + + echo "Found latest release: $LAST_TAG" + echo "LAST_TAG=$LAST_TAG" >> $GITHUB_ENV + + - 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/publish-maven.yml b/.github/workflows/publish-maven.yml index a68ef7e5..17bbcb91 100644 --- a/.github/workflows/publish-maven.yml +++ b/.github/workflows/publish-maven.yml @@ -42,6 +42,7 @@ jobs: echo "finished configuration" bump-my-version bump --config-file .bump_version.toml --current-version 0.0.0 --new-version $tag echo "bumpversion finished" + auto-changelog git add . git commit -m "release $tag" git push 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/.openapi-generator/FILES b/.openapi-generator/FILES index 1194cdb4..6b99e9b0 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -133,6 +133,9 @@ docs/Capability.md docs/ChainDescriptor.md docs/ChainInfoResponse.md docs/ChannelDvnConfigWithConfirmations.md +docs/ChapsAddress.md +docs/ChapsDestination.md +docs/ChapsPaymentInfo.md docs/ClaimRewardsRequest.md docs/CollectionBurnRequestDto.md docs/CollectionBurnResponseDto.md @@ -362,7 +365,6 @@ docs/ExecutionStepType.md docs/ExecutionTransferOperation.md docs/ExternalAccount.md docs/ExternalAccountLocalBankAfrica.md -docs/ExternalAccountLocalBankAfricaType.md docs/ExternalAccountMobileMoney.md docs/ExternalAccountMobileMoneyProvider.md docs/ExternalAccountMobileMoneyType.md @@ -370,6 +372,7 @@ docs/ExternalAccountSenderInformation.md docs/ExternalAccountType.md docs/ExternalWalletAsset.md docs/ExternalWalletsApi.md +docs/ExtraParameters.md docs/Failure.md docs/FailureReason.md docs/Fee.md @@ -433,7 +436,12 @@ docs/IndicativeQuoteType.md docs/InitiatorConfig.md docs/InitiatorConfigPattern.md docs/InstructionAmount.md +docs/InteracAddress.md +docs/InteracDestination.md +docs/InteracPaymentInfo.md docs/InternalReference.md +docs/InternalTransferAddress.md +docs/InternalTransferDestination.md docs/InternalTransferResponse.md docs/InternalWalletsApi.md docs/InvalidParamaterValueError.md @@ -549,11 +557,15 @@ docs/ParticipantsIdentification.md docs/PayeeAccount.md docs/PayeeAccountResponse.md docs/PayeeAccountType.md +docs/PayidAddress.md +docs/PayidDestination.md +docs/PayidPaymentInfo.md docs/PaymentAccount.md docs/PaymentAccountResponse.md docs/PaymentAccountType.md docs/PaymentInstructions.md docs/PaymentInstructionsOneOf.md +docs/PaymentRedirect.md docs/PaymentsPayoutApi.md docs/PayoutInitMethod.md docs/PayoutInstruction.md @@ -616,6 +628,7 @@ docs/ReQuoteDetailsReQuote.md docs/ReadAbiFunction.md docs/ReadCallFunctionDto.md docs/ReadCallFunctionDtoAbiFunction.md +docs/RecipientHandle.md docs/RedeemFundsToLinkedDDAResponse.md docs/RegisterNewAssetRequest.md docs/ReissueMultichainTokenRequest.md @@ -1023,6 +1036,8 @@ docs/WithdrawRequest.md docs/WorkflowConfigStatus.md docs/WorkflowConfigurationId.md docs/WorkflowExecutionOperation.md +docs/Workspace.md +docs/WorkspaceApi.md docs/WorkspaceStatusBetaApi.md docs/WriteAbiFunction.md docs/WriteCallFunctionDto.md @@ -1100,6 +1115,7 @@ 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/WebhooksV2Api.java src/main/java/com/fireblocks/sdk/api/WhitelistIpAddressesApi.java +src/main/java/com/fireblocks/sdk/api/WorkspaceApi.java src/main/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApi.java src/main/java/com/fireblocks/sdk/model/APIUser.java src/main/java/com/fireblocks/sdk/model/AbaPaymentInfo.java @@ -1224,6 +1240,9 @@ src/main/java/com/fireblocks/sdk/model/Capability.java src/main/java/com/fireblocks/sdk/model/ChainDescriptor.java src/main/java/com/fireblocks/sdk/model/ChainInfoResponse.java src/main/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmations.java +src/main/java/com/fireblocks/sdk/model/ChapsAddress.java +src/main/java/com/fireblocks/sdk/model/ChapsDestination.java +src/main/java/com/fireblocks/sdk/model/ChapsPaymentInfo.java src/main/java/com/fireblocks/sdk/model/ClaimRewardsRequest.java src/main/java/com/fireblocks/sdk/model/CollectionBurnRequestDto.java src/main/java/com/fireblocks/sdk/model/CollectionBurnResponseDto.java @@ -1442,13 +1461,13 @@ src/main/java/com/fireblocks/sdk/model/ExecutionStepType.java src/main/java/com/fireblocks/sdk/model/ExecutionTransferOperation.java src/main/java/com/fireblocks/sdk/model/ExternalAccount.java src/main/java/com/fireblocks/sdk/model/ExternalAccountLocalBankAfrica.java -src/main/java/com/fireblocks/sdk/model/ExternalAccountLocalBankAfricaType.java src/main/java/com/fireblocks/sdk/model/ExternalAccountMobileMoney.java src/main/java/com/fireblocks/sdk/model/ExternalAccountMobileMoneyProvider.java src/main/java/com/fireblocks/sdk/model/ExternalAccountMobileMoneyType.java src/main/java/com/fireblocks/sdk/model/ExternalAccountSenderInformation.java src/main/java/com/fireblocks/sdk/model/ExternalAccountType.java src/main/java/com/fireblocks/sdk/model/ExternalWalletAsset.java +src/main/java/com/fireblocks/sdk/model/ExtraParameters.java src/main/java/com/fireblocks/sdk/model/Failure.java src/main/java/com/fireblocks/sdk/model/FailureReason.java src/main/java/com/fireblocks/sdk/model/Fee.java @@ -1510,7 +1529,12 @@ src/main/java/com/fireblocks/sdk/model/IndicativeQuoteType.java src/main/java/com/fireblocks/sdk/model/InitiatorConfig.java src/main/java/com/fireblocks/sdk/model/InitiatorConfigPattern.java src/main/java/com/fireblocks/sdk/model/InstructionAmount.java +src/main/java/com/fireblocks/sdk/model/InteracAddress.java +src/main/java/com/fireblocks/sdk/model/InteracDestination.java +src/main/java/com/fireblocks/sdk/model/InteracPaymentInfo.java src/main/java/com/fireblocks/sdk/model/InternalReference.java +src/main/java/com/fireblocks/sdk/model/InternalTransferAddress.java +src/main/java/com/fireblocks/sdk/model/InternalTransferDestination.java src/main/java/com/fireblocks/sdk/model/InternalTransferResponse.java src/main/java/com/fireblocks/sdk/model/InvalidParamaterValueError.java src/main/java/com/fireblocks/sdk/model/JobCreated.java @@ -1618,11 +1642,15 @@ src/main/java/com/fireblocks/sdk/model/ParticipantsIdentification.java src/main/java/com/fireblocks/sdk/model/PayeeAccount.java src/main/java/com/fireblocks/sdk/model/PayeeAccountResponse.java src/main/java/com/fireblocks/sdk/model/PayeeAccountType.java +src/main/java/com/fireblocks/sdk/model/PayidAddress.java +src/main/java/com/fireblocks/sdk/model/PayidDestination.java +src/main/java/com/fireblocks/sdk/model/PayidPaymentInfo.java src/main/java/com/fireblocks/sdk/model/PaymentAccount.java src/main/java/com/fireblocks/sdk/model/PaymentAccountResponse.java src/main/java/com/fireblocks/sdk/model/PaymentAccountType.java src/main/java/com/fireblocks/sdk/model/PaymentInstructions.java src/main/java/com/fireblocks/sdk/model/PaymentInstructionsOneOf.java +src/main/java/com/fireblocks/sdk/model/PaymentRedirect.java src/main/java/com/fireblocks/sdk/model/PayoutInitMethod.java src/main/java/com/fireblocks/sdk/model/PayoutInstruction.java src/main/java/com/fireblocks/sdk/model/PayoutInstructionResponse.java @@ -1682,6 +1710,7 @@ src/main/java/com/fireblocks/sdk/model/ReQuoteDetailsReQuote.java src/main/java/com/fireblocks/sdk/model/ReadAbiFunction.java src/main/java/com/fireblocks/sdk/model/ReadCallFunctionDto.java src/main/java/com/fireblocks/sdk/model/ReadCallFunctionDtoAbiFunction.java +src/main/java/com/fireblocks/sdk/model/RecipientHandle.java src/main/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponse.java src/main/java/com/fireblocks/sdk/model/RegisterNewAssetRequest.java src/main/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequest.java @@ -2073,6 +2102,7 @@ src/main/java/com/fireblocks/sdk/model/WithdrawRequest.java src/main/java/com/fireblocks/sdk/model/WorkflowConfigStatus.java src/main/java/com/fireblocks/sdk/model/WorkflowConfigurationId.java src/main/java/com/fireblocks/sdk/model/WorkflowExecutionOperation.java +src/main/java/com/fireblocks/sdk/model/Workspace.java src/main/java/com/fireblocks/sdk/model/WriteAbiFunction.java src/main/java/com/fireblocks/sdk/model/WriteCallFunctionDto.java src/main/java/com/fireblocks/sdk/model/WriteCallFunctionDtoAbiFunction.java @@ -2128,6 +2158,7 @@ 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/WebhooksV2ApiTest.java src/test/java/com/fireblocks/sdk/api/WhitelistIpAddressesApiTest.java +src/test/java/com/fireblocks/sdk/api/WorkspaceApiTest.java src/test/java/com/fireblocks/sdk/api/WorkspaceStatusBetaApiTest.java src/test/java/com/fireblocks/sdk/model/APIUserTest.java src/test/java/com/fireblocks/sdk/model/AbaPaymentInfoTest.java @@ -2251,6 +2282,9 @@ src/test/java/com/fireblocks/sdk/model/CapabilityTest.java src/test/java/com/fireblocks/sdk/model/ChainDescriptorTest.java src/test/java/com/fireblocks/sdk/model/ChainInfoResponseTest.java src/test/java/com/fireblocks/sdk/model/ChannelDvnConfigWithConfirmationsTest.java +src/test/java/com/fireblocks/sdk/model/ChapsAddressTest.java +src/test/java/com/fireblocks/sdk/model/ChapsDestinationTest.java +src/test/java/com/fireblocks/sdk/model/ChapsPaymentInfoTest.java src/test/java/com/fireblocks/sdk/model/ClaimRewardsRequestTest.java src/test/java/com/fireblocks/sdk/model/CollectionBurnRequestDtoTest.java src/test/java/com/fireblocks/sdk/model/CollectionBurnResponseDtoTest.java @@ -2468,7 +2502,6 @@ src/test/java/com/fireblocks/sdk/model/ExecutionStepStatusEnumTest.java src/test/java/com/fireblocks/sdk/model/ExecutionStepTypeTest.java src/test/java/com/fireblocks/sdk/model/ExecutionTransferOperationTest.java src/test/java/com/fireblocks/sdk/model/ExternalAccountLocalBankAfricaTest.java -src/test/java/com/fireblocks/sdk/model/ExternalAccountLocalBankAfricaTypeTest.java src/test/java/com/fireblocks/sdk/model/ExternalAccountMobileMoneyProviderTest.java src/test/java/com/fireblocks/sdk/model/ExternalAccountMobileMoneyTest.java src/test/java/com/fireblocks/sdk/model/ExternalAccountMobileMoneyTypeTest.java @@ -2476,6 +2509,7 @@ src/test/java/com/fireblocks/sdk/model/ExternalAccountSenderInformationTest.java src/test/java/com/fireblocks/sdk/model/ExternalAccountTest.java src/test/java/com/fireblocks/sdk/model/ExternalAccountTypeTest.java src/test/java/com/fireblocks/sdk/model/ExternalWalletAssetTest.java +src/test/java/com/fireblocks/sdk/model/ExtraParametersTest.java src/test/java/com/fireblocks/sdk/model/FailureReasonTest.java src/test/java/com/fireblocks/sdk/model/FailureTest.java src/test/java/com/fireblocks/sdk/model/FeeBreakdownTest.java @@ -2537,7 +2571,12 @@ src/test/java/com/fireblocks/sdk/model/IndicativeQuoteTypeTest.java src/test/java/com/fireblocks/sdk/model/InitiatorConfigPatternTest.java src/test/java/com/fireblocks/sdk/model/InitiatorConfigTest.java src/test/java/com/fireblocks/sdk/model/InstructionAmountTest.java +src/test/java/com/fireblocks/sdk/model/InteracAddressTest.java +src/test/java/com/fireblocks/sdk/model/InteracDestinationTest.java +src/test/java/com/fireblocks/sdk/model/InteracPaymentInfoTest.java src/test/java/com/fireblocks/sdk/model/InternalReferenceTest.java +src/test/java/com/fireblocks/sdk/model/InternalTransferAddressTest.java +src/test/java/com/fireblocks/sdk/model/InternalTransferDestinationTest.java src/test/java/com/fireblocks/sdk/model/InternalTransferResponseTest.java src/test/java/com/fireblocks/sdk/model/InvalidParamaterValueErrorTest.java src/test/java/com/fireblocks/sdk/model/JobCreatedTest.java @@ -2645,11 +2684,15 @@ src/test/java/com/fireblocks/sdk/model/ParticipantsIdentificationTest.java src/test/java/com/fireblocks/sdk/model/PayeeAccountResponseTest.java src/test/java/com/fireblocks/sdk/model/PayeeAccountTest.java src/test/java/com/fireblocks/sdk/model/PayeeAccountTypeTest.java +src/test/java/com/fireblocks/sdk/model/PayidAddressTest.java +src/test/java/com/fireblocks/sdk/model/PayidDestinationTest.java +src/test/java/com/fireblocks/sdk/model/PayidPaymentInfoTest.java src/test/java/com/fireblocks/sdk/model/PaymentAccountResponseTest.java src/test/java/com/fireblocks/sdk/model/PaymentAccountTest.java src/test/java/com/fireblocks/sdk/model/PaymentAccountTypeTest.java src/test/java/com/fireblocks/sdk/model/PaymentInstructionsOneOfTest.java src/test/java/com/fireblocks/sdk/model/PaymentInstructionsTest.java +src/test/java/com/fireblocks/sdk/model/PaymentRedirectTest.java src/test/java/com/fireblocks/sdk/model/PayoutInitMethodTest.java src/test/java/com/fireblocks/sdk/model/PayoutInstructionResponseTest.java src/test/java/com/fireblocks/sdk/model/PayoutInstructionStateTest.java @@ -2709,6 +2752,7 @@ src/test/java/com/fireblocks/sdk/model/ReQuoteDetailsTest.java src/test/java/com/fireblocks/sdk/model/ReadAbiFunctionTest.java src/test/java/com/fireblocks/sdk/model/ReadCallFunctionDtoAbiFunctionTest.java src/test/java/com/fireblocks/sdk/model/ReadCallFunctionDtoTest.java +src/test/java/com/fireblocks/sdk/model/RecipientHandleTest.java src/test/java/com/fireblocks/sdk/model/RedeemFundsToLinkedDDAResponseTest.java src/test/java/com/fireblocks/sdk/model/RegisterNewAssetRequestTest.java src/test/java/com/fireblocks/sdk/model/ReissueMultichainTokenRequestTest.java @@ -3100,6 +3144,7 @@ src/test/java/com/fireblocks/sdk/model/WithdrawRequestTest.java src/test/java/com/fireblocks/sdk/model/WorkflowConfigStatusTest.java src/test/java/com/fireblocks/sdk/model/WorkflowConfigurationIdTest.java src/test/java/com/fireblocks/sdk/model/WorkflowExecutionOperationTest.java +src/test/java/com/fireblocks/sdk/model/WorkspaceTest.java src/test/java/com/fireblocks/sdk/model/WriteAbiFunctionTest.java src/test/java/com/fireblocks/sdk/model/WriteCallFunctionDtoAbiFunctionTest.java src/test/java/com/fireblocks/sdk/model/WriteCallFunctionDtoTest.java diff --git a/README.md b/README.md index 05243052..1e837e12 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.1.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.1.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.1.0.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` @@ -349,6 +349,7 @@ Class | Method | HTTP request | Description *SmartTransferApi* | [**updateTicketTerm**](docs/SmartTransferApi.md#updateTicketTerm) | **PUT** /smart-transfers/{ticketId}/terms/{termId} | Update ticket leg (term) *StakingApi* | [**approveTermsOfServiceByProviderId**](docs/StakingApi.md#approveTermsOfServiceByProviderId) | **POST** /staking/providers/{providerId}/approveTermsOfService | Approve provider terms of service *StakingApi* | [**claimRewards**](docs/StakingApi.md#claimRewards) | **POST** /staking/chains/{chainDescriptor}/claim_rewards | Claim accrued rewards +*StakingApi* | [**consolidate**](docs/StakingApi.md#consolidate) | **POST** /staking/chains/{chainDescriptor}/consolidate | Consolidate staking positions (ETH validator consolidation) *StakingApi* | [**getAllDelegations**](docs/StakingApi.md#getAllDelegations) | **GET** /staking/positions | List staking positions *StakingApi* | [**getChainInfo**](docs/StakingApi.md#getChainInfo) | **GET** /staking/chains/{chainDescriptor}/chainInfo | Get chain-level staking parameters *StakingApi* | [**getChains**](docs/StakingApi.md#getChains) | **GET** /staking/chains | List supported staking chains @@ -499,6 +500,7 @@ Class | Method | HTTP request | Description *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 | Get whitelisted ip addresses for an API Key +*WorkspaceApi* | [**getWorkspace**](docs/WorkspaceApi.md#getWorkspace) | **GET** /workspace | Get workspace *WorkspaceStatusBetaApi* | [**getWorkspaceStatus**](docs/WorkspaceStatusBetaApi.md#getWorkspaceStatus) | **GET** /management/workspace_status | Returns current workspace status @@ -626,6 +628,9 @@ Class | Method | HTTP request | Description - [ChainDescriptor](docs/ChainDescriptor.md) - [ChainInfoResponse](docs/ChainInfoResponse.md) - [ChannelDvnConfigWithConfirmations](docs/ChannelDvnConfigWithConfirmations.md) + - [ChapsAddress](docs/ChapsAddress.md) + - [ChapsDestination](docs/ChapsDestination.md) + - [ChapsPaymentInfo](docs/ChapsPaymentInfo.md) - [ClaimRewardsRequest](docs/ClaimRewardsRequest.md) - [CollectionBurnRequestDto](docs/CollectionBurnRequestDto.md) - [CollectionBurnResponseDto](docs/CollectionBurnResponseDto.md) @@ -844,13 +849,13 @@ Class | Method | HTTP request | Description - [ExecutionTransferOperation](docs/ExecutionTransferOperation.md) - [ExternalAccount](docs/ExternalAccount.md) - [ExternalAccountLocalBankAfrica](docs/ExternalAccountLocalBankAfrica.md) - - [ExternalAccountLocalBankAfricaType](docs/ExternalAccountLocalBankAfricaType.md) - [ExternalAccountMobileMoney](docs/ExternalAccountMobileMoney.md) - [ExternalAccountMobileMoneyProvider](docs/ExternalAccountMobileMoneyProvider.md) - [ExternalAccountMobileMoneyType](docs/ExternalAccountMobileMoneyType.md) - [ExternalAccountSenderInformation](docs/ExternalAccountSenderInformation.md) - [ExternalAccountType](docs/ExternalAccountType.md) - [ExternalWalletAsset](docs/ExternalWalletAsset.md) + - [ExtraParameters](docs/ExtraParameters.md) - [Failure](docs/Failure.md) - [FailureReason](docs/FailureReason.md) - [Fee](docs/Fee.md) @@ -912,7 +917,12 @@ Class | Method | HTTP request | Description - [InitiatorConfig](docs/InitiatorConfig.md) - [InitiatorConfigPattern](docs/InitiatorConfigPattern.md) - [InstructionAmount](docs/InstructionAmount.md) + - [InteracAddress](docs/InteracAddress.md) + - [InteracDestination](docs/InteracDestination.md) + - [InteracPaymentInfo](docs/InteracPaymentInfo.md) - [InternalReference](docs/InternalReference.md) + - [InternalTransferAddress](docs/InternalTransferAddress.md) + - [InternalTransferDestination](docs/InternalTransferDestination.md) - [InternalTransferResponse](docs/InternalTransferResponse.md) - [InvalidParamaterValueError](docs/InvalidParamaterValueError.md) - [JobCreated](docs/JobCreated.md) @@ -1020,11 +1030,15 @@ Class | Method | HTTP request | Description - [PayeeAccount](docs/PayeeAccount.md) - [PayeeAccountResponse](docs/PayeeAccountResponse.md) - [PayeeAccountType](docs/PayeeAccountType.md) + - [PayidAddress](docs/PayidAddress.md) + - [PayidDestination](docs/PayidDestination.md) + - [PayidPaymentInfo](docs/PayidPaymentInfo.md) - [PaymentAccount](docs/PaymentAccount.md) - [PaymentAccountResponse](docs/PaymentAccountResponse.md) - [PaymentAccountType](docs/PaymentAccountType.md) - [PaymentInstructions](docs/PaymentInstructions.md) - [PaymentInstructionsOneOf](docs/PaymentInstructionsOneOf.md) + - [PaymentRedirect](docs/PaymentRedirect.md) - [PayoutInitMethod](docs/PayoutInitMethod.md) - [PayoutInstruction](docs/PayoutInstruction.md) - [PayoutInstructionResponse](docs/PayoutInstructionResponse.md) @@ -1084,6 +1098,7 @@ Class | Method | HTTP request | Description - [ReadAbiFunction](docs/ReadAbiFunction.md) - [ReadCallFunctionDto](docs/ReadCallFunctionDto.md) - [ReadCallFunctionDtoAbiFunction](docs/ReadCallFunctionDtoAbiFunction.md) + - [RecipientHandle](docs/RecipientHandle.md) - [RedeemFundsToLinkedDDAResponse](docs/RedeemFundsToLinkedDDAResponse.md) - [RegisterNewAssetRequest](docs/RegisterNewAssetRequest.md) - [ReissueMultichainTokenRequest](docs/ReissueMultichainTokenRequest.md) @@ -1475,6 +1490,7 @@ Class | Method | HTTP request | Description - [WorkflowConfigStatus](docs/WorkflowConfigStatus.md) - [WorkflowConfigurationId](docs/WorkflowConfigurationId.md) - [WorkflowExecutionOperation](docs/WorkflowExecutionOperation.md) + - [Workspace](docs/Workspace.md) - [WriteAbiFunction](docs/WriteAbiFunction.md) - [WriteCallFunctionDto](docs/WriteCallFunctionDto.md) - [WriteCallFunctionDtoAbiFunction](docs/WriteCallFunctionDtoAbiFunction.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 0ef4873b..1d6e3638 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -776,6 +776,14 @@ paths: schema: type: string style: simple + - description: Optional immutable blockchain wallet type to store per tenant+vault + explode: true + in: query + name: blockchainWalletType + required: false + schema: + type: string + style: form responses: "200": content: @@ -801,11 +809,11 @@ paths: - language: java code: "CompletableFuture> response\ \ = fireblocks.vaults().activateAssetForVaultAccount(vaultAccountId, assetId,\ - \ idempotencyKey);" + \ blockchainWalletType, idempotencyKey);" name: Fireblocks SDK Java example - language: python code: "response = fireblocks.vaults.activate_asset_for_vault_account(vault_account_id,\ - \ asset_id, idempotency_key);" + \ asset_id, blockchain_wallet_type, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript @@ -814,10 +822,10 @@ paths: - lang: Java source: "CompletableFuture> response\ \ = fireblocks.vaults().activateAssetForVaultAccount(vaultAccountId, assetId,\ - \ idempotencyKey);" + \ blockchainWalletType, idempotencyKey);" - lang: Python source: "response = fireblocks.vaults.activate_asset_for_vault_account(vault_account_id,\ - \ asset_id, idempotency_key);" + \ asset_id, blockchain_wallet_type, idempotency_key);" x-accepts: - application/json /vault/accounts/{vaultAccountId}/set_customer_ref_id: @@ -1095,6 +1103,14 @@ paths: schema: type: string style: simple + - description: Optional immutable blockchain wallet type to store per tenant+vault + explode: true + in: query + name: blockchainWalletType + required: false + schema: + type: string + style: form requestBody: content: application/json: @@ -1133,11 +1149,11 @@ paths: - language: java code: "CompletableFuture> response\ \ = fireblocks.vaults().createVaultAccountAsset(vaultAccountId, assetId,\ - \ createAssetsRequest, idempotencyKey);" + \ createAssetsRequest, blockchainWalletType, idempotencyKey);" name: Fireblocks SDK Java example - language: python code: "response = fireblocks.vaults.create_vault_account_asset(vault_account_id,\ - \ asset_id, create_assets_request, idempotency_key);" + \ asset_id, create_assets_request, blockchain_wallet_type, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript @@ -1146,10 +1162,10 @@ paths: - lang: Java source: "CompletableFuture> response\ \ = fireblocks.vaults().createVaultAccountAsset(vaultAccountId, assetId,\ - \ createAssetsRequest, idempotencyKey);" + \ createAssetsRequest, blockchainWalletType, idempotencyKey);" - lang: Python source: "response = fireblocks.vaults.create_vault_account_asset(vault_account_id,\ - \ asset_id, create_assets_request, idempotency_key);" + \ asset_id, create_assets_request, blockchain_wallet_type, idempotency_key);" x-content-type: application/json x-accepts: - application/json @@ -2034,6 +2050,7 @@ paths: post: description: "Create multiple vault accounts by running an async job. \n\ - The HBAR, TON, SUI, TERRA, ALGO, and DOT blockchains are not supported.\n\ + - These endpoints are currently in beta and might be subject to changes.\n\ - Limited to a maximum of 10,000 accounts per operation.\n\n**Endpoint Permissions:**\ \ Admin, Non-Signing Admin, Signer, Approver, Editor.\n" operationId: createMultipleAccounts @@ -4554,6 +4571,47 @@ paths: name: Fireblocks SDK Javascript example x-accepts: - application/json + /workspace: + get: + description: | + Returns the workspace ID and name for the authenticated user. + operationId: getWorkspace + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Workspace" + description: Workspace details + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Get workspace + tags: + - Workspace + x-rate-limit-category: read + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> = fireblocks.workspace.getWorkspace();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.workspace().getWorkspace(); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.workspace.get_workspace(); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> = fireblocks.workspace.getWorkspace();" + - lang: Java + source: CompletableFuture> response = fireblocks.workspace().getWorkspace(); + - lang: Python + source: response = fireblocks.workspace.get_workspace(); + x-accepts: + - application/json /workspace/freeze: post: description: "Freezes a Workspace so that ALL operations by ANY user are blocked.\n\ @@ -18871,29 +18929,50 @@ paths: x-content-type: application/json x-accepts: - application/json - /staking/positions: - get: + /staking/chains/{chainDescriptor}/consolidate: + post: description: |- - Returns all staking positions with core details: amounts, rewards, status, chain, and vault. -
Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. - operationId: getAllDelegations + Consolidates the source staking position into the destination, merging the balance into the destination and closing the source position once complete. Both positions must be from the same validator provider and same vault account. On chain, this translates into a consolidation transaction, where the source validator is consolidated into the destination validator. Supported chains: Ethereum (ETH) only. +
Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor. + operationId: consolidate parameters: - - description: "Protocol identifier to filter positions (e.g., ATOM_COS/AXL/CELESTIA}).\ - \ If omitted, positions across all supported chains are returned." - explode: true - in: query + - description: "Protocol identifier for the staking operation (e.g., ETH)." + example: ETH + explode: false + in: path name: chainDescriptor + required: true + schema: + enum: + - ETH + - ETH_TEST6 + - ETH_TEST_HOODI + type: string + style: simple + - 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: - $ref: "#/components/schemas/ChainDescriptor" - style: form + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/MergeStakeAccountsRequest" + required: true responses: - "200": + "201": content: application/json: schema: - $ref: "#/components/schemas/StakingGetAllDelegationsResponse" - description: Positions retrieved successfully. + $ref: "#/components/schemas/MergeStakeAccountsResponse" + description: Merge request accepted and created. headers: X-Request-ID: $ref: "#/components/headers/X-Request-ID" @@ -18947,181 +19026,290 @@ paths: $ref: "#/components/headers/X-Request-ID" default: $ref: "#/components/responses/Error" - summary: List staking positions + summary: Consolidate staking positions (ETH validator consolidation) tags: - Staking - x-rate-limit-category: query + x-rate-limit-category: write x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.staking.getAllDelegations(stakingApiGetAllDelegationsRequest);" + code: "const response: Promise>\ + \ = fireblocks.staking.consolidate(stakingApiConsolidateRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture>> response = fireblocks.staking().getAllDelegations(chainDescriptor); + code: "CompletableFuture> response\ + \ = fireblocks.staking().consolidate(mergeStakeAccountsRequest, chainDescriptor,\ + \ idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: response = fireblocks.staking.get_all_delegations(chain_descriptor); + code: "response = fireblocks.staking.consolidate(merge_stake_accounts_request,\ + \ chain_descriptor, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.staking.getAllDelegations(stakingApiGetAllDelegationsRequest);" + source: "const response: Promise>\ + \ = fireblocks.staking.consolidate(stakingApiConsolidateRequest);" - lang: Java - source: CompletableFuture>> response = fireblocks.staking().getAllDelegations(chainDescriptor); + source: "CompletableFuture> response\ + \ = fireblocks.staking().consolidate(mergeStakeAccountsRequest, chainDescriptor,\ + \ idempotencyKey);" - lang: Python - source: response = fireblocks.staking.get_all_delegations(chain_descriptor); + source: "response = fireblocks.staking.consolidate(merge_stake_accounts_request,\ + \ chain_descriptor, idempotency_key);" + x-content-type: application/json x-accepts: - application/json - /staking/positions/summary: + /staking/positions: get: - description: "Returns an aggregated cross-vault summary: active/inactive counts,\ - \ total staked, and total rewards per chain." - operationId: getSummary + description: |- + Returns all staking positions with core details: amounts, rewards, status, chain, and vault. +
Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor. + operationId: getAllDelegations + parameters: + - description: "Protocol identifier to filter positions (e.g., ATOM_COS/AXL/CELESTIA}).\ + \ If omitted, positions across all supported chains are returned." + explode: true + in: query + name: chainDescriptor + required: false + schema: + $ref: "#/components/schemas/ChainDescriptor" + style: form responses: "200": - content: - application/json: - example: - active: - - chainDescriptor: ETH - amount: "64.036604667" - - chainDescriptor: SOL - amount: "0.077345939" - inactive: - - chainDescriptor: ETH - amount: "0" - - chainDescriptor: SOL - amount: "0" - rewardsAmount: - - chainDescriptor: ETH - amount: "0.036604667" - - chainDescriptor: SOL - amount: "0.001345939" - totalStaked: - - chainDescriptor: ETH - amount: "64.036604667" - - chainDescriptor: SOL - amount: "0.077345939" - schema: - $ref: "#/components/schemas/DelegationSummary" - description: Summary across all vaults returned successfully. - headers: - X-Request-ID: - $ref: "#/components/headers/X-Request-ID" - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorSchema" - description: "Forbidden: insufficient permissions, disabled feature, or\ - \ restricted provider/validator." - headers: - X-Request-ID: - $ref: "#/components/headers/X-Request-ID" - "404": content: application/json: schema: - $ref: "#/components/schemas/ErrorSchema" - description: "Not found: requested resource does not exist (e.g., position,\ - \ validator, provider, or wallet)." - headers: - X-Request-ID: - $ref: "#/components/headers/X-Request-ID" - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorSchema" - description: "Rate limit exceeded: slow down and retry later." + $ref: "#/components/schemas/StakingGetAllDelegationsResponse" + description: Positions retrieved successfully. headers: X-Request-ID: $ref: "#/components/headers/X-Request-ID" - "500": + "400": content: application/json: schema: $ref: "#/components/schemas/ErrorSchema" - description: Internal error while processing the request. - headers: - X-Request-ID: - $ref: "#/components/headers/X-Request-ID" - default: - $ref: "#/components/responses/Error" - summary: Get positions summary - tags: - - Staking - x-rate-limit-category: query - x-readme: - code-samples: - - language: typescript - code: "const response: Promise> =\ - \ fireblocks.staking.getSummary();" - name: Fireblocks SDK TypeScript example - - language: java - code: CompletableFuture> response = fireblocks.staking().getSummary(); - name: Fireblocks SDK Java example - - language: python - code: response = fireblocks.staking.get_summary(); - name: Fireblocks SDK Python example - x-codeSamples: - - lang: TypeScript - source: "const response: Promise> =\ - \ fireblocks.staking.getSummary();" - - lang: Java - source: CompletableFuture> response = fireblocks.staking().getSummary(); - - lang: Python - source: response = fireblocks.staking.get_summary(); - x-accepts: - - application/json - /staking/positions/summary/vaults: - get: - description: "Returns per-vault aggregates: status breakdown, total staked,\ - \ and total rewards per chain." - operationId: getSummaryByVault - responses: - "200": - content: - application/json: - example: - "0": - active: - - chainDescriptor: SOL - amount: "0.015202376" - inactive: - - chainDescriptor: SOL - amount: "0" - rewardsAmount: - - chainDescriptor: SOL - amount: "0.000202376" - totalStaked: - - chainDescriptor: SOL - amount: "0.015202376" - "1": - active: - - chainDescriptor: ETH - amount: "64.036604667" - - chainDescriptor: SOL - amount: "0.011191566" - inactive: - - chainDescriptor: ETH - amount: "0" - - chainDescriptor: SOL - amount: "0" - rewardsAmount: - - chainDescriptor: ETH - amount: "0.036604667" - - chainDescriptor: SOL - amount: "0.000191566" - totalStaked: - - chainDescriptor: ETH - amount: "64.036604667" - - chainDescriptor: SOL - amount: "0.011191566" - schema: - $ref: "#/components/schemas/StakingGetSummaryByVaultResponse" - description: Per-vault summary returned successfully. + description: "Bad request: missing/invalid fields, unsupported amount, or\ + \ malformed payload." + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: "Forbidden: insufficient permissions, disabled feature, or\ + \ restricted provider/validator." + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: "Not found: requested resource does not exist (e.g., position,\ + \ validator, provider, or wallet)." + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: "Rate limit exceeded: slow down and retry later." + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: Internal error while processing the request. + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: List staking positions + tags: + - Staking + x-rate-limit-category: query + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.staking.getAllDelegations(stakingApiGetAllDelegationsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture>> response = fireblocks.staking().getAllDelegations(chainDescriptor); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.staking.get_all_delegations(chain_descriptor); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.staking.getAllDelegations(stakingApiGetAllDelegationsRequest);" + - lang: Java + source: CompletableFuture>> response = fireblocks.staking().getAllDelegations(chainDescriptor); + - lang: Python + source: response = fireblocks.staking.get_all_delegations(chain_descriptor); + x-accepts: + - application/json + /staking/positions/summary: + get: + description: "Returns an aggregated cross-vault summary: active/inactive counts,\ + \ total staked, and total rewards per chain." + operationId: getSummary + responses: + "200": + content: + application/json: + example: + active: + - chainDescriptor: ETH + amount: "64.036604667" + - chainDescriptor: SOL + amount: "0.077345939" + inactive: + - chainDescriptor: ETH + amount: "0" + - chainDescriptor: SOL + amount: "0" + rewardsAmount: + - chainDescriptor: ETH + amount: "0.036604667" + - chainDescriptor: SOL + amount: "0.001345939" + totalStaked: + - chainDescriptor: ETH + amount: "64.036604667" + - chainDescriptor: SOL + amount: "0.077345939" + schema: + $ref: "#/components/schemas/DelegationSummary" + description: Summary across all vaults returned successfully. + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: "Forbidden: insufficient permissions, disabled feature, or\ + \ restricted provider/validator." + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: "Not found: requested resource does not exist (e.g., position,\ + \ validator, provider, or wallet)." + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: "Rate limit exceeded: slow down and retry later." + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/ErrorSchema" + description: Internal error while processing the request. + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Get positions summary + tags: + - Staking + x-rate-limit-category: query + x-readme: + code-samples: + - language: typescript + code: "const response: Promise> =\ + \ fireblocks.staking.getSummary();" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response = fireblocks.staking().getSummary(); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.staking.get_summary(); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise> =\ + \ fireblocks.staking.getSummary();" + - lang: Java + source: CompletableFuture> response = fireblocks.staking().getSummary(); + - lang: Python + source: response = fireblocks.staking.get_summary(); + x-accepts: + - application/json + /staking/positions/summary/vaults: + get: + description: "Returns per-vault aggregates: status breakdown, total staked,\ + \ and total rewards per chain." + operationId: getSummaryByVault + responses: + "200": + content: + application/json: + example: + "0": + active: + - chainDescriptor: SOL + amount: "0.015202376" + inactive: + - chainDescriptor: SOL + amount: "0" + rewardsAmount: + - chainDescriptor: SOL + amount: "0.000202376" + totalStaked: + - chainDescriptor: SOL + amount: "0.015202376" + "1": + active: + - chainDescriptor: ETH + amount: "64.036604667" + - chainDescriptor: SOL + amount: "0.011191566" + inactive: + - chainDescriptor: ETH + amount: "0" + - chainDescriptor: SOL + amount: "0" + rewardsAmount: + - chainDescriptor: ETH + amount: "0.036604667" + - chainDescriptor: SOL + amount: "0.000191566" + totalStaked: + - chainDescriptor: ETH + amount: "64.036604667" + - chainDescriptor: SOL + amount: "0.011191566" + schema: + $ref: "#/components/schemas/StakingGetSummaryByVaultResponse" + description: Per-vault summary returned successfully. headers: X-Request-ID: $ref: "#/components/headers/X-Request-ID" @@ -30879,6 +31067,23 @@ components: - requiredAlgorithms - status type: object + Workspace: + example: + name: My Workspace + id: 123e4567-e89b-12d3-a456-426614174000 + properties: + id: + description: The ID of the workspace + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + name: + description: The name of the workspace + example: My Workspace + type: string + required: + - id + - name + type: object ExchangeType: description: Exchange account's type enum: @@ -33508,6 +33713,175 @@ components: - country - rail type: object + InteracPaymentInfo: + description: Interac e-Transfer payment information for Canadian dollar transfers + properties: + rail: + description: The payment rail type for Interac transfers + enum: + - INTERAC + example: INTERAC + type: string + addressingSystem: + description: The addressing system used for Interac transfers + enum: + - INTERAC + example: INTERAC + type: string + accountHolderGivenName: + description: The given name (first name) of the account holder + example: John + type: string + accountHolderSurname: + description: The surname (last name) of the account holder + example: Smith + type: string + country: + description: The country for the transfer (ISO 3166-1 alpha-2 code) + example: CA + type: string + recipientHandleType: + description: The type of recipient handler being used + enum: + - EMAIL + example: EMAIL + type: string + recipientHandleValue: + description: Email address registered for Interac e-Transfer + example: john.smith@email.com + type: string + message: + description: The message to be sent to the recipient + example: Please deposit the funds into the account + type: string + required: + - accountHolderGivenName + - accountHolderSurname + - addressingSystem + - country + - message + - rail + - recipientHandleType + - recipientHandleValue + - securityQuestion + type: object + PayidPaymentInfo: + description: PayID payment information for Australian dollar transfers + properties: + rail: + description: The payment rail type for PayID transfers + enum: + - PAYID + example: PAYID + type: string + addressingSystem: + description: The addressing system used for PayID transfers + enum: + - PAYID + example: PAYID + type: string + accountHolderGivenName: + description: The given name (first name) of the account holder + example: John + type: string + accountHolderSurname: + description: The surname (last name) of the account holder + example: Williams + type: string + country: + description: The country for the transfer (ISO 3166-1 alpha-2 code) + example: AU + type: string + value: + description: "The PayID identifier (email, phone, ABN, or organization ID)" + example: john.williams@email.com + type: string + type: + description: The type of PayID being used + enum: + - EMAIL + example: EMAIL + type: string + bsb: + description: "Bank State Branch (BSB) number (6 digits, format XXX-XXX)" + example: 123-456 + type: string + accountNumber: + description: Australian bank account number + example: "12345678" + type: string + required: + - accountHolderGivenName + - accountHolderSurname + - accountNumber + - addressingSystem + - country + - rail + - type + - value + type: object + ChapsPaymentInfo: + description: CHAPS payment information for UK pound sterling same-day transfers + properties: + rail: + description: The payment rail type for CHAPS transfers + enum: + - CHAPS + example: CHAPS + type: string + addressingSystem: + description: The addressing system used for CHAPS transfers + enum: + - CHAPS + example: CHAPS + type: string + accountHolderGivenName: + description: The given name (first name) of the account holder + example: John + type: string + accountHolderSurname: + description: The surname (last name) of the account holder + example: Smith + type: string + country: + description: The country for the transfer (ISO 3166-1 alpha-2 code) + example: GB + type: string + sortCode: + description: UK bank sort code (format XX-XX-XX) + example: 12-34-56 + pattern: "^\\d{6}$" + type: string + accountNumber: + description: UK bank account number + example: "12345678" + pattern: "^\\d{8}$" + type: string + bankName: + description: The name of the bank + example: Barclays Bank + type: string + bankAccountCountry: + description: CHAPS bank account holder name + example: GB + pattern: "^\\d{2}$" + type: string + bankAccountHolderName: + description: CHAPS bank account holder name + example: John Smith + pattern: "^(?=.{1,140}$)[^\\s]+(\\s+[^\\s]+)*$" + type: string + required: + - accountHolderGivenName + - accountHolderSurname + - accountNumber + - addressingSystem + - bankAccountCountry + - bankAccountHolderName + - country + - rail + - sortCode + type: object AdditionalInfoRequest: description: External wallet request with additional payment information for various payment rails @@ -36849,16 +37223,56 @@ components: type: array type: object ExtraParameters: + additionalProperties: true description: | 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 UTXO-based blockchain input selection, add the key `inputsSelection` with the value set to 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) - properties: {} + 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) + + **Note:** `rawMessageData`, `contractCallData`, and `inputsSelection` cannot be used together in the same call. + example: + piiData: + key: "" + nodeControls: + key: "" + contractCallData: contractCallData + inputsSelection: + key: "" + allowBaseAssetAddress: true + rawMessageData: + key: "" + programCallData: programCallData + properties: + nodeControls: + additionalProperties: true + nullable: true + type: object + rawMessageData: + additionalProperties: true + nullable: true + type: object + contractCallData: + nullable: true + type: string + programCallData: + nullable: true + type: string + inputsSelection: + additionalProperties: true + nullable: true + type: object + allowBaseAssetAddress: + nullable: true + type: boolean + piiData: + additionalProperties: true + nullable: true + type: object type: object SignedMessage: description: A list of signed messages returned for raw signing. @@ -37097,7 +37511,18 @@ components: subType: subType id: id type: null - extraParameters: "{}" + extraParameters: + piiData: + key: "" + nodeControls: + key: "" + contractCallData: contractCallData + inputsSelection: + key: "" + allowBaseAssetAddress: true + rawMessageData: + key: "" + programCallData: programCallData replacedTxHash: replacedTxHash travelRuleMessageId: trm_12345678-1234-1234-1234-123456789012 externalTxId: externalTxId @@ -37937,17 +38362,7 @@ components: example: "0.00203928" type: string extraParameters: - description: | - 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) - properties: {} - type: object + $ref: "#/components/schemas/ExtraParameters" signedMessages: items: $ref: "#/components/schemas/SignedMessage" @@ -40680,7 +41095,18 @@ components: subType: null id: id type: null - extraParameters: "{}" + extraParameters: + piiData: + key: "" + nodeControls: + key: "" + contractCallData: contractCallData + inputsSelection: + key: "" + allowBaseAssetAddress: true + rawMessageData: + key: "" + programCallData: programCallData source: walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 isCollateral: true @@ -41971,17 +42397,7 @@ components: example: 00000000-0000-0000-0000-000000000000 type: string extraParameters: - description: | - 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) - properties: {} - type: object + $ref: "#/components/schemas/ExtraParameters" customerRefId: description: The ID for AML providers to associate the owner of funds with transactions. @@ -43846,7 +44262,18 @@ components: subType: null id: id type: null - extraParameters: "{}" + extraParameters: + piiData: + key: "" + nodeControls: + key: "" + contractCallData: contractCallData + inputsSelection: + key: "" + allowBaseAssetAddress: true + rawMessageData: + key: "" + programCallData: programCallData source: walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 isCollateral: true @@ -45069,7 +45496,18 @@ components: subType: null id: id type: null - extraParameters: "{}" + extraParameters: + piiData: + key: "" + nodeControls: + key: "" + contractCallData: contractCallData + inputsSelection: + key: "" + allowBaseAssetAddress: true + rawMessageData: + key: "" + programCallData: programCallData source: walletId: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 isCollateral: true @@ -52363,6 +52801,41 @@ components: required: - providerId type: object + TransferRail: + description: "Transfer rail: \n* **BLOCKCHAIN** - Transfer over the public blockchain\n\ + * **INTERNAL** - Internal transfer within the same account (e.g. sub-accounts\ + \ or same api key)\n* **PEER** - Peer transfer within the same provider network\n\ + * **SWIFT** - International wire transfer\n* **IBAN** - International Bank\ + \ Account Number transfer\n* **US_WIRE** - Domestic wire transfer within the\ + \ United States (e.g. FedWire)\n* **ACH** - Automated Clearing House transfer,\ + \ typically takes longer but not as expensive as wire transfers\n* **SEPA**\ + \ - Euro transfers within the SEPA zone\n* **SPEI** - Mexican interbank electronic\ + \ payment system\n* **PIX** - Brazilian instant payment system\n* **LOCAL_BANK_TRANSFER_AFRICA**\ + \ - Local bank transfers within Africa\n* **MOBILE_MONEY** - Mobile money\ + \ transfers (e.g. M-Pesa)\n* **INTERNAL_TRANSFER** - Internal transfer within\ + \ the same account\n* **INTERAC** - Canadian interbank transfer system\n*\ + \ **PAYID** - Australian PayID payment system\n* **CHAPS** - The Clearing\ + \ House Automated Payment System (CHAPS) is a real-time gross settlement payment\ + \ system used for transactions in the United Kingdom\n" + enum: + - BLOCKCHAIN + - INTERNAL + - PEER + - SWIFT + - IBAN + - US_WIRE + - ACH + - SEPA + - SPEI + - PIX + - LOCAL_BANK_TRANSFER_AFRICA + - MOBILE_MONEY + - INTERNAL_TRANSFER + - INTERAC + - PAYID + - CHAPS + example: BLOCKCHAIN + type: string DVPSettlementType: enum: - DVP @@ -52421,39 +52894,24 @@ components: email: format: email type: string + successRedirectUrl: + description: "URL to redirect the end user back to after they complete the\ + \ payment on the bank/mobile provider page (e.g., the merchant checkout\ + \ page)" + type: string required: - email - mobilePhoneNumber - provider - type type: object - ExternalAccountLocalBankAfricaType: - enum: - - LOCAL_BANK_AFRICA_RAIL - type: string - LocalBankAfricaAccountNumber: - example: "1234567890123" - pattern: "^\\d{4,17}$" - type: string ExternalAccountLocalBankAfrica: properties: - type: - $ref: "#/components/schemas/ExternalAccountLocalBankAfricaType" - accountNumber: - example: "1234567890123" - pattern: "^\\d{4,17}$" + successRedirectUrl: + description: "URL to redirect the end user back to after they complete the\ + \ payment on the bank/mobile provider page (e.g., the merchant checkout\ + \ page)" type: string - bankName: - description: Name of the bank - type: string - bankCode: - description: Internal bank identifier - type: string - required: - - accountNumber - - bankCode - - bankName - - type type: object ExternalAccountSenderInformation: description: "Additional data for the external account, depending on the type\ @@ -52598,11 +53056,16 @@ components: baseAssetId: description: The asset you receive on BUY / give on SELL. type: string + baseAssetRail: + $ref: "#/components/schemas/TransferRail" quoteAssetId: description: The counter asset used to pay/receive. type: string + quoteAssetRail: + $ref: "#/components/schemas/TransferRail" baseAmount: - description: The amount to convert from + description: Amount in baseAssetId. BUY = base amount to receive; SELL = + base amount to sell. example: "100.00" pattern: ^\d+(\.\d+)?$ type: string @@ -53032,33 +53495,6 @@ components: required: - type type: object - TransferRail: - description: "Transfer rail: \n* **BLOCKCHAIN** - Transfer over the public blockchain\n\ - * **INTERNAL** - Internal transfer within the same account (e.g. sub-accounts\ - \ or same api key)\n* **PEER** - Peer transfer within the same provider network\n\ - * **SWIFT** - International wire transfer\n* **IBAN** - International Bank\ - \ Account Number transfer\n* **US_WIRE** - Domestic wire transfer within the\ - \ United States (e.g. FedWire)\n* **ACH** - Automated Clearing House transfer,\ - \ typically takes longer but not as expensive as wire transfers\n* **SEPA**\ - \ - Euro transfers within the SEPA zone\n* **SPEI** - Mexican interbank electronic\ - \ payment system\n* **PIX** - Brazilian instant payment system\n* **LOCAL_BANK_TRANSFER_AFRICA**\ - \ - Local bank transfers within Africa\n* **MOBILE_MONEY** - Mobile money\ - \ transfers (e.g. M-Pesa)\n" - enum: - - BLOCKCHAIN - - INTERNAL - - PEER - - SWIFT - - IBAN - - US_WIRE - - ACH - - SEPA - - SPEI - - PIX - - LOCAL_BANK_TRANSFER_AFRICA - - MOBILE_MONEY - example: BLOCKCHAIN - type: string ExecutionRequestBaseDetails: example: side: BUY @@ -53071,15 +53507,16 @@ components: side: $ref: "#/components/schemas/Side" baseAmount: - description: Amount to convert + description: Amount in baseAssetId. BUY = base amount to receive; SELL = + base amount to sell. type: string baseAssetId: - description: Source asset identifier + description: The asset you receive on BUY / give on SELL. type: string baseAssetRail: $ref: "#/components/schemas/TransferRail" quoteAssetId: - description: Target asset identifier + description: Counter asset used to pay/receive type: string quoteAssetRail: $ref: "#/components/schemas/TransferRail" @@ -54129,6 +54566,8 @@ components: keyType: phone bankName: Banco do Brasil bankCode: "001" + qrCode: qr_code_number + expirationDate: 2025-01-15T12:00:00Z properties: accountHolder: $ref: "#/components/schemas/AccountHolderDetails" @@ -54136,16 +54575,24 @@ components: type: string keyType: enum: - - cpf - - cnpj - - email - - phone - - random + - CPF + - CNPJ + - EMAIL + - PHONE + - RANDOM type: string bankName: type: string bankCode: type: string + qrCode: + description: The QR code to be used for the transfer + example: qr_code_number + type: string + expirationDate: + description: The expiration date of the QR code + example: 2025-01-15T12:00:00Z + type: string required: - accountHolder - keyType @@ -54177,6 +54624,25 @@ components: - address - type type: object + LocalBankAfricaAccountNumber: + example: "1234567890123" + pattern: "^\\d{4,17}$" + type: string + PaymentRedirect: + description: "URL returned by the provider that the end user will be redirected\ + \ to in order to complete the payment on the bank/mobile provider page. After\ + \ completion, the bank/mobile provider redirects the end user back to successRedirectUrl\ + \ (provided in the RAMP request)" + properties: + url: + description: URL to redirect to + example: https://yellowcard.example.com/authorize?token=abc123&transactionId=16b8b2c3-bd61-4745-9c48-3d30c2bc6907 + type: string + expiresAt: + description: Expiration date of the redirect + example: 2025-01-15T12:00:00Z + type: string + type: object LocalBankTransferAfricaAddress: example: accountHolder: @@ -54189,6 +54655,10 @@ components: accountNumber: "1234567890123" bankName: First Bank of Nigeria bankCode: "011" + successPaymentInstructionRedirectUrl: https://yellowcard.example.com/authorize?token=abc123&transactionId=16b8b2c3-bd61-4745-9c48-3d30c2bc6907 + paymentRedirect: + url: https://yellowcard.example.com/authorize?token=abc123&transactionId=16b8b2c3-bd61-4745-9c48-3d30c2bc6907 + expiresAt: 2025-01-15T12:00:00Z properties: accountHolder: $ref: "#/components/schemas/AccountHolderDetails" @@ -54202,6 +54672,11 @@ components: bankCode: description: Internal bank identifier type: string + successPaymentInstructionRedirectUrl: + description: The URL to redirect to after the payment instruction is successful + type: string + paymentRedirect: + $ref: "#/components/schemas/PaymentRedirect" required: - accountHolder - accountNumber @@ -54246,6 +54721,10 @@ components: provider: m-pesa beneficiaryDocumentId: "12345678" beneficiaryRelationship: self + successPaymentInstructionRedirectUrl: https://yellowcard.example.com/authorize?token=abc123&transactionId=16b8b2c3-bd61-4745-9c48-3d30c2bc6907 + paymentRedirect: + url: https://yellowcard.example.com/authorize?token=abc123&transactionId=16b8b2c3-bd61-4745-9c48-3d30c2bc6907 + expiresAt: 2025-01-15T12:00:00Z properties: accountHolder: $ref: "#/components/schemas/AccountHolderDetails" @@ -54269,6 +54748,11 @@ components: beneficiaryRelationship: description: Relationship to beneficiary for AML purposes type: string + successPaymentInstructionRedirectUrl: + description: The URL to redirect to after the payment instruction is successful + type: string + paymentRedirect: + $ref: "#/components/schemas/PaymentRedirect" required: - accountHolder - mobilePhoneNumber @@ -54336,6 +54820,244 @@ components: - address - type type: object + ChapsAddress: + example: + accountHolder: + name: John Smith + city: London + country: GB + subdivision: ENG + address: 123 Oxford Street + postalCode: W1D 1BS + sortCode: 12-34-56 + accountNumber: "12345678" + bankName: Barclays Bank + properties: + accountHolder: + $ref: "#/components/schemas/AccountHolderDetails" + sortCode: + description: UK bank sort code (format XX-XX-XX) + example: 12-34-56 + type: string + accountNumber: + description: UK bank account number + example: "12345678" + type: string + bankName: + description: Name of the bank + example: Barclays Bank + type: string + bankAccountCountry: + description: CHAPS bank account holder name + example: GB + pattern: "^\\d{2}$" + type: string + bankAccountHolderName: + description: CHAPS bank account holder name + example: John Smith + pattern: "^(?=.{1,140}$)[^\\s]+(\\s+[^\\s]+)*$" + type: string + required: + - accountHolder + - accountNumber + - bankAccountCountry + - bankAccountHolderName + - sortCode + type: object + ChapsDestination: + example: + type: CHAPS + address: + accountHolder: + name: John Smith + city: London + country: GB + subdivision: ENG + address: 123 Oxford Street + postalCode: W1D 1BS + sortCode: 12-34-56 + accountNumber: "12345678" + bankName: Barclays Bank + properties: + type: + enum: + - CHAPS + type: string + address: + $ref: "#/components/schemas/ChapsAddress" + required: + - address + - type + type: object + RecipientHandle: + properties: + type: + enum: + - EMAIL + type: string + value: + description: The value of the recipient handle + example: john.smith@email.com + type: string + required: + - type + - value + type: object + InteracAddress: + example: + accountHolder: + name: John Smith + city: Toronto + country: CA + subdivision: "ON" + address: 123 Yonge Street + postalCode: M5B 1M4 + recipientHandle: + type: EMAIL + value: john.smith@email.com + message: Please deposit the funds into the account + securityQuestion: What is your mother's maiden name? + securityAnswer: Jane Smith + properties: + accountHolder: + $ref: "#/components/schemas/AccountHolderDetails" + recipientHandle: + $ref: "#/components/schemas/RecipientHandle" + message: + description: The message to be sent to the recipient + example: Please deposit the funds into the account + type: string + required: + - accountHolder + - recipientHandle + type: object + InteracDestination: + example: + type: INTERAC + address: + accountHolder: + name: John Smith + city: Toronto + country: CA + subdivision: "ON" + address: 123 Yonge Street + postalCode: M5B 1M4 + email: john.smith@email.com + institutionNumber: "001" + transitNumber: "12345" + accountNumber: "1234567" + bankName: Royal Bank of Canada + properties: + type: + enum: + - INTERAC + type: string + address: + $ref: "#/components/schemas/InteracAddress" + required: + - address + - type + type: object + PayidAddress: + example: + accountHolder: + name: John Williams + city: Sydney + country: AU + subdivision: NSW + address: 456 George Street + postalCode: "2000" + value: john.williams@email.com + type: EMAIL + bsb: 123-456 + accountNumber: "12345678" + properties: + accountHolder: + $ref: "#/components/schemas/AccountHolderDetails" + value: + description: "The PayID identifier (email, phone, ABN, or organization ID)" + example: john.williams@email.com + type: string + type: + description: The type of PayID being used + enum: + - EMAIL + example: EMAIL + type: string + bsb: + description: "Bank State Branch (BSB) number (6 digits, format XXX-XXX)" + example: 123-456 + type: string + accountNumber: + description: Australian bank account number + example: "12345678" + type: string + required: + - accountHolder + - accountNumber + - type + - value + type: object + PayidDestination: + example: + type: PAYID + address: + accountHolder: + name: John Williams + city: Sydney + country: AU + subdivision: NSW + address: 456 George Street + postalCode: "2000" + payId: john.williams@email.com + payIdType: email + bsb: 123-456 + accountNumber: "12345678" + bankName: Commonwealth Bank + properties: + type: + enum: + - PAYID + type: string + address: + $ref: "#/components/schemas/PayidAddress" + required: + - address + - type + type: object + InternalTransferAddress: + example: + externalSubAccountId: sub_acc_1234567890 + accountId: acc_1234567890 + properties: + externalAccountId: + description: The provider's identifier for the external account. This enables + the user to fund the account externally (outside of Fireblocks) if needed. + type: string + accountId: + description: The Fireblocks account ID where the user should deposit the + funds. + type: string + required: + - accountId + - externalSubAccountId + type: object + InternalTransferDestination: + example: + type: INTERNAL_TRANSFER + address: + externalSubAccountId: sub_acc_1234567890 + accountId: acc_1234567890 + properties: + type: + enum: + - INTERNAL_TRANSFER + type: string + address: + $ref: "#/components/schemas/InternalTransferAddress" + required: + - type + type: object FiatDestination: oneOf: - $ref: "#/components/schemas/IbanDestination" @@ -54348,6 +55070,10 @@ components: - $ref: "#/components/schemas/LocalBankTransferAfricaDestination" - $ref: "#/components/schemas/MobileMoneyDestination" - $ref: "#/components/schemas/EuropeanSEPADestination" + - $ref: "#/components/schemas/ChapsDestination" + - $ref: "#/components/schemas/InteracDestination" + - $ref: "#/components/schemas/PayidDestination" + - $ref: "#/components/schemas/InternalTransferDestination" FiatPaymentMetadata: properties: referenceId: @@ -70694,6 +71420,9 @@ components: - $ref: "#/components/schemas/UsWirePaymentInfo" - $ref: "#/components/schemas/MomoPaymentInfo" - $ref: "#/components/schemas/LbtPaymentInfo" + - $ref: "#/components/schemas/InteracPaymentInfo" + - $ref: "#/components/schemas/PayidPaymentInfo" + - $ref: "#/components/schemas/ChapsPaymentInfo" type: object AssetMedia_attributes: description: Media attributes diff --git a/build.gradle b/build.gradle index bf7de030..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.1.0' +version = '0.0.0' buildscript { repositories { diff --git a/docs/AdditionalInfoRequestAdditionalInfo.md b/docs/AdditionalInfoRequestAdditionalInfo.md index 3165bdce..ac02899e 100644 --- a/docs/AdditionalInfoRequestAdditionalInfo.md +++ b/docs/AdditionalInfoRequestAdditionalInfo.md @@ -7,9 +7,12 @@ Additional payment information based on the payment rail type ## oneOf schemas * [AbaPaymentInfo](AbaPaymentInfo.md) * [AchPaymentInfo](AchPaymentInfo.md) +* [ChapsPaymentInfo](ChapsPaymentInfo.md) * [IbanPaymentInfo](IbanPaymentInfo.md) +* [InteracPaymentInfo](InteracPaymentInfo.md) * [LbtPaymentInfo](LbtPaymentInfo.md) * [MomoPaymentInfo](MomoPaymentInfo.md) +* [PayidPaymentInfo](PayidPaymentInfo.md) * [PixPaymentInfo](PixPaymentInfo.md) * [SepaPaymentInfo](SepaPaymentInfo.md) * [SpeiAdvancedPaymentInfo](SpeiAdvancedPaymentInfo.md) @@ -22,9 +25,12 @@ Additional payment information based on the payment rail type import com.fireblocks.sdk.model.AdditionalInfoRequestAdditionalInfo; import com.fireblocks.sdk.model.AbaPaymentInfo; import com.fireblocks.sdk.model.AchPaymentInfo; +import com.fireblocks.sdk.model.ChapsPaymentInfo; import com.fireblocks.sdk.model.IbanPaymentInfo; +import com.fireblocks.sdk.model.InteracPaymentInfo; import com.fireblocks.sdk.model.LbtPaymentInfo; import com.fireblocks.sdk.model.MomoPaymentInfo; +import com.fireblocks.sdk.model.PayidPaymentInfo; import com.fireblocks.sdk.model.PixPaymentInfo; import com.fireblocks.sdk.model.SepaPaymentInfo; import com.fireblocks.sdk.model.SpeiAdvancedPaymentInfo; @@ -49,6 +55,13 @@ public class Example { // to get back the AchPaymentInfo set earlier AchPaymentInfo testAchPaymentInfo = (AchPaymentInfo) exampleAdditionalInfoRequestAdditionalInfo.getActualInstance(); + // create a new ChapsPaymentInfo + ChapsPaymentInfo exampleChapsPaymentInfo = new ChapsPaymentInfo(); + // set AdditionalInfoRequestAdditionalInfo to ChapsPaymentInfo + exampleAdditionalInfoRequestAdditionalInfo.setActualInstance(exampleChapsPaymentInfo); + // to get back the ChapsPaymentInfo set earlier + ChapsPaymentInfo testChapsPaymentInfo = (ChapsPaymentInfo) exampleAdditionalInfoRequestAdditionalInfo.getActualInstance(); + // create a new IbanPaymentInfo IbanPaymentInfo exampleIbanPaymentInfo = new IbanPaymentInfo(); // set AdditionalInfoRequestAdditionalInfo to IbanPaymentInfo @@ -56,6 +69,13 @@ public class Example { // to get back the IbanPaymentInfo set earlier IbanPaymentInfo testIbanPaymentInfo = (IbanPaymentInfo) exampleAdditionalInfoRequestAdditionalInfo.getActualInstance(); + // create a new InteracPaymentInfo + InteracPaymentInfo exampleInteracPaymentInfo = new InteracPaymentInfo(); + // set AdditionalInfoRequestAdditionalInfo to InteracPaymentInfo + exampleAdditionalInfoRequestAdditionalInfo.setActualInstance(exampleInteracPaymentInfo); + // to get back the InteracPaymentInfo set earlier + InteracPaymentInfo testInteracPaymentInfo = (InteracPaymentInfo) exampleAdditionalInfoRequestAdditionalInfo.getActualInstance(); + // create a new LbtPaymentInfo LbtPaymentInfo exampleLbtPaymentInfo = new LbtPaymentInfo(); // set AdditionalInfoRequestAdditionalInfo to LbtPaymentInfo @@ -70,6 +90,13 @@ public class Example { // to get back the MomoPaymentInfo set earlier MomoPaymentInfo testMomoPaymentInfo = (MomoPaymentInfo) exampleAdditionalInfoRequestAdditionalInfo.getActualInstance(); + // create a new PayidPaymentInfo + PayidPaymentInfo examplePayidPaymentInfo = new PayidPaymentInfo(); + // set AdditionalInfoRequestAdditionalInfo to PayidPaymentInfo + exampleAdditionalInfoRequestAdditionalInfo.setActualInstance(examplePayidPaymentInfo); + // to get back the PayidPaymentInfo set earlier + PayidPaymentInfo testPayidPaymentInfo = (PayidPaymentInfo) exampleAdditionalInfoRequestAdditionalInfo.getActualInstance(); + // create a new PixPaymentInfo PixPaymentInfo examplePixPaymentInfo = new PixPaymentInfo(); // set AdditionalInfoRequestAdditionalInfo to PixPaymentInfo diff --git a/docs/ChapsAddress.md b/docs/ChapsAddress.md new file mode 100644 index 00000000..6e2f1f5f --- /dev/null +++ b/docs/ChapsAddress.md @@ -0,0 +1,18 @@ + + +# ChapsAddress + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accountHolder** | [**AccountHolderDetails**](AccountHolderDetails.md) | | | +|**sortCode** | **String** | UK bank sort code (format XX-XX-XX) | | +|**accountNumber** | **String** | UK bank account number | | +|**bankName** | **String** | Name of the bank | [optional] | +|**bankAccountCountry** | **String** | CHAPS bank account holder name | | +|**bankAccountHolderName** | **String** | CHAPS bank account holder name | | + + + diff --git a/docs/ChapsDestination.md b/docs/ChapsDestination.md new file mode 100644 index 00000000..33e6c5cc --- /dev/null +++ b/docs/ChapsDestination.md @@ -0,0 +1,22 @@ + + +# ChapsDestination + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | | +|**address** | [**ChapsAddress**](ChapsAddress.md) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| CHAPS | "CHAPS" | + + + diff --git a/docs/ChapsPaymentInfo.md b/docs/ChapsPaymentInfo.md new file mode 100644 index 00000000..a68a625e --- /dev/null +++ b/docs/ChapsPaymentInfo.md @@ -0,0 +1,39 @@ + + +# ChapsPaymentInfo + +CHAPS payment information for UK pound sterling same-day transfers + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rail** | [**RailEnum**](#RailEnum) | The payment rail type for CHAPS transfers | | +|**addressingSystem** | [**AddressingSystemEnum**](#AddressingSystemEnum) | The addressing system used for CHAPS transfers | | +|**accountHolderGivenName** | **String** | The given name (first name) of the account holder | | +|**accountHolderSurname** | **String** | The surname (last name) of the account holder | | +|**country** | **String** | The country for the transfer (ISO 3166-1 alpha-2 code) | | +|**sortCode** | **String** | UK bank sort code (format XX-XX-XX) | | +|**accountNumber** | **String** | UK bank account number | | +|**bankName** | **String** | The name of the bank | [optional] | +|**bankAccountCountry** | **String** | CHAPS bank account holder name | | +|**bankAccountHolderName** | **String** | CHAPS bank account holder name | | + + + +## Enum: RailEnum + +| Name | Value | +|---- | -----| +| CHAPS | "CHAPS" | + + + +## Enum: AddressingSystemEnum + +| Name | Value | +|---- | -----| +| CHAPS | "CHAPS" | + + + diff --git a/docs/CreateQuote.md b/docs/CreateQuote.md index 5213f2d0..257965dd 100644 --- a/docs/CreateQuote.md +++ b/docs/CreateQuote.md @@ -9,8 +9,10 @@ |------------ | ------------- | ------------- | -------------| |**scope** | [**List<CreateQuoteScopeInner>**](CreateQuoteScopeInner.md) | | | |**baseAssetId** | **String** | The asset you receive on BUY / give on SELL. | | +|**baseAssetRail** | **TransferRail** | | [optional] | |**quoteAssetId** | **String** | The counter asset used to pay/receive. | | -|**baseAmount** | **String** | The amount to convert from | | +|**quoteAssetRail** | **TransferRail** | | [optional] | +|**baseAmount** | **String** | Amount in baseAssetId. BUY = base amount to receive; SELL = base amount to sell. | | |**slippageBps** | **BigDecimal** | Slippage tolerance in basis points (bps) for defi quotes - 1 is 0.01% and 10000 is 100% | [optional] | |**settlement** | [**DVPSettlement**](DVPSettlement.md) | | [optional] | |**side** | **Side** | | | diff --git a/docs/ExecutionRequestBaseDetails.md b/docs/ExecutionRequestBaseDetails.md index f2d27ad5..e7987ece 100644 --- a/docs/ExecutionRequestBaseDetails.md +++ b/docs/ExecutionRequestBaseDetails.md @@ -8,10 +8,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**side** | **Side** | | | -|**baseAmount** | **String** | Amount to convert | | -|**baseAssetId** | **String** | Source asset identifier | | +|**baseAmount** | **String** | Amount in baseAssetId. BUY = base amount to receive; SELL = base amount to sell. | | +|**baseAssetId** | **String** | The asset you receive on BUY / give on SELL. | | |**baseAssetRail** | **TransferRail** | | [optional] | -|**quoteAssetId** | **String** | Target asset identifier | | +|**quoteAssetId** | **String** | Counter asset used to pay/receive | | |**quoteAssetRail** | **TransferRail** | | [optional] | diff --git a/docs/ExternalAccountLocalBankAfrica.md b/docs/ExternalAccountLocalBankAfrica.md index 322fd4d6..0a4b4f01 100644 --- a/docs/ExternalAccountLocalBankAfrica.md +++ b/docs/ExternalAccountLocalBankAfrica.md @@ -7,10 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**type** | **ExternalAccountLocalBankAfricaType** | | | -|**accountNumber** | **String** | | | -|**bankName** | **String** | Name of the bank | | -|**bankCode** | **String** | Internal bank identifier | | +|**successRedirectUrl** | **String** | URL to redirect the end user back to after they complete the payment on the bank/mobile provider page (e.g., the merchant checkout page) | [optional] | diff --git a/docs/ExternalAccountLocalBankAfricaType.md b/docs/ExternalAccountLocalBankAfricaType.md deleted file mode 100644 index cb3db7f3..00000000 --- a/docs/ExternalAccountLocalBankAfricaType.md +++ /dev/null @@ -1,11 +0,0 @@ - - -# ExternalAccountLocalBankAfricaType - -## Enum - - -* `LOCAL_BANK_AFRICA_RAIL` (value: `"LOCAL_BANK_AFRICA_RAIL"`) - - - diff --git a/docs/ExternalAccountMobileMoney.md b/docs/ExternalAccountMobileMoney.md index 7a368fbb..1bc0f505 100644 --- a/docs/ExternalAccountMobileMoney.md +++ b/docs/ExternalAccountMobileMoney.md @@ -11,6 +11,7 @@ |**mobilePhoneNumber** | **String** | Mobile phone number in E.164 format | | |**provider** | **ExternalAccountMobileMoneyProvider** | | | |**email** | **String** | | | +|**successRedirectUrl** | **String** | URL to redirect the end user back to after they complete the payment on the bank/mobile provider page (e.g., the merchant checkout page) | [optional] | diff --git a/docs/ExtraParameters.md b/docs/ExtraParameters.md new file mode 100644 index 00000000..1cf55364 --- /dev/null +++ b/docs/ExtraParameters.md @@ -0,0 +1,20 @@ + + +# ExtraParameters + +Additional protocol / operation specific key-value parameters: For UTXO-based blockchain input selection, add the key `inputsSelection` with the value set to 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) **Note:** `rawMessageData`, `contractCallData`, and `inputsSelection` cannot be used together in the same call. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nodeControls** | **Map<String, Object>** | | [optional] | +|**rawMessageData** | **Map<String, Object>** | | [optional] | +|**contractCallData** | **String** | | [optional] | +|**programCallData** | **String** | | [optional] | +|**inputsSelection** | **Map<String, Object>** | | [optional] | +|**allowBaseAssetAddress** | **Boolean** | | [optional] | +|**piiData** | **Map<String, Object>** | | [optional] | + + + diff --git a/docs/FiatDestination.md b/docs/FiatDestination.md index 70112bc0..7900a3cb 100644 --- a/docs/FiatDestination.md +++ b/docs/FiatDestination.md @@ -4,10 +4,14 @@ ## oneOf schemas * [AchDestination](AchDestination.md) +* [ChapsDestination](ChapsDestination.md) * [EuropeanSEPADestination](EuropeanSEPADestination.md) * [IbanDestination](IbanDestination.md) +* [InteracDestination](InteracDestination.md) +* [InternalTransferDestination](InternalTransferDestination.md) * [LocalBankTransferAfricaDestination](LocalBankTransferAfricaDestination.md) * [MobileMoneyDestination](MobileMoneyDestination.md) +* [PayidDestination](PayidDestination.md) * [PixDestination](PixDestination.md) * [SEPADestination](SEPADestination.md) * [SpeiDestination](SpeiDestination.md) @@ -19,10 +23,14 @@ // Import classes: import com.fireblocks.sdk.model.FiatDestination; import com.fireblocks.sdk.model.AchDestination; +import com.fireblocks.sdk.model.ChapsDestination; import com.fireblocks.sdk.model.EuropeanSEPADestination; import com.fireblocks.sdk.model.IbanDestination; +import com.fireblocks.sdk.model.InteracDestination; +import com.fireblocks.sdk.model.InternalTransferDestination; import com.fireblocks.sdk.model.LocalBankTransferAfricaDestination; import com.fireblocks.sdk.model.MobileMoneyDestination; +import com.fireblocks.sdk.model.PayidDestination; import com.fireblocks.sdk.model.PixDestination; import com.fireblocks.sdk.model.SEPADestination; import com.fireblocks.sdk.model.SpeiDestination; @@ -40,6 +48,13 @@ public class Example { // to get back the AchDestination set earlier AchDestination testAchDestination = (AchDestination) exampleFiatDestination.getActualInstance(); + // create a new ChapsDestination + ChapsDestination exampleChapsDestination = new ChapsDestination(); + // set FiatDestination to ChapsDestination + exampleFiatDestination.setActualInstance(exampleChapsDestination); + // to get back the ChapsDestination set earlier + ChapsDestination testChapsDestination = (ChapsDestination) exampleFiatDestination.getActualInstance(); + // create a new EuropeanSEPADestination EuropeanSEPADestination exampleEuropeanSEPADestination = new EuropeanSEPADestination(); // set FiatDestination to EuropeanSEPADestination @@ -54,6 +69,20 @@ public class Example { // to get back the IbanDestination set earlier IbanDestination testIbanDestination = (IbanDestination) exampleFiatDestination.getActualInstance(); + // create a new InteracDestination + InteracDestination exampleInteracDestination = new InteracDestination(); + // set FiatDestination to InteracDestination + exampleFiatDestination.setActualInstance(exampleInteracDestination); + // to get back the InteracDestination set earlier + InteracDestination testInteracDestination = (InteracDestination) exampleFiatDestination.getActualInstance(); + + // create a new InternalTransferDestination + InternalTransferDestination exampleInternalTransferDestination = new InternalTransferDestination(); + // set FiatDestination to InternalTransferDestination + exampleFiatDestination.setActualInstance(exampleInternalTransferDestination); + // to get back the InternalTransferDestination set earlier + InternalTransferDestination testInternalTransferDestination = (InternalTransferDestination) exampleFiatDestination.getActualInstance(); + // create a new LocalBankTransferAfricaDestination LocalBankTransferAfricaDestination exampleLocalBankTransferAfricaDestination = new LocalBankTransferAfricaDestination(); // set FiatDestination to LocalBankTransferAfricaDestination @@ -68,6 +97,13 @@ public class Example { // to get back the MobileMoneyDestination set earlier MobileMoneyDestination testMobileMoneyDestination = (MobileMoneyDestination) exampleFiatDestination.getActualInstance(); + // create a new PayidDestination + PayidDestination examplePayidDestination = new PayidDestination(); + // set FiatDestination to PayidDestination + exampleFiatDestination.setActualInstance(examplePayidDestination); + // to get back the PayidDestination set earlier + PayidDestination testPayidDestination = (PayidDestination) exampleFiatDestination.getActualInstance(); + // create a new PixDestination PixDestination examplePixDestination = new PixDestination(); // set FiatDestination to PixDestination diff --git a/docs/InteracAddress.md b/docs/InteracAddress.md new file mode 100644 index 00000000..24b9abb5 --- /dev/null +++ b/docs/InteracAddress.md @@ -0,0 +1,15 @@ + + +# InteracAddress + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accountHolder** | [**AccountHolderDetails**](AccountHolderDetails.md) | | | +|**recipientHandle** | [**RecipientHandle**](RecipientHandle.md) | | | +|**message** | **String** | The message to be sent to the recipient | [optional] | + + + diff --git a/docs/InteracDestination.md b/docs/InteracDestination.md new file mode 100644 index 00000000..14ab9501 --- /dev/null +++ b/docs/InteracDestination.md @@ -0,0 +1,22 @@ + + +# InteracDestination + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | | +|**address** | [**InteracAddress**](InteracAddress.md) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| INTERAC | "INTERAC" | + + + diff --git a/docs/InteracPaymentInfo.md b/docs/InteracPaymentInfo.md new file mode 100644 index 00000000..0cbe6137 --- /dev/null +++ b/docs/InteracPaymentInfo.md @@ -0,0 +1,45 @@ + + +# InteracPaymentInfo + +Interac e-Transfer payment information for Canadian dollar transfers + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rail** | [**RailEnum**](#RailEnum) | The payment rail type for Interac transfers | | +|**addressingSystem** | [**AddressingSystemEnum**](#AddressingSystemEnum) | The addressing system used for Interac transfers | | +|**accountHolderGivenName** | **String** | The given name (first name) of the account holder | | +|**accountHolderSurname** | **String** | The surname (last name) of the account holder | | +|**country** | **String** | The country for the transfer (ISO 3166-1 alpha-2 code) | | +|**recipientHandleType** | [**RecipientHandleTypeEnum**](#RecipientHandleTypeEnum) | The type of recipient handler being used | | +|**recipientHandleValue** | **String** | Email address registered for Interac e-Transfer | | +|**message** | **String** | The message to be sent to the recipient | | + + + +## Enum: RailEnum + +| Name | Value | +|---- | -----| +| INTERAC | "INTERAC" | + + + +## Enum: AddressingSystemEnum + +| Name | Value | +|---- | -----| +| INTERAC | "INTERAC" | + + + +## Enum: RecipientHandleTypeEnum + +| Name | Value | +|---- | -----| +| EMAIL | "EMAIL" | + + + diff --git a/docs/InternalTransferAddress.md b/docs/InternalTransferAddress.md new file mode 100644 index 00000000..4609abd9 --- /dev/null +++ b/docs/InternalTransferAddress.md @@ -0,0 +1,14 @@ + + +# InternalTransferAddress + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**externalAccountId** | **String** | The provider's identifier for the external account. This enables the user to fund the account externally (outside of Fireblocks) if needed. | [optional] | +|**accountId** | **String** | The Fireblocks account ID where the user should deposit the funds. | | + + + diff --git a/docs/InternalTransferDestination.md b/docs/InternalTransferDestination.md new file mode 100644 index 00000000..da1e067e --- /dev/null +++ b/docs/InternalTransferDestination.md @@ -0,0 +1,22 @@ + + +# InternalTransferDestination + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | | +|**address** | [**InternalTransferAddress**](InternalTransferAddress.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| INTERNAL_TRANSFER | "INTERNAL_TRANSFER" | + + + diff --git a/docs/LocalBankTransferAfricaAddress.md b/docs/LocalBankTransferAfricaAddress.md index 3e89ccb4..12d14961 100644 --- a/docs/LocalBankTransferAfricaAddress.md +++ b/docs/LocalBankTransferAfricaAddress.md @@ -11,6 +11,8 @@ |**accountNumber** | **String** | | | |**bankName** | **String** | Name of the bank | | |**bankCode** | **String** | Internal bank identifier | | +|**successPaymentInstructionRedirectUrl** | **String** | The URL to redirect to after the payment instruction is successful | [optional] | +|**paymentRedirect** | [**PaymentRedirect**](PaymentRedirect.md) | | [optional] | diff --git a/docs/MarketExecutionRequestDetails.md b/docs/MarketExecutionRequestDetails.md index c8f03bc0..8e02355d 100644 --- a/docs/MarketExecutionRequestDetails.md +++ b/docs/MarketExecutionRequestDetails.md @@ -9,10 +9,10 @@ |------------ | ------------- | ------------- | -------------| |**type** | **MarketTypeEnum** | | | |**side** | **Side** | | | -|**baseAmount** | **String** | Amount to convert | | -|**baseAssetId** | **String** | Source asset identifier | | +|**baseAmount** | **String** | Amount in baseAssetId. BUY = base amount to receive; SELL = base amount to sell. | | +|**baseAssetId** | **String** | The asset you receive on BUY / give on SELL. | | |**baseAssetRail** | **TransferRail** | | [optional] | -|**quoteAssetId** | **String** | Target asset identifier | | +|**quoteAssetId** | **String** | Counter asset used to pay/receive | | |**quoteAssetRail** | **TransferRail** | | [optional] | diff --git a/docs/MobileMoneyAddress.md b/docs/MobileMoneyAddress.md index e8d9569d..05dfe30d 100644 --- a/docs/MobileMoneyAddress.md +++ b/docs/MobileMoneyAddress.md @@ -12,6 +12,8 @@ |**provider** | [**ProviderEnum**](#ProviderEnum) | Mobile money provider | | |**beneficiaryDocumentId** | **String** | Beneficiary document identification (may be required) | [optional] | |**beneficiaryRelationship** | **String** | Relationship to beneficiary for AML purposes | [optional] | +|**successPaymentInstructionRedirectUrl** | **String** | The URL to redirect to after the payment instruction is successful | [optional] | +|**paymentRedirect** | [**PaymentRedirect**](PaymentRedirect.md) | | [optional] | diff --git a/docs/PayidAddress.md b/docs/PayidAddress.md new file mode 100644 index 00000000..6197a436 --- /dev/null +++ b/docs/PayidAddress.md @@ -0,0 +1,25 @@ + + +# PayidAddress + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accountHolder** | [**AccountHolderDetails**](AccountHolderDetails.md) | | | +|**value** | **String** | The PayID identifier (email, phone, ABN, or organization ID) | | +|**type** | [**TypeEnum**](#TypeEnum) | The type of PayID being used | | +|**bsb** | **String** | Bank State Branch (BSB) number (6 digits, format XXX-XXX) | [optional] | +|**accountNumber** | **String** | Australian bank account number | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| EMAIL | "EMAIL" | + + + diff --git a/docs/PayidDestination.md b/docs/PayidDestination.md new file mode 100644 index 00000000..a0d24e63 --- /dev/null +++ b/docs/PayidDestination.md @@ -0,0 +1,22 @@ + + +# PayidDestination + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | | +|**address** | [**PayidAddress**](PayidAddress.md) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| PAYID | "PAYID" | + + + diff --git a/docs/PayidPaymentInfo.md b/docs/PayidPaymentInfo.md new file mode 100644 index 00000000..78f9dfd2 --- /dev/null +++ b/docs/PayidPaymentInfo.md @@ -0,0 +1,46 @@ + + +# PayidPaymentInfo + +PayID payment information for Australian dollar transfers + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rail** | [**RailEnum**](#RailEnum) | The payment rail type for PayID transfers | | +|**addressingSystem** | [**AddressingSystemEnum**](#AddressingSystemEnum) | The addressing system used for PayID transfers | | +|**accountHolderGivenName** | **String** | The given name (first name) of the account holder | | +|**accountHolderSurname** | **String** | The surname (last name) of the account holder | | +|**country** | **String** | The country for the transfer (ISO 3166-1 alpha-2 code) | | +|**value** | **String** | The PayID identifier (email, phone, ABN, or organization ID) | | +|**type** | [**TypeEnum**](#TypeEnum) | The type of PayID being used | | +|**bsb** | **String** | Bank State Branch (BSB) number (6 digits, format XXX-XXX) | [optional] | +|**accountNumber** | **String** | Australian bank account number | | + + + +## Enum: RailEnum + +| Name | Value | +|---- | -----| +| PAYID | "PAYID" | + + + +## Enum: AddressingSystemEnum + +| Name | Value | +|---- | -----| +| PAYID | "PAYID" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| EMAIL | "EMAIL" | + + + diff --git a/docs/PaymentInstructionsOneOf.md b/docs/PaymentInstructionsOneOf.md index 0171a86c..d36fbfab 100644 --- a/docs/PaymentInstructionsOneOf.md +++ b/docs/PaymentInstructionsOneOf.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**type** | [**TypeEnum**](#TypeEnum) | | | -|**address** | [**EuropeanSEPAAddress**](EuropeanSEPAAddress.md) | | | +|**address** | [**InternalTransferAddress**](InternalTransferAddress.md) | | | |**referenceId** | **String** | | [optional] | @@ -17,7 +17,7 @@ | Name | Value | |---- | -----| -| EUROPEAN_SEPA | "EUROPEAN_SEPA" | +| INTERNAL_TRANSFER | "INTERNAL_TRANSFER" | diff --git a/docs/PaymentRedirect.md b/docs/PaymentRedirect.md new file mode 100644 index 00000000..704fcd04 --- /dev/null +++ b/docs/PaymentRedirect.md @@ -0,0 +1,15 @@ + + +# PaymentRedirect + +URL returned by the provider that the end user will be redirected to in order to complete the payment on the bank/mobile provider page. After completion, the bank/mobile provider redirects the end user back to successRedirectUrl (provided in the RAMP request) + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**url** | **String** | URL to redirect to | [optional] | +|**expiresAt** | **String** | Expiration date of the redirect | [optional] | + + + diff --git a/docs/PixAddress.md b/docs/PixAddress.md index 17344042..22c6e196 100644 --- a/docs/PixAddress.md +++ b/docs/PixAddress.md @@ -12,6 +12,8 @@ |**keyType** | [**KeyTypeEnum**](#KeyTypeEnum) | | | |**bankName** | **String** | | [optional] | |**bankCode** | **String** | | [optional] | +|**qrCode** | **String** | The QR code to be used for the transfer | [optional] | +|**expirationDate** | **String** | The expiration date of the QR code | [optional] | @@ -19,11 +21,11 @@ | Name | Value | |---- | -----| -| CPF | "cpf" | -| CNPJ | "cnpj" | -| EMAIL | "email" | -| PHONE | "phone" | -| RANDOM | "random" | +| CPF | "CPF" | +| CNPJ | "CNPJ" | +| EMAIL | "EMAIL" | +| PHONE | "PHONE" | +| RANDOM | "RANDOM" | diff --git a/docs/RecipientHandle.md b/docs/RecipientHandle.md new file mode 100644 index 00000000..2a32e01d --- /dev/null +++ b/docs/RecipientHandle.md @@ -0,0 +1,22 @@ + + +# RecipientHandle + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | | +|**value** | **String** | The value of the recipient handle | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| EMAIL | "EMAIL" | + + + diff --git a/docs/StakingApi.md b/docs/StakingApi.md index 2fe59a0e..eec08493 100644 --- a/docs/StakingApi.md +++ b/docs/StakingApi.md @@ -6,6 +6,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ |------------- | ------------- | -------------| | [**approveTermsOfServiceByProviderId**](StakingApi.md#approveTermsOfServiceByProviderId) | **POST** /staking/providers/{providerId}/approveTermsOfService | Approve provider terms of service | | [**claimRewards**](StakingApi.md#claimRewards) | **POST** /staking/chains/{chainDescriptor}/claim_rewards | Claim accrued rewards | +| [**consolidate**](StakingApi.md#consolidate) | **POST** /staking/chains/{chainDescriptor}/consolidate | Consolidate staking positions (ETH validator consolidation) | | [**getAllDelegations**](StakingApi.md#getAllDelegations) | **GET** /staking/positions | List staking positions | | [**getChainInfo**](StakingApi.md#getChainInfo) | **GET** /staking/chains/{chainDescriptor}/chainInfo | Get chain-level staking parameters | | [**getChains**](StakingApi.md#getChains) | **GET** /staking/chains | List supported staking chains | @@ -201,6 +202,98 @@ No authorization required | **0** | Error Response | * X-Request-ID -
| +## consolidate + +> CompletableFuture> consolidate consolidate(mergeStakeAccountsRequest, chainDescriptor, idempotencyKey) + +Consolidate staking positions (ETH validator consolidation) + +Consolidates the source staking position into the destination, merging the balance into the destination and closing the source position once complete. Both positions must be from the same validator provider and same vault account. On chain, this translates into a consolidation transaction, where the source validator is consolidated into the destination validator. Supported chains: Ethereum (ETH) only. </br>Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor. + +### 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.StakingApi; +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); + + MergeStakeAccountsRequest mergeStakeAccountsRequest = new MergeStakeAccountsRequest(); // MergeStakeAccountsRequest | + String chainDescriptor = "ETH"; // String | Protocol identifier for the staking operation (e.g., ETH). + 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.staking().consolidate(mergeStakeAccountsRequest, chainDescriptor, 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 StakingApi#consolidate"); + 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 StakingApi#consolidate"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **mergeStakeAccountsRequest** | [**MergeStakeAccountsRequest**](MergeStakeAccountsRequest.md)| | | +| **chainDescriptor** | **String**| Protocol identifier for the staking operation (e.g., ETH). | [enum: ETH, ETH_TEST6, ETH_TEST_HOODI] | +| **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 | +|-------------|-------------|------------------| +| **201** | Merge request accepted and created. | * X-Request-ID -
| +| **400** | Bad request: missing/invalid fields, unsupported amount, or malformed payload. | * X-Request-ID -
| +| **403** | Forbidden: insufficient permissions, disabled feature, or restricted provider/validator. | * X-Request-ID -
| +| **404** | Not found: requested resource does not exist (e.g., position, validator, provider, or wallet). | * X-Request-ID -
| +| **429** | Rate limit exceeded: slow down and retry later. | * X-Request-ID -
| +| **500** | Internal error while processing the request. | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + ## getAllDelegations > CompletableFuture>> getAllDelegations getAllDelegations(chainDescriptor) diff --git a/docs/TransactionRequest.md b/docs/TransactionRequest.md index 9ea03b92..8c1e8293 100644 --- a/docs/TransactionRequest.md +++ b/docs/TransactionRequest.md @@ -27,7 +27,7 @@ |**gasPrice** | [**TransactionRequestGasPrice**](TransactionRequestGasPrice.md) | | [optional] | |**networkFee** | [**TransactionRequestNetworkFee**](TransactionRequestNetworkFee.md) | | [optional] | |**replaceTxByHash** | **String** | For EVM-based blockchains only. In case a transaction is stuck, specify the hash of the stuck transaction to replace it by this transaction with a higher fee, or to replace it with this transaction with a zero fee and drop it from the blockchain. | [optional] | -|**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] | +|**extraParameters** | **ExtraParameters** | | [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 supporting functionality to associate transactions with existing travel rule messages. | [optional] | diff --git a/docs/TransactionResponse.md b/docs/TransactionResponse.md index 6a782760..e974a909 100644 --- a/docs/TransactionResponse.md +++ b/docs/TransactionResponse.md @@ -46,7 +46,7 @@ |**gasLimit** | **String** | Gas limit for EVM-based blockchain transactions | [optional] | |**blockchainIndex** | **String** | Blockchain-specific index or identifier for the transaction | [optional] | |**paidRent** | **String** | Solana rent payment amount | [optional] | -|**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] | +|**extraParameters** | **ExtraParameters** | | [optional] | |**signedMessages** | [**List<SignedMessage>**](SignedMessage.md) | | [optional] | |**numOfConfirmations** | **BigDecimal** | The number of confirmations of the transaction. The number will increase until the transaction will be considered completed according to the confirmation policy. | [optional] | |**blockInfo** | [**BlockInfo**](BlockInfo.md) | | [optional] | diff --git a/docs/TransferRail.md b/docs/TransferRail.md index ab512e1a..b46f6fc2 100644 --- a/docs/TransferRail.md +++ b/docs/TransferRail.md @@ -29,5 +29,13 @@ * `MOBILE_MONEY` (value: `"MOBILE_MONEY"`) +* `INTERNAL_TRANSFER` (value: `"INTERNAL_TRANSFER"`) + +* `INTERAC` (value: `"INTERAC"`) + +* `PAYID` (value: `"PAYID"`) + +* `CHAPS` (value: `"CHAPS"`) + diff --git a/docs/VaultsApi.md b/docs/VaultsApi.md index 9ec9984d..e650705d 100644 --- a/docs/VaultsApi.md +++ b/docs/VaultsApi.md @@ -39,7 +39,7 @@ All URIs are relative to https://developers.fireblocks.com/reference/ ## activateAssetForVaultAccount -> CompletableFuture> activateAssetForVaultAccount activateAssetForVaultAccount(vaultAccountId, assetId, idempotencyKey) +> CompletableFuture> activateAssetForVaultAccount activateAssetForVaultAccount(vaultAccountId, assetId, idempotencyKey, blockchainWalletType) Activate a wallet in a vault account @@ -71,8 +71,9 @@ public class Example { String vaultAccountId = "vaultAccountId_example"; // String | The ID of the vault account to return, or 'default' for the default vault account String assetId = "assetId_example"; // String | The ID of the asset String idempotencyKey = "idempotencyKey_example"; // String | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. + String blockchainWalletType = "blockchainWalletType_example"; // String | Optional immutable blockchain wallet type to store per tenant+vault try { - CompletableFuture> response = fireblocks.vaults().activateAssetForVaultAccount(vaultAccountId, assetId, idempotencyKey); + CompletableFuture> response = fireblocks.vaults().activateAssetForVaultAccount(vaultAccountId, assetId, idempotencyKey, blockchainWalletType); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -102,6 +103,7 @@ public class Example { | **vaultAccountId** | **String**| The ID of the vault account to return, or 'default' for the default vault account | | | **assetId** | **String**| The ID of the asset | | | **idempotencyKey** | **String**| A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | [optional] | +| **blockchainWalletType** | **String**| Optional immutable blockchain wallet type to store per tenant+vault | [optional] | ### Return type @@ -305,7 +307,7 @@ No authorization required Bulk creation of new vault accounts -Create multiple vault accounts by running an async job. - The HBAR, TON, SUI, TERRA, ALGO, and DOT blockchains are not supported. - Limited to a maximum of 10,000 accounts per operation. **Endpoint Permissions:** Admin, Non-Signing Admin, Signer, Approver, Editor. +Create multiple vault accounts by running an async job. - The HBAR, TON, SUI, TERRA, ALGO, and DOT blockchains are not supported. - These endpoints are currently in beta and might be subject to changes. - Limited to a maximum of 10,000 accounts per operation. **Endpoint Permissions:** Admin, Non-Signing Admin, Signer, Approver, Editor. ### Example @@ -556,7 +558,7 @@ No authorization required ## createVaultAccountAsset -> CompletableFuture> createVaultAccountAsset createVaultAccountAsset(vaultAccountId, assetId, createAssetsRequest, idempotencyKey) +> CompletableFuture> createVaultAccountAsset createVaultAccountAsset(vaultAccountId, assetId, createAssetsRequest, idempotencyKey, blockchainWalletType) Create a new vault wallet @@ -589,8 +591,9 @@ public class Example { String assetId = "assetId_example"; // String | The ID of the asset CreateAssetsRequest createAssetsRequest = new CreateAssetsRequest(); // CreateAssetsRequest | 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. + String blockchainWalletType = "blockchainWalletType_example"; // String | Optional immutable blockchain wallet type to store per tenant+vault try { - CompletableFuture> response = fireblocks.vaults().createVaultAccountAsset(vaultAccountId, assetId, createAssetsRequest, idempotencyKey); + CompletableFuture> response = fireblocks.vaults().createVaultAccountAsset(vaultAccountId, assetId, createAssetsRequest, idempotencyKey, blockchainWalletType); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -621,6 +624,7 @@ public class Example { | **assetId** | **String**| The ID of the asset | | | **createAssetsRequest** | [**CreateAssetsRequest**](CreateAssetsRequest.md)| | [optional] | | **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] | +| **blockchainWalletType** | **String**| Optional immutable blockchain wallet type to store per tenant+vault | [optional] | ### Return type diff --git a/docs/Workspace.md b/docs/Workspace.md new file mode 100644 index 00000000..1d9cb00e --- /dev/null +++ b/docs/Workspace.md @@ -0,0 +1,14 @@ + + +# Workspace + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The ID of the workspace | | +|**name** | **String** | The name of the workspace | | + + + diff --git a/docs/WorkspaceApi.md b/docs/WorkspaceApi.md new file mode 100644 index 00000000..3de835fd --- /dev/null +++ b/docs/WorkspaceApi.md @@ -0,0 +1,88 @@ +# WorkspaceApi + +All URIs are relative to https://developers.fireblocks.com/reference/ + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getWorkspace**](WorkspaceApi.md#getWorkspace) | **GET** /workspace | Get workspace | + + + +## getWorkspace + +> CompletableFuture> getWorkspace getWorkspace() + +Get workspace + +Returns the workspace ID and name for the authenticated user. + +### 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.WorkspaceApi; +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); + + try { + CompletableFuture> response = fireblocks.workspace().getWorkspace(); + 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 WorkspaceApi#getWorkspace"); + 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 WorkspaceApi#getWorkspace"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### 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** | Workspace details | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + 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 2a36b7f5..89176ce6 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 14.1.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 e9bf3fa5..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.1.0"; + public static final String VERSION = "0.0.0"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/src/main/java/com/fireblocks/sdk/Fireblocks.java b/src/main/java/com/fireblocks/sdk/Fireblocks.java index c09c79ae..b7d8ab63 100644 --- a/src/main/java/com/fireblocks/sdk/Fireblocks.java +++ b/src/main/java/com/fireblocks/sdk/Fireblocks.java @@ -80,6 +80,7 @@ public class Fireblocks { private WebhooksApi webhooks; private WebhooksV2Api webhooksV2; private WhitelistIpAddressesApi whitelistIpAddresses; + private WorkspaceApi workspace; private WorkspaceStatusBetaApi workspaceStatusBeta; public Fireblocks(ConfigurationOptions conf) { @@ -528,6 +529,13 @@ public WhitelistIpAddressesApi whitelistIpAddresses() { return whitelistIpAddresses; } + public WorkspaceApi workspace() { + if (workspace == null) { + workspace = new WorkspaceApi(apiClient); + } + return workspace; + } + public WorkspaceStatusBetaApi workspaceStatusBeta() { if (workspaceStatusBeta == null) { workspaceStatusBeta = new WorkspaceStatusBetaApi(apiClient); diff --git a/src/main/java/com/fireblocks/sdk/api/StakingApi.java b/src/main/java/com/fireblocks/sdk/api/StakingApi.java index 97d0c26a..01cf54ce 100644 --- a/src/main/java/com/fireblocks/sdk/api/StakingApi.java +++ b/src/main/java/com/fireblocks/sdk/api/StakingApi.java @@ -238,6 +238,106 @@ private HttpRequest.Builder claimRewardsRequestBuilder( } return localVarRequestBuilder; } + /** + * Consolidate staking positions (ETH validator consolidation) Consolidates the source staking + * position into the destination, merging the balance into the destination and closing the + * source position once complete. Both positions must be from the same validator provider and + * same vault account. On chain, this translates into a consolidation transaction, where the + * source validator is consolidated into the destination validator. Supported chains: Ethereum + * (ETH) only. </br>Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, + * Approver, Editor. + * + * @param mergeStakeAccountsRequest (required) + * @param chainDescriptor Protocol identifier for the staking operation (e.g., ETH). (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<MergeStakeAccountsResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> consolidate( + MergeStakeAccountsRequest mergeStakeAccountsRequest, + String chainDescriptor, + String idempotencyKey) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + consolidateRequestBuilder( + mergeStakeAccountsRequest, chainDescriptor, 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("consolidate", 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< + MergeStakeAccountsResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder consolidateRequestBuilder( + MergeStakeAccountsRequest mergeStakeAccountsRequest, + String chainDescriptor, + String idempotencyKey) + throws ApiException { + ValidationUtils.assertParamExists( + "consolidate", "mergeStakeAccountsRequest", mergeStakeAccountsRequest); + ValidationUtils.assertParamExistsAndNotEmpty( + "consolidate", "chainDescriptor", chainDescriptor); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/staking/chains/{chainDescriptor}/consolidate" + .replace( + "{chainDescriptor}", + ApiClient.urlEncode(chainDescriptor.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(mergeStakeAccountsRequest); + 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; + } /** * List staking positions Returns all staking positions with core details: amounts, rewards, * status, chain, and vault. </br>Endpoint Permission: Admin, Non-Signing Admin, Signer, diff --git a/src/main/java/com/fireblocks/sdk/api/VaultsApi.java b/src/main/java/com/fireblocks/sdk/api/VaultsApi.java index c25b42e6..1bd5413f 100644 --- a/src/main/java/com/fireblocks/sdk/api/VaultsApi.java +++ b/src/main/java/com/fireblocks/sdk/api/VaultsApi.java @@ -115,15 +115,21 @@ private String formatExceptionMessage(String operationId, int statusCode, String * @param idempotencyKey A unique identifier for the request. If the request is sent multiple * times with the same idempotency key, the server will return the same response as the * first request. The idempotency key is valid for 24 hours. (optional) + * @param blockchainWalletType Optional immutable blockchain wallet type to store per + * tenant+vault (optional) * @return CompletableFuture<ApiResponse<CreateVaultAssetResponse>> * @throws ApiException if fails to make API call */ public CompletableFuture> activateAssetForVaultAccount( - String vaultAccountId, String assetId, String idempotencyKey) throws ApiException { + String vaultAccountId, + String assetId, + String idempotencyKey, + String blockchainWalletType) + throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = activateAssetForVaultAccountRequestBuilder( - vaultAccountId, assetId, idempotencyKey); + vaultAccountId, assetId, idempotencyKey, blockchainWalletType); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -159,7 +165,11 @@ public CompletableFuture> activateAssetFor } private HttpRequest.Builder activateAssetForVaultAccountRequestBuilder( - String vaultAccountId, String assetId, String idempotencyKey) throws ApiException { + String vaultAccountId, + String assetId, + String idempotencyKey, + String blockchainWalletType) + throws ApiException { ValidationUtils.assertParamExistsAndNotEmpty( "activateAssetForVaultAccount", "vaultAccountId", vaultAccountId); ValidationUtils.assertParamExistsAndNotEmpty( @@ -172,7 +182,24 @@ private HttpRequest.Builder activateAssetForVaultAccountRequestBuilder( .replace("{vaultAccountId}", ApiClient.urlEncode(vaultAccountId.toString())) .replace("{assetId}", ApiClient.urlEncode(assetId.toString())); - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "blockchainWalletType"; + localVarQueryParams.addAll( + ApiClient.parameterToPairs("blockchainWalletType", blockchainWalletType)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } if (idempotencyKey != null) { localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); @@ -371,9 +398,9 @@ private HttpRequest.Builder createLegacyAddressRequestBuilder( } /** * Bulk creation of new vault accounts Create multiple vault accounts by running an async job. - - * The HBAR, TON, SUI, TERRA, ALGO, and DOT blockchains are not supported. - Limited to a - * maximum of 10,000 accounts per operation. **Endpoint Permissions:** Admin, Non-Signing Admin, - * Signer, Approver, Editor. + * The HBAR, TON, SUI, TERRA, ALGO, and DOT blockchains are not supported. - These endpoints are + * currently in beta and might be subject to changes. - Limited to a maximum of 10,000 accounts + * per operation. **Endpoint Permissions:** Admin, Non-Signing Admin, Signer, Approver, Editor. * * @param createMultipleAccountsRequest (required) * @param idempotencyKey A unique identifier for the request. If the request is sent multiple @@ -651,6 +678,8 @@ private HttpRequest.Builder createVaultAccountRequestBuilder( * @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) + * @param blockchainWalletType Optional immutable blockchain wallet type to store per + * tenant+vault (optional) * @return CompletableFuture<ApiResponse<CreateVaultAssetResponse>> * @throws ApiException if fails to make API call */ @@ -658,12 +687,17 @@ public CompletableFuture> createVaultAccou String vaultAccountId, String assetId, CreateAssetsRequest createAssetsRequest, - String idempotencyKey) + String idempotencyKey, + String blockchainWalletType) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = createVaultAccountAssetRequestBuilder( - vaultAccountId, assetId, createAssetsRequest, idempotencyKey); + vaultAccountId, + assetId, + createAssetsRequest, + idempotencyKey, + blockchainWalletType); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -701,7 +735,8 @@ private HttpRequest.Builder createVaultAccountAssetRequestBuilder( String vaultAccountId, String assetId, CreateAssetsRequest createAssetsRequest, - String idempotencyKey) + String idempotencyKey, + String blockchainWalletType) throws ApiException { ValidationUtils.assertParamExistsAndNotEmpty( "createVaultAccountAsset", "vaultAccountId", vaultAccountId); @@ -714,7 +749,24 @@ private HttpRequest.Builder createVaultAccountAssetRequestBuilder( .replace("{vaultAccountId}", ApiClient.urlEncode(vaultAccountId.toString())) .replace("{assetId}", ApiClient.urlEncode(assetId.toString())); - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "blockchainWalletType"; + localVarQueryParams.addAll( + ApiClient.parameterToPairs("blockchainWalletType", blockchainWalletType)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } if (idempotencyKey != null) { localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); diff --git a/src/main/java/com/fireblocks/sdk/api/WorkspaceApi.java b/src/main/java/com/fireblocks/sdk/api/WorkspaceApi.java new file mode 100644 index 00000000..721c3593 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/api/WorkspaceApi.java @@ -0,0 +1,132 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.Workspace; +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.util.concurrent.CompletableFuture; +import java.util.function.Consumer; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class WorkspaceApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public WorkspaceApi() { + this(new ApiClient()); + } + + public WorkspaceApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + private ApiException getApiException(String operationId, HttpResponse response) { + String message = + formatExceptionMessage(operationId, response.statusCode(), response.body()); + return new ApiException( + response.statusCode(), message, response.headers(), response.body()); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Get workspace Returns the workspace ID and name for the authenticated user. + * + * @return CompletableFuture<ApiResponse<Workspace>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getWorkspace() throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = getWorkspaceRequestBuilder(); + 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("getWorkspace", 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< + Workspace>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getWorkspaceRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/workspace"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AdditionalInfoRequestAdditionalInfo.java b/src/main/java/com/fireblocks/sdk/model/AdditionalInfoRequestAdditionalInfo.java index ccdd8622..6a983f53 100644 --- a/src/main/java/com/fireblocks/sdk/model/AdditionalInfoRequestAdditionalInfo.java +++ b/src/main/java/com/fireblocks/sdk/model/AdditionalInfoRequestAdditionalInfo.java @@ -175,6 +175,48 @@ public AdditionalInfoRequestAdditionalInfo deserialize( log.log(Level.FINER, "Input data does not match schema 'AchPaymentInfo'", e); } + // deserialize ChapsPaymentInfo + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ChapsPaymentInfo.class.equals(Integer.class) + || ChapsPaymentInfo.class.equals(Long.class) + || ChapsPaymentInfo.class.equals(Float.class) + || ChapsPaymentInfo.class.equals(Double.class) + || ChapsPaymentInfo.class.equals(Boolean.class) + || ChapsPaymentInfo.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ChapsPaymentInfo.class.equals(Integer.class) + || ChapsPaymentInfo.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ChapsPaymentInfo.class.equals(Float.class) + || ChapsPaymentInfo.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (ChapsPaymentInfo.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ChapsPaymentInfo.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ChapsPaymentInfo.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 'ChapsPaymentInfo'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ChapsPaymentInfo'", e); + } + // deserialize IbanPaymentInfo try { boolean attemptParsing = true; @@ -217,6 +259,49 @@ public AdditionalInfoRequestAdditionalInfo deserialize( log.log(Level.FINER, "Input data does not match schema 'IbanPaymentInfo'", e); } + // deserialize InteracPaymentInfo + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (InteracPaymentInfo.class.equals(Integer.class) + || InteracPaymentInfo.class.equals(Long.class) + || InteracPaymentInfo.class.equals(Float.class) + || InteracPaymentInfo.class.equals(Double.class) + || InteracPaymentInfo.class.equals(Boolean.class) + || InteracPaymentInfo.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((InteracPaymentInfo.class.equals(Integer.class) + || InteracPaymentInfo.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((InteracPaymentInfo.class.equals(Float.class) + || InteracPaymentInfo.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (InteracPaymentInfo.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (InteracPaymentInfo.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(InteracPaymentInfo.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 'InteracPaymentInfo'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'InteracPaymentInfo'", e); + } + // deserialize LbtPaymentInfo try { boolean attemptParsing = true; @@ -301,6 +386,48 @@ public AdditionalInfoRequestAdditionalInfo deserialize( log.log(Level.FINER, "Input data does not match schema 'MomoPaymentInfo'", e); } + // deserialize PayidPaymentInfo + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PayidPaymentInfo.class.equals(Integer.class) + || PayidPaymentInfo.class.equals(Long.class) + || PayidPaymentInfo.class.equals(Float.class) + || PayidPaymentInfo.class.equals(Double.class) + || PayidPaymentInfo.class.equals(Boolean.class) + || PayidPaymentInfo.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((PayidPaymentInfo.class.equals(Integer.class) + || PayidPaymentInfo.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((PayidPaymentInfo.class.equals(Float.class) + || PayidPaymentInfo.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (PayidPaymentInfo.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (PayidPaymentInfo.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PayidPaymentInfo.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 'PayidPaymentInfo'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PayidPaymentInfo'", e); + } + // deserialize PixPaymentInfo try { boolean attemptParsing = true; @@ -556,11 +683,21 @@ public AdditionalInfoRequestAdditionalInfo(AchPaymentInfo o) { setActualInstance(o); } + public AdditionalInfoRequestAdditionalInfo(ChapsPaymentInfo o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public AdditionalInfoRequestAdditionalInfo(IbanPaymentInfo o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } + public AdditionalInfoRequestAdditionalInfo(InteracPaymentInfo o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public AdditionalInfoRequestAdditionalInfo(LbtPaymentInfo o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -571,6 +708,11 @@ public AdditionalInfoRequestAdditionalInfo(MomoPaymentInfo o) { setActualInstance(o); } + public AdditionalInfoRequestAdditionalInfo(PayidPaymentInfo o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public AdditionalInfoRequestAdditionalInfo(PixPaymentInfo o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -599,9 +741,12 @@ public AdditionalInfoRequestAdditionalInfo(UsWirePaymentInfo o) { static { schemas.put("AbaPaymentInfo", AbaPaymentInfo.class); schemas.put("AchPaymentInfo", AchPaymentInfo.class); + schemas.put("ChapsPaymentInfo", ChapsPaymentInfo.class); schemas.put("IbanPaymentInfo", IbanPaymentInfo.class); + schemas.put("InteracPaymentInfo", InteracPaymentInfo.class); schemas.put("LbtPaymentInfo", LbtPaymentInfo.class); schemas.put("MomoPaymentInfo", MomoPaymentInfo.class); + schemas.put("PayidPaymentInfo", PayidPaymentInfo.class); schemas.put("PixPaymentInfo", PixPaymentInfo.class); schemas.put("SepaPaymentInfo", SepaPaymentInfo.class); schemas.put("SpeiAdvancedPaymentInfo", SpeiAdvancedPaymentInfo.class); @@ -618,9 +763,10 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: AbaPaymentInfo, AchPaymentInfo, IbanPaymentInfo, - * LbtPaymentInfo, MomoPaymentInfo, PixPaymentInfo, SepaPaymentInfo, SpeiAdvancedPaymentInfo, - * SpeiBasicPaymentInfo, UsWirePaymentInfo + * against the oneOf child schemas: AbaPaymentInfo, AchPaymentInfo, ChapsPaymentInfo, + * IbanPaymentInfo, InteracPaymentInfo, LbtPaymentInfo, MomoPaymentInfo, PayidPaymentInfo, + * PixPaymentInfo, SepaPaymentInfo, SpeiAdvancedPaymentInfo, SpeiBasicPaymentInfo, + * UsWirePaymentInfo * *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be * a composed schema (allOf, anyOf, oneOf). @@ -637,11 +783,21 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(ChapsPaymentInfo.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(IbanPaymentInfo.class, instance, new HashSet>())) { super.setActualInstance(instance); return; } + if (JSON.isInstanceOf(InteracPaymentInfo.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(LbtPaymentInfo.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -652,6 +808,11 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(PayidPaymentInfo.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(PixPaymentInfo.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -678,19 +839,22 @@ public void setActualInstance(Object instance) { } throw new RuntimeException( - "Invalid instance type. Must be AbaPaymentInfo, AchPaymentInfo, IbanPaymentInfo," - + " LbtPaymentInfo, MomoPaymentInfo, PixPaymentInfo, SepaPaymentInfo," - + " SpeiAdvancedPaymentInfo, SpeiBasicPaymentInfo, UsWirePaymentInfo"); + "Invalid instance type. Must be AbaPaymentInfo, AchPaymentInfo, ChapsPaymentInfo," + + " IbanPaymentInfo, InteracPaymentInfo, LbtPaymentInfo, MomoPaymentInfo," + + " PayidPaymentInfo, PixPaymentInfo, SepaPaymentInfo, SpeiAdvancedPaymentInfo," + + " SpeiBasicPaymentInfo, UsWirePaymentInfo"); } /** * Get the actual instance, which can be the following: AbaPaymentInfo, AchPaymentInfo, - * IbanPaymentInfo, LbtPaymentInfo, MomoPaymentInfo, PixPaymentInfo, SepaPaymentInfo, - * SpeiAdvancedPaymentInfo, SpeiBasicPaymentInfo, UsWirePaymentInfo + * ChapsPaymentInfo, IbanPaymentInfo, InteracPaymentInfo, LbtPaymentInfo, MomoPaymentInfo, + * PayidPaymentInfo, PixPaymentInfo, SepaPaymentInfo, SpeiAdvancedPaymentInfo, + * SpeiBasicPaymentInfo, UsWirePaymentInfo * - * @return The actual instance (AbaPaymentInfo, AchPaymentInfo, IbanPaymentInfo, LbtPaymentInfo, - * MomoPaymentInfo, PixPaymentInfo, SepaPaymentInfo, SpeiAdvancedPaymentInfo, - * SpeiBasicPaymentInfo, UsWirePaymentInfo) + * @return The actual instance (AbaPaymentInfo, AchPaymentInfo, ChapsPaymentInfo, + * IbanPaymentInfo, InteracPaymentInfo, LbtPaymentInfo, MomoPaymentInfo, PayidPaymentInfo, + * PixPaymentInfo, SepaPaymentInfo, SpeiAdvancedPaymentInfo, SpeiBasicPaymentInfo, + * UsWirePaymentInfo) */ @Override public Object getActualInstance() { @@ -719,6 +883,17 @@ public AchPaymentInfo getAchPaymentInfo() throws ClassCastException { return (AchPaymentInfo) super.getActualInstance(); } + /** + * Get the actual instance of `ChapsPaymentInfo`. If the actual instance is not + * `ChapsPaymentInfo`, the ClassCastException will be thrown. + * + * @return The actual instance of `ChapsPaymentInfo` + * @throws ClassCastException if the instance is not `ChapsPaymentInfo` + */ + public ChapsPaymentInfo getChapsPaymentInfo() throws ClassCastException { + return (ChapsPaymentInfo) super.getActualInstance(); + } + /** * Get the actual instance of `IbanPaymentInfo`. If the actual instance is not * `IbanPaymentInfo`, the ClassCastException will be thrown. @@ -730,6 +905,17 @@ public IbanPaymentInfo getIbanPaymentInfo() throws ClassCastException { return (IbanPaymentInfo) super.getActualInstance(); } + /** + * Get the actual instance of `InteracPaymentInfo`. If the actual instance is not + * `InteracPaymentInfo`, the ClassCastException will be thrown. + * + * @return The actual instance of `InteracPaymentInfo` + * @throws ClassCastException if the instance is not `InteracPaymentInfo` + */ + public InteracPaymentInfo getInteracPaymentInfo() throws ClassCastException { + return (InteracPaymentInfo) super.getActualInstance(); + } + /** * Get the actual instance of `LbtPaymentInfo`. If the actual instance is not `LbtPaymentInfo`, * the ClassCastException will be thrown. @@ -752,6 +938,17 @@ public MomoPaymentInfo getMomoPaymentInfo() throws ClassCastException { return (MomoPaymentInfo) super.getActualInstance(); } + /** + * Get the actual instance of `PayidPaymentInfo`. If the actual instance is not + * `PayidPaymentInfo`, the ClassCastException will be thrown. + * + * @return The actual instance of `PayidPaymentInfo` + * @throws ClassCastException if the instance is not `PayidPaymentInfo` + */ + public PayidPaymentInfo getPayidPaymentInfo() throws ClassCastException { + return (PayidPaymentInfo) super.getActualInstance(); + } + /** * Get the actual instance of `PixPaymentInfo`. If the actual instance is not `PixPaymentInfo`, * the ClassCastException will be thrown. @@ -919,6 +1116,30 @@ public String toUrlQueryString(String prefix) { } return joiner.toString(); } + if (getActualInstance() instanceof InteracPaymentInfo) { + if (getActualInstance() != null) { + joiner.add( + ((InteracPaymentInfo) getActualInstance()) + .toUrlQueryString(prefix + "one_of_10" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof PayidPaymentInfo) { + if (getActualInstance() != null) { + joiner.add( + ((PayidPaymentInfo) getActualInstance()) + .toUrlQueryString(prefix + "one_of_11" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ChapsPaymentInfo) { + if (getActualInstance() != null) { + joiner.add( + ((ChapsPaymentInfo) getActualInstance()) + .toUrlQueryString(prefix + "one_of_12" + suffix)); + } + return joiner.toString(); + } return null; } } diff --git a/src/main/java/com/fireblocks/sdk/model/ChapsAddress.java b/src/main/java/com/fireblocks/sdk/model/ChapsAddress.java new file mode 100644 index 00000000..47de0bf6 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ChapsAddress.java @@ -0,0 +1,363 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** ChapsAddress */ +@JsonPropertyOrder({ + ChapsAddress.JSON_PROPERTY_ACCOUNT_HOLDER, + ChapsAddress.JSON_PROPERTY_SORT_CODE, + ChapsAddress.JSON_PROPERTY_ACCOUNT_NUMBER, + ChapsAddress.JSON_PROPERTY_BANK_NAME, + ChapsAddress.JSON_PROPERTY_BANK_ACCOUNT_COUNTRY, + ChapsAddress.JSON_PROPERTY_BANK_ACCOUNT_HOLDER_NAME +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ChapsAddress { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER = "accountHolder"; + @jakarta.annotation.Nonnull private AccountHolderDetails accountHolder; + + public static final String JSON_PROPERTY_SORT_CODE = "sortCode"; + @jakarta.annotation.Nonnull private String sortCode; + + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + @jakarta.annotation.Nonnull private String accountNumber; + + public static final String JSON_PROPERTY_BANK_NAME = "bankName"; + @jakarta.annotation.Nullable private String bankName; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_COUNTRY = "bankAccountCountry"; + @jakarta.annotation.Nonnull private String bankAccountCountry; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_HOLDER_NAME = "bankAccountHolderName"; + @jakarta.annotation.Nonnull private String bankAccountHolderName; + + public ChapsAddress() {} + + @JsonCreator + public ChapsAddress( + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_HOLDER, required = true) + AccountHolderDetails accountHolder, + @JsonProperty(value = JSON_PROPERTY_SORT_CODE, required = true) String sortCode, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_NUMBER, required = true) + String accountNumber, + @JsonProperty(value = JSON_PROPERTY_BANK_ACCOUNT_COUNTRY, required = true) + String bankAccountCountry, + @JsonProperty(value = JSON_PROPERTY_BANK_ACCOUNT_HOLDER_NAME, required = true) + String bankAccountHolderName) { + this.accountHolder = accountHolder; + this.sortCode = sortCode; + this.accountNumber = accountNumber; + this.bankAccountCountry = bankAccountCountry; + this.bankAccountHolderName = bankAccountHolderName; + } + + public ChapsAddress accountHolder( + @jakarta.annotation.Nonnull AccountHolderDetails accountHolder) { + this.accountHolder = accountHolder; + return this; + } + + /** + * Get accountHolder + * + * @return accountHolder + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AccountHolderDetails getAccountHolder() { + return accountHolder; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountHolder(@jakarta.annotation.Nonnull AccountHolderDetails accountHolder) { + this.accountHolder = accountHolder; + } + + public ChapsAddress sortCode(@jakarta.annotation.Nonnull String sortCode) { + this.sortCode = sortCode; + return this; + } + + /** + * UK bank sort code (format XX-XX-XX) + * + * @return sortCode + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SORT_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSortCode() { + return sortCode; + } + + @JsonProperty(JSON_PROPERTY_SORT_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSortCode(@jakarta.annotation.Nonnull String sortCode) { + this.sortCode = sortCode; + } + + public ChapsAddress accountNumber(@jakarta.annotation.Nonnull String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * UK bank account number + * + * @return accountNumber + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountNumber() { + return accountNumber; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountNumber(@jakarta.annotation.Nonnull String accountNumber) { + this.accountNumber = accountNumber; + } + + public ChapsAddress bankName(@jakarta.annotation.Nullable String bankName) { + this.bankName = bankName; + return this; + } + + /** + * Name of the bank + * + * @return bankName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BANK_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBankName() { + return bankName; + } + + @JsonProperty(JSON_PROPERTY_BANK_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankName(@jakarta.annotation.Nullable String bankName) { + this.bankName = bankName; + } + + public ChapsAddress bankAccountCountry(@jakarta.annotation.Nonnull String bankAccountCountry) { + this.bankAccountCountry = bankAccountCountry; + return this; + } + + /** + * CHAPS bank account holder name + * + * @return bankAccountCountry + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_COUNTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBankAccountCountry() { + return bankAccountCountry; + } + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_COUNTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBankAccountCountry(@jakarta.annotation.Nonnull String bankAccountCountry) { + this.bankAccountCountry = bankAccountCountry; + } + + public ChapsAddress bankAccountHolderName( + @jakarta.annotation.Nonnull String bankAccountHolderName) { + this.bankAccountHolderName = bankAccountHolderName; + return this; + } + + /** + * CHAPS bank account holder name + * + * @return bankAccountHolderName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_HOLDER_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBankAccountHolderName() { + return bankAccountHolderName; + } + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_HOLDER_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBankAccountHolderName(@jakarta.annotation.Nonnull String bankAccountHolderName) { + this.bankAccountHolderName = bankAccountHolderName; + } + + /** Return true if this ChapsAddress object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChapsAddress chapsAddress = (ChapsAddress) o; + return Objects.equals(this.accountHolder, chapsAddress.accountHolder) + && Objects.equals(this.sortCode, chapsAddress.sortCode) + && Objects.equals(this.accountNumber, chapsAddress.accountNumber) + && Objects.equals(this.bankName, chapsAddress.bankName) + && Objects.equals(this.bankAccountCountry, chapsAddress.bankAccountCountry) + && Objects.equals(this.bankAccountHolderName, chapsAddress.bankAccountHolderName); + } + + @Override + public int hashCode() { + return Objects.hash( + accountHolder, + sortCode, + accountNumber, + bankName, + bankAccountCountry, + bankAccountHolderName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChapsAddress {\n"); + sb.append(" accountHolder: ").append(toIndentedString(accountHolder)).append("\n"); + sb.append(" sortCode: ").append(toIndentedString(sortCode)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n"); + sb.append(" bankAccountCountry: ") + .append(toIndentedString(bankAccountCountry)) + .append("\n"); + sb.append(" bankAccountHolderName: ") + .append(toIndentedString(bankAccountHolderName)) + .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 `accountHolder` to the URL query string + if (getAccountHolder() != null) { + joiner.add(getAccountHolder().toUrlQueryString(prefix + "accountHolder" + suffix)); + } + + // add `sortCode` to the URL query string + if (getSortCode() != null) { + joiner.add( + String.format( + "%ssortCode%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSortCode())))); + } + + // add `accountNumber` to the URL query string + if (getAccountNumber() != null) { + joiner.add( + String.format( + "%saccountNumber%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAccountNumber())))); + } + + // add `bankName` to the URL query string + if (getBankName() != null) { + joiner.add( + String.format( + "%sbankName%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBankName())))); + } + + // add `bankAccountCountry` to the URL query string + if (getBankAccountCountry() != null) { + joiner.add( + String.format( + "%sbankAccountCountry%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBankAccountCountry())))); + } + + // add `bankAccountHolderName` to the URL query string + if (getBankAccountHolderName() != null) { + joiner.add( + String.format( + "%sbankAccountHolderName%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getBankAccountHolderName())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ChapsDestination.java b/src/main/java/com/fireblocks/sdk/model/ChapsDestination.java new file mode 100644 index 00000000..c38137e6 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ChapsDestination.java @@ -0,0 +1,213 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** ChapsDestination */ +@JsonPropertyOrder({ChapsDestination.JSON_PROPERTY_TYPE, ChapsDestination.JSON_PROPERTY_ADDRESS}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ChapsDestination { + /** Gets or Sets type */ + public enum TypeEnum { + CHAPS(String.valueOf("CHAPS")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private TypeEnum type; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + @jakarta.annotation.Nonnull private ChapsAddress address; + + public ChapsDestination() {} + + @JsonCreator + public ChapsDestination( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_ADDRESS, required = true) ChapsAddress address) { + this.type = type; + this.address = address; + } + + public ChapsDestination type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public ChapsDestination address(@jakarta.annotation.Nonnull ChapsAddress address) { + this.address = address; + return this; + } + + /** + * Get address + * + * @return address + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ChapsAddress getAddress() { + return address; + } + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(@jakarta.annotation.Nonnull ChapsAddress address) { + this.address = address; + } + + /** Return true if this ChapsDestination object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChapsDestination chapsDestination = (ChapsDestination) o; + return Objects.equals(this.type, chapsDestination.type) + && Objects.equals(this.address, chapsDestination.address); + } + + @Override + public int hashCode() { + return Objects.hash(type, address); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChapsDestination {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ChapsPaymentInfo.java b/src/main/java/com/fireblocks/sdk/model/ChapsPaymentInfo.java new file mode 100644 index 00000000..3efeee90 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ChapsPaymentInfo.java @@ -0,0 +1,614 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** CHAPS payment information for UK pound sterling same-day transfers */ +@JsonPropertyOrder({ + ChapsPaymentInfo.JSON_PROPERTY_RAIL, + ChapsPaymentInfo.JSON_PROPERTY_ADDRESSING_SYSTEM, + ChapsPaymentInfo.JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME, + ChapsPaymentInfo.JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME, + ChapsPaymentInfo.JSON_PROPERTY_COUNTRY, + ChapsPaymentInfo.JSON_PROPERTY_SORT_CODE, + ChapsPaymentInfo.JSON_PROPERTY_ACCOUNT_NUMBER, + ChapsPaymentInfo.JSON_PROPERTY_BANK_NAME, + ChapsPaymentInfo.JSON_PROPERTY_BANK_ACCOUNT_COUNTRY, + ChapsPaymentInfo.JSON_PROPERTY_BANK_ACCOUNT_HOLDER_NAME +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ChapsPaymentInfo { + /** The payment rail type for CHAPS transfers */ + public enum RailEnum { + CHAPS(String.valueOf("CHAPS")); + + private String value; + + RailEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RailEnum fromValue(String value) { + for (RailEnum b : RailEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RAIL = "rail"; + @jakarta.annotation.Nonnull private RailEnum rail; + + /** The addressing system used for CHAPS transfers */ + public enum AddressingSystemEnum { + CHAPS(String.valueOf("CHAPS")); + + private String value; + + AddressingSystemEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AddressingSystemEnum fromValue(String value) { + for (AddressingSystemEnum b : AddressingSystemEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ADDRESSING_SYSTEM = "addressingSystem"; + @jakarta.annotation.Nonnull private AddressingSystemEnum addressingSystem; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME = "accountHolderGivenName"; + @jakarta.annotation.Nonnull private String accountHolderGivenName; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME = "accountHolderSurname"; + @jakarta.annotation.Nonnull private String accountHolderSurname; + + public static final String JSON_PROPERTY_COUNTRY = "country"; + @jakarta.annotation.Nonnull private String country; + + public static final String JSON_PROPERTY_SORT_CODE = "sortCode"; + @jakarta.annotation.Nonnull private String sortCode; + + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + @jakarta.annotation.Nonnull private String accountNumber; + + public static final String JSON_PROPERTY_BANK_NAME = "bankName"; + @jakarta.annotation.Nullable private String bankName; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_COUNTRY = "bankAccountCountry"; + @jakarta.annotation.Nonnull private String bankAccountCountry; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_HOLDER_NAME = "bankAccountHolderName"; + @jakarta.annotation.Nonnull private String bankAccountHolderName; + + public ChapsPaymentInfo() {} + + @JsonCreator + public ChapsPaymentInfo( + @JsonProperty(value = JSON_PROPERTY_RAIL, required = true) RailEnum rail, + @JsonProperty(value = JSON_PROPERTY_ADDRESSING_SYSTEM, required = true) + AddressingSystemEnum addressingSystem, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME, required = true) + String accountHolderGivenName, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME, required = true) + String accountHolderSurname, + @JsonProperty(value = JSON_PROPERTY_COUNTRY, required = true) String country, + @JsonProperty(value = JSON_PROPERTY_SORT_CODE, required = true) String sortCode, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_NUMBER, required = true) + String accountNumber, + @JsonProperty(value = JSON_PROPERTY_BANK_ACCOUNT_COUNTRY, required = true) + String bankAccountCountry, + @JsonProperty(value = JSON_PROPERTY_BANK_ACCOUNT_HOLDER_NAME, required = true) + String bankAccountHolderName) { + this.rail = rail; + this.addressingSystem = addressingSystem; + this.accountHolderGivenName = accountHolderGivenName; + this.accountHolderSurname = accountHolderSurname; + this.country = country; + this.sortCode = sortCode; + this.accountNumber = accountNumber; + this.bankAccountCountry = bankAccountCountry; + this.bankAccountHolderName = bankAccountHolderName; + } + + public ChapsPaymentInfo rail(@jakarta.annotation.Nonnull RailEnum rail) { + this.rail = rail; + return this; + } + + /** + * The payment rail type for CHAPS transfers + * + * @return rail + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RailEnum getRail() { + return rail; + } + + @JsonProperty(JSON_PROPERTY_RAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRail(@jakarta.annotation.Nonnull RailEnum rail) { + this.rail = rail; + } + + public ChapsPaymentInfo addressingSystem( + @jakarta.annotation.Nonnull AddressingSystemEnum addressingSystem) { + this.addressingSystem = addressingSystem; + return this; + } + + /** + * The addressing system used for CHAPS transfers + * + * @return addressingSystem + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESSING_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AddressingSystemEnum getAddressingSystem() { + return addressingSystem; + } + + @JsonProperty(JSON_PROPERTY_ADDRESSING_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddressingSystem( + @jakarta.annotation.Nonnull AddressingSystemEnum addressingSystem) { + this.addressingSystem = addressingSystem; + } + + public ChapsPaymentInfo accountHolderGivenName( + @jakarta.annotation.Nonnull String accountHolderGivenName) { + this.accountHolderGivenName = accountHolderGivenName; + return this; + } + + /** + * The given name (first name) of the account holder + * + * @return accountHolderGivenName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountHolderGivenName() { + return accountHolderGivenName; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountHolderGivenName( + @jakarta.annotation.Nonnull String accountHolderGivenName) { + this.accountHolderGivenName = accountHolderGivenName; + } + + public ChapsPaymentInfo accountHolderSurname( + @jakarta.annotation.Nonnull String accountHolderSurname) { + this.accountHolderSurname = accountHolderSurname; + return this; + } + + /** + * The surname (last name) of the account holder + * + * @return accountHolderSurname + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountHolderSurname() { + return accountHolderSurname; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountHolderSurname(@jakarta.annotation.Nonnull String accountHolderSurname) { + this.accountHolderSurname = accountHolderSurname; + } + + public ChapsPaymentInfo country(@jakarta.annotation.Nonnull String country) { + this.country = country; + return this; + } + + /** + * The country for the transfer (ISO 3166-1 alpha-2 code) + * + * @return country + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCountry() { + return country; + } + + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCountry(@jakarta.annotation.Nonnull String country) { + this.country = country; + } + + public ChapsPaymentInfo sortCode(@jakarta.annotation.Nonnull String sortCode) { + this.sortCode = sortCode; + return this; + } + + /** + * UK bank sort code (format XX-XX-XX) + * + * @return sortCode + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SORT_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSortCode() { + return sortCode; + } + + @JsonProperty(JSON_PROPERTY_SORT_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSortCode(@jakarta.annotation.Nonnull String sortCode) { + this.sortCode = sortCode; + } + + public ChapsPaymentInfo accountNumber(@jakarta.annotation.Nonnull String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * UK bank account number + * + * @return accountNumber + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountNumber() { + return accountNumber; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountNumber(@jakarta.annotation.Nonnull String accountNumber) { + this.accountNumber = accountNumber; + } + + public ChapsPaymentInfo bankName(@jakarta.annotation.Nullable String bankName) { + this.bankName = bankName; + return this; + } + + /** + * The name of the bank + * + * @return bankName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BANK_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBankName() { + return bankName; + } + + @JsonProperty(JSON_PROPERTY_BANK_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankName(@jakarta.annotation.Nullable String bankName) { + this.bankName = bankName; + } + + public ChapsPaymentInfo bankAccountCountry( + @jakarta.annotation.Nonnull String bankAccountCountry) { + this.bankAccountCountry = bankAccountCountry; + return this; + } + + /** + * CHAPS bank account holder name + * + * @return bankAccountCountry + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_COUNTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBankAccountCountry() { + return bankAccountCountry; + } + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_COUNTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBankAccountCountry(@jakarta.annotation.Nonnull String bankAccountCountry) { + this.bankAccountCountry = bankAccountCountry; + } + + public ChapsPaymentInfo bankAccountHolderName( + @jakarta.annotation.Nonnull String bankAccountHolderName) { + this.bankAccountHolderName = bankAccountHolderName; + return this; + } + + /** + * CHAPS bank account holder name + * + * @return bankAccountHolderName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_HOLDER_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBankAccountHolderName() { + return bankAccountHolderName; + } + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_HOLDER_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBankAccountHolderName(@jakarta.annotation.Nonnull String bankAccountHolderName) { + this.bankAccountHolderName = bankAccountHolderName; + } + + /** Return true if this ChapsPaymentInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChapsPaymentInfo chapsPaymentInfo = (ChapsPaymentInfo) o; + return Objects.equals(this.rail, chapsPaymentInfo.rail) + && Objects.equals(this.addressingSystem, chapsPaymentInfo.addressingSystem) + && Objects.equals( + this.accountHolderGivenName, chapsPaymentInfo.accountHolderGivenName) + && Objects.equals(this.accountHolderSurname, chapsPaymentInfo.accountHolderSurname) + && Objects.equals(this.country, chapsPaymentInfo.country) + && Objects.equals(this.sortCode, chapsPaymentInfo.sortCode) + && Objects.equals(this.accountNumber, chapsPaymentInfo.accountNumber) + && Objects.equals(this.bankName, chapsPaymentInfo.bankName) + && Objects.equals(this.bankAccountCountry, chapsPaymentInfo.bankAccountCountry) + && Objects.equals( + this.bankAccountHolderName, chapsPaymentInfo.bankAccountHolderName); + } + + @Override + public int hashCode() { + return Objects.hash( + rail, + addressingSystem, + accountHolderGivenName, + accountHolderSurname, + country, + sortCode, + accountNumber, + bankName, + bankAccountCountry, + bankAccountHolderName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChapsPaymentInfo {\n"); + sb.append(" rail: ").append(toIndentedString(rail)).append("\n"); + sb.append(" addressingSystem: ").append(toIndentedString(addressingSystem)).append("\n"); + sb.append(" accountHolderGivenName: ") + .append(toIndentedString(accountHolderGivenName)) + .append("\n"); + sb.append(" accountHolderSurname: ") + .append(toIndentedString(accountHolderSurname)) + .append("\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" sortCode: ").append(toIndentedString(sortCode)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n"); + sb.append(" bankAccountCountry: ") + .append(toIndentedString(bankAccountCountry)) + .append("\n"); + sb.append(" bankAccountHolderName: ") + .append(toIndentedString(bankAccountHolderName)) + .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 `rail` to the URL query string + if (getRail() != null) { + joiner.add( + String.format( + "%srail%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRail())))); + } + + // add `addressingSystem` to the URL query string + if (getAddressingSystem() != null) { + joiner.add( + String.format( + "%saddressingSystem%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAddressingSystem())))); + } + + // add `accountHolderGivenName` to the URL query string + if (getAccountHolderGivenName() != null) { + joiner.add( + String.format( + "%saccountHolderGivenName%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getAccountHolderGivenName())))); + } + + // add `accountHolderSurname` to the URL query string + if (getAccountHolderSurname() != null) { + joiner.add( + String.format( + "%saccountHolderSurname%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getAccountHolderSurname())))); + } + + // add `country` to the URL query string + if (getCountry() != null) { + joiner.add( + String.format( + "%scountry%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCountry())))); + } + + // add `sortCode` to the URL query string + if (getSortCode() != null) { + joiner.add( + String.format( + "%ssortCode%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSortCode())))); + } + + // add `accountNumber` to the URL query string + if (getAccountNumber() != null) { + joiner.add( + String.format( + "%saccountNumber%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAccountNumber())))); + } + + // add `bankName` to the URL query string + if (getBankName() != null) { + joiner.add( + String.format( + "%sbankName%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBankName())))); + } + + // add `bankAccountCountry` to the URL query string + if (getBankAccountCountry() != null) { + joiner.add( + String.format( + "%sbankAccountCountry%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBankAccountCountry())))); + } + + // add `bankAccountHolderName` to the URL query string + if (getBankAccountHolderName() != null) { + joiner.add( + String.format( + "%sbankAccountHolderName%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getBankAccountHolderName())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateQuote.java b/src/main/java/com/fireblocks/sdk/model/CreateQuote.java index 60cc68ec..73146fa3 100644 --- a/src/main/java/com/fireblocks/sdk/model/CreateQuote.java +++ b/src/main/java/com/fireblocks/sdk/model/CreateQuote.java @@ -28,7 +28,9 @@ @JsonPropertyOrder({ CreateQuote.JSON_PROPERTY_SCOPE, CreateQuote.JSON_PROPERTY_BASE_ASSET_ID, + CreateQuote.JSON_PROPERTY_BASE_ASSET_RAIL, CreateQuote.JSON_PROPERTY_QUOTE_ASSET_ID, + CreateQuote.JSON_PROPERTY_QUOTE_ASSET_RAIL, CreateQuote.JSON_PROPERTY_BASE_AMOUNT, CreateQuote.JSON_PROPERTY_SLIPPAGE_BPS, CreateQuote.JSON_PROPERTY_SETTLEMENT, @@ -44,9 +46,15 @@ public class CreateQuote { public static final String JSON_PROPERTY_BASE_ASSET_ID = "baseAssetId"; @jakarta.annotation.Nonnull private String baseAssetId; + public static final String JSON_PROPERTY_BASE_ASSET_RAIL = "baseAssetRail"; + @jakarta.annotation.Nullable private TransferRail baseAssetRail; + public static final String JSON_PROPERTY_QUOTE_ASSET_ID = "quoteAssetId"; @jakarta.annotation.Nonnull private String quoteAssetId; + public static final String JSON_PROPERTY_QUOTE_ASSET_RAIL = "quoteAssetRail"; + @jakarta.annotation.Nullable private TransferRail quoteAssetRail; + public static final String JSON_PROPERTY_BASE_AMOUNT = "baseAmount"; @jakarta.annotation.Nonnull private String baseAmount; @@ -131,6 +139,29 @@ public void setBaseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { this.baseAssetId = baseAssetId; } + public CreateQuote baseAssetRail(@jakarta.annotation.Nullable TransferRail baseAssetRail) { + this.baseAssetRail = baseAssetRail; + return this; + } + + /** + * Get baseAssetRail + * + * @return baseAssetRail + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BASE_ASSET_RAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransferRail getBaseAssetRail() { + return baseAssetRail; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_RAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBaseAssetRail(@jakarta.annotation.Nullable TransferRail baseAssetRail) { + this.baseAssetRail = baseAssetRail; + } + public CreateQuote quoteAssetId(@jakarta.annotation.Nonnull String quoteAssetId) { this.quoteAssetId = quoteAssetId; return this; @@ -154,13 +185,36 @@ public void setQuoteAssetId(@jakarta.annotation.Nonnull String quoteAssetId) { this.quoteAssetId = quoteAssetId; } + public CreateQuote quoteAssetRail(@jakarta.annotation.Nullable TransferRail quoteAssetRail) { + this.quoteAssetRail = quoteAssetRail; + return this; + } + + /** + * Get quoteAssetRail + * + * @return quoteAssetRail + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_RAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransferRail getQuoteAssetRail() { + return quoteAssetRail; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_RAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setQuoteAssetRail(@jakarta.annotation.Nullable TransferRail quoteAssetRail) { + this.quoteAssetRail = quoteAssetRail; + } + public CreateQuote baseAmount(@jakarta.annotation.Nonnull String baseAmount) { this.baseAmount = baseAmount; return this; } /** - * The amount to convert from + * Amount in baseAssetId. BUY = base amount to receive; SELL = base amount to sell. * * @return baseAmount */ @@ -259,7 +313,9 @@ public boolean equals(Object o) { CreateQuote createQuote = (CreateQuote) o; return Objects.equals(this.scope, createQuote.scope) && Objects.equals(this.baseAssetId, createQuote.baseAssetId) + && Objects.equals(this.baseAssetRail, createQuote.baseAssetRail) && Objects.equals(this.quoteAssetId, createQuote.quoteAssetId) + && Objects.equals(this.quoteAssetRail, createQuote.quoteAssetRail) && Objects.equals(this.baseAmount, createQuote.baseAmount) && Objects.equals(this.slippageBps, createQuote.slippageBps) && Objects.equals(this.settlement, createQuote.settlement) @@ -269,7 +325,15 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - scope, baseAssetId, quoteAssetId, baseAmount, slippageBps, settlement, side); + scope, + baseAssetId, + baseAssetRail, + quoteAssetId, + quoteAssetRail, + baseAmount, + slippageBps, + settlement, + side); } @Override @@ -278,7 +342,9 @@ public String toString() { sb.append("class CreateQuote {\n"); sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); sb.append(" baseAssetId: ").append(toIndentedString(baseAssetId)).append("\n"); + sb.append(" baseAssetRail: ").append(toIndentedString(baseAssetRail)).append("\n"); sb.append(" quoteAssetId: ").append(toIndentedString(quoteAssetId)).append("\n"); + sb.append(" quoteAssetRail: ").append(toIndentedString(quoteAssetRail)).append("\n"); sb.append(" baseAmount: ").append(toIndentedString(baseAmount)).append("\n"); sb.append(" slippageBps: ").append(toIndentedString(slippageBps)).append("\n"); sb.append(" settlement: ").append(toIndentedString(settlement)).append("\n"); @@ -363,6 +429,16 @@ public String toUrlQueryString(String prefix) { ApiClient.urlEncode(ApiClient.valueToString(getBaseAssetId())))); } + // add `baseAssetRail` to the URL query string + if (getBaseAssetRail() != null) { + joiner.add( + String.format( + "%sbaseAssetRail%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBaseAssetRail())))); + } + // add `quoteAssetId` to the URL query string if (getQuoteAssetId() != null) { joiner.add( @@ -373,6 +449,16 @@ public String toUrlQueryString(String prefix) { ApiClient.urlEncode(ApiClient.valueToString(getQuoteAssetId())))); } + // add `quoteAssetRail` to the URL query string + if (getQuoteAssetRail() != null) { + joiner.add( + String.format( + "%squoteAssetRail%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getQuoteAssetRail())))); + } + // add `baseAmount` to the URL query string if (getBaseAmount() != null) { joiner.add( diff --git a/src/main/java/com/fireblocks/sdk/model/ExecutionRequestBaseDetails.java b/src/main/java/com/fireblocks/sdk/model/ExecutionRequestBaseDetails.java index 77ea1c54..a1d73ea0 100644 --- a/src/main/java/com/fireblocks/sdk/model/ExecutionRequestBaseDetails.java +++ b/src/main/java/com/fireblocks/sdk/model/ExecutionRequestBaseDetails.java @@ -96,7 +96,7 @@ public ExecutionRequestBaseDetails baseAmount(@jakarta.annotation.Nonnull String } /** - * Amount to convert + * Amount in baseAssetId. BUY = base amount to receive; SELL = base amount to sell. * * @return baseAmount */ @@ -119,7 +119,7 @@ public ExecutionRequestBaseDetails baseAssetId(@jakarta.annotation.Nonnull Strin } /** - * Source asset identifier + * The asset you receive on BUY / give on SELL. * * @return baseAssetId */ @@ -167,7 +167,7 @@ public ExecutionRequestBaseDetails quoteAssetId( } /** - * Target asset identifier + * Counter asset used to pay/receive * * @return quoteAssetId */ diff --git a/src/main/java/com/fireblocks/sdk/model/ExternalAccountLocalBankAfrica.java b/src/main/java/com/fireblocks/sdk/model/ExternalAccountLocalBankAfrica.java index bce7f5b3..0bd5128e 100644 --- a/src/main/java/com/fireblocks/sdk/model/ExternalAccountLocalBankAfrica.java +++ b/src/main/java/com/fireblocks/sdk/model/ExternalAccountLocalBankAfrica.java @@ -13,7 +13,6 @@ 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; @@ -22,136 +21,39 @@ import java.util.StringJoiner; /** ExternalAccountLocalBankAfrica */ -@JsonPropertyOrder({ - ExternalAccountLocalBankAfrica.JSON_PROPERTY_TYPE, - ExternalAccountLocalBankAfrica.JSON_PROPERTY_ACCOUNT_NUMBER, - ExternalAccountLocalBankAfrica.JSON_PROPERTY_BANK_NAME, - ExternalAccountLocalBankAfrica.JSON_PROPERTY_BANK_CODE -}) +@JsonPropertyOrder({ExternalAccountLocalBankAfrica.JSON_PROPERTY_SUCCESS_REDIRECT_URL}) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") public class ExternalAccountLocalBankAfrica { - public static final String JSON_PROPERTY_TYPE = "type"; - @jakarta.annotation.Nonnull private ExternalAccountLocalBankAfricaType type; - - public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; - @jakarta.annotation.Nonnull private String accountNumber; - - public static final String JSON_PROPERTY_BANK_NAME = "bankName"; - @jakarta.annotation.Nonnull private String bankName; - - public static final String JSON_PROPERTY_BANK_CODE = "bankCode"; - @jakarta.annotation.Nonnull private String bankCode; + public static final String JSON_PROPERTY_SUCCESS_REDIRECT_URL = "successRedirectUrl"; + @jakarta.annotation.Nullable private String successRedirectUrl; public ExternalAccountLocalBankAfrica() {} - @JsonCreator - public ExternalAccountLocalBankAfrica( - @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) - ExternalAccountLocalBankAfricaType type, - @JsonProperty(value = JSON_PROPERTY_ACCOUNT_NUMBER, required = true) - String accountNumber, - @JsonProperty(value = JSON_PROPERTY_BANK_NAME, required = true) String bankName, - @JsonProperty(value = JSON_PROPERTY_BANK_CODE, required = true) String bankCode) { - this.type = type; - this.accountNumber = accountNumber; - this.bankName = bankName; - this.bankCode = bankCode; - } - - public ExternalAccountLocalBankAfrica type( - @jakarta.annotation.Nonnull ExternalAccountLocalBankAfricaType type) { - this.type = type; + public ExternalAccountLocalBankAfrica successRedirectUrl( + @jakarta.annotation.Nullable String successRedirectUrl) { + this.successRedirectUrl = successRedirectUrl; return this; } /** - * Get type + * URL to redirect the end user back to after they complete the payment on the bank/mobile + * provider page (e.g., the merchant checkout page) * - * @return type + * @return successRedirectUrl */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ExternalAccountLocalBankAfricaType getType() { - return type; - } - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(@jakarta.annotation.Nonnull ExternalAccountLocalBankAfricaType type) { - this.type = type; + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUCCESS_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSuccessRedirectUrl() { + return successRedirectUrl; } - public ExternalAccountLocalBankAfrica accountNumber( - @jakarta.annotation.Nonnull String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - /** - * Get accountNumber - * - * @return accountNumber - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getAccountNumber() { - return accountNumber; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAccountNumber(@jakarta.annotation.Nonnull String accountNumber) { - this.accountNumber = accountNumber; - } - - public ExternalAccountLocalBankAfrica bankName(@jakarta.annotation.Nonnull String bankName) { - this.bankName = bankName; - return this; - } - - /** - * Name of the bank - * - * @return bankName - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_BANK_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getBankName() { - return bankName; - } - - @JsonProperty(JSON_PROPERTY_BANK_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBankName(@jakarta.annotation.Nonnull String bankName) { - this.bankName = bankName; - } - - public ExternalAccountLocalBankAfrica bankCode(@jakarta.annotation.Nonnull String bankCode) { - this.bankCode = bankCode; - return this; - } - - /** - * Internal bank identifier - * - * @return bankCode - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_BANK_CODE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getBankCode() { - return bankCode; - } - - @JsonProperty(JSON_PROPERTY_BANK_CODE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBankCode(@jakarta.annotation.Nonnull String bankCode) { - this.bankCode = bankCode; + @JsonProperty(JSON_PROPERTY_SUCCESS_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSuccessRedirectUrl(@jakarta.annotation.Nullable String successRedirectUrl) { + this.successRedirectUrl = successRedirectUrl; } /** Return true if this ExternalAccountLocalBankAfrica object is equal to o. */ @@ -165,25 +67,22 @@ public boolean equals(Object o) { } ExternalAccountLocalBankAfrica externalAccountLocalBankAfrica = (ExternalAccountLocalBankAfrica) o; - return Objects.equals(this.type, externalAccountLocalBankAfrica.type) - && Objects.equals(this.accountNumber, externalAccountLocalBankAfrica.accountNumber) - && Objects.equals(this.bankName, externalAccountLocalBankAfrica.bankName) - && Objects.equals(this.bankCode, externalAccountLocalBankAfrica.bankCode); + return Objects.equals( + this.successRedirectUrl, externalAccountLocalBankAfrica.successRedirectUrl); } @Override public int hashCode() { - return Objects.hash(type, accountNumber, bankName, bankCode); + return Objects.hash(successRedirectUrl); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ExternalAccountLocalBankAfrica {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); - sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n"); - sb.append(" bankCode: ").append(toIndentedString(bankCode)).append("\n"); + sb.append(" successRedirectUrl: ") + .append(toIndentedString(successRedirectUrl)) + .append("\n"); sb.append("}"); return sb.toString(); } @@ -231,44 +130,14 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `type` to the URL query string - if (getType() != null) { - joiner.add( - String.format( - "%stype%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getType())))); - } - - // add `accountNumber` to the URL query string - if (getAccountNumber() != null) { - joiner.add( - String.format( - "%saccountNumber%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getAccountNumber())))); - } - - // add `bankName` to the URL query string - if (getBankName() != null) { - joiner.add( - String.format( - "%sbankName%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getBankName())))); - } - - // add `bankCode` to the URL query string - if (getBankCode() != null) { + // add `successRedirectUrl` to the URL query string + if (getSuccessRedirectUrl() != null) { joiner.add( String.format( - "%sbankCode%s=%s", + "%ssuccessRedirectUrl%s=%s", prefix, suffix, - ApiClient.urlEncode(ApiClient.valueToString(getBankCode())))); + ApiClient.urlEncode(ApiClient.valueToString(getSuccessRedirectUrl())))); } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/ExternalAccountLocalBankAfricaType.java b/src/main/java/com/fireblocks/sdk/model/ExternalAccountLocalBankAfricaType.java deleted file mode 100644 index 20d12353..00000000 --- a/src/main/java/com/fireblocks/sdk/model/ExternalAccountLocalBankAfricaType.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Fireblocks API - * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: developers@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.model; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Gets or Sets ExternalAccountLocalBankAfricaType */ -public enum ExternalAccountLocalBankAfricaType { - LOCAL_BANK_AFRICA_RAIL("LOCAL_BANK_AFRICA_RAIL"); - - private String value; - - ExternalAccountLocalBankAfricaType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ExternalAccountLocalBankAfricaType fromValue(String value) { - for (ExternalAccountLocalBankAfricaType b : ExternalAccountLocalBankAfricaType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - - /** - * Convert the instance into URL query string. - * - * @param prefix prefix of the query string - * @return URL query string - */ - public String toUrlQueryString(String prefix) { - if (prefix == null) { - prefix = ""; - } - - return String.format("%s=%s", prefix, this.toString()); - } -} diff --git a/src/main/java/com/fireblocks/sdk/model/ExternalAccountMobileMoney.java b/src/main/java/com/fireblocks/sdk/model/ExternalAccountMobileMoney.java index 515d0875..0ba6f794 100644 --- a/src/main/java/com/fireblocks/sdk/model/ExternalAccountMobileMoney.java +++ b/src/main/java/com/fireblocks/sdk/model/ExternalAccountMobileMoney.java @@ -26,7 +26,8 @@ ExternalAccountMobileMoney.JSON_PROPERTY_TYPE, ExternalAccountMobileMoney.JSON_PROPERTY_MOBILE_PHONE_NUMBER, ExternalAccountMobileMoney.JSON_PROPERTY_PROVIDER, - ExternalAccountMobileMoney.JSON_PROPERTY_EMAIL + ExternalAccountMobileMoney.JSON_PROPERTY_EMAIL, + ExternalAccountMobileMoney.JSON_PROPERTY_SUCCESS_REDIRECT_URL }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -44,6 +45,9 @@ public class ExternalAccountMobileMoney { public static final String JSON_PROPERTY_EMAIL = "email"; @jakarta.annotation.Nonnull private String email; + public static final String JSON_PROPERTY_SUCCESS_REDIRECT_URL = "successRedirectUrl"; + @jakarta.annotation.Nullable private String successRedirectUrl; + public ExternalAccountMobileMoney() {} @JsonCreator @@ -157,6 +161,31 @@ public void setEmail(@jakarta.annotation.Nonnull String email) { this.email = email; } + public ExternalAccountMobileMoney successRedirectUrl( + @jakarta.annotation.Nullable String successRedirectUrl) { + this.successRedirectUrl = successRedirectUrl; + return this; + } + + /** + * URL to redirect the end user back to after they complete the payment on the bank/mobile + * provider page (e.g., the merchant checkout page) + * + * @return successRedirectUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUCCESS_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSuccessRedirectUrl() { + return successRedirectUrl; + } + + @JsonProperty(JSON_PROPERTY_SUCCESS_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSuccessRedirectUrl(@jakarta.annotation.Nullable String successRedirectUrl) { + this.successRedirectUrl = successRedirectUrl; + } + /** Return true if this ExternalAccountMobileMoney object is equal to o. */ @Override public boolean equals(Object o) { @@ -171,12 +200,14 @@ public boolean equals(Object o) { && Objects.equals( this.mobilePhoneNumber, externalAccountMobileMoney.mobilePhoneNumber) && Objects.equals(this.provider, externalAccountMobileMoney.provider) - && Objects.equals(this.email, externalAccountMobileMoney.email); + && Objects.equals(this.email, externalAccountMobileMoney.email) + && Objects.equals( + this.successRedirectUrl, externalAccountMobileMoney.successRedirectUrl); } @Override public int hashCode() { - return Objects.hash(type, mobilePhoneNumber, provider, email); + return Objects.hash(type, mobilePhoneNumber, provider, email, successRedirectUrl); } @Override @@ -189,6 +220,9 @@ public String toString() { .append("\n"); sb.append(" provider: ").append(toIndentedString(provider)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" successRedirectUrl: ") + .append(toIndentedString(successRedirectUrl)) + .append("\n"); sb.append("}"); return sb.toString(); } @@ -276,6 +310,16 @@ public String toUrlQueryString(String prefix) { ApiClient.urlEncode(ApiClient.valueToString(getEmail())))); } + // add `successRedirectUrl` to the URL query string + if (getSuccessRedirectUrl() != null) { + joiner.add( + String.format( + "%ssuccessRedirectUrl%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSuccessRedirectUrl())))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/ExtraParameters.java b/src/main/java/com/fireblocks/sdk/model/ExtraParameters.java new file mode 100644 index 00000000..c05a83f0 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ExtraParameters.java @@ -0,0 +1,535 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.StringJoiner; + +/** + * Additional protocol / operation specific key-value parameters: For UTXO-based blockchain input + * selection, add the key `inputsSelection` with the value set to 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) + * **Note:** `rawMessageData`, `contractCallData`, and + * `inputsSelection` cannot be used together in the same call. + */ +@JsonPropertyOrder({ + ExtraParameters.JSON_PROPERTY_NODE_CONTROLS, + ExtraParameters.JSON_PROPERTY_RAW_MESSAGE_DATA, + ExtraParameters.JSON_PROPERTY_CONTRACT_CALL_DATA, + ExtraParameters.JSON_PROPERTY_PROGRAM_CALL_DATA, + ExtraParameters.JSON_PROPERTY_INPUTS_SELECTION, + ExtraParameters.JSON_PROPERTY_ALLOW_BASE_ASSET_ADDRESS, + ExtraParameters.JSON_PROPERTY_PII_DATA +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ExtraParameters extends HashMap { + public static final String JSON_PROPERTY_NODE_CONTROLS = "nodeControls"; + @jakarta.annotation.Nullable private Map nodeControls; + + public static final String JSON_PROPERTY_RAW_MESSAGE_DATA = "rawMessageData"; + @jakarta.annotation.Nullable private Map rawMessageData; + + public static final String JSON_PROPERTY_CONTRACT_CALL_DATA = "contractCallData"; + @jakarta.annotation.Nullable private String contractCallData; + + public static final String JSON_PROPERTY_PROGRAM_CALL_DATA = "programCallData"; + @jakarta.annotation.Nullable private String programCallData; + + public static final String JSON_PROPERTY_INPUTS_SELECTION = "inputsSelection"; + @jakarta.annotation.Nullable private Map inputsSelection; + + public static final String JSON_PROPERTY_ALLOW_BASE_ASSET_ADDRESS = "allowBaseAssetAddress"; + @jakarta.annotation.Nullable private Boolean allowBaseAssetAddress; + + public static final String JSON_PROPERTY_PII_DATA = "piiData"; + @jakarta.annotation.Nullable private Map piiData; + + public ExtraParameters() {} + + public ExtraParameters nodeControls( + @jakarta.annotation.Nullable Map nodeControls) { + this.nodeControls = nodeControls; + return this; + } + + public ExtraParameters putNodeControlsItem(String key, Object nodeControlsItem) { + if (this.nodeControls == null) { + this.nodeControls = new HashMap<>(); + } + this.nodeControls.put(key, nodeControlsItem); + return this; + } + + /** + * Get nodeControls + * + * @return nodeControls + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NODE_CONTROLS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getNodeControls() { + return nodeControls; + } + + @JsonProperty(JSON_PROPERTY_NODE_CONTROLS) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setNodeControls(@jakarta.annotation.Nullable Map nodeControls) { + this.nodeControls = nodeControls; + } + + public ExtraParameters rawMessageData( + @jakarta.annotation.Nullable Map rawMessageData) { + this.rawMessageData = rawMessageData; + return this; + } + + public ExtraParameters putRawMessageDataItem(String key, Object rawMessageDataItem) { + if (this.rawMessageData == null) { + this.rawMessageData = new HashMap<>(); + } + this.rawMessageData.put(key, rawMessageDataItem); + return this; + } + + /** + * Get rawMessageData + * + * @return rawMessageData + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RAW_MESSAGE_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getRawMessageData() { + return rawMessageData; + } + + @JsonProperty(JSON_PROPERTY_RAW_MESSAGE_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setRawMessageData(@jakarta.annotation.Nullable Map rawMessageData) { + this.rawMessageData = rawMessageData; + } + + public ExtraParameters contractCallData(@jakarta.annotation.Nullable String contractCallData) { + this.contractCallData = contractCallData; + return this; + } + + /** + * Get contractCallData + * + * @return contractCallData + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTRACT_CALL_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getContractCallData() { + return contractCallData; + } + + @JsonProperty(JSON_PROPERTY_CONTRACT_CALL_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContractCallData(@jakarta.annotation.Nullable String contractCallData) { + this.contractCallData = contractCallData; + } + + public ExtraParameters programCallData(@jakarta.annotation.Nullable String programCallData) { + this.programCallData = programCallData; + return this; + } + + /** + * Get programCallData + * + * @return programCallData + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROGRAM_CALL_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProgramCallData() { + return programCallData; + } + + @JsonProperty(JSON_PROPERTY_PROGRAM_CALL_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProgramCallData(@jakarta.annotation.Nullable String programCallData) { + this.programCallData = programCallData; + } + + public ExtraParameters inputsSelection( + @jakarta.annotation.Nullable Map inputsSelection) { + this.inputsSelection = inputsSelection; + return this; + } + + public ExtraParameters putInputsSelectionItem(String key, Object inputsSelectionItem) { + if (this.inputsSelection == null) { + this.inputsSelection = new HashMap<>(); + } + this.inputsSelection.put(key, inputsSelectionItem); + return this; + } + + /** + * Get inputsSelection + * + * @return inputsSelection + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUTS_SELECTION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getInputsSelection() { + return inputsSelection; + } + + @JsonProperty(JSON_PROPERTY_INPUTS_SELECTION) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setInputsSelection( + @jakarta.annotation.Nullable Map inputsSelection) { + this.inputsSelection = inputsSelection; + } + + public ExtraParameters allowBaseAssetAddress( + @jakarta.annotation.Nullable Boolean allowBaseAssetAddress) { + this.allowBaseAssetAddress = allowBaseAssetAddress; + return this; + } + + /** + * Get allowBaseAssetAddress + * + * @return allowBaseAssetAddress + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALLOW_BASE_ASSET_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAllowBaseAssetAddress() { + return allowBaseAssetAddress; + } + + @JsonProperty(JSON_PROPERTY_ALLOW_BASE_ASSET_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAllowBaseAssetAddress( + @jakarta.annotation.Nullable Boolean allowBaseAssetAddress) { + this.allowBaseAssetAddress = allowBaseAssetAddress; + } + + public ExtraParameters piiData(@jakarta.annotation.Nullable Map piiData) { + this.piiData = piiData; + return this; + } + + public ExtraParameters putPiiDataItem(String key, Object piiDataItem) { + if (this.piiData == null) { + this.piiData = new HashMap<>(); + } + this.piiData.put(key, piiDataItem); + return this; + } + + /** + * Get piiData + * + * @return piiData + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PII_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public Map getPiiData() { + return piiData; + } + + @JsonProperty(JSON_PROPERTY_PII_DATA) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setPiiData(@jakarta.annotation.Nullable Map piiData) { + this.piiData = piiData; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public ExtraParameters putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ExtraParameters object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExtraParameters extraParameters = (ExtraParameters) o; + return Objects.equals(this.nodeControls, extraParameters.nodeControls) + && Objects.equals(this.rawMessageData, extraParameters.rawMessageData) + && Objects.equals(this.contractCallData, extraParameters.contractCallData) + && Objects.equals(this.programCallData, extraParameters.programCallData) + && Objects.equals(this.inputsSelection, extraParameters.inputsSelection) + && Objects.equals(this.allowBaseAssetAddress, extraParameters.allowBaseAssetAddress) + && Objects.equals(this.piiData, extraParameters.piiData) + && Objects.equals(this.additionalProperties, extraParameters.additionalProperties) + && super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash( + nodeControls, + rawMessageData, + contractCallData, + programCallData, + inputsSelection, + allowBaseAssetAddress, + piiData, + super.hashCode(), + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExtraParameters {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" nodeControls: ").append(toIndentedString(nodeControls)).append("\n"); + sb.append(" rawMessageData: ").append(toIndentedString(rawMessageData)).append("\n"); + sb.append(" contractCallData: ").append(toIndentedString(contractCallData)).append("\n"); + sb.append(" programCallData: ").append(toIndentedString(programCallData)).append("\n"); + sb.append(" inputsSelection: ").append(toIndentedString(inputsSelection)).append("\n"); + sb.append(" allowBaseAssetAddress: ") + .append(toIndentedString(allowBaseAssetAddress)) + .append("\n"); + sb.append(" piiData: ").append(toIndentedString(piiData)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .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 `nodeControls` to the URL query string + if (getNodeControls() != null) { + for (String _key : getNodeControls().keySet()) { + joiner.add( + String.format( + "%snodeControls%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getNodeControls().get(_key), + ApiClient.urlEncode( + ApiClient.valueToString(getNodeControls().get(_key))))); + } + } + + // add `rawMessageData` to the URL query string + if (getRawMessageData() != null) { + for (String _key : getRawMessageData().keySet()) { + joiner.add( + String.format( + "%srawMessageData%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getRawMessageData().get(_key), + ApiClient.urlEncode( + ApiClient.valueToString(getRawMessageData().get(_key))))); + } + } + + // add `contractCallData` to the URL query string + if (getContractCallData() != null) { + joiner.add( + String.format( + "%scontractCallData%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getContractCallData())))); + } + + // add `programCallData` to the URL query string + if (getProgramCallData() != null) { + joiner.add( + String.format( + "%sprogramCallData%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getProgramCallData())))); + } + + // add `inputsSelection` to the URL query string + if (getInputsSelection() != null) { + for (String _key : getInputsSelection().keySet()) { + joiner.add( + String.format( + "%sinputsSelection%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getInputsSelection().get(_key), + ApiClient.urlEncode( + ApiClient.valueToString(getInputsSelection().get(_key))))); + } + } + + // add `allowBaseAssetAddress` to the URL query string + if (getAllowBaseAssetAddress() != null) { + joiner.add( + String.format( + "%sallowBaseAssetAddress%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getAllowBaseAssetAddress())))); + } + + // add `piiData` to the URL query string + if (getPiiData() != null) { + for (String _key : getPiiData().keySet()) { + joiner.add( + String.format( + "%spiiData%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, _key, containerSuffix), + getPiiData().get(_key), + ApiClient.urlEncode( + ApiClient.valueToString(getPiiData().get(_key))))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/FiatDestination.java b/src/main/java/com/fireblocks/sdk/model/FiatDestination.java index 6c2bb4d0..c219fce3 100644 --- a/src/main/java/com/fireblocks/sdk/model/FiatDestination.java +++ b/src/main/java/com/fireblocks/sdk/model/FiatDestination.java @@ -120,6 +120,48 @@ public FiatDestination deserialize(JsonParser jp, DeserializationContext ctxt) log.log(Level.FINER, "Input data does not match schema 'AchDestination'", e); } + // deserialize ChapsDestination + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ChapsDestination.class.equals(Integer.class) + || ChapsDestination.class.equals(Long.class) + || ChapsDestination.class.equals(Float.class) + || ChapsDestination.class.equals(Double.class) + || ChapsDestination.class.equals(Boolean.class) + || ChapsDestination.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ChapsDestination.class.equals(Integer.class) + || ChapsDestination.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ChapsDestination.class.equals(Float.class) + || ChapsDestination.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (ChapsDestination.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ChapsDestination.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ChapsDestination.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 'ChapsDestination'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ChapsDestination'", e); + } + // deserialize EuropeanSEPADestination try { boolean attemptParsing = true; @@ -209,6 +251,98 @@ public FiatDestination deserialize(JsonParser jp, DeserializationContext ctxt) log.log(Level.FINER, "Input data does not match schema 'IbanDestination'", e); } + // deserialize InteracDestination + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (InteracDestination.class.equals(Integer.class) + || InteracDestination.class.equals(Long.class) + || InteracDestination.class.equals(Float.class) + || InteracDestination.class.equals(Double.class) + || InteracDestination.class.equals(Boolean.class) + || InteracDestination.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((InteracDestination.class.equals(Integer.class) + || InteracDestination.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((InteracDestination.class.equals(Float.class) + || InteracDestination.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (InteracDestination.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (InteracDestination.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(InteracDestination.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 'InteracDestination'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'InteracDestination'", e); + } + + // deserialize InternalTransferDestination + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (InternalTransferDestination.class.equals(Integer.class) + || InternalTransferDestination.class.equals(Long.class) + || InternalTransferDestination.class.equals(Float.class) + || InternalTransferDestination.class.equals(Double.class) + || InternalTransferDestination.class.equals(Boolean.class) + || InternalTransferDestination.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((InternalTransferDestination.class.equals(Integer.class) + || InternalTransferDestination.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((InternalTransferDestination.class.equals(Float.class) + || InternalTransferDestination.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (InternalTransferDestination.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (InternalTransferDestination.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(InternalTransferDestination.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 'InternalTransferDestination'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'InternalTransferDestination'", + e); + } + // deserialize LocalBankTransferAfricaDestination try { boolean attemptParsing = true; @@ -307,6 +441,48 @@ public FiatDestination deserialize(JsonParser jp, DeserializationContext ctxt) e); } + // deserialize PayidDestination + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PayidDestination.class.equals(Integer.class) + || PayidDestination.class.equals(Long.class) + || PayidDestination.class.equals(Float.class) + || PayidDestination.class.equals(Double.class) + || PayidDestination.class.equals(Boolean.class) + || PayidDestination.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((PayidDestination.class.equals(Integer.class) + || PayidDestination.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((PayidDestination.class.equals(Float.class) + || PayidDestination.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (PayidDestination.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (PayidDestination.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PayidDestination.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 'PayidDestination'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PayidDestination'", e); + } + // deserialize PixDestination try { boolean attemptParsing = true; @@ -550,6 +726,11 @@ public FiatDestination(AchDestination o) { setActualInstance(o); } + public FiatDestination(ChapsDestination o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public FiatDestination(EuropeanSEPADestination o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -560,6 +741,16 @@ public FiatDestination(IbanDestination o) { setActualInstance(o); } + public FiatDestination(InteracDestination o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public FiatDestination(InternalTransferDestination o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public FiatDestination(LocalBankTransferAfricaDestination o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -570,6 +761,11 @@ public FiatDestination(MobileMoneyDestination o) { setActualInstance(o); } + public FiatDestination(PayidDestination o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public FiatDestination(PixDestination o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -597,10 +793,14 @@ public FiatDestination(USWireDestination o) { static { schemas.put("AchDestination", AchDestination.class); + schemas.put("ChapsDestination", ChapsDestination.class); schemas.put("EuropeanSEPADestination", EuropeanSEPADestination.class); schemas.put("IbanDestination", IbanDestination.class); + schemas.put("InteracDestination", InteracDestination.class); + schemas.put("InternalTransferDestination", InternalTransferDestination.class); schemas.put("LocalBankTransferAfricaDestination", LocalBankTransferAfricaDestination.class); schemas.put("MobileMoneyDestination", MobileMoneyDestination.class); + schemas.put("PayidDestination", PayidDestination.class); schemas.put("PixDestination", PixDestination.class); schemas.put("SEPADestination", SEPADestination.class); schemas.put("SpeiDestination", SpeiDestination.class); @@ -616,9 +816,10 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: AchDestination, EuropeanSEPADestination, IbanDestination, - * LocalBankTransferAfricaDestination, MobileMoneyDestination, PixDestination, SEPADestination, - * SpeiDestination, SwiftDestination, USWireDestination + * against the oneOf child schemas: AchDestination, ChapsDestination, EuropeanSEPADestination, + * IbanDestination, InteracDestination, InternalTransferDestination, + * LocalBankTransferAfricaDestination, MobileMoneyDestination, PayidDestination, PixDestination, + * SEPADestination, SpeiDestination, SwiftDestination, USWireDestination * *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be * a composed schema (allOf, anyOf, oneOf). @@ -630,6 +831,11 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(ChapsDestination.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(EuropeanSEPADestination.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -640,6 +846,17 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(InteracDestination.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + InternalTransferDestination.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( LocalBankTransferAfricaDestination.class, instance, new HashSet>())) { super.setActualInstance(instance); @@ -651,6 +868,11 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(PayidDestination.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(PixDestination.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -677,20 +899,23 @@ public void setActualInstance(Object instance) { } throw new RuntimeException( - "Invalid instance type. Must be AchDestination, EuropeanSEPADestination," - + " IbanDestination, LocalBankTransferAfricaDestination," - + " MobileMoneyDestination, PixDestination, SEPADestination, SpeiDestination," - + " SwiftDestination, USWireDestination"); + "Invalid instance type. Must be AchDestination, ChapsDestination," + + " EuropeanSEPADestination, IbanDestination, InteracDestination," + + " InternalTransferDestination, LocalBankTransferAfricaDestination," + + " MobileMoneyDestination, PayidDestination, PixDestination, SEPADestination," + + " SpeiDestination, SwiftDestination, USWireDestination"); } /** - * Get the actual instance, which can be the following: AchDestination, EuropeanSEPADestination, - * IbanDestination, LocalBankTransferAfricaDestination, MobileMoneyDestination, PixDestination, + * Get the actual instance, which can be the following: AchDestination, ChapsDestination, + * EuropeanSEPADestination, IbanDestination, InteracDestination, InternalTransferDestination, + * LocalBankTransferAfricaDestination, MobileMoneyDestination, PayidDestination, PixDestination, * SEPADestination, SpeiDestination, SwiftDestination, USWireDestination * - * @return The actual instance (AchDestination, EuropeanSEPADestination, IbanDestination, - * LocalBankTransferAfricaDestination, MobileMoneyDestination, PixDestination, - * SEPADestination, SpeiDestination, SwiftDestination, USWireDestination) + * @return The actual instance (AchDestination, ChapsDestination, EuropeanSEPADestination, + * IbanDestination, InteracDestination, InternalTransferDestination, + * LocalBankTransferAfricaDestination, MobileMoneyDestination, PayidDestination, + * PixDestination, SEPADestination, SpeiDestination, SwiftDestination, USWireDestination) */ @Override public Object getActualInstance() { @@ -708,6 +933,17 @@ public AchDestination getAchDestination() throws ClassCastException { return (AchDestination) super.getActualInstance(); } + /** + * Get the actual instance of `ChapsDestination`. If the actual instance is not + * `ChapsDestination`, the ClassCastException will be thrown. + * + * @return The actual instance of `ChapsDestination` + * @throws ClassCastException if the instance is not `ChapsDestination` + */ + public ChapsDestination getChapsDestination() throws ClassCastException { + return (ChapsDestination) super.getActualInstance(); + } + /** * Get the actual instance of `EuropeanSEPADestination`. If the actual instance is not * `EuropeanSEPADestination`, the ClassCastException will be thrown. @@ -730,6 +966,28 @@ public IbanDestination getIbanDestination() throws ClassCastException { return (IbanDestination) super.getActualInstance(); } + /** + * Get the actual instance of `InteracDestination`. If the actual instance is not + * `InteracDestination`, the ClassCastException will be thrown. + * + * @return The actual instance of `InteracDestination` + * @throws ClassCastException if the instance is not `InteracDestination` + */ + public InteracDestination getInteracDestination() throws ClassCastException { + return (InteracDestination) super.getActualInstance(); + } + + /** + * Get the actual instance of `InternalTransferDestination`. If the actual instance is not + * `InternalTransferDestination`, the ClassCastException will be thrown. + * + * @return The actual instance of `InternalTransferDestination` + * @throws ClassCastException if the instance is not `InternalTransferDestination` + */ + public InternalTransferDestination getInternalTransferDestination() throws ClassCastException { + return (InternalTransferDestination) super.getActualInstance(); + } + /** * Get the actual instance of `LocalBankTransferAfricaDestination`. If the actual instance is * not `LocalBankTransferAfricaDestination`, the ClassCastException will be thrown. @@ -753,6 +1011,17 @@ public MobileMoneyDestination getMobileMoneyDestination() throws ClassCastExcept return (MobileMoneyDestination) super.getActualInstance(); } + /** + * Get the actual instance of `PayidDestination`. If the actual instance is not + * `PayidDestination`, the ClassCastException will be thrown. + * + * @return The actual instance of `PayidDestination` + * @throws ClassCastException if the instance is not `PayidDestination` + */ + public PayidDestination getPayidDestination() throws ClassCastException { + return (PayidDestination) super.getActualInstance(); + } + /** * Get the actual instance of `PixDestination`. If the actual instance is not `PixDestination`, * the ClassCastException will be thrown. @@ -920,6 +1189,38 @@ public String toUrlQueryString(String prefix) { } return joiner.toString(); } + if (getActualInstance() instanceof ChapsDestination) { + if (getActualInstance() != null) { + joiner.add( + ((ChapsDestination) getActualInstance()) + .toUrlQueryString(prefix + "one_of_10" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof InteracDestination) { + if (getActualInstance() != null) { + joiner.add( + ((InteracDestination) getActualInstance()) + .toUrlQueryString(prefix + "one_of_11" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof PayidDestination) { + if (getActualInstance() != null) { + joiner.add( + ((PayidDestination) getActualInstance()) + .toUrlQueryString(prefix + "one_of_12" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof InternalTransferDestination) { + if (getActualInstance() != null) { + joiner.add( + ((InternalTransferDestination) getActualInstance()) + .toUrlQueryString(prefix + "one_of_13" + suffix)); + } + return joiner.toString(); + } return null; } } diff --git a/src/main/java/com/fireblocks/sdk/model/InteracAddress.java b/src/main/java/com/fireblocks/sdk/model/InteracAddress.java new file mode 100644 index 00000000..f5a107fd --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/InteracAddress.java @@ -0,0 +1,222 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** InteracAddress */ +@JsonPropertyOrder({ + InteracAddress.JSON_PROPERTY_ACCOUNT_HOLDER, + InteracAddress.JSON_PROPERTY_RECIPIENT_HANDLE, + InteracAddress.JSON_PROPERTY_MESSAGE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class InteracAddress { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER = "accountHolder"; + @jakarta.annotation.Nonnull private AccountHolderDetails accountHolder; + + public static final String JSON_PROPERTY_RECIPIENT_HANDLE = "recipientHandle"; + @jakarta.annotation.Nonnull private RecipientHandle recipientHandle; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nullable private String message; + + public InteracAddress() {} + + @JsonCreator + public InteracAddress( + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_HOLDER, required = true) + AccountHolderDetails accountHolder, + @JsonProperty(value = JSON_PROPERTY_RECIPIENT_HANDLE, required = true) + RecipientHandle recipientHandle) { + this.accountHolder = accountHolder; + this.recipientHandle = recipientHandle; + } + + public InteracAddress accountHolder( + @jakarta.annotation.Nonnull AccountHolderDetails accountHolder) { + this.accountHolder = accountHolder; + return this; + } + + /** + * Get accountHolder + * + * @return accountHolder + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AccountHolderDetails getAccountHolder() { + return accountHolder; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountHolder(@jakarta.annotation.Nonnull AccountHolderDetails accountHolder) { + this.accountHolder = accountHolder; + } + + public InteracAddress recipientHandle( + @jakarta.annotation.Nonnull RecipientHandle recipientHandle) { + this.recipientHandle = recipientHandle; + return this; + } + + /** + * Get recipientHandle + * + * @return recipientHandle + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECIPIENT_HANDLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RecipientHandle getRecipientHandle() { + return recipientHandle; + } + + @JsonProperty(JSON_PROPERTY_RECIPIENT_HANDLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRecipientHandle(@jakarta.annotation.Nonnull RecipientHandle recipientHandle) { + this.recipientHandle = recipientHandle; + } + + public InteracAddress message(@jakarta.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * The message to be sent to the recipient + * + * @return message + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMessage(@jakarta.annotation.Nullable String message) { + this.message = message; + } + + /** Return true if this InteracAddress object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InteracAddress interacAddress = (InteracAddress) o; + return Objects.equals(this.accountHolder, interacAddress.accountHolder) + && Objects.equals(this.recipientHandle, interacAddress.recipientHandle) + && Objects.equals(this.message, interacAddress.message); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolder, recipientHandle, message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InteracAddress {\n"); + sb.append(" accountHolder: ").append(toIndentedString(accountHolder)).append("\n"); + sb.append(" recipientHandle: ").append(toIndentedString(recipientHandle)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).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 `accountHolder` to the URL query string + if (getAccountHolder() != null) { + joiner.add(getAccountHolder().toUrlQueryString(prefix + "accountHolder" + suffix)); + } + + // add `recipientHandle` to the URL query string + if (getRecipientHandle() != null) { + joiner.add(getRecipientHandle().toUrlQueryString(prefix + "recipientHandle" + suffix)); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/InteracDestination.java b/src/main/java/com/fireblocks/sdk/model/InteracDestination.java new file mode 100644 index 00000000..398de95c --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/InteracDestination.java @@ -0,0 +1,216 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** InteracDestination */ +@JsonPropertyOrder({ + InteracDestination.JSON_PROPERTY_TYPE, + InteracDestination.JSON_PROPERTY_ADDRESS +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class InteracDestination { + /** Gets or Sets type */ + public enum TypeEnum { + INTERAC(String.valueOf("INTERAC")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private TypeEnum type; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + @jakarta.annotation.Nonnull private InteracAddress address; + + public InteracDestination() {} + + @JsonCreator + public InteracDestination( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_ADDRESS, required = true) InteracAddress address) { + this.type = type; + this.address = address; + } + + public InteracDestination type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public InteracDestination address(@jakarta.annotation.Nonnull InteracAddress address) { + this.address = address; + return this; + } + + /** + * Get address + * + * @return address + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public InteracAddress getAddress() { + return address; + } + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(@jakarta.annotation.Nonnull InteracAddress address) { + this.address = address; + } + + /** Return true if this InteracDestination object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InteracDestination interacDestination = (InteracDestination) o; + return Objects.equals(this.type, interacDestination.type) + && Objects.equals(this.address, interacDestination.address); + } + + @Override + public int hashCode() { + return Objects.hash(type, address); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InteracDestination {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/InteracPaymentInfo.java b/src/main/java/com/fireblocks/sdk/model/InteracPaymentInfo.java new file mode 100644 index 00000000..62b75168 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/InteracPaymentInfo.java @@ -0,0 +1,565 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** Interac e-Transfer payment information for Canadian dollar transfers */ +@JsonPropertyOrder({ + InteracPaymentInfo.JSON_PROPERTY_RAIL, + InteracPaymentInfo.JSON_PROPERTY_ADDRESSING_SYSTEM, + InteracPaymentInfo.JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME, + InteracPaymentInfo.JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME, + InteracPaymentInfo.JSON_PROPERTY_COUNTRY, + InteracPaymentInfo.JSON_PROPERTY_RECIPIENT_HANDLE_TYPE, + InteracPaymentInfo.JSON_PROPERTY_RECIPIENT_HANDLE_VALUE, + InteracPaymentInfo.JSON_PROPERTY_MESSAGE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class InteracPaymentInfo { + /** The payment rail type for Interac transfers */ + public enum RailEnum { + INTERAC(String.valueOf("INTERAC")); + + private String value; + + RailEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RailEnum fromValue(String value) { + for (RailEnum b : RailEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RAIL = "rail"; + @jakarta.annotation.Nonnull private RailEnum rail; + + /** The addressing system used for Interac transfers */ + public enum AddressingSystemEnum { + INTERAC(String.valueOf("INTERAC")); + + private String value; + + AddressingSystemEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AddressingSystemEnum fromValue(String value) { + for (AddressingSystemEnum b : AddressingSystemEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ADDRESSING_SYSTEM = "addressingSystem"; + @jakarta.annotation.Nonnull private AddressingSystemEnum addressingSystem; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME = "accountHolderGivenName"; + @jakarta.annotation.Nonnull private String accountHolderGivenName; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME = "accountHolderSurname"; + @jakarta.annotation.Nonnull private String accountHolderSurname; + + public static final String JSON_PROPERTY_COUNTRY = "country"; + @jakarta.annotation.Nonnull private String country; + + /** The type of recipient handler being used */ + public enum RecipientHandleTypeEnum { + EMAIL(String.valueOf("EMAIL")); + + private String value; + + RecipientHandleTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RecipientHandleTypeEnum fromValue(String value) { + for (RecipientHandleTypeEnum b : RecipientHandleTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RECIPIENT_HANDLE_TYPE = "recipientHandleType"; + @jakarta.annotation.Nonnull private RecipientHandleTypeEnum recipientHandleType; + + public static final String JSON_PROPERTY_RECIPIENT_HANDLE_VALUE = "recipientHandleValue"; + @jakarta.annotation.Nonnull private String recipientHandleValue; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + @jakarta.annotation.Nonnull private String message; + + public InteracPaymentInfo() {} + + @JsonCreator + public InteracPaymentInfo( + @JsonProperty(value = JSON_PROPERTY_RAIL, required = true) RailEnum rail, + @JsonProperty(value = JSON_PROPERTY_ADDRESSING_SYSTEM, required = true) + AddressingSystemEnum addressingSystem, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME, required = true) + String accountHolderGivenName, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME, required = true) + String accountHolderSurname, + @JsonProperty(value = JSON_PROPERTY_COUNTRY, required = true) String country, + @JsonProperty(value = JSON_PROPERTY_RECIPIENT_HANDLE_TYPE, required = true) + RecipientHandleTypeEnum recipientHandleType, + @JsonProperty(value = JSON_PROPERTY_RECIPIENT_HANDLE_VALUE, required = true) + String recipientHandleValue, + @JsonProperty(value = JSON_PROPERTY_MESSAGE, required = true) String message) { + this.rail = rail; + this.addressingSystem = addressingSystem; + this.accountHolderGivenName = accountHolderGivenName; + this.accountHolderSurname = accountHolderSurname; + this.country = country; + this.recipientHandleType = recipientHandleType; + this.recipientHandleValue = recipientHandleValue; + this.message = message; + } + + public InteracPaymentInfo rail(@jakarta.annotation.Nonnull RailEnum rail) { + this.rail = rail; + return this; + } + + /** + * The payment rail type for Interac transfers + * + * @return rail + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RailEnum getRail() { + return rail; + } + + @JsonProperty(JSON_PROPERTY_RAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRail(@jakarta.annotation.Nonnull RailEnum rail) { + this.rail = rail; + } + + public InteracPaymentInfo addressingSystem( + @jakarta.annotation.Nonnull AddressingSystemEnum addressingSystem) { + this.addressingSystem = addressingSystem; + return this; + } + + /** + * The addressing system used for Interac transfers + * + * @return addressingSystem + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESSING_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AddressingSystemEnum getAddressingSystem() { + return addressingSystem; + } + + @JsonProperty(JSON_PROPERTY_ADDRESSING_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddressingSystem( + @jakarta.annotation.Nonnull AddressingSystemEnum addressingSystem) { + this.addressingSystem = addressingSystem; + } + + public InteracPaymentInfo accountHolderGivenName( + @jakarta.annotation.Nonnull String accountHolderGivenName) { + this.accountHolderGivenName = accountHolderGivenName; + return this; + } + + /** + * The given name (first name) of the account holder + * + * @return accountHolderGivenName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountHolderGivenName() { + return accountHolderGivenName; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountHolderGivenName( + @jakarta.annotation.Nonnull String accountHolderGivenName) { + this.accountHolderGivenName = accountHolderGivenName; + } + + public InteracPaymentInfo accountHolderSurname( + @jakarta.annotation.Nonnull String accountHolderSurname) { + this.accountHolderSurname = accountHolderSurname; + return this; + } + + /** + * The surname (last name) of the account holder + * + * @return accountHolderSurname + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountHolderSurname() { + return accountHolderSurname; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountHolderSurname(@jakarta.annotation.Nonnull String accountHolderSurname) { + this.accountHolderSurname = accountHolderSurname; + } + + public InteracPaymentInfo country(@jakarta.annotation.Nonnull String country) { + this.country = country; + return this; + } + + /** + * The country for the transfer (ISO 3166-1 alpha-2 code) + * + * @return country + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCountry() { + return country; + } + + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCountry(@jakarta.annotation.Nonnull String country) { + this.country = country; + } + + public InteracPaymentInfo recipientHandleType( + @jakarta.annotation.Nonnull RecipientHandleTypeEnum recipientHandleType) { + this.recipientHandleType = recipientHandleType; + return this; + } + + /** + * The type of recipient handler being used + * + * @return recipientHandleType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECIPIENT_HANDLE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RecipientHandleTypeEnum getRecipientHandleType() { + return recipientHandleType; + } + + @JsonProperty(JSON_PROPERTY_RECIPIENT_HANDLE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRecipientHandleType( + @jakarta.annotation.Nonnull RecipientHandleTypeEnum recipientHandleType) { + this.recipientHandleType = recipientHandleType; + } + + public InteracPaymentInfo recipientHandleValue( + @jakarta.annotation.Nonnull String recipientHandleValue) { + this.recipientHandleValue = recipientHandleValue; + return this; + } + + /** + * Email address registered for Interac e-Transfer + * + * @return recipientHandleValue + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RECIPIENT_HANDLE_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRecipientHandleValue() { + return recipientHandleValue; + } + + @JsonProperty(JSON_PROPERTY_RECIPIENT_HANDLE_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRecipientHandleValue(@jakarta.annotation.Nonnull String recipientHandleValue) { + this.recipientHandleValue = recipientHandleValue; + } + + public InteracPaymentInfo message(@jakarta.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * The message to be sent to the recipient + * + * @return message + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMessage(@jakarta.annotation.Nonnull String message) { + this.message = message; + } + + /** Return true if this InteracPaymentInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InteracPaymentInfo interacPaymentInfo = (InteracPaymentInfo) o; + return Objects.equals(this.rail, interacPaymentInfo.rail) + && Objects.equals(this.addressingSystem, interacPaymentInfo.addressingSystem) + && Objects.equals( + this.accountHolderGivenName, interacPaymentInfo.accountHolderGivenName) + && Objects.equals( + this.accountHolderSurname, interacPaymentInfo.accountHolderSurname) + && Objects.equals(this.country, interacPaymentInfo.country) + && Objects.equals(this.recipientHandleType, interacPaymentInfo.recipientHandleType) + && Objects.equals( + this.recipientHandleValue, interacPaymentInfo.recipientHandleValue) + && Objects.equals(this.message, interacPaymentInfo.message); + } + + @Override + public int hashCode() { + return Objects.hash( + rail, + addressingSystem, + accountHolderGivenName, + accountHolderSurname, + country, + recipientHandleType, + recipientHandleValue, + message); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InteracPaymentInfo {\n"); + sb.append(" rail: ").append(toIndentedString(rail)).append("\n"); + sb.append(" addressingSystem: ").append(toIndentedString(addressingSystem)).append("\n"); + sb.append(" accountHolderGivenName: ") + .append(toIndentedString(accountHolderGivenName)) + .append("\n"); + sb.append(" accountHolderSurname: ") + .append(toIndentedString(accountHolderSurname)) + .append("\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" recipientHandleType: ") + .append(toIndentedString(recipientHandleType)) + .append("\n"); + sb.append(" recipientHandleValue: ") + .append(toIndentedString(recipientHandleValue)) + .append("\n"); + sb.append(" message: ").append(toIndentedString(message)).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 `rail` to the URL query string + if (getRail() != null) { + joiner.add( + String.format( + "%srail%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRail())))); + } + + // add `addressingSystem` to the URL query string + if (getAddressingSystem() != null) { + joiner.add( + String.format( + "%saddressingSystem%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAddressingSystem())))); + } + + // add `accountHolderGivenName` to the URL query string + if (getAccountHolderGivenName() != null) { + joiner.add( + String.format( + "%saccountHolderGivenName%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getAccountHolderGivenName())))); + } + + // add `accountHolderSurname` to the URL query string + if (getAccountHolderSurname() != null) { + joiner.add( + String.format( + "%saccountHolderSurname%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getAccountHolderSurname())))); + } + + // add `country` to the URL query string + if (getCountry() != null) { + joiner.add( + String.format( + "%scountry%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCountry())))); + } + + // add `recipientHandleType` to the URL query string + if (getRecipientHandleType() != null) { + joiner.add( + String.format( + "%srecipientHandleType%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getRecipientHandleType())))); + } + + // add `recipientHandleValue` to the URL query string + if (getRecipientHandleValue() != null) { + joiner.add( + String.format( + "%srecipientHandleValue%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getRecipientHandleValue())))); + } + + // add `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/InternalTransferAddress.java b/src/main/java/com/fireblocks/sdk/model/InternalTransferAddress.java new file mode 100644 index 00000000..c0431c08 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/InternalTransferAddress.java @@ -0,0 +1,191 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** InternalTransferAddress */ +@JsonPropertyOrder({ + InternalTransferAddress.JSON_PROPERTY_EXTERNAL_ACCOUNT_ID, + InternalTransferAddress.JSON_PROPERTY_ACCOUNT_ID +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class InternalTransferAddress { + public static final String JSON_PROPERTY_EXTERNAL_ACCOUNT_ID = "externalAccountId"; + @jakarta.annotation.Nullable private String externalAccountId; + + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + @jakarta.annotation.Nonnull private String accountId; + + public InternalTransferAddress() {} + + @JsonCreator + public InternalTransferAddress( + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_ID, required = true) String accountId) { + this.accountId = accountId; + } + + public InternalTransferAddress externalAccountId( + @jakarta.annotation.Nullable String externalAccountId) { + this.externalAccountId = externalAccountId; + return this; + } + + /** + * The provider's identifier for the external account. This enables the user to fund the + * account externally (outside of Fireblocks) if needed. + * + * @return externalAccountId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXTERNAL_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getExternalAccountId() { + return externalAccountId; + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExternalAccountId(@jakarta.annotation.Nullable String externalAccountId) { + this.externalAccountId = externalAccountId; + } + + public InternalTransferAddress accountId(@jakarta.annotation.Nonnull String accountId) { + this.accountId = accountId; + return this; + } + + /** + * The Fireblocks account ID where the user should deposit the funds. + * + * @return accountId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountId() { + return accountId; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountId(@jakarta.annotation.Nonnull String accountId) { + this.accountId = accountId; + } + + /** Return true if this InternalTransferAddress object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InternalTransferAddress internalTransferAddress = (InternalTransferAddress) o; + return Objects.equals(this.externalAccountId, internalTransferAddress.externalAccountId) + && Objects.equals(this.accountId, internalTransferAddress.accountId); + } + + @Override + public int hashCode() { + return Objects.hash(externalAccountId, accountId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InternalTransferAddress {\n"); + sb.append(" externalAccountId: ") + .append(toIndentedString(externalAccountId)) + .append("\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).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 `externalAccountId` to the URL query string + if (getExternalAccountId() != null) { + joiner.add( + String.format( + "%sexternalAccountId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getExternalAccountId())))); + } + + // add `accountId` to the URL query string + if (getAccountId() != null) { + joiner.add( + String.format( + "%saccountId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAccountId())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/InternalTransferDestination.java b/src/main/java/com/fireblocks/sdk/model/InternalTransferDestination.java new file mode 100644 index 00000000..02f76768 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/InternalTransferDestination.java @@ -0,0 +1,215 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** InternalTransferDestination */ +@JsonPropertyOrder({ + InternalTransferDestination.JSON_PROPERTY_TYPE, + InternalTransferDestination.JSON_PROPERTY_ADDRESS +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class InternalTransferDestination { + /** Gets or Sets type */ + public enum TypeEnum { + INTERNAL_TRANSFER(String.valueOf("INTERNAL_TRANSFER")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private TypeEnum type; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + @jakarta.annotation.Nullable private InternalTransferAddress address; + + public InternalTransferDestination() {} + + @JsonCreator + public InternalTransferDestination( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type) { + this.type = type; + } + + public InternalTransferDestination type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public InternalTransferDestination address( + @jakarta.annotation.Nullable InternalTransferAddress address) { + this.address = address; + return this; + } + + /** + * Get address + * + * @return address + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public InternalTransferAddress getAddress() { + return address; + } + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(@jakarta.annotation.Nullable InternalTransferAddress address) { + this.address = address; + } + + /** Return true if this InternalTransferDestination object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InternalTransferDestination internalTransferDestination = (InternalTransferDestination) o; + return Objects.equals(this.type, internalTransferDestination.type) + && Objects.equals(this.address, internalTransferDestination.address); + } + + @Override + public int hashCode() { + return Objects.hash(type, address); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InternalTransferDestination {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/LocalBankTransferAfricaAddress.java b/src/main/java/com/fireblocks/sdk/model/LocalBankTransferAfricaAddress.java index f3f4750a..d85a5f2c 100644 --- a/src/main/java/com/fireblocks/sdk/model/LocalBankTransferAfricaAddress.java +++ b/src/main/java/com/fireblocks/sdk/model/LocalBankTransferAfricaAddress.java @@ -26,7 +26,9 @@ LocalBankTransferAfricaAddress.JSON_PROPERTY_ACCOUNT_HOLDER, LocalBankTransferAfricaAddress.JSON_PROPERTY_ACCOUNT_NUMBER, LocalBankTransferAfricaAddress.JSON_PROPERTY_BANK_NAME, - LocalBankTransferAfricaAddress.JSON_PROPERTY_BANK_CODE + LocalBankTransferAfricaAddress.JSON_PROPERTY_BANK_CODE, + LocalBankTransferAfricaAddress.JSON_PROPERTY_SUCCESS_PAYMENT_INSTRUCTION_REDIRECT_URL, + LocalBankTransferAfricaAddress.JSON_PROPERTY_PAYMENT_REDIRECT }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -44,6 +46,13 @@ public class LocalBankTransferAfricaAddress { public static final String JSON_PROPERTY_BANK_CODE = "bankCode"; @jakarta.annotation.Nonnull private String bankCode; + public static final String JSON_PROPERTY_SUCCESS_PAYMENT_INSTRUCTION_REDIRECT_URL = + "successPaymentInstructionRedirectUrl"; + @jakarta.annotation.Nullable private String successPaymentInstructionRedirectUrl; + + public static final String JSON_PROPERTY_PAYMENT_REDIRECT = "paymentRedirect"; + @jakarta.annotation.Nullable private PaymentRedirect paymentRedirect; + public LocalBankTransferAfricaAddress() {} @JsonCreator @@ -154,6 +163,55 @@ public void setBankCode(@jakarta.annotation.Nonnull String bankCode) { this.bankCode = bankCode; } + public LocalBankTransferAfricaAddress successPaymentInstructionRedirectUrl( + @jakarta.annotation.Nullable String successPaymentInstructionRedirectUrl) { + this.successPaymentInstructionRedirectUrl = successPaymentInstructionRedirectUrl; + return this; + } + + /** + * The URL to redirect to after the payment instruction is successful + * + * @return successPaymentInstructionRedirectUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUCCESS_PAYMENT_INSTRUCTION_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSuccessPaymentInstructionRedirectUrl() { + return successPaymentInstructionRedirectUrl; + } + + @JsonProperty(JSON_PROPERTY_SUCCESS_PAYMENT_INSTRUCTION_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSuccessPaymentInstructionRedirectUrl( + @jakarta.annotation.Nullable String successPaymentInstructionRedirectUrl) { + this.successPaymentInstructionRedirectUrl = successPaymentInstructionRedirectUrl; + } + + public LocalBankTransferAfricaAddress paymentRedirect( + @jakarta.annotation.Nullable PaymentRedirect paymentRedirect) { + this.paymentRedirect = paymentRedirect; + return this; + } + + /** + * Get paymentRedirect + * + * @return paymentRedirect + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYMENT_REDIRECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PaymentRedirect getPaymentRedirect() { + return paymentRedirect; + } + + @JsonProperty(JSON_PROPERTY_PAYMENT_REDIRECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaymentRedirect(@jakarta.annotation.Nullable PaymentRedirect paymentRedirect) { + this.paymentRedirect = paymentRedirect; + } + /** Return true if this LocalBankTransferAfricaAddress object is equal to o. */ @Override public boolean equals(Object o) { @@ -168,12 +226,23 @@ public boolean equals(Object o) { return Objects.equals(this.accountHolder, localBankTransferAfricaAddress.accountHolder) && Objects.equals(this.accountNumber, localBankTransferAfricaAddress.accountNumber) && Objects.equals(this.bankName, localBankTransferAfricaAddress.bankName) - && Objects.equals(this.bankCode, localBankTransferAfricaAddress.bankCode); + && Objects.equals(this.bankCode, localBankTransferAfricaAddress.bankCode) + && Objects.equals( + this.successPaymentInstructionRedirectUrl, + localBankTransferAfricaAddress.successPaymentInstructionRedirectUrl) + && Objects.equals( + this.paymentRedirect, localBankTransferAfricaAddress.paymentRedirect); } @Override public int hashCode() { - return Objects.hash(accountHolder, accountNumber, bankName, bankCode); + return Objects.hash( + accountHolder, + accountNumber, + bankName, + bankCode, + successPaymentInstructionRedirectUrl, + paymentRedirect); } @Override @@ -184,6 +253,10 @@ public String toString() { sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n"); sb.append(" bankCode: ").append(toIndentedString(bankCode)).append("\n"); + sb.append(" successPaymentInstructionRedirectUrl: ") + .append(toIndentedString(successPaymentInstructionRedirectUrl)) + .append("\n"); + sb.append(" paymentRedirect: ").append(toIndentedString(paymentRedirect)).append("\n"); sb.append("}"); return sb.toString(); } @@ -266,6 +339,23 @@ public String toUrlQueryString(String prefix) { ApiClient.urlEncode(ApiClient.valueToString(getBankCode())))); } + // add `successPaymentInstructionRedirectUrl` to the URL query string + if (getSuccessPaymentInstructionRedirectUrl() != null) { + joiner.add( + String.format( + "%ssuccessPaymentInstructionRedirectUrl%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString( + getSuccessPaymentInstructionRedirectUrl())))); + } + + // add `paymentRedirect` to the URL query string + if (getPaymentRedirect() != null) { + joiner.add(getPaymentRedirect().toUrlQueryString(prefix + "paymentRedirect" + suffix)); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/MarketExecutionRequestDetails.java b/src/main/java/com/fireblocks/sdk/model/MarketExecutionRequestDetails.java index 03c60b3b..159b011c 100644 --- a/src/main/java/com/fireblocks/sdk/model/MarketExecutionRequestDetails.java +++ b/src/main/java/com/fireblocks/sdk/model/MarketExecutionRequestDetails.java @@ -125,7 +125,7 @@ public MarketExecutionRequestDetails baseAmount(@jakarta.annotation.Nonnull Stri } /** - * Amount to convert + * Amount in baseAssetId. BUY = base amount to receive; SELL = base amount to sell. * * @return baseAmount */ @@ -149,7 +149,7 @@ public MarketExecutionRequestDetails baseAssetId( } /** - * Source asset identifier + * The asset you receive on BUY / give on SELL. * * @return baseAssetId */ @@ -197,7 +197,7 @@ public MarketExecutionRequestDetails quoteAssetId( } /** - * Target asset identifier + * Counter asset used to pay/receive * * @return quoteAssetId */ diff --git a/src/main/java/com/fireblocks/sdk/model/MobileMoneyAddress.java b/src/main/java/com/fireblocks/sdk/model/MobileMoneyAddress.java index 0835408b..30b6396b 100644 --- a/src/main/java/com/fireblocks/sdk/model/MobileMoneyAddress.java +++ b/src/main/java/com/fireblocks/sdk/model/MobileMoneyAddress.java @@ -28,7 +28,9 @@ MobileMoneyAddress.JSON_PROPERTY_MOBILE_PHONE_NUMBER, MobileMoneyAddress.JSON_PROPERTY_PROVIDER, MobileMoneyAddress.JSON_PROPERTY_BENEFICIARY_DOCUMENT_ID, - MobileMoneyAddress.JSON_PROPERTY_BENEFICIARY_RELATIONSHIP + MobileMoneyAddress.JSON_PROPERTY_BENEFICIARY_RELATIONSHIP, + MobileMoneyAddress.JSON_PROPERTY_SUCCESS_PAYMENT_INSTRUCTION_REDIRECT_URL, + MobileMoneyAddress.JSON_PROPERTY_PAYMENT_REDIRECT }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -88,6 +90,13 @@ public static ProviderEnum fromValue(String value) { public static final String JSON_PROPERTY_BENEFICIARY_RELATIONSHIP = "beneficiaryRelationship"; @jakarta.annotation.Nullable private String beneficiaryRelationship; + public static final String JSON_PROPERTY_SUCCESS_PAYMENT_INSTRUCTION_REDIRECT_URL = + "successPaymentInstructionRedirectUrl"; + @jakarta.annotation.Nullable private String successPaymentInstructionRedirectUrl; + + public static final String JSON_PROPERTY_PAYMENT_REDIRECT = "paymentRedirect"; + @jakarta.annotation.Nullable private PaymentRedirect paymentRedirect; + public MobileMoneyAddress() {} @JsonCreator @@ -223,6 +232,55 @@ public void setBeneficiaryRelationship( this.beneficiaryRelationship = beneficiaryRelationship; } + public MobileMoneyAddress successPaymentInstructionRedirectUrl( + @jakarta.annotation.Nullable String successPaymentInstructionRedirectUrl) { + this.successPaymentInstructionRedirectUrl = successPaymentInstructionRedirectUrl; + return this; + } + + /** + * The URL to redirect to after the payment instruction is successful + * + * @return successPaymentInstructionRedirectUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUCCESS_PAYMENT_INSTRUCTION_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSuccessPaymentInstructionRedirectUrl() { + return successPaymentInstructionRedirectUrl; + } + + @JsonProperty(JSON_PROPERTY_SUCCESS_PAYMENT_INSTRUCTION_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSuccessPaymentInstructionRedirectUrl( + @jakarta.annotation.Nullable String successPaymentInstructionRedirectUrl) { + this.successPaymentInstructionRedirectUrl = successPaymentInstructionRedirectUrl; + } + + public MobileMoneyAddress paymentRedirect( + @jakarta.annotation.Nullable PaymentRedirect paymentRedirect) { + this.paymentRedirect = paymentRedirect; + return this; + } + + /** + * Get paymentRedirect + * + * @return paymentRedirect + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYMENT_REDIRECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public PaymentRedirect getPaymentRedirect() { + return paymentRedirect; + } + + @JsonProperty(JSON_PROPERTY_PAYMENT_REDIRECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaymentRedirect(@jakarta.annotation.Nullable PaymentRedirect paymentRedirect) { + this.paymentRedirect = paymentRedirect; + } + /** Return true if this MobileMoneyAddress object is equal to o. */ @Override public boolean equals(Object o) { @@ -239,7 +297,11 @@ public boolean equals(Object o) { && Objects.equals( this.beneficiaryDocumentId, mobileMoneyAddress.beneficiaryDocumentId) && Objects.equals( - this.beneficiaryRelationship, mobileMoneyAddress.beneficiaryRelationship); + this.beneficiaryRelationship, mobileMoneyAddress.beneficiaryRelationship) + && Objects.equals( + this.successPaymentInstructionRedirectUrl, + mobileMoneyAddress.successPaymentInstructionRedirectUrl) + && Objects.equals(this.paymentRedirect, mobileMoneyAddress.paymentRedirect); } @Override @@ -249,7 +311,9 @@ public int hashCode() { mobilePhoneNumber, provider, beneficiaryDocumentId, - beneficiaryRelationship); + beneficiaryRelationship, + successPaymentInstructionRedirectUrl, + paymentRedirect); } @Override @@ -267,6 +331,10 @@ public String toString() { sb.append(" beneficiaryRelationship: ") .append(toIndentedString(beneficiaryRelationship)) .append("\n"); + sb.append(" successPaymentInstructionRedirectUrl: ") + .append(toIndentedString(successPaymentInstructionRedirectUrl)) + .append("\n"); + sb.append(" paymentRedirect: ").append(toIndentedString(paymentRedirect)).append("\n"); sb.append("}"); return sb.toString(); } @@ -361,6 +429,23 @@ public String toUrlQueryString(String prefix) { ApiClient.valueToString(getBeneficiaryRelationship())))); } + // add `successPaymentInstructionRedirectUrl` to the URL query string + if (getSuccessPaymentInstructionRedirectUrl() != null) { + joiner.add( + String.format( + "%ssuccessPaymentInstructionRedirectUrl%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString( + getSuccessPaymentInstructionRedirectUrl())))); + } + + // add `paymentRedirect` to the URL query string + if (getPaymentRedirect() != null) { + joiner.add(getPaymentRedirect().toUrlQueryString(prefix + "paymentRedirect" + suffix)); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/PayidAddress.java b/src/main/java/com/fireblocks/sdk/model/PayidAddress.java new file mode 100644 index 00000000..3af6e308 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/PayidAddress.java @@ -0,0 +1,340 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** PayidAddress */ +@JsonPropertyOrder({ + PayidAddress.JSON_PROPERTY_ACCOUNT_HOLDER, + PayidAddress.JSON_PROPERTY_VALUE, + PayidAddress.JSON_PROPERTY_TYPE, + PayidAddress.JSON_PROPERTY_BSB, + PayidAddress.JSON_PROPERTY_ACCOUNT_NUMBER +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class PayidAddress { + public static final String JSON_PROPERTY_ACCOUNT_HOLDER = "accountHolder"; + @jakarta.annotation.Nonnull private AccountHolderDetails accountHolder; + + public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nonnull private String value; + + /** The type of PayID being used */ + public enum TypeEnum { + EMAIL(String.valueOf("EMAIL")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private TypeEnum type; + + public static final String JSON_PROPERTY_BSB = "bsb"; + @jakarta.annotation.Nullable private String bsb; + + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + @jakarta.annotation.Nonnull private String accountNumber; + + public PayidAddress() {} + + @JsonCreator + public PayidAddress( + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_HOLDER, required = true) + AccountHolderDetails accountHolder, + @JsonProperty(value = JSON_PROPERTY_VALUE, required = true) String value, + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_NUMBER, required = true) + String accountNumber) { + this.accountHolder = accountHolder; + this.value = value; + this.type = type; + this.accountNumber = accountNumber; + } + + public PayidAddress accountHolder( + @jakarta.annotation.Nonnull AccountHolderDetails accountHolder) { + this.accountHolder = accountHolder; + return this; + } + + /** + * Get accountHolder + * + * @return accountHolder + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AccountHolderDetails getAccountHolder() { + return accountHolder; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountHolder(@jakarta.annotation.Nonnull AccountHolderDetails accountHolder) { + this.accountHolder = accountHolder; + } + + public PayidAddress value(@jakarta.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * The PayID identifier (email, phone, ABN, or organization ID) + * + * @return value + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@jakarta.annotation.Nonnull String value) { + this.value = value; + } + + public PayidAddress type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type of PayID being used + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public PayidAddress bsb(@jakarta.annotation.Nullable String bsb) { + this.bsb = bsb; + return this; + } + + /** + * Bank State Branch (BSB) number (6 digits, format XXX-XXX) + * + * @return bsb + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BSB) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBsb() { + return bsb; + } + + @JsonProperty(JSON_PROPERTY_BSB) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBsb(@jakarta.annotation.Nullable String bsb) { + this.bsb = bsb; + } + + public PayidAddress accountNumber(@jakarta.annotation.Nonnull String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Australian bank account number + * + * @return accountNumber + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountNumber() { + return accountNumber; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountNumber(@jakarta.annotation.Nonnull String accountNumber) { + this.accountNumber = accountNumber; + } + + /** Return true if this PayidAddress object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PayidAddress payidAddress = (PayidAddress) o; + return Objects.equals(this.accountHolder, payidAddress.accountHolder) + && Objects.equals(this.value, payidAddress.value) + && Objects.equals(this.type, payidAddress.type) + && Objects.equals(this.bsb, payidAddress.bsb) + && Objects.equals(this.accountNumber, payidAddress.accountNumber); + } + + @Override + public int hashCode() { + return Objects.hash(accountHolder, value, type, bsb, accountNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PayidAddress {\n"); + sb.append(" accountHolder: ").append(toIndentedString(accountHolder)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" bsb: ").append(toIndentedString(bsb)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).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 `accountHolder` to the URL query string + if (getAccountHolder() != null) { + joiner.add(getAccountHolder().toUrlQueryString(prefix + "accountHolder" + suffix)); + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add( + String.format( + "%svalue%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getValue())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `bsb` to the URL query string + if (getBsb() != null) { + joiner.add( + String.format( + "%sbsb%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBsb())))); + } + + // add `accountNumber` to the URL query string + if (getAccountNumber() != null) { + joiner.add( + String.format( + "%saccountNumber%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAccountNumber())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/PayidDestination.java b/src/main/java/com/fireblocks/sdk/model/PayidDestination.java new file mode 100644 index 00000000..dde104d7 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/PayidDestination.java @@ -0,0 +1,213 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** PayidDestination */ +@JsonPropertyOrder({PayidDestination.JSON_PROPERTY_TYPE, PayidDestination.JSON_PROPERTY_ADDRESS}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class PayidDestination { + /** Gets or Sets type */ + public enum TypeEnum { + PAYID(String.valueOf("PAYID")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private TypeEnum type; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + @jakarta.annotation.Nonnull private PayidAddress address; + + public PayidDestination() {} + + @JsonCreator + public PayidDestination( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_ADDRESS, required = true) PayidAddress address) { + this.type = type; + this.address = address; + } + + public PayidDestination type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public PayidDestination address(@jakarta.annotation.Nonnull PayidAddress address) { + this.address = address; + return this; + } + + /** + * Get address + * + * @return address + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PayidAddress getAddress() { + return address; + } + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(@jakarta.annotation.Nonnull PayidAddress address) { + this.address = address; + } + + /** Return true if this PayidDestination object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PayidDestination payidDestination = (PayidDestination) o; + return Objects.equals(this.type, payidDestination.type) + && Objects.equals(this.address, payidDestination.address); + } + + @Override + public int hashCode() { + return Objects.hash(type, address); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PayidDestination {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add(getAddress().toUrlQueryString(prefix + "address" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/PayidPaymentInfo.java b/src/main/java/com/fireblocks/sdk/model/PayidPaymentInfo.java new file mode 100644 index 00000000..2024318c --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/PayidPaymentInfo.java @@ -0,0 +1,593 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** PayID payment information for Australian dollar transfers */ +@JsonPropertyOrder({ + PayidPaymentInfo.JSON_PROPERTY_RAIL, + PayidPaymentInfo.JSON_PROPERTY_ADDRESSING_SYSTEM, + PayidPaymentInfo.JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME, + PayidPaymentInfo.JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME, + PayidPaymentInfo.JSON_PROPERTY_COUNTRY, + PayidPaymentInfo.JSON_PROPERTY_VALUE, + PayidPaymentInfo.JSON_PROPERTY_TYPE, + PayidPaymentInfo.JSON_PROPERTY_BSB, + PayidPaymentInfo.JSON_PROPERTY_ACCOUNT_NUMBER +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class PayidPaymentInfo { + /** The payment rail type for PayID transfers */ + public enum RailEnum { + PAYID(String.valueOf("PAYID")); + + private String value; + + RailEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RailEnum fromValue(String value) { + for (RailEnum b : RailEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RAIL = "rail"; + @jakarta.annotation.Nonnull private RailEnum rail; + + /** The addressing system used for PayID transfers */ + public enum AddressingSystemEnum { + PAYID(String.valueOf("PAYID")); + + private String value; + + AddressingSystemEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AddressingSystemEnum fromValue(String value) { + for (AddressingSystemEnum b : AddressingSystemEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ADDRESSING_SYSTEM = "addressingSystem"; + @jakarta.annotation.Nonnull private AddressingSystemEnum addressingSystem; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME = "accountHolderGivenName"; + @jakarta.annotation.Nonnull private String accountHolderGivenName; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME = "accountHolderSurname"; + @jakarta.annotation.Nonnull private String accountHolderSurname; + + public static final String JSON_PROPERTY_COUNTRY = "country"; + @jakarta.annotation.Nonnull private String country; + + public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nonnull private String value; + + /** The type of PayID being used */ + public enum TypeEnum { + EMAIL(String.valueOf("EMAIL")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private TypeEnum type; + + public static final String JSON_PROPERTY_BSB = "bsb"; + @jakarta.annotation.Nullable private String bsb; + + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + @jakarta.annotation.Nonnull private String accountNumber; + + public PayidPaymentInfo() {} + + @JsonCreator + public PayidPaymentInfo( + @JsonProperty(value = JSON_PROPERTY_RAIL, required = true) RailEnum rail, + @JsonProperty(value = JSON_PROPERTY_ADDRESSING_SYSTEM, required = true) + AddressingSystemEnum addressingSystem, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME, required = true) + String accountHolderGivenName, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME, required = true) + String accountHolderSurname, + @JsonProperty(value = JSON_PROPERTY_COUNTRY, required = true) String country, + @JsonProperty(value = JSON_PROPERTY_VALUE, required = true) String value, + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_NUMBER, required = true) + String accountNumber) { + this.rail = rail; + this.addressingSystem = addressingSystem; + this.accountHolderGivenName = accountHolderGivenName; + this.accountHolderSurname = accountHolderSurname; + this.country = country; + this.value = value; + this.type = type; + this.accountNumber = accountNumber; + } + + public PayidPaymentInfo rail(@jakarta.annotation.Nonnull RailEnum rail) { + this.rail = rail; + return this; + } + + /** + * The payment rail type for PayID transfers + * + * @return rail + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RailEnum getRail() { + return rail; + } + + @JsonProperty(JSON_PROPERTY_RAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRail(@jakarta.annotation.Nonnull RailEnum rail) { + this.rail = rail; + } + + public PayidPaymentInfo addressingSystem( + @jakarta.annotation.Nonnull AddressingSystemEnum addressingSystem) { + this.addressingSystem = addressingSystem; + return this; + } + + /** + * The addressing system used for PayID transfers + * + * @return addressingSystem + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESSING_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AddressingSystemEnum getAddressingSystem() { + return addressingSystem; + } + + @JsonProperty(JSON_PROPERTY_ADDRESSING_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddressingSystem( + @jakarta.annotation.Nonnull AddressingSystemEnum addressingSystem) { + this.addressingSystem = addressingSystem; + } + + public PayidPaymentInfo accountHolderGivenName( + @jakarta.annotation.Nonnull String accountHolderGivenName) { + this.accountHolderGivenName = accountHolderGivenName; + return this; + } + + /** + * The given name (first name) of the account holder + * + * @return accountHolderGivenName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountHolderGivenName() { + return accountHolderGivenName; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountHolderGivenName( + @jakarta.annotation.Nonnull String accountHolderGivenName) { + this.accountHolderGivenName = accountHolderGivenName; + } + + public PayidPaymentInfo accountHolderSurname( + @jakarta.annotation.Nonnull String accountHolderSurname) { + this.accountHolderSurname = accountHolderSurname; + return this; + } + + /** + * The surname (last name) of the account holder + * + * @return accountHolderSurname + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountHolderSurname() { + return accountHolderSurname; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountHolderSurname(@jakarta.annotation.Nonnull String accountHolderSurname) { + this.accountHolderSurname = accountHolderSurname; + } + + public PayidPaymentInfo country(@jakarta.annotation.Nonnull String country) { + this.country = country; + return this; + } + + /** + * The country for the transfer (ISO 3166-1 alpha-2 code) + * + * @return country + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCountry() { + return country; + } + + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCountry(@jakarta.annotation.Nonnull String country) { + this.country = country; + } + + public PayidPaymentInfo value(@jakarta.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * The PayID identifier (email, phone, ABN, or organization ID) + * + * @return value + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@jakarta.annotation.Nonnull String value) { + this.value = value; + } + + public PayidPaymentInfo type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * The type of PayID being used + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public PayidPaymentInfo bsb(@jakarta.annotation.Nullable String bsb) { + this.bsb = bsb; + return this; + } + + /** + * Bank State Branch (BSB) number (6 digits, format XXX-XXX) + * + * @return bsb + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BSB) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBsb() { + return bsb; + } + + @JsonProperty(JSON_PROPERTY_BSB) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBsb(@jakarta.annotation.Nullable String bsb) { + this.bsb = bsb; + } + + public PayidPaymentInfo accountNumber(@jakarta.annotation.Nonnull String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Australian bank account number + * + * @return accountNumber + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountNumber() { + return accountNumber; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountNumber(@jakarta.annotation.Nonnull String accountNumber) { + this.accountNumber = accountNumber; + } + + /** Return true if this PayidPaymentInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PayidPaymentInfo payidPaymentInfo = (PayidPaymentInfo) o; + return Objects.equals(this.rail, payidPaymentInfo.rail) + && Objects.equals(this.addressingSystem, payidPaymentInfo.addressingSystem) + && Objects.equals( + this.accountHolderGivenName, payidPaymentInfo.accountHolderGivenName) + && Objects.equals(this.accountHolderSurname, payidPaymentInfo.accountHolderSurname) + && Objects.equals(this.country, payidPaymentInfo.country) + && Objects.equals(this.value, payidPaymentInfo.value) + && Objects.equals(this.type, payidPaymentInfo.type) + && Objects.equals(this.bsb, payidPaymentInfo.bsb) + && Objects.equals(this.accountNumber, payidPaymentInfo.accountNumber); + } + + @Override + public int hashCode() { + return Objects.hash( + rail, + addressingSystem, + accountHolderGivenName, + accountHolderSurname, + country, + value, + type, + bsb, + accountNumber); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PayidPaymentInfo {\n"); + sb.append(" rail: ").append(toIndentedString(rail)).append("\n"); + sb.append(" addressingSystem: ").append(toIndentedString(addressingSystem)).append("\n"); + sb.append(" accountHolderGivenName: ") + .append(toIndentedString(accountHolderGivenName)) + .append("\n"); + sb.append(" accountHolderSurname: ") + .append(toIndentedString(accountHolderSurname)) + .append("\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" bsb: ").append(toIndentedString(bsb)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).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 `rail` to the URL query string + if (getRail() != null) { + joiner.add( + String.format( + "%srail%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRail())))); + } + + // add `addressingSystem` to the URL query string + if (getAddressingSystem() != null) { + joiner.add( + String.format( + "%saddressingSystem%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAddressingSystem())))); + } + + // add `accountHolderGivenName` to the URL query string + if (getAccountHolderGivenName() != null) { + joiner.add( + String.format( + "%saccountHolderGivenName%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getAccountHolderGivenName())))); + } + + // add `accountHolderSurname` to the URL query string + if (getAccountHolderSurname() != null) { + joiner.add( + String.format( + "%saccountHolderSurname%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getAccountHolderSurname())))); + } + + // add `country` to the URL query string + if (getCountry() != null) { + joiner.add( + String.format( + "%scountry%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCountry())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add( + String.format( + "%svalue%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getValue())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `bsb` to the URL query string + if (getBsb() != null) { + joiner.add( + String.format( + "%sbsb%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBsb())))); + } + + // add `accountNumber` to the URL query string + if (getAccountNumber() != null) { + joiner.add( + String.format( + "%saccountNumber%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAccountNumber())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/PaymentInstructionsOneOf.java b/src/main/java/com/fireblocks/sdk/model/PaymentInstructionsOneOf.java index 7bbc255e..e63e9f56 100644 --- a/src/main/java/com/fireblocks/sdk/model/PaymentInstructionsOneOf.java +++ b/src/main/java/com/fireblocks/sdk/model/PaymentInstructionsOneOf.java @@ -34,7 +34,7 @@ public class PaymentInstructionsOneOf { /** Gets or Sets type */ public enum TypeEnum { - EUROPEAN_SEPA(String.valueOf("EUROPEAN_SEPA")); + INTERNAL_TRANSFER(String.valueOf("INTERNAL_TRANSFER")); private String value; @@ -67,7 +67,7 @@ public static TypeEnum fromValue(String value) { @jakarta.annotation.Nonnull private TypeEnum type; public static final String JSON_PROPERTY_ADDRESS = "address"; - @jakarta.annotation.Nonnull private EuropeanSEPAAddress address; + @jakarta.annotation.Nonnull private InternalTransferAddress address; public static final String JSON_PROPERTY_REFERENCE_ID = "referenceId"; @jakarta.annotation.Nullable private String referenceId; @@ -78,7 +78,7 @@ public PaymentInstructionsOneOf() {} public PaymentInstructionsOneOf( @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, @JsonProperty(value = JSON_PROPERTY_ADDRESS, required = true) - EuropeanSEPAAddress address) { + InternalTransferAddress address) { this.type = type; this.address = address; } @@ -107,7 +107,7 @@ public void setType(@jakarta.annotation.Nonnull TypeEnum type) { } public PaymentInstructionsOneOf address( - @jakarta.annotation.Nonnull EuropeanSEPAAddress address) { + @jakarta.annotation.Nonnull InternalTransferAddress address) { this.address = address; return this; } @@ -120,13 +120,13 @@ public PaymentInstructionsOneOf address( @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public EuropeanSEPAAddress getAddress() { + public InternalTransferAddress getAddress() { return address; } @JsonProperty(JSON_PROPERTY_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAddress(@jakarta.annotation.Nonnull EuropeanSEPAAddress address) { + public void setAddress(@jakarta.annotation.Nonnull InternalTransferAddress address) { this.address = address; } diff --git a/src/main/java/com/fireblocks/sdk/model/PaymentRedirect.java b/src/main/java/com/fireblocks/sdk/model/PaymentRedirect.java new file mode 100644 index 00000000..a7cf91c1 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/PaymentRedirect.java @@ -0,0 +1,181 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** + * URL returned by the provider that the end user will be redirected to in order to complete the + * payment on the bank/mobile provider page. After completion, the bank/mobile provider redirects + * the end user back to successRedirectUrl (provided in the RAMP request) + */ +@JsonPropertyOrder({PaymentRedirect.JSON_PROPERTY_URL, PaymentRedirect.JSON_PROPERTY_EXPIRES_AT}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class PaymentRedirect { + public static final String JSON_PROPERTY_URL = "url"; + @jakarta.annotation.Nullable private String url; + + public static final String JSON_PROPERTY_EXPIRES_AT = "expiresAt"; + @jakarta.annotation.Nullable private String expiresAt; + + public PaymentRedirect() {} + + public PaymentRedirect url(@jakarta.annotation.Nullable String url) { + this.url = url; + return this; + } + + /** + * URL to redirect to + * + * @return url + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } + + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUrl(@jakarta.annotation.Nullable String url) { + this.url = url; + } + + public PaymentRedirect expiresAt(@jakarta.annotation.Nullable String expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * Expiration date of the redirect + * + * @return expiresAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getExpiresAt() { + return expiresAt; + } + + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpiresAt(@jakarta.annotation.Nullable String expiresAt) { + this.expiresAt = expiresAt; + } + + /** Return true if this PaymentRedirect object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaymentRedirect paymentRedirect = (PaymentRedirect) o; + return Objects.equals(this.url, paymentRedirect.url) + && Objects.equals(this.expiresAt, paymentRedirect.expiresAt); + } + + @Override + public int hashCode() { + return Objects.hash(url, expiresAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaymentRedirect {\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).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 `url` to the URL query string + if (getUrl() != null) { + joiner.add( + String.format( + "%surl%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getUrl())))); + } + + // add `expiresAt` to the URL query string + if (getExpiresAt() != null) { + joiner.add( + String.format( + "%sexpiresAt%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getExpiresAt())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/PixAddress.java b/src/main/java/com/fireblocks/sdk/model/PixAddress.java index e8b75762..8a5a7746 100644 --- a/src/main/java/com/fireblocks/sdk/model/PixAddress.java +++ b/src/main/java/com/fireblocks/sdk/model/PixAddress.java @@ -28,7 +28,9 @@ PixAddress.JSON_PROPERTY_PIX_KEY, PixAddress.JSON_PROPERTY_KEY_TYPE, PixAddress.JSON_PROPERTY_BANK_NAME, - PixAddress.JSON_PROPERTY_BANK_CODE + PixAddress.JSON_PROPERTY_BANK_CODE, + PixAddress.JSON_PROPERTY_QR_CODE, + PixAddress.JSON_PROPERTY_EXPIRATION_DATE }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -42,15 +44,15 @@ public class PixAddress { /** Gets or Sets keyType */ public enum KeyTypeEnum { - CPF(String.valueOf("cpf")), + CPF(String.valueOf("CPF")), - CNPJ(String.valueOf("cnpj")), + CNPJ(String.valueOf("CNPJ")), - EMAIL(String.valueOf("email")), + EMAIL(String.valueOf("EMAIL")), - PHONE(String.valueOf("phone")), + PHONE(String.valueOf("PHONE")), - RANDOM(String.valueOf("random")); + RANDOM(String.valueOf("RANDOM")); private String value; @@ -88,6 +90,12 @@ public static KeyTypeEnum fromValue(String value) { public static final String JSON_PROPERTY_BANK_CODE = "bankCode"; @jakarta.annotation.Nullable private String bankCode; + public static final String JSON_PROPERTY_QR_CODE = "qrCode"; + @jakarta.annotation.Nullable private String qrCode; + + public static final String JSON_PROPERTY_EXPIRATION_DATE = "expirationDate"; + @jakarta.annotation.Nullable private String expirationDate; + public PixAddress() {} @JsonCreator @@ -217,6 +225,52 @@ public void setBankCode(@jakarta.annotation.Nullable String bankCode) { this.bankCode = bankCode; } + public PixAddress qrCode(@jakarta.annotation.Nullable String qrCode) { + this.qrCode = qrCode; + return this; + } + + /** + * The QR code to be used for the transfer + * + * @return qrCode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getQrCode() { + return qrCode; + } + + @JsonProperty(JSON_PROPERTY_QR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setQrCode(@jakarta.annotation.Nullable String qrCode) { + this.qrCode = qrCode; + } + + public PixAddress expirationDate(@jakarta.annotation.Nullable String expirationDate) { + this.expirationDate = expirationDate; + return this; + } + + /** + * The expiration date of the QR code + * + * @return expirationDate + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPIRATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getExpirationDate() { + return expirationDate; + } + + @JsonProperty(JSON_PROPERTY_EXPIRATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpirationDate(@jakarta.annotation.Nullable String expirationDate) { + this.expirationDate = expirationDate; + } + /** Return true if this PixAddress object is equal to o. */ @Override public boolean equals(Object o) { @@ -231,12 +285,15 @@ public boolean equals(Object o) { && Objects.equals(this.pixKey, pixAddress.pixKey) && Objects.equals(this.keyType, pixAddress.keyType) && Objects.equals(this.bankName, pixAddress.bankName) - && Objects.equals(this.bankCode, pixAddress.bankCode); + && Objects.equals(this.bankCode, pixAddress.bankCode) + && Objects.equals(this.qrCode, pixAddress.qrCode) + && Objects.equals(this.expirationDate, pixAddress.expirationDate); } @Override public int hashCode() { - return Objects.hash(accountHolder, pixKey, keyType, bankName, bankCode); + return Objects.hash( + accountHolder, pixKey, keyType, bankName, bankCode, qrCode, expirationDate); } @Override @@ -248,6 +305,8 @@ public String toString() { sb.append(" keyType: ").append(toIndentedString(keyType)).append("\n"); sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n"); sb.append(" bankCode: ").append(toIndentedString(bankCode)).append("\n"); + sb.append(" qrCode: ").append(toIndentedString(qrCode)).append("\n"); + sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); sb.append("}"); return sb.toString(); } @@ -340,6 +399,26 @@ public String toUrlQueryString(String prefix) { ApiClient.urlEncode(ApiClient.valueToString(getBankCode())))); } + // add `qrCode` to the URL query string + if (getQrCode() != null) { + joiner.add( + String.format( + "%sqrCode%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getQrCode())))); + } + + // add `expirationDate` to the URL query string + if (getExpirationDate() != null) { + joiner.add( + String.format( + "%sexpirationDate%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getExpirationDate())))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/RecipientHandle.java b/src/main/java/com/fireblocks/sdk/model/RecipientHandle.java new file mode 100644 index 00000000..f0efe941 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/RecipientHandle.java @@ -0,0 +1,218 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** RecipientHandle */ +@JsonPropertyOrder({RecipientHandle.JSON_PROPERTY_TYPE, RecipientHandle.JSON_PROPERTY_VALUE}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class RecipientHandle { + /** Gets or Sets type */ + public enum TypeEnum { + EMAIL(String.valueOf("EMAIL")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private TypeEnum type; + + public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nonnull private String value; + + public RecipientHandle() {} + + @JsonCreator + public RecipientHandle( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_VALUE, required = true) String value) { + this.type = type; + this.value = value; + } + + public RecipientHandle type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public RecipientHandle value(@jakarta.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * The value of the recipient handle + * + * @return value + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@jakarta.annotation.Nonnull String value) { + this.value = value; + } + + /** Return true if this RecipientHandle object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RecipientHandle recipientHandle = (RecipientHandle) o; + return Objects.equals(this.type, recipientHandle.type) + && Objects.equals(this.value, recipientHandle.value); + } + + @Override + public int hashCode() { + return Objects.hash(type, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RecipientHandle {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add( + String.format( + "%svalue%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getValue())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java b/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java index 8001b701..b2b38fde 100644 --- a/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/TransactionRequest.java @@ -160,7 +160,7 @@ public static FeeLevelEnum fromValue(String value) { @jakarta.annotation.Nullable private String replaceTxByHash; public static final String JSON_PROPERTY_EXTRA_PARAMETERS = "extraParameters"; - @jakarta.annotation.Nullable private Object extraParameters; + @jakarta.annotation.Nullable private ExtraParameters extraParameters; public static final String JSON_PROPERTY_CUSTOMER_REF_ID = "customerRefId"; @jakarta.annotation.Nullable private String customerRefId; @@ -691,46 +691,27 @@ public void setReplaceTxByHash(@jakarta.annotation.Nullable String replaceTxByHa this.replaceTxByHash = replaceTxByHash; } - public TransactionRequest extraParameters(@jakarta.annotation.Nullable Object extraParameters) { + public TransactionRequest extraParameters( + @jakarta.annotation.Nullable ExtraParameters extraParameters) { this.extraParameters = extraParameters; return this; } /** - * 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) + * Get extraParameters * * @return extraParameters */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXTRA_PARAMETERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Object getExtraParameters() { + public ExtraParameters getExtraParameters() { return extraParameters; } @JsonProperty(JSON_PROPERTY_EXTRA_PARAMETERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExtraParameters(@jakarta.annotation.Nullable Object extraParameters) { + public void setExtraParameters(@jakarta.annotation.Nullable ExtraParameters extraParameters) { this.extraParameters = extraParameters; } diff --git a/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java b/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java index 28dc3d0d..0a44b2b0 100644 --- a/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/TransactionResponse.java @@ -213,7 +213,7 @@ public class TransactionResponse { @jakarta.annotation.Nullable private String paidRent; public static final String JSON_PROPERTY_EXTRA_PARAMETERS = "extraParameters"; - @jakarta.annotation.Nullable private Object extraParameters; + @jakarta.annotation.Nullable private ExtraParameters extraParameters; public static final String JSON_PROPERTY_SIGNED_MESSAGES = "signedMessages"; @jakarta.annotation.Nullable private List signedMessages; @@ -1299,46 +1299,26 @@ public void setPaidRent(@jakarta.annotation.Nullable String paidRent) { } public TransactionResponse extraParameters( - @jakarta.annotation.Nullable Object extraParameters) { + @jakarta.annotation.Nullable ExtraParameters extraParameters) { this.extraParameters = extraParameters; return this; } /** - * 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) + * Get extraParameters * * @return extraParameters */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_EXTRA_PARAMETERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Object getExtraParameters() { + public ExtraParameters getExtraParameters() { return extraParameters; } @JsonProperty(JSON_PROPERTY_EXTRA_PARAMETERS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setExtraParameters(@jakarta.annotation.Nullable Object extraParameters) { + public void setExtraParameters(@jakarta.annotation.Nullable ExtraParameters extraParameters) { this.extraParameters = extraParameters; } diff --git a/src/main/java/com/fireblocks/sdk/model/TransferRail.java b/src/main/java/com/fireblocks/sdk/model/TransferRail.java index 0fa09619..a2442ad1 100644 --- a/src/main/java/com/fireblocks/sdk/model/TransferRail.java +++ b/src/main/java/com/fireblocks/sdk/model/TransferRail.java @@ -25,7 +25,10 @@ * longer but not as expensive as wire transfers * **SEPA** - Euro transfers within the SEPA zone * * **SPEI** - Mexican interbank electronic payment system * **PIX** - Brazilian instant payment * system * **LOCAL_BANK_TRANSFER_AFRICA** - Local bank transfers within Africa * **MOBILE_MONEY** - - * Mobile money transfers (e.g. M-Pesa) + * Mobile money transfers (e.g. M-Pesa) * **INTERNAL_TRANSFER** - Internal transfer within the same + * account * **INTERAC** - Canadian interbank transfer system * **PAYID** - Australian PayID payment + * system * **CHAPS** - The Clearing House Automated Payment System (CHAPS) is a real-time gross + * settlement payment system used for transactions in the United Kingdom */ public enum TransferRail { BLOCKCHAIN("BLOCKCHAIN"), @@ -50,7 +53,15 @@ public enum TransferRail { LOCAL_BANK_TRANSFER_AFRICA("LOCAL_BANK_TRANSFER_AFRICA"), - MOBILE_MONEY("MOBILE_MONEY"); + MOBILE_MONEY("MOBILE_MONEY"), + + INTERNAL_TRANSFER("INTERNAL_TRANSFER"), + + INTERAC("INTERAC"), + + PAYID("PAYID"), + + CHAPS("CHAPS"); private String value; diff --git a/src/main/java/com/fireblocks/sdk/model/Workspace.java b/src/main/java/com/fireblocks/sdk/model/Workspace.java new file mode 100644 index 00000000..c31e3457 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/Workspace.java @@ -0,0 +1,183 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** Workspace */ +@JsonPropertyOrder({Workspace.JSON_PROPERTY_ID, Workspace.JSON_PROPERTY_NAME}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class Workspace { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull private String name; + + public Workspace() {} + + @JsonCreator + public Workspace( + @JsonProperty(value = JSON_PROPERTY_ID, required = true) String id, + @JsonProperty(value = JSON_PROPERTY_NAME, required = true) String name) { + this.id = id; + this.name = name; + } + + public Workspace id(@jakarta.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * The ID of the workspace + * + * @return id + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setId(@jakarta.annotation.Nonnull String id) { + this.id = id; + } + + public Workspace name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The name of the workspace + * + * @return name + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(@jakarta.annotation.Nonnull String name) { + this.name = name; + } + + /** Return true if this Workspace object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Workspace workspace = (Workspace) o; + return Objects.equals(this.id, workspace.id) && Objects.equals(this.name, workspace.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Workspace {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `id` to the URL query string + if (getId() != null) { + joiner.add( + String.format( + "%sid%s=%s", + prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + return joiner.toString(); + } +} diff --git a/src/test/java/com/fireblocks/sdk/FireblocksTest.java b/src/test/java/com/fireblocks/sdk/FireblocksTest.java index 51f2c9a9..04d9e225 100644 --- a/src/test/java/com/fireblocks/sdk/FireblocksTest.java +++ b/src/test/java/com/fireblocks/sdk/FireblocksTest.java @@ -709,6 +709,14 @@ public void testGetWhitelistIpAddressesApi() { Assert.assertSame(whitelistIpAddresses, fireblocks.whitelistIpAddresses()); } + @Test + public void testGetWorkspaceApi() { + setupFireblocks(true, null, null); + WorkspaceApi workspace = fireblocks.workspace(); + Assert.assertNotNull(workspace); + Assert.assertSame(workspace, fireblocks.workspace()); + } + @Test public void testGetWorkspaceStatusBetaApi() { setupFireblocks(true, null, null); diff --git a/src/test/java/com/fireblocks/sdk/api/StakingApiTest.java b/src/test/java/com/fireblocks/sdk/api/StakingApiTest.java index 02a0bad2..37edd11e 100644 --- a/src/test/java/com/fireblocks/sdk/api/StakingApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/StakingApiTest.java @@ -77,6 +77,27 @@ public void claimRewardsTest() throws ApiException { api.claimRewards(claimRewardsRequest, chainDescriptor, idempotencyKey); } + /** + * Consolidate staking positions (ETH validator consolidation) + * + *

Consolidates the source staking position into the destination, merging the balance into + * the destination and closing the source position once complete. Both positions must be from + * the same validator provider and same vault account. On chain, this translates into a + * consolidation transaction, where the source validator is consolidated into the destination + * validator. Supported chains: Ethereum (ETH) only. </br>Endpoint Permission: Owner, + * Admin, Non-Signing Admin, Signer, Approver, Editor. + * + * @throws ApiException if the Api call fails + */ + @Test + public void consolidateTest() throws ApiException { + MergeStakeAccountsRequest mergeStakeAccountsRequest = null; + String chainDescriptor = null; + String idempotencyKey = null; + CompletableFuture> response = + api.consolidate(mergeStakeAccountsRequest, chainDescriptor, idempotencyKey); + } + /** * List staking positions * diff --git a/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java b/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java index 9baf641b..36ab20d7 100644 --- a/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/VaultsApiTest.java @@ -70,8 +70,10 @@ public void activateAssetForVaultAccountTest() throws ApiException { String vaultAccountId = null; String assetId = null; String idempotencyKey = null; + String blockchainWalletType = null; CompletableFuture> response = - api.activateAssetForVaultAccount(vaultAccountId, assetId, idempotencyKey); + api.activateAssetForVaultAccount( + vaultAccountId, assetId, idempotencyKey, blockchainWalletType); } /** @@ -115,8 +117,9 @@ public void createLegacyAddressTest() throws ApiException { * Bulk creation of new vault accounts * *

Create multiple vault accounts by running an async job. - The HBAR, TON, SUI, TERRA, ALGO, - * and DOT blockchains are not supported. - Limited to a maximum of 10,000 accounts per - * operation. **Endpoint Permissions:** Admin, Non-Signing Admin, Signer, Approver, Editor. + * and DOT blockchains are not supported. - These endpoints are currently in beta and might be + * subject to changes. - Limited to a maximum of 10,000 accounts per operation. **Endpoint + * Permissions:** Admin, Non-Signing Admin, Signer, Approver, Editor. * * @throws ApiException if the Api call fails */ @@ -182,9 +185,14 @@ public void createVaultAccountAssetTest() throws ApiException { String assetId = null; CreateAssetsRequest createAssetsRequest = null; String idempotencyKey = null; + String blockchainWalletType = null; CompletableFuture> response = api.createVaultAccountAsset( - vaultAccountId, assetId, createAssetsRequest, idempotencyKey); + vaultAccountId, + assetId, + createAssetsRequest, + idempotencyKey, + blockchainWalletType); } /** diff --git a/src/test/java/com/fireblocks/sdk/api/WorkspaceApiTest.java b/src/test/java/com/fireblocks/sdk/api/WorkspaceApiTest.java new file mode 100644 index 00000000..8ea50da6 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/api/WorkspaceApiTest.java @@ -0,0 +1,40 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.Workspace; +import java.util.concurrent.CompletableFuture; +import org.junit.Ignore; +import org.junit.Test; + +/** API tests for WorkspaceApi */ +@Ignore +public class WorkspaceApiTest { + + private final WorkspaceApi api = new WorkspaceApi(); + + /** + * Get workspace + * + *

Returns the workspace ID and name for the authenticated user. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getWorkspaceTest() throws ApiException { + CompletableFuture> response = api.getWorkspace(); + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AdditionalInfoRequestAdditionalInfoTest.java b/src/test/java/com/fireblocks/sdk/model/AdditionalInfoRequestAdditionalInfoTest.java index e903cdcf..01394b49 100644 --- a/src/test/java/com/fireblocks/sdk/model/AdditionalInfoRequestAdditionalInfoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/AdditionalInfoRequestAdditionalInfoTest.java @@ -301,4 +301,58 @@ void beneficiaryDocumentIdTest() { void beneficiaryRelationshipTest() { // TODO: test beneficiaryRelationship } + + /** Test the property 'recipientHandleType' */ + @Test + void recipientHandleTypeTest() { + // TODO: test recipientHandleType + } + + /** Test the property 'recipientHandleValue' */ + @Test + void recipientHandleValueTest() { + // TODO: test recipientHandleValue + } + + /** Test the property 'message' */ + @Test + void messageTest() { + // TODO: test message + } + + /** Test the property 'value' */ + @Test + void valueTest() { + // TODO: test value + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'bsb' */ + @Test + void bsbTest() { + // TODO: test bsb + } + + /** Test the property 'sortCode' */ + @Test + void sortCodeTest() { + // TODO: test sortCode + } + + /** Test the property 'bankAccountCountry' */ + @Test + void bankAccountCountryTest() { + // TODO: test bankAccountCountry + } + + /** Test the property 'bankAccountHolderName' */ + @Test + void bankAccountHolderNameTest() { + // TODO: test bankAccountHolderName + } } diff --git a/src/test/java/com/fireblocks/sdk/model/ChapsAddressTest.java b/src/test/java/com/fireblocks/sdk/model/ChapsAddressTest.java new file mode 100644 index 00000000..cbd3b669 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ChapsAddressTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ChapsAddress */ +class ChapsAddressTest { + private final ChapsAddress model = new ChapsAddress(); + + /** Model tests for ChapsAddress */ + @Test + void testChapsAddress() { + // TODO: test ChapsAddress + } + + /** Test the property 'accountHolder' */ + @Test + void accountHolderTest() { + // TODO: test accountHolder + } + + /** Test the property 'sortCode' */ + @Test + void sortCodeTest() { + // TODO: test sortCode + } + + /** Test the property 'accountNumber' */ + @Test + void accountNumberTest() { + // TODO: test accountNumber + } + + /** Test the property 'bankName' */ + @Test + void bankNameTest() { + // TODO: test bankName + } + + /** Test the property 'bankAccountCountry' */ + @Test + void bankAccountCountryTest() { + // TODO: test bankAccountCountry + } + + /** Test the property 'bankAccountHolderName' */ + @Test + void bankAccountHolderNameTest() { + // TODO: test bankAccountHolderName + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ChapsDestinationTest.java b/src/test/java/com/fireblocks/sdk/model/ChapsDestinationTest.java new file mode 100644 index 00000000..00119236 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ChapsDestinationTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ChapsDestination */ +class ChapsDestinationTest { + private final ChapsDestination model = new ChapsDestination(); + + /** Model tests for ChapsDestination */ + @Test + void testChapsDestination() { + // TODO: test ChapsDestination + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'address' */ + @Test + void addressTest() { + // TODO: test address + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ChapsPaymentInfoTest.java b/src/test/java/com/fireblocks/sdk/model/ChapsPaymentInfoTest.java new file mode 100644 index 00000000..bc66395f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ChapsPaymentInfoTest.java @@ -0,0 +1,87 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ChapsPaymentInfo */ +class ChapsPaymentInfoTest { + private final ChapsPaymentInfo model = new ChapsPaymentInfo(); + + /** Model tests for ChapsPaymentInfo */ + @Test + void testChapsPaymentInfo() { + // TODO: test ChapsPaymentInfo + } + + /** Test the property 'rail' */ + @Test + void railTest() { + // TODO: test rail + } + + /** Test the property 'addressingSystem' */ + @Test + void addressingSystemTest() { + // TODO: test addressingSystem + } + + /** Test the property 'accountHolderGivenName' */ + @Test + void accountHolderGivenNameTest() { + // TODO: test accountHolderGivenName + } + + /** Test the property 'accountHolderSurname' */ + @Test + void accountHolderSurnameTest() { + // TODO: test accountHolderSurname + } + + /** Test the property 'country' */ + @Test + void countryTest() { + // TODO: test country + } + + /** Test the property 'sortCode' */ + @Test + void sortCodeTest() { + // TODO: test sortCode + } + + /** Test the property 'accountNumber' */ + @Test + void accountNumberTest() { + // TODO: test accountNumber + } + + /** Test the property 'bankName' */ + @Test + void bankNameTest() { + // TODO: test bankName + } + + /** Test the property 'bankAccountCountry' */ + @Test + void bankAccountCountryTest() { + // TODO: test bankAccountCountry + } + + /** Test the property 'bankAccountHolderName' */ + @Test + void bankAccountHolderNameTest() { + // TODO: test bankAccountHolderName + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateQuoteTest.java b/src/test/java/com/fireblocks/sdk/model/CreateQuoteTest.java index 461d4432..c1177ff1 100644 --- a/src/test/java/com/fireblocks/sdk/model/CreateQuoteTest.java +++ b/src/test/java/com/fireblocks/sdk/model/CreateQuoteTest.java @@ -37,12 +37,24 @@ void baseAssetIdTest() { // TODO: test baseAssetId } + /** Test the property 'baseAssetRail' */ + @Test + void baseAssetRailTest() { + // TODO: test baseAssetRail + } + /** Test the property 'quoteAssetId' */ @Test void quoteAssetIdTest() { // TODO: test quoteAssetId } + /** Test the property 'quoteAssetRail' */ + @Test + void quoteAssetRailTest() { + // TODO: test quoteAssetRail + } + /** Test the property 'baseAmount' */ @Test void baseAmountTest() { diff --git a/src/test/java/com/fireblocks/sdk/model/ExternalAccountLocalBankAfricaTest.java b/src/test/java/com/fireblocks/sdk/model/ExternalAccountLocalBankAfricaTest.java index ce376bc4..d2cea6e5 100644 --- a/src/test/java/com/fireblocks/sdk/model/ExternalAccountLocalBankAfricaTest.java +++ b/src/test/java/com/fireblocks/sdk/model/ExternalAccountLocalBankAfricaTest.java @@ -25,27 +25,9 @@ void testExternalAccountLocalBankAfrica() { // TODO: test ExternalAccountLocalBankAfrica } - /** Test the property 'type' */ + /** Test the property 'successRedirectUrl' */ @Test - void typeTest() { - // TODO: test type - } - - /** Test the property 'accountNumber' */ - @Test - void accountNumberTest() { - // TODO: test accountNumber - } - - /** Test the property 'bankName' */ - @Test - void bankNameTest() { - // TODO: test bankName - } - - /** Test the property 'bankCode' */ - @Test - void bankCodeTest() { - // TODO: test bankCode + void successRedirectUrlTest() { + // TODO: test successRedirectUrl } } diff --git a/src/test/java/com/fireblocks/sdk/model/ExternalAccountMobileMoneyTest.java b/src/test/java/com/fireblocks/sdk/model/ExternalAccountMobileMoneyTest.java index 24ab3b11..ccd99284 100644 --- a/src/test/java/com/fireblocks/sdk/model/ExternalAccountMobileMoneyTest.java +++ b/src/test/java/com/fireblocks/sdk/model/ExternalAccountMobileMoneyTest.java @@ -48,4 +48,10 @@ void providerTest() { void emailTest() { // TODO: test email } + + /** Test the property 'successRedirectUrl' */ + @Test + void successRedirectUrlTest() { + // TODO: test successRedirectUrl + } } diff --git a/src/test/java/com/fireblocks/sdk/model/ExternalAccountSenderInformationTest.java b/src/test/java/com/fireblocks/sdk/model/ExternalAccountSenderInformationTest.java index 8fdb922a..2d11ba40 100644 --- a/src/test/java/com/fireblocks/sdk/model/ExternalAccountSenderInformationTest.java +++ b/src/test/java/com/fireblocks/sdk/model/ExternalAccountSenderInformationTest.java @@ -49,21 +49,9 @@ void emailTest() { // TODO: test email } - /** Test the property 'accountNumber' */ + /** Test the property 'successRedirectUrl' */ @Test - void accountNumberTest() { - // TODO: test accountNumber - } - - /** Test the property 'bankName' */ - @Test - void bankNameTest() { - // TODO: test bankName - } - - /** Test the property 'bankCode' */ - @Test - void bankCodeTest() { - // TODO: test bankCode + void successRedirectUrlTest() { + // TODO: test successRedirectUrl } } diff --git a/src/test/java/com/fireblocks/sdk/model/ExtraParametersTest.java b/src/test/java/com/fireblocks/sdk/model/ExtraParametersTest.java new file mode 100644 index 00000000..46a1b034 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ExtraParametersTest.java @@ -0,0 +1,69 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ExtraParameters */ +class ExtraParametersTest { + private final ExtraParameters model = new ExtraParameters(); + + /** Model tests for ExtraParameters */ + @Test + void testExtraParameters() { + // TODO: test ExtraParameters + } + + /** Test the property 'nodeControls' */ + @Test + void nodeControlsTest() { + // TODO: test nodeControls + } + + /** Test the property 'rawMessageData' */ + @Test + void rawMessageDataTest() { + // TODO: test rawMessageData + } + + /** Test the property 'contractCallData' */ + @Test + void contractCallDataTest() { + // TODO: test contractCallData + } + + /** Test the property 'programCallData' */ + @Test + void programCallDataTest() { + // TODO: test programCallData + } + + /** Test the property 'inputsSelection' */ + @Test + void inputsSelectionTest() { + // TODO: test inputsSelection + } + + /** Test the property 'allowBaseAssetAddress' */ + @Test + void allowBaseAssetAddressTest() { + // TODO: test allowBaseAssetAddress + } + + /** Test the property 'piiData' */ + @Test + void piiDataTest() { + // TODO: test piiData + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/InteracAddressTest.java b/src/test/java/com/fireblocks/sdk/model/InteracAddressTest.java new file mode 100644 index 00000000..8bc0b361 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/InteracAddressTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for InteracAddress */ +class InteracAddressTest { + private final InteracAddress model = new InteracAddress(); + + /** Model tests for InteracAddress */ + @Test + void testInteracAddress() { + // TODO: test InteracAddress + } + + /** Test the property 'accountHolder' */ + @Test + void accountHolderTest() { + // TODO: test accountHolder + } + + /** Test the property 'recipientHandle' */ + @Test + void recipientHandleTest() { + // TODO: test recipientHandle + } + + /** Test the property 'message' */ + @Test + void messageTest() { + // TODO: test message + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/InteracDestinationTest.java b/src/test/java/com/fireblocks/sdk/model/InteracDestinationTest.java new file mode 100644 index 00000000..d756272f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/InteracDestinationTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for InteracDestination */ +class InteracDestinationTest { + private final InteracDestination model = new InteracDestination(); + + /** Model tests for InteracDestination */ + @Test + void testInteracDestination() { + // TODO: test InteracDestination + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'address' */ + @Test + void addressTest() { + // TODO: test address + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/InteracPaymentInfoTest.java b/src/test/java/com/fireblocks/sdk/model/InteracPaymentInfoTest.java new file mode 100644 index 00000000..113826e4 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/InteracPaymentInfoTest.java @@ -0,0 +1,75 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for InteracPaymentInfo */ +class InteracPaymentInfoTest { + private final InteracPaymentInfo model = new InteracPaymentInfo(); + + /** Model tests for InteracPaymentInfo */ + @Test + void testInteracPaymentInfo() { + // TODO: test InteracPaymentInfo + } + + /** Test the property 'rail' */ + @Test + void railTest() { + // TODO: test rail + } + + /** Test the property 'addressingSystem' */ + @Test + void addressingSystemTest() { + // TODO: test addressingSystem + } + + /** Test the property 'accountHolderGivenName' */ + @Test + void accountHolderGivenNameTest() { + // TODO: test accountHolderGivenName + } + + /** Test the property 'accountHolderSurname' */ + @Test + void accountHolderSurnameTest() { + // TODO: test accountHolderSurname + } + + /** Test the property 'country' */ + @Test + void countryTest() { + // TODO: test country + } + + /** Test the property 'recipientHandleType' */ + @Test + void recipientHandleTypeTest() { + // TODO: test recipientHandleType + } + + /** Test the property 'recipientHandleValue' */ + @Test + void recipientHandleValueTest() { + // TODO: test recipientHandleValue + } + + /** Test the property 'message' */ + @Test + void messageTest() { + // TODO: test message + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/InternalTransferAddressTest.java b/src/test/java/com/fireblocks/sdk/model/InternalTransferAddressTest.java new file mode 100644 index 00000000..0bad29e6 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/InternalTransferAddressTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for InternalTransferAddress */ +class InternalTransferAddressTest { + private final InternalTransferAddress model = new InternalTransferAddress(); + + /** Model tests for InternalTransferAddress */ + @Test + void testInternalTransferAddress() { + // TODO: test InternalTransferAddress + } + + /** Test the property 'externalAccountId' */ + @Test + void externalAccountIdTest() { + // TODO: test externalAccountId + } + + /** Test the property 'accountId' */ + @Test + void accountIdTest() { + // TODO: test accountId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/InternalTransferDestinationTest.java b/src/test/java/com/fireblocks/sdk/model/InternalTransferDestinationTest.java new file mode 100644 index 00000000..9c1c6ad9 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/InternalTransferDestinationTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for InternalTransferDestination */ +class InternalTransferDestinationTest { + private final InternalTransferDestination model = new InternalTransferDestination(); + + /** Model tests for InternalTransferDestination */ + @Test + void testInternalTransferDestination() { + // TODO: test InternalTransferDestination + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'address' */ + @Test + void addressTest() { + // TODO: test address + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/LocalBankTransferAfricaAddressTest.java b/src/test/java/com/fireblocks/sdk/model/LocalBankTransferAfricaAddressTest.java index c1ddbf0b..71e3aace 100644 --- a/src/test/java/com/fireblocks/sdk/model/LocalBankTransferAfricaAddressTest.java +++ b/src/test/java/com/fireblocks/sdk/model/LocalBankTransferAfricaAddressTest.java @@ -48,4 +48,16 @@ void bankNameTest() { void bankCodeTest() { // TODO: test bankCode } + + /** Test the property 'successPaymentInstructionRedirectUrl' */ + @Test + void successPaymentInstructionRedirectUrlTest() { + // TODO: test successPaymentInstructionRedirectUrl + } + + /** Test the property 'paymentRedirect' */ + @Test + void paymentRedirectTest() { + // TODO: test paymentRedirect + } } diff --git a/src/test/java/com/fireblocks/sdk/model/MobileMoneyAddressTest.java b/src/test/java/com/fireblocks/sdk/model/MobileMoneyAddressTest.java index 6b52fc74..a7bb153b 100644 --- a/src/test/java/com/fireblocks/sdk/model/MobileMoneyAddressTest.java +++ b/src/test/java/com/fireblocks/sdk/model/MobileMoneyAddressTest.java @@ -54,4 +54,16 @@ void beneficiaryDocumentIdTest() { void beneficiaryRelationshipTest() { // TODO: test beneficiaryRelationship } + + /** Test the property 'successPaymentInstructionRedirectUrl' */ + @Test + void successPaymentInstructionRedirectUrlTest() { + // TODO: test successPaymentInstructionRedirectUrl + } + + /** Test the property 'paymentRedirect' */ + @Test + void paymentRedirectTest() { + // TODO: test paymentRedirect + } } diff --git a/src/test/java/com/fireblocks/sdk/model/PayidAddressTest.java b/src/test/java/com/fireblocks/sdk/model/PayidAddressTest.java new file mode 100644 index 00000000..e6260537 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/PayidAddressTest.java @@ -0,0 +1,57 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for PayidAddress */ +class PayidAddressTest { + private final PayidAddress model = new PayidAddress(); + + /** Model tests for PayidAddress */ + @Test + void testPayidAddress() { + // TODO: test PayidAddress + } + + /** Test the property 'accountHolder' */ + @Test + void accountHolderTest() { + // TODO: test accountHolder + } + + /** Test the property 'value' */ + @Test + void valueTest() { + // TODO: test value + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'bsb' */ + @Test + void bsbTest() { + // TODO: test bsb + } + + /** Test the property 'accountNumber' */ + @Test + void accountNumberTest() { + // TODO: test accountNumber + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/PayidDestinationTest.java b/src/test/java/com/fireblocks/sdk/model/PayidDestinationTest.java new file mode 100644 index 00000000..21d93f24 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/PayidDestinationTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for PayidDestination */ +class PayidDestinationTest { + private final PayidDestination model = new PayidDestination(); + + /** Model tests for PayidDestination */ + @Test + void testPayidDestination() { + // TODO: test PayidDestination + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'address' */ + @Test + void addressTest() { + // TODO: test address + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/PayidPaymentInfoTest.java b/src/test/java/com/fireblocks/sdk/model/PayidPaymentInfoTest.java new file mode 100644 index 00000000..e82c77c7 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/PayidPaymentInfoTest.java @@ -0,0 +1,81 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for PayidPaymentInfo */ +class PayidPaymentInfoTest { + private final PayidPaymentInfo model = new PayidPaymentInfo(); + + /** Model tests for PayidPaymentInfo */ + @Test + void testPayidPaymentInfo() { + // TODO: test PayidPaymentInfo + } + + /** Test the property 'rail' */ + @Test + void railTest() { + // TODO: test rail + } + + /** Test the property 'addressingSystem' */ + @Test + void addressingSystemTest() { + // TODO: test addressingSystem + } + + /** Test the property 'accountHolderGivenName' */ + @Test + void accountHolderGivenNameTest() { + // TODO: test accountHolderGivenName + } + + /** Test the property 'accountHolderSurname' */ + @Test + void accountHolderSurnameTest() { + // TODO: test accountHolderSurname + } + + /** Test the property 'country' */ + @Test + void countryTest() { + // TODO: test country + } + + /** Test the property 'value' */ + @Test + void valueTest() { + // TODO: test value + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'bsb' */ + @Test + void bsbTest() { + // TODO: test bsb + } + + /** Test the property 'accountNumber' */ + @Test + void accountNumberTest() { + // TODO: test accountNumber + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/PaymentRedirectTest.java b/src/test/java/com/fireblocks/sdk/model/PaymentRedirectTest.java new file mode 100644 index 00000000..01e30d35 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/PaymentRedirectTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for PaymentRedirect */ +class PaymentRedirectTest { + private final PaymentRedirect model = new PaymentRedirect(); + + /** Model tests for PaymentRedirect */ + @Test + void testPaymentRedirect() { + // TODO: test PaymentRedirect + } + + /** Test the property 'url' */ + @Test + void urlTest() { + // TODO: test url + } + + /** Test the property 'expiresAt' */ + @Test + void expiresAtTest() { + // TODO: test expiresAt + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/PixAddressTest.java b/src/test/java/com/fireblocks/sdk/model/PixAddressTest.java index 6fe95618..495ee502 100644 --- a/src/test/java/com/fireblocks/sdk/model/PixAddressTest.java +++ b/src/test/java/com/fireblocks/sdk/model/PixAddressTest.java @@ -54,4 +54,16 @@ void bankNameTest() { void bankCodeTest() { // TODO: test bankCode } + + /** Test the property 'qrCode' */ + @Test + void qrCodeTest() { + // TODO: test qrCode + } + + /** Test the property 'expirationDate' */ + @Test + void expirationDateTest() { + // TODO: test expirationDate + } } diff --git a/src/test/java/com/fireblocks/sdk/model/RecipientHandleTest.java b/src/test/java/com/fireblocks/sdk/model/RecipientHandleTest.java new file mode 100644 index 00000000..b91a13e6 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/RecipientHandleTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for RecipientHandle */ +class RecipientHandleTest { + private final RecipientHandle model = new RecipientHandle(); + + /** Model tests for RecipientHandle */ + @Test + void testRecipientHandle() { + // TODO: test RecipientHandle + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'value' */ + @Test + void valueTest() { + // TODO: test value + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ExternalAccountLocalBankAfricaTypeTest.java b/src/test/java/com/fireblocks/sdk/model/WorkspaceTest.java similarity index 63% rename from src/test/java/com/fireblocks/sdk/model/ExternalAccountLocalBankAfricaTypeTest.java rename to src/test/java/com/fireblocks/sdk/model/WorkspaceTest.java index fdc3f76d..b1717d87 100644 --- a/src/test/java/com/fireblocks/sdk/model/ExternalAccountLocalBankAfricaTypeTest.java +++ b/src/test/java/com/fireblocks/sdk/model/WorkspaceTest.java @@ -15,11 +15,25 @@ import org.junit.jupiter.api.Test; -/** Model tests for ExternalAccountLocalBankAfricaType */ -class ExternalAccountLocalBankAfricaTypeTest { - /** Model tests for ExternalAccountLocalBankAfricaType */ +/** Model tests for Workspace */ +class WorkspaceTest { + private final Workspace model = new Workspace(); + + /** Model tests for Workspace */ + @Test + void testWorkspace() { + // TODO: test Workspace + } + + /** Test the property 'id' */ + @Test + void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ @Test - void testExternalAccountLocalBankAfricaType() { - // TODO: test ExternalAccountLocalBankAfricaType + void nameTest() { + // TODO: test name } }