diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index f9ff3bed..850c86bd 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -11,9 +11,16 @@ build.sbt docs/APIUser.md docs/AbaPaymentInfo.md docs/AbiFunction.md +docs/AccessType.md docs/Account.md +docs/AccountAccess.md +docs/AccountBase.md +docs/AccountBasedAccessProvider.md docs/AccountConfig.md +docs/AccountHolderDetails.md docs/AccountIdentifier.md +docs/AccountProviderID.md +docs/AccountReference.md docs/AccountType.md docs/AccountType2.md docs/AchPaymentInfo.md @@ -54,6 +61,7 @@ docs/AssetConfig.md docs/AssetConflictErrorResponse.md docs/AssetDetailsMetadata.md docs/AssetDetailsOnchain.md +docs/AssetFeature.md docs/AssetForbiddenErrorResponse.md docs/AssetInternalServerErrorResponse.md docs/AssetMedia.md @@ -79,6 +87,7 @@ docs/AuditLogsApi.md docs/AuditorData.md docs/AuthorizationGroups.md docs/AuthorizationInfo.md +docs/BaseProvider.md docs/BasicAddressRequest.md docs/BlockInfo.md docs/BlockchainExplorer.md @@ -87,10 +96,14 @@ docs/BlockchainMetadata.md docs/BlockchainNotFoundErrorResponse.md docs/BlockchainOnchain.md docs/BlockchainResponse.md +docs/BlockchainTransfer.md docs/BlockchainsAssetsApi.md +docs/BpsFee.md +docs/BusinessIdentification.md docs/CallbackHandler.md docs/CallbackHandlerRequest.md docs/CancelTransactionResponse.md +docs/Capability.md docs/ChainDescriptor.md docs/ChainInfoResponse.md docs/ChannelDvnConfigWithConfirmations.md @@ -106,6 +119,7 @@ docs/CollectionOwnershipResponse.md docs/CollectionTokenMetadataAttributeDto.md docs/CollectionTokenMetadataDto.md docs/CollectionType.md +docs/CommittedQuoteType.md docs/ComplianceApi.md docs/ComplianceResultFullPayload.md docs/ComplianceResultStatusesEnum.md @@ -120,6 +134,22 @@ docs/ConfigOperation.md docs/ConfigOperationSnapshot.md docs/ConfigOperationStatus.md docs/ConfigTransferOperationSnapshot.md +docs/ConnectedAccount.md +docs/ConnectedAccountApprovalStatus.md +docs/ConnectedAccountAssetType.md +docs/ConnectedAccountBalances.md +docs/ConnectedAccountBalancesResponse.md +docs/ConnectedAccountCapability.md +docs/ConnectedAccountManifest.md +docs/ConnectedAccountRateResponse.md +docs/ConnectedAccountTotalBalance.md +docs/ConnectedAccountTradingPair.md +docs/ConnectedAccountTradingPairSupportedType.md +docs/ConnectedAccountTradingPairsResponse.md +docs/ConnectedAccountsBetaApi.md +docs/ConnectedAccountsResponse.md +docs/ConnectedSingleAccount.md +docs/ConnectedSingleAccountResponse.md docs/ConsoleUser.md docs/ConsoleUserApi.md docs/ContractAbiResponseDto.md @@ -181,7 +211,10 @@ docs/CreateMultipleDepositAddressesRequest.md docs/CreateMultipleVaultAccountsJobStatus.md docs/CreateNcwConnectionRequest.md docs/CreateNetworkIdRequest.md +docs/CreateOrderRequest.md docs/CreatePayoutRequest.md +docs/CreateQuote.md +docs/CreateQuoteScopeInner.md docs/CreateSigningKeyDto.md docs/CreateSigningKeyDtoProofOfOwnership.md docs/CreateTagRequest.md @@ -199,6 +232,7 @@ docs/CreateWalletRequest.md docs/CreateWebhookRequest.md docs/CreateWorkflowExecutionRequestParamsInner.md docs/CustomRoutingDest.md +docs/DVPSettlement.md docs/DefaultNetworkRoutingDest.md docs/Delegation.md docs/DelegationSummary.md @@ -217,6 +251,8 @@ docs/Destination.md docs/DestinationConfig.md docs/DestinationTransferPeerPath.md docs/DestinationTransferPeerPathResponse.md +docs/DirectAccess.md +docs/DirectAccessProvider.md docs/DisbursementAmountInstruction.md docs/DisbursementConfigOperation.md docs/DisbursementInstruction.md @@ -259,6 +295,7 @@ docs/EmbeddedWalletPaginatedAssetsResponse.md docs/EmbeddedWalletPaginatedWalletsResponse.md docs/EmbeddedWalletSetUpStatus.md docs/EmbeddedWalletsApi.md +docs/ErrorCodes.md docs/ErrorResponse.md docs/ErrorResponseError.md docs/ErrorSchema.md @@ -276,10 +313,21 @@ docs/ExchangeType.md docs/ExecutionConversionOperation.md docs/ExecutionDisbursementOperation.md docs/ExecutionOperationStatus.md +docs/ExecutionRequestBaseDetails.md +docs/ExecutionRequestDetails.md +docs/ExecutionResponseBaseDetails.md +docs/ExecutionResponseDetails.md docs/ExecutionScreeningOperation.md +docs/ExecutionStep.md +docs/ExecutionStepDetails.md +docs/ExecutionStepError.md +docs/ExecutionStepStatusEnum.md +docs/ExecutionStepType.md docs/ExecutionTransferOperation.md +docs/ExternalAccount.md docs/ExternalWalletAsset.md docs/ExternalWalletsApi.md +docs/Fee.md docs/FeeBreakdown.md docs/FeeBreakdownOneOf.md docs/FeeBreakdownOneOf1.md @@ -290,6 +338,8 @@ docs/FiatAccount.md docs/FiatAccountType.md docs/FiatAccountsApi.md docs/FiatAsset.md +docs/FiatTransfer.md +docs/FixedFee.md docs/FreezeTransactionResponse.md docs/FunctionDoc.md docs/Funds.md @@ -312,6 +362,7 @@ docs/GetLinkedCollectionsPaginatedResponse.md docs/GetMaxSpendableAmountResponse.md docs/GetMpcKeysResponse.md docs/GetNFTsResponse.md +docs/GetOrdersResponse.md docs/GetOtaStatusResponse.md docs/GetOwnershipTokensResponse.md docs/GetSigningKeyResponseDto.md @@ -321,10 +372,13 @@ docs/GetWhitelistIpAddressesResponse.md docs/GetWorkspaceStatusResponse.md docs/HttpContractDoesNotExistError.md docs/IbanPaymentInfo.md +docs/Identification.md docs/IdlType.md +docs/IndicativeQuoteType.md docs/InitiatorConfig.md docs/InitiatorConfigPattern.md docs/InstructionAmount.md +docs/InternalReference.md docs/InternalTransferResponse.md docs/InternalWalletsApi.md docs/InvalidParamaterValueError.md @@ -366,10 +420,16 @@ docs/LegacyPolicyValidation.md docs/LegacyPublishDraftRequest.md docs/LegacyPublishResult.md docs/LegacySrcOrDestAttributesInner.md +docs/LimitExecutionRequestDetails.md +docs/LimitExecutionResponseDetails.md docs/ListAssetsResponse.md docs/ListBlockchainsResponse.md docs/ListOwnedCollectionsResponse.md docs/ListOwnedTokensResponse.md +docs/Manifest.md +docs/MarketExecutionRequestDetails.md +docs/MarketExecutionResponseDetails.md +docs/MarketRequoteRequestDetails.md docs/MediaEntityResponse.md docs/MergeStakeAccountsRequest.md docs/MergeStakeAccountsResponse.md @@ -392,8 +452,6 @@ docs/NetworkIdRoutingPolicyValue.md docs/NetworkRecord.md docs/NewAddress.md docs/NftsApi.md -docs/NonWalletQuoteFee.md -docs/NonWalletQuoteResponse.md docs/NoneNetworkRoutingDest.md docs/NotFoundException.md docs/Notification.md @@ -405,7 +463,11 @@ docs/NotificationWithData.md docs/OffExchangesApi.md docs/OneTimeAddress.md docs/OneTimeAddressAccount.md +docs/OneTimeAddressReference.md docs/OperationExecutionFailure.md +docs/OrderDetails.md +docs/OrderStatus.md +docs/OrderSummary.md docs/OtaBetaApi.md docs/PaginatedAddressResponse.md docs/PaginatedAddressResponsePaging.md @@ -417,12 +479,15 @@ docs/PairApiKeyRequest.md docs/PairApiKeyResponse.md docs/Parameter.md docs/ParameterWithValue.md +docs/ParticipantRelationshipType.md +docs/ParticipantsIdentification.md docs/PayeeAccount.md docs/PayeeAccountResponse.md docs/PayeeAccountType.md docs/PaymentAccount.md docs/PaymentAccountResponse.md docs/PaymentAccountType.md +docs/PaymentInstructions.md docs/PaymentsPayoutApi.md docs/PayoutInitMethod.md docs/PayoutInstruction.md @@ -432,7 +497,11 @@ docs/PayoutResponse.md docs/PayoutState.md docs/PayoutStatus.md docs/PeerAdapterInfo.md +docs/PeerType.md +docs/PersonalIdentification.md +docs/PersonalIdentificationFullName.md docs/PixPaymentInfo.md +docs/PlatformAccount.md docs/Players.md docs/PolicyAndValidationResponse.md docs/PolicyCheckResult.md @@ -447,17 +516,25 @@ docs/PolicyRuleError.md docs/PolicyStatus.md docs/PolicyType.md docs/PolicyValidation.md +docs/PostOrderSettlement.md +docs/PostalAddress.md docs/PreScreening.md +docs/PrefundedSettlement.md docs/ProgramCallConfig.md docs/Provider.md -docs/ProviderAdditionalData.md -docs/ProviderCategoryEnum.md +docs/ProviderID.md +docs/ProvidersListResponse.md docs/PublicKeyInformation.md docs/PublishDraftRequest.md docs/PublishResult.md -docs/QuoteFee.md -docs/QuoteRequest.md -docs/QuoteResponse.md +docs/Quote.md +docs/QuoteExecutionRequestDetails.md +docs/QuoteExecutionResponseDetails.md +docs/QuoteExecutionWithRequoteRequestDetails.md +docs/QuoteExecutionWithRequoteRequestDetailsAllOfReQuote.md +docs/QuoteExecutionWithRequoteResponseDetails.md +docs/QuoteExecutionWithRequoteResponseDetailsAllOfReQuote.md +docs/QuotesResponse.md docs/ReadAbiFunction.md docs/ReadCallFunctionDto.md docs/ReadCallFunctionDtoAbiFunction.md @@ -484,6 +561,7 @@ docs/ResendWebhooksByTransactionIdResponse.md docs/ResendWebhooksResponse.md docs/ResetDeviceApi.md docs/RespondToConnectionRequest.md +docs/RetryRequoteRequestDetails.md docs/RewardInfo.md docs/RewardsInfo.md docs/SOLAccount.md @@ -525,8 +603,10 @@ docs/SetOtaStatusResponse.md docs/SetOtaStatusResponseOneOf.md docs/SetRoutingPolicyRequest.md docs/SetRoutingPolicyResponse.md +docs/Settlement.md docs/SettlementRequestBody.md docs/SettlementResponse.md +docs/SettlementSourceAccount.md docs/SignedMessage.md docs/SignedMessageSignature.md docs/SigningKeyDto.md @@ -577,16 +657,6 @@ docs/StakingApi.md docs/StakingProvider.md docs/Status.md docs/StellarRippleCreateParamsDto.md -docs/SwapBetaApi.md -docs/SwapFlowError.md -docs/SwapOperation.md -docs/SwapOperationRequest.md -docs/SwapOperationsPaginatedResponse.md -docs/SwapProvider.md -docs/SwapProviderProtocolsEnum.md -docs/SwapProvidersPaginatedResponse.md -docs/SwapRequiredAction.md -docs/SwapRequiredActionsEnum.md docs/SystemMessageInfo.md docs/Tag.md docs/TagsApi.md @@ -594,6 +664,7 @@ docs/TagsPagedResponse.md docs/Task.md docs/TemplatesPaginatedResponse.md docs/ThirdPartyRouting.md +docs/TimeInForce.md docs/TimePeriodConfig.md docs/TimePeriodMatchType.md docs/ToCollateralTransaction.md @@ -612,6 +683,10 @@ docs/TokenResponse.md docs/TokenizationApi.md docs/TokensPaginatedResponse.md docs/TradingAccountType.md +docs/TradingBetaApi.md +docs/TradingErrorResponse.md +docs/TradingErrorResponseError.md +docs/TradingProvider.md docs/Transaction.md docs/TransactionFee.md docs/TransactionOperation.md @@ -642,6 +717,8 @@ docs/TransferOperationPreviewOutput.md docs/TransferOperationType.md docs/TransferPeerPathSubType.md docs/TransferPeerPathType.md +docs/TransferRail.md +docs/TransferReceipt.md docs/TransferValidationFailure.md docs/TravelRuleAddress.md docs/TravelRuleApi.md @@ -722,7 +799,6 @@ docs/VerdictConfig.md docs/Version.md docs/WalletAsset.md docs/WalletAssetAdditionalInfo.md -docs/WalletQuoteResponse.md docs/Web3ConnectionsApi.md docs/Webhook.md docs/WebhookEvent.md @@ -773,6 +849,7 @@ src/main/java/com/fireblocks/sdk/api/AuditLogsApi.java src/main/java/com/fireblocks/sdk/api/BlockchainsAssetsApi.java src/main/java/com/fireblocks/sdk/api/ComplianceApi.java src/main/java/com/fireblocks/sdk/api/ComplianceScreeningConfigurationApi.java +src/main/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApi.java src/main/java/com/fireblocks/sdk/api/ConsoleUserApi.java src/main/java/com/fireblocks/sdk/api/ContractInteractionsApi.java src/main/java/com/fireblocks/sdk/api/ContractTemplatesApi.java @@ -798,9 +875,9 @@ src/main/java/com/fireblocks/sdk/api/PolicyEditorV2BetaApi.java src/main/java/com/fireblocks/sdk/api/ResetDeviceApi.java src/main/java/com/fireblocks/sdk/api/SmartTransferApi.java src/main/java/com/fireblocks/sdk/api/StakingApi.java -src/main/java/com/fireblocks/sdk/api/SwapBetaApi.java src/main/java/com/fireblocks/sdk/api/TagsApi.java src/main/java/com/fireblocks/sdk/api/TokenizationApi.java +src/main/java/com/fireblocks/sdk/api/TradingBetaApi.java src/main/java/com/fireblocks/sdk/api/TransactionsApi.java src/main/java/com/fireblocks/sdk/api/TravelRuleApi.java src/main/java/com/fireblocks/sdk/api/UserGroupsBetaApi.java @@ -815,9 +892,16 @@ src/main/java/com/fireblocks/sdk/model/APIUser.java src/main/java/com/fireblocks/sdk/model/AbaPaymentInfo.java src/main/java/com/fireblocks/sdk/model/AbiFunction.java src/main/java/com/fireblocks/sdk/model/AbstractOpenApiSchema.java +src/main/java/com/fireblocks/sdk/model/AccessType.java src/main/java/com/fireblocks/sdk/model/Account.java +src/main/java/com/fireblocks/sdk/model/AccountAccess.java +src/main/java/com/fireblocks/sdk/model/AccountBase.java +src/main/java/com/fireblocks/sdk/model/AccountBasedAccessProvider.java src/main/java/com/fireblocks/sdk/model/AccountConfig.java +src/main/java/com/fireblocks/sdk/model/AccountHolderDetails.java src/main/java/com/fireblocks/sdk/model/AccountIdentifier.java +src/main/java/com/fireblocks/sdk/model/AccountProviderID.java +src/main/java/com/fireblocks/sdk/model/AccountReference.java src/main/java/com/fireblocks/sdk/model/AccountType.java src/main/java/com/fireblocks/sdk/model/AccountType2.java src/main/java/com/fireblocks/sdk/model/AchPaymentInfo.java @@ -857,6 +941,7 @@ src/main/java/com/fireblocks/sdk/model/AssetConfig.java src/main/java/com/fireblocks/sdk/model/AssetConflictErrorResponse.java src/main/java/com/fireblocks/sdk/model/AssetDetailsMetadata.java src/main/java/com/fireblocks/sdk/model/AssetDetailsOnchain.java +src/main/java/com/fireblocks/sdk/model/AssetFeature.java src/main/java/com/fireblocks/sdk/model/AssetForbiddenErrorResponse.java src/main/java/com/fireblocks/sdk/model/AssetInternalServerErrorResponse.java src/main/java/com/fireblocks/sdk/model/AssetMedia.java @@ -880,6 +965,7 @@ src/main/java/com/fireblocks/sdk/model/AuditLogData.java src/main/java/com/fireblocks/sdk/model/AuditorData.java src/main/java/com/fireblocks/sdk/model/AuthorizationGroups.java src/main/java/com/fireblocks/sdk/model/AuthorizationInfo.java +src/main/java/com/fireblocks/sdk/model/BaseProvider.java src/main/java/com/fireblocks/sdk/model/BasicAddressRequest.java src/main/java/com/fireblocks/sdk/model/BlockInfo.java src/main/java/com/fireblocks/sdk/model/BlockchainExplorer.java @@ -888,9 +974,13 @@ src/main/java/com/fireblocks/sdk/model/BlockchainMetadata.java src/main/java/com/fireblocks/sdk/model/BlockchainNotFoundErrorResponse.java src/main/java/com/fireblocks/sdk/model/BlockchainOnchain.java src/main/java/com/fireblocks/sdk/model/BlockchainResponse.java +src/main/java/com/fireblocks/sdk/model/BlockchainTransfer.java +src/main/java/com/fireblocks/sdk/model/BpsFee.java +src/main/java/com/fireblocks/sdk/model/BusinessIdentification.java src/main/java/com/fireblocks/sdk/model/CallbackHandler.java src/main/java/com/fireblocks/sdk/model/CallbackHandlerRequest.java src/main/java/com/fireblocks/sdk/model/CancelTransactionResponse.java +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 @@ -906,6 +996,7 @@ src/main/java/com/fireblocks/sdk/model/CollectionOwnershipResponse.java src/main/java/com/fireblocks/sdk/model/CollectionTokenMetadataAttributeDto.java src/main/java/com/fireblocks/sdk/model/CollectionTokenMetadataDto.java src/main/java/com/fireblocks/sdk/model/CollectionType.java +src/main/java/com/fireblocks/sdk/model/CommittedQuoteType.java src/main/java/com/fireblocks/sdk/model/ComplianceResultFullPayload.java src/main/java/com/fireblocks/sdk/model/ComplianceResultStatusesEnum.java src/main/java/com/fireblocks/sdk/model/ComplianceResults.java @@ -918,6 +1009,21 @@ src/main/java/com/fireblocks/sdk/model/ConfigOperation.java src/main/java/com/fireblocks/sdk/model/ConfigOperationSnapshot.java src/main/java/com/fireblocks/sdk/model/ConfigOperationStatus.java src/main/java/com/fireblocks/sdk/model/ConfigTransferOperationSnapshot.java +src/main/java/com/fireblocks/sdk/model/ConnectedAccount.java +src/main/java/com/fireblocks/sdk/model/ConnectedAccountApprovalStatus.java +src/main/java/com/fireblocks/sdk/model/ConnectedAccountAssetType.java +src/main/java/com/fireblocks/sdk/model/ConnectedAccountBalances.java +src/main/java/com/fireblocks/sdk/model/ConnectedAccountBalancesResponse.java +src/main/java/com/fireblocks/sdk/model/ConnectedAccountCapability.java +src/main/java/com/fireblocks/sdk/model/ConnectedAccountManifest.java +src/main/java/com/fireblocks/sdk/model/ConnectedAccountRateResponse.java +src/main/java/com/fireblocks/sdk/model/ConnectedAccountTotalBalance.java +src/main/java/com/fireblocks/sdk/model/ConnectedAccountTradingPair.java +src/main/java/com/fireblocks/sdk/model/ConnectedAccountTradingPairSupportedType.java +src/main/java/com/fireblocks/sdk/model/ConnectedAccountTradingPairsResponse.java +src/main/java/com/fireblocks/sdk/model/ConnectedAccountsResponse.java +src/main/java/com/fireblocks/sdk/model/ConnectedSingleAccount.java +src/main/java/com/fireblocks/sdk/model/ConnectedSingleAccountResponse.java src/main/java/com/fireblocks/sdk/model/ConsoleUser.java src/main/java/com/fireblocks/sdk/model/ContractAbiResponseDto.java src/main/java/com/fireblocks/sdk/model/ContractAbiResponseDtoAbiInner.java @@ -974,7 +1080,10 @@ src/main/java/com/fireblocks/sdk/model/CreateMultipleDepositAddressesRequest.jav src/main/java/com/fireblocks/sdk/model/CreateMultipleVaultAccountsJobStatus.java src/main/java/com/fireblocks/sdk/model/CreateNcwConnectionRequest.java src/main/java/com/fireblocks/sdk/model/CreateNetworkIdRequest.java +src/main/java/com/fireblocks/sdk/model/CreateOrderRequest.java src/main/java/com/fireblocks/sdk/model/CreatePayoutRequest.java +src/main/java/com/fireblocks/sdk/model/CreateQuote.java +src/main/java/com/fireblocks/sdk/model/CreateQuoteScopeInner.java src/main/java/com/fireblocks/sdk/model/CreateSigningKeyDto.java src/main/java/com/fireblocks/sdk/model/CreateSigningKeyDtoProofOfOwnership.java src/main/java/com/fireblocks/sdk/model/CreateTagRequest.java @@ -992,6 +1101,7 @@ src/main/java/com/fireblocks/sdk/model/CreateWalletRequest.java src/main/java/com/fireblocks/sdk/model/CreateWebhookRequest.java src/main/java/com/fireblocks/sdk/model/CreateWorkflowExecutionRequestParamsInner.java src/main/java/com/fireblocks/sdk/model/CustomRoutingDest.java +src/main/java/com/fireblocks/sdk/model/DVPSettlement.java src/main/java/com/fireblocks/sdk/model/DefaultNetworkRoutingDest.java src/main/java/com/fireblocks/sdk/model/Delegation.java src/main/java/com/fireblocks/sdk/model/DelegationSummary.java @@ -1009,6 +1119,8 @@ src/main/java/com/fireblocks/sdk/model/Destination.java src/main/java/com/fireblocks/sdk/model/DestinationConfig.java src/main/java/com/fireblocks/sdk/model/DestinationTransferPeerPath.java src/main/java/com/fireblocks/sdk/model/DestinationTransferPeerPathResponse.java +src/main/java/com/fireblocks/sdk/model/DirectAccess.java +src/main/java/com/fireblocks/sdk/model/DirectAccessProvider.java src/main/java/com/fireblocks/sdk/model/DisbursementAmountInstruction.java src/main/java/com/fireblocks/sdk/model/DisbursementConfigOperation.java src/main/java/com/fireblocks/sdk/model/DisbursementInstruction.java @@ -1050,6 +1162,7 @@ src/main/java/com/fireblocks/sdk/model/EmbeddedWalletPaginatedAddressesResponse. src/main/java/com/fireblocks/sdk/model/EmbeddedWalletPaginatedAssetsResponse.java src/main/java/com/fireblocks/sdk/model/EmbeddedWalletPaginatedWalletsResponse.java src/main/java/com/fireblocks/sdk/model/EmbeddedWalletSetUpStatus.java +src/main/java/com/fireblocks/sdk/model/ErrorCodes.java src/main/java/com/fireblocks/sdk/model/ErrorResponse.java src/main/java/com/fireblocks/sdk/model/ErrorResponseError.java src/main/java/com/fireblocks/sdk/model/ErrorSchema.java @@ -1066,9 +1179,20 @@ src/main/java/com/fireblocks/sdk/model/ExchangeType.java src/main/java/com/fireblocks/sdk/model/ExecutionConversionOperation.java src/main/java/com/fireblocks/sdk/model/ExecutionDisbursementOperation.java src/main/java/com/fireblocks/sdk/model/ExecutionOperationStatus.java +src/main/java/com/fireblocks/sdk/model/ExecutionRequestBaseDetails.java +src/main/java/com/fireblocks/sdk/model/ExecutionRequestDetails.java +src/main/java/com/fireblocks/sdk/model/ExecutionResponseBaseDetails.java +src/main/java/com/fireblocks/sdk/model/ExecutionResponseDetails.java src/main/java/com/fireblocks/sdk/model/ExecutionScreeningOperation.java +src/main/java/com/fireblocks/sdk/model/ExecutionStep.java +src/main/java/com/fireblocks/sdk/model/ExecutionStepDetails.java +src/main/java/com/fireblocks/sdk/model/ExecutionStepError.java +src/main/java/com/fireblocks/sdk/model/ExecutionStepStatusEnum.java +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/ExternalWalletAsset.java +src/main/java/com/fireblocks/sdk/model/Fee.java src/main/java/com/fireblocks/sdk/model/FeeBreakdown.java src/main/java/com/fireblocks/sdk/model/FeeBreakdownOneOf.java src/main/java/com/fireblocks/sdk/model/FeeBreakdownOneOf1.java @@ -1078,6 +1202,8 @@ src/main/java/com/fireblocks/sdk/model/FetchAbiRequestDto.java src/main/java/com/fireblocks/sdk/model/FiatAccount.java src/main/java/com/fireblocks/sdk/model/FiatAccountType.java src/main/java/com/fireblocks/sdk/model/FiatAsset.java +src/main/java/com/fireblocks/sdk/model/FiatTransfer.java +src/main/java/com/fireblocks/sdk/model/FixedFee.java src/main/java/com/fireblocks/sdk/model/FreezeTransactionResponse.java src/main/java/com/fireblocks/sdk/model/FunctionDoc.java src/main/java/com/fireblocks/sdk/model/Funds.java @@ -1099,6 +1225,7 @@ src/main/java/com/fireblocks/sdk/model/GetLinkedCollectionsPaginatedResponse.jav src/main/java/com/fireblocks/sdk/model/GetMaxSpendableAmountResponse.java src/main/java/com/fireblocks/sdk/model/GetMpcKeysResponse.java src/main/java/com/fireblocks/sdk/model/GetNFTsResponse.java +src/main/java/com/fireblocks/sdk/model/GetOrdersResponse.java src/main/java/com/fireblocks/sdk/model/GetOtaStatusResponse.java src/main/java/com/fireblocks/sdk/model/GetOwnershipTokensResponse.java src/main/java/com/fireblocks/sdk/model/GetSigningKeyResponseDto.java @@ -1108,10 +1235,13 @@ src/main/java/com/fireblocks/sdk/model/GetWhitelistIpAddressesResponse.java src/main/java/com/fireblocks/sdk/model/GetWorkspaceStatusResponse.java src/main/java/com/fireblocks/sdk/model/HttpContractDoesNotExistError.java src/main/java/com/fireblocks/sdk/model/IbanPaymentInfo.java +src/main/java/com/fireblocks/sdk/model/Identification.java src/main/java/com/fireblocks/sdk/model/IdlType.java +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/InternalReference.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/Job.java @@ -1149,10 +1279,16 @@ src/main/java/com/fireblocks/sdk/model/LegacyPolicyValidation.java src/main/java/com/fireblocks/sdk/model/LegacyPublishDraftRequest.java src/main/java/com/fireblocks/sdk/model/LegacyPublishResult.java src/main/java/com/fireblocks/sdk/model/LegacySrcOrDestAttributesInner.java +src/main/java/com/fireblocks/sdk/model/LimitExecutionRequestDetails.java +src/main/java/com/fireblocks/sdk/model/LimitExecutionResponseDetails.java src/main/java/com/fireblocks/sdk/model/ListAssetsResponse.java src/main/java/com/fireblocks/sdk/model/ListBlockchainsResponse.java src/main/java/com/fireblocks/sdk/model/ListOwnedCollectionsResponse.java src/main/java/com/fireblocks/sdk/model/ListOwnedTokensResponse.java +src/main/java/com/fireblocks/sdk/model/Manifest.java +src/main/java/com/fireblocks/sdk/model/MarketExecutionRequestDetails.java +src/main/java/com/fireblocks/sdk/model/MarketExecutionResponseDetails.java +src/main/java/com/fireblocks/sdk/model/MarketRequoteRequestDetails.java src/main/java/com/fireblocks/sdk/model/MediaEntityResponse.java src/main/java/com/fireblocks/sdk/model/MergeStakeAccountsRequest.java src/main/java/com/fireblocks/sdk/model/MergeStakeAccountsResponse.java @@ -1173,8 +1309,6 @@ src/main/java/com/fireblocks/sdk/model/NetworkIdResponse.java src/main/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyValue.java src/main/java/com/fireblocks/sdk/model/NetworkRecord.java src/main/java/com/fireblocks/sdk/model/NewAddress.java -src/main/java/com/fireblocks/sdk/model/NonWalletQuoteFee.java -src/main/java/com/fireblocks/sdk/model/NonWalletQuoteResponse.java src/main/java/com/fireblocks/sdk/model/NoneNetworkRoutingDest.java src/main/java/com/fireblocks/sdk/model/NotFoundException.java src/main/java/com/fireblocks/sdk/model/Notification.java @@ -1185,7 +1319,11 @@ src/main/java/com/fireblocks/sdk/model/NotificationStatus.java src/main/java/com/fireblocks/sdk/model/NotificationWithData.java src/main/java/com/fireblocks/sdk/model/OneTimeAddress.java src/main/java/com/fireblocks/sdk/model/OneTimeAddressAccount.java +src/main/java/com/fireblocks/sdk/model/OneTimeAddressReference.java src/main/java/com/fireblocks/sdk/model/OperationExecutionFailure.java +src/main/java/com/fireblocks/sdk/model/OrderDetails.java +src/main/java/com/fireblocks/sdk/model/OrderStatus.java +src/main/java/com/fireblocks/sdk/model/OrderSummary.java src/main/java/com/fireblocks/sdk/model/PaginatedAddressResponse.java src/main/java/com/fireblocks/sdk/model/PaginatedAddressResponsePaging.java src/main/java/com/fireblocks/sdk/model/PaginatedAssetWalletResponse.java @@ -1196,12 +1334,15 @@ src/main/java/com/fireblocks/sdk/model/PairApiKeyRequest.java src/main/java/com/fireblocks/sdk/model/PairApiKeyResponse.java src/main/java/com/fireblocks/sdk/model/Parameter.java src/main/java/com/fireblocks/sdk/model/ParameterWithValue.java +src/main/java/com/fireblocks/sdk/model/ParticipantRelationshipType.java +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/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/PayoutInitMethod.java src/main/java/com/fireblocks/sdk/model/PayoutInstruction.java src/main/java/com/fireblocks/sdk/model/PayoutInstructionResponse.java @@ -1210,7 +1351,11 @@ src/main/java/com/fireblocks/sdk/model/PayoutResponse.java src/main/java/com/fireblocks/sdk/model/PayoutState.java src/main/java/com/fireblocks/sdk/model/PayoutStatus.java src/main/java/com/fireblocks/sdk/model/PeerAdapterInfo.java +src/main/java/com/fireblocks/sdk/model/PeerType.java +src/main/java/com/fireblocks/sdk/model/PersonalIdentification.java +src/main/java/com/fireblocks/sdk/model/PersonalIdentificationFullName.java src/main/java/com/fireblocks/sdk/model/PixPaymentInfo.java +src/main/java/com/fireblocks/sdk/model/PlatformAccount.java src/main/java/com/fireblocks/sdk/model/Players.java src/main/java/com/fireblocks/sdk/model/PolicyAndValidationResponse.java src/main/java/com/fireblocks/sdk/model/PolicyCheckResult.java @@ -1223,17 +1368,25 @@ src/main/java/com/fireblocks/sdk/model/PolicyRuleError.java src/main/java/com/fireblocks/sdk/model/PolicyStatus.java src/main/java/com/fireblocks/sdk/model/PolicyType.java src/main/java/com/fireblocks/sdk/model/PolicyValidation.java +src/main/java/com/fireblocks/sdk/model/PostOrderSettlement.java +src/main/java/com/fireblocks/sdk/model/PostalAddress.java src/main/java/com/fireblocks/sdk/model/PreScreening.java +src/main/java/com/fireblocks/sdk/model/PrefundedSettlement.java src/main/java/com/fireblocks/sdk/model/ProgramCallConfig.java src/main/java/com/fireblocks/sdk/model/Provider.java -src/main/java/com/fireblocks/sdk/model/ProviderAdditionalData.java -src/main/java/com/fireblocks/sdk/model/ProviderCategoryEnum.java +src/main/java/com/fireblocks/sdk/model/ProviderID.java +src/main/java/com/fireblocks/sdk/model/ProvidersListResponse.java src/main/java/com/fireblocks/sdk/model/PublicKeyInformation.java src/main/java/com/fireblocks/sdk/model/PublishDraftRequest.java src/main/java/com/fireblocks/sdk/model/PublishResult.java -src/main/java/com/fireblocks/sdk/model/QuoteFee.java -src/main/java/com/fireblocks/sdk/model/QuoteRequest.java -src/main/java/com/fireblocks/sdk/model/QuoteResponse.java +src/main/java/com/fireblocks/sdk/model/Quote.java +src/main/java/com/fireblocks/sdk/model/QuoteExecutionRequestDetails.java +src/main/java/com/fireblocks/sdk/model/QuoteExecutionResponseDetails.java +src/main/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteRequestDetails.java +src/main/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteRequestDetailsAllOfReQuote.java +src/main/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteResponseDetails.java +src/main/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteResponseDetailsAllOfReQuote.java +src/main/java/com/fireblocks/sdk/model/QuotesResponse.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 @@ -1259,6 +1412,7 @@ src/main/java/com/fireblocks/sdk/model/ResendTransactionWebhooksRequest.java src/main/java/com/fireblocks/sdk/model/ResendWebhooksByTransactionIdResponse.java src/main/java/com/fireblocks/sdk/model/ResendWebhooksResponse.java src/main/java/com/fireblocks/sdk/model/RespondToConnectionRequest.java +src/main/java/com/fireblocks/sdk/model/RetryRequoteRequestDetails.java src/main/java/com/fireblocks/sdk/model/RewardInfo.java src/main/java/com/fireblocks/sdk/model/RewardsInfo.java src/main/java/com/fireblocks/sdk/model/SOLAccount.java @@ -1300,8 +1454,10 @@ src/main/java/com/fireblocks/sdk/model/SetOtaStatusResponse.java src/main/java/com/fireblocks/sdk/model/SetOtaStatusResponseOneOf.java src/main/java/com/fireblocks/sdk/model/SetRoutingPolicyRequest.java src/main/java/com/fireblocks/sdk/model/SetRoutingPolicyResponse.java +src/main/java/com/fireblocks/sdk/model/Settlement.java src/main/java/com/fireblocks/sdk/model/SettlementRequestBody.java src/main/java/com/fireblocks/sdk/model/SettlementResponse.java +src/main/java/com/fireblocks/sdk/model/SettlementSourceAccount.java src/main/java/com/fireblocks/sdk/model/SignedMessage.java src/main/java/com/fireblocks/sdk/model/SignedMessageSignature.java src/main/java/com/fireblocks/sdk/model/SigningKeyDto.java @@ -1350,21 +1506,13 @@ src/main/java/com/fireblocks/sdk/model/StakeResponse.java src/main/java/com/fireblocks/sdk/model/StakingProvider.java src/main/java/com/fireblocks/sdk/model/Status.java src/main/java/com/fireblocks/sdk/model/StellarRippleCreateParamsDto.java -src/main/java/com/fireblocks/sdk/model/SwapFlowError.java -src/main/java/com/fireblocks/sdk/model/SwapOperation.java -src/main/java/com/fireblocks/sdk/model/SwapOperationRequest.java -src/main/java/com/fireblocks/sdk/model/SwapOperationsPaginatedResponse.java -src/main/java/com/fireblocks/sdk/model/SwapProvider.java -src/main/java/com/fireblocks/sdk/model/SwapProviderProtocolsEnum.java -src/main/java/com/fireblocks/sdk/model/SwapProvidersPaginatedResponse.java -src/main/java/com/fireblocks/sdk/model/SwapRequiredAction.java -src/main/java/com/fireblocks/sdk/model/SwapRequiredActionsEnum.java src/main/java/com/fireblocks/sdk/model/SystemMessageInfo.java src/main/java/com/fireblocks/sdk/model/Tag.java src/main/java/com/fireblocks/sdk/model/TagsPagedResponse.java src/main/java/com/fireblocks/sdk/model/Task.java src/main/java/com/fireblocks/sdk/model/TemplatesPaginatedResponse.java src/main/java/com/fireblocks/sdk/model/ThirdPartyRouting.java +src/main/java/com/fireblocks/sdk/model/TimeInForce.java src/main/java/com/fireblocks/sdk/model/TimePeriodConfig.java src/main/java/com/fireblocks/sdk/model/TimePeriodMatchType.java src/main/java/com/fireblocks/sdk/model/ToCollateralTransaction.java @@ -1382,6 +1530,9 @@ src/main/java/com/fireblocks/sdk/model/TokenOwnershipStatusUpdatePayload.java src/main/java/com/fireblocks/sdk/model/TokenResponse.java src/main/java/com/fireblocks/sdk/model/TokensPaginatedResponse.java src/main/java/com/fireblocks/sdk/model/TradingAccountType.java +src/main/java/com/fireblocks/sdk/model/TradingErrorResponse.java +src/main/java/com/fireblocks/sdk/model/TradingErrorResponseError.java +src/main/java/com/fireblocks/sdk/model/TradingProvider.java src/main/java/com/fireblocks/sdk/model/Transaction.java src/main/java/com/fireblocks/sdk/model/TransactionFee.java src/main/java/com/fireblocks/sdk/model/TransactionOperation.java @@ -1411,6 +1562,8 @@ src/main/java/com/fireblocks/sdk/model/TransferOperationPreviewOutput.java src/main/java/com/fireblocks/sdk/model/TransferOperationType.java src/main/java/com/fireblocks/sdk/model/TransferPeerPathSubType.java src/main/java/com/fireblocks/sdk/model/TransferPeerPathType.java +src/main/java/com/fireblocks/sdk/model/TransferRail.java +src/main/java/com/fireblocks/sdk/model/TransferReceipt.java src/main/java/com/fireblocks/sdk/model/TransferValidationFailure.java src/main/java/com/fireblocks/sdk/model/TravelRuleAddress.java src/main/java/com/fireblocks/sdk/model/TravelRuleCreateTransactionRequest.java @@ -1487,7 +1640,6 @@ src/main/java/com/fireblocks/sdk/model/VerdictConfig.java src/main/java/com/fireblocks/sdk/model/Version.java src/main/java/com/fireblocks/sdk/model/WalletAsset.java src/main/java/com/fireblocks/sdk/model/WalletAssetAdditionalInfo.java -src/main/java/com/fireblocks/sdk/model/WalletQuoteResponse.java src/main/java/com/fireblocks/sdk/model/Webhook.java src/main/java/com/fireblocks/sdk/model/WebhookEvent.java src/main/java/com/fireblocks/sdk/model/WebhookPaginatedResponse.java @@ -1512,6 +1664,7 @@ src/test/java/com/fireblocks/sdk/api/AuditLogsApiTest.java src/test/java/com/fireblocks/sdk/api/BlockchainsAssetsApiTest.java src/test/java/com/fireblocks/sdk/api/ComplianceApiTest.java src/test/java/com/fireblocks/sdk/api/ComplianceScreeningConfigurationApiTest.java +src/test/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApiTest.java src/test/java/com/fireblocks/sdk/api/ConsoleUserApiTest.java src/test/java/com/fireblocks/sdk/api/ContractInteractionsApiTest.java src/test/java/com/fireblocks/sdk/api/ContractTemplatesApiTest.java @@ -1537,9 +1690,9 @@ src/test/java/com/fireblocks/sdk/api/PolicyEditorV2BetaApiTest.java src/test/java/com/fireblocks/sdk/api/ResetDeviceApiTest.java src/test/java/com/fireblocks/sdk/api/SmartTransferApiTest.java src/test/java/com/fireblocks/sdk/api/StakingApiTest.java -src/test/java/com/fireblocks/sdk/api/SwapBetaApiTest.java src/test/java/com/fireblocks/sdk/api/TagsApiTest.java src/test/java/com/fireblocks/sdk/api/TokenizationApiTest.java +src/test/java/com/fireblocks/sdk/api/TradingBetaApiTest.java src/test/java/com/fireblocks/sdk/api/TransactionsApiTest.java src/test/java/com/fireblocks/sdk/api/TravelRuleApiTest.java src/test/java/com/fireblocks/sdk/api/UserGroupsBetaApiTest.java @@ -1553,8 +1706,15 @@ 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 src/test/java/com/fireblocks/sdk/model/AbiFunctionTest.java +src/test/java/com/fireblocks/sdk/model/AccessTypeTest.java +src/test/java/com/fireblocks/sdk/model/AccountAccessTest.java +src/test/java/com/fireblocks/sdk/model/AccountBaseTest.java +src/test/java/com/fireblocks/sdk/model/AccountBasedAccessProviderTest.java src/test/java/com/fireblocks/sdk/model/AccountConfigTest.java +src/test/java/com/fireblocks/sdk/model/AccountHolderDetailsTest.java src/test/java/com/fireblocks/sdk/model/AccountIdentifierTest.java +src/test/java/com/fireblocks/sdk/model/AccountProviderIDTest.java +src/test/java/com/fireblocks/sdk/model/AccountReferenceTest.java src/test/java/com/fireblocks/sdk/model/AccountTest.java src/test/java/com/fireblocks/sdk/model/AccountType2Test.java src/test/java/com/fireblocks/sdk/model/AccountTypeTest.java @@ -1594,6 +1754,7 @@ src/test/java/com/fireblocks/sdk/model/AssetConfigTest.java src/test/java/com/fireblocks/sdk/model/AssetConflictErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/AssetDetailsMetadataTest.java src/test/java/com/fireblocks/sdk/model/AssetDetailsOnchainTest.java +src/test/java/com/fireblocks/sdk/model/AssetFeatureTest.java src/test/java/com/fireblocks/sdk/model/AssetForbiddenErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/AssetInternalServerErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/AssetMediaAttributesTest.java @@ -1618,6 +1779,7 @@ src/test/java/com/fireblocks/sdk/model/AuditLogDataTest.java src/test/java/com/fireblocks/sdk/model/AuditorDataTest.java src/test/java/com/fireblocks/sdk/model/AuthorizationGroupsTest.java src/test/java/com/fireblocks/sdk/model/AuthorizationInfoTest.java +src/test/java/com/fireblocks/sdk/model/BaseProviderTest.java src/test/java/com/fireblocks/sdk/model/BasicAddressRequestTest.java src/test/java/com/fireblocks/sdk/model/BlockInfoTest.java src/test/java/com/fireblocks/sdk/model/BlockchainExplorerTest.java @@ -1626,9 +1788,13 @@ src/test/java/com/fireblocks/sdk/model/BlockchainMetadataTest.java src/test/java/com/fireblocks/sdk/model/BlockchainNotFoundErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/BlockchainOnchainTest.java src/test/java/com/fireblocks/sdk/model/BlockchainResponseTest.java +src/test/java/com/fireblocks/sdk/model/BlockchainTransferTest.java +src/test/java/com/fireblocks/sdk/model/BpsFeeTest.java +src/test/java/com/fireblocks/sdk/model/BusinessIdentificationTest.java src/test/java/com/fireblocks/sdk/model/CallbackHandlerRequestTest.java src/test/java/com/fireblocks/sdk/model/CallbackHandlerTest.java src/test/java/com/fireblocks/sdk/model/CancelTransactionResponseTest.java +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 @@ -1644,6 +1810,7 @@ src/test/java/com/fireblocks/sdk/model/CollectionOwnershipResponseTest.java src/test/java/com/fireblocks/sdk/model/CollectionTokenMetadataAttributeDtoTest.java src/test/java/com/fireblocks/sdk/model/CollectionTokenMetadataDtoTest.java src/test/java/com/fireblocks/sdk/model/CollectionTypeTest.java +src/test/java/com/fireblocks/sdk/model/CommittedQuoteTypeTest.java src/test/java/com/fireblocks/sdk/model/ComplianceResultFullPayloadTest.java src/test/java/com/fireblocks/sdk/model/ComplianceResultStatusesEnumTest.java src/test/java/com/fireblocks/sdk/model/ComplianceResultsTest.java @@ -1656,6 +1823,21 @@ src/test/java/com/fireblocks/sdk/model/ConfigOperationSnapshotTest.java src/test/java/com/fireblocks/sdk/model/ConfigOperationStatusTest.java src/test/java/com/fireblocks/sdk/model/ConfigOperationTest.java src/test/java/com/fireblocks/sdk/model/ConfigTransferOperationSnapshotTest.java +src/test/java/com/fireblocks/sdk/model/ConnectedAccountApprovalStatusTest.java +src/test/java/com/fireblocks/sdk/model/ConnectedAccountAssetTypeTest.java +src/test/java/com/fireblocks/sdk/model/ConnectedAccountBalancesResponseTest.java +src/test/java/com/fireblocks/sdk/model/ConnectedAccountBalancesTest.java +src/test/java/com/fireblocks/sdk/model/ConnectedAccountCapabilityTest.java +src/test/java/com/fireblocks/sdk/model/ConnectedAccountManifestTest.java +src/test/java/com/fireblocks/sdk/model/ConnectedAccountRateResponseTest.java +src/test/java/com/fireblocks/sdk/model/ConnectedAccountTest.java +src/test/java/com/fireblocks/sdk/model/ConnectedAccountTotalBalanceTest.java +src/test/java/com/fireblocks/sdk/model/ConnectedAccountTradingPairSupportedTypeTest.java +src/test/java/com/fireblocks/sdk/model/ConnectedAccountTradingPairTest.java +src/test/java/com/fireblocks/sdk/model/ConnectedAccountTradingPairsResponseTest.java +src/test/java/com/fireblocks/sdk/model/ConnectedAccountsResponseTest.java +src/test/java/com/fireblocks/sdk/model/ConnectedSingleAccountResponseTest.java +src/test/java/com/fireblocks/sdk/model/ConnectedSingleAccountTest.java src/test/java/com/fireblocks/sdk/model/ConsoleUserTest.java src/test/java/com/fireblocks/sdk/model/ContractAbiResponseDtoAbiInnerTest.java src/test/java/com/fireblocks/sdk/model/ContractAbiResponseDtoTest.java @@ -1712,7 +1894,10 @@ src/test/java/com/fireblocks/sdk/model/CreateMultipleDepositAddressesRequestTest src/test/java/com/fireblocks/sdk/model/CreateMultipleVaultAccountsJobStatusTest.java src/test/java/com/fireblocks/sdk/model/CreateNcwConnectionRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateNetworkIdRequestTest.java +src/test/java/com/fireblocks/sdk/model/CreateOrderRequestTest.java src/test/java/com/fireblocks/sdk/model/CreatePayoutRequestTest.java +src/test/java/com/fireblocks/sdk/model/CreateQuoteScopeInnerTest.java +src/test/java/com/fireblocks/sdk/model/CreateQuoteTest.java src/test/java/com/fireblocks/sdk/model/CreateSigningKeyDtoProofOfOwnershipTest.java src/test/java/com/fireblocks/sdk/model/CreateSigningKeyDtoTest.java src/test/java/com/fireblocks/sdk/model/CreateTagRequestTest.java @@ -1730,6 +1915,7 @@ src/test/java/com/fireblocks/sdk/model/CreateWalletRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateWebhookRequestTest.java src/test/java/com/fireblocks/sdk/model/CreateWorkflowExecutionRequestParamsInnerTest.java src/test/java/com/fireblocks/sdk/model/CustomRoutingDestTest.java +src/test/java/com/fireblocks/sdk/model/DVPSettlementTest.java src/test/java/com/fireblocks/sdk/model/DefaultNetworkRoutingDestTest.java src/test/java/com/fireblocks/sdk/model/DelegationSummaryTest.java src/test/java/com/fireblocks/sdk/model/DelegationTest.java @@ -1747,6 +1933,8 @@ src/test/java/com/fireblocks/sdk/model/DestinationConfigTest.java src/test/java/com/fireblocks/sdk/model/DestinationTest.java src/test/java/com/fireblocks/sdk/model/DestinationTransferPeerPathResponseTest.java src/test/java/com/fireblocks/sdk/model/DestinationTransferPeerPathTest.java +src/test/java/com/fireblocks/sdk/model/DirectAccessProviderTest.java +src/test/java/com/fireblocks/sdk/model/DirectAccessTest.java src/test/java/com/fireblocks/sdk/model/DisbursementAmountInstructionTest.java src/test/java/com/fireblocks/sdk/model/DisbursementConfigOperationTest.java src/test/java/com/fireblocks/sdk/model/DisbursementInstructionOutputTest.java @@ -1788,6 +1976,7 @@ src/test/java/com/fireblocks/sdk/model/EmbeddedWalletPaginatedAssetsResponseTest src/test/java/com/fireblocks/sdk/model/EmbeddedWalletPaginatedWalletsResponseTest.java src/test/java/com/fireblocks/sdk/model/EmbeddedWalletSetUpStatusTest.java src/test/java/com/fireblocks/sdk/model/EmbeddedWalletTest.java +src/test/java/com/fireblocks/sdk/model/ErrorCodesTest.java src/test/java/com/fireblocks/sdk/model/ErrorResponseErrorTest.java src/test/java/com/fireblocks/sdk/model/ErrorResponseTest.java src/test/java/com/fireblocks/sdk/model/ErrorSchemaTest.java @@ -1804,18 +1993,31 @@ src/test/java/com/fireblocks/sdk/model/ExchangeTypeTest.java src/test/java/com/fireblocks/sdk/model/ExecutionConversionOperationTest.java src/test/java/com/fireblocks/sdk/model/ExecutionDisbursementOperationTest.java src/test/java/com/fireblocks/sdk/model/ExecutionOperationStatusTest.java +src/test/java/com/fireblocks/sdk/model/ExecutionRequestBaseDetailsTest.java +src/test/java/com/fireblocks/sdk/model/ExecutionRequestDetailsTest.java +src/test/java/com/fireblocks/sdk/model/ExecutionResponseBaseDetailsTest.java +src/test/java/com/fireblocks/sdk/model/ExecutionResponseDetailsTest.java src/test/java/com/fireblocks/sdk/model/ExecutionScreeningOperationTest.java +src/test/java/com/fireblocks/sdk/model/ExecutionStepDetailsTest.java +src/test/java/com/fireblocks/sdk/model/ExecutionStepErrorTest.java +src/test/java/com/fireblocks/sdk/model/ExecutionStepStatusEnumTest.java +src/test/java/com/fireblocks/sdk/model/ExecutionStepTest.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/ExternalAccountTest.java src/test/java/com/fireblocks/sdk/model/ExternalWalletAssetTest.java src/test/java/com/fireblocks/sdk/model/FeeBreakdownOneOf1Test.java src/test/java/com/fireblocks/sdk/model/FeeBreakdownOneOfTest.java src/test/java/com/fireblocks/sdk/model/FeeBreakdownTest.java src/test/java/com/fireblocks/sdk/model/FeeInfoTest.java src/test/java/com/fireblocks/sdk/model/FeeLevelTest.java +src/test/java/com/fireblocks/sdk/model/FeeTest.java src/test/java/com/fireblocks/sdk/model/FetchAbiRequestDtoTest.java src/test/java/com/fireblocks/sdk/model/FiatAccountTest.java src/test/java/com/fireblocks/sdk/model/FiatAccountTypeTest.java src/test/java/com/fireblocks/sdk/model/FiatAssetTest.java +src/test/java/com/fireblocks/sdk/model/FiatTransferTest.java +src/test/java/com/fireblocks/sdk/model/FixedFeeTest.java src/test/java/com/fireblocks/sdk/model/FreezeTransactionResponseTest.java src/test/java/com/fireblocks/sdk/model/FunctionDocTest.java src/test/java/com/fireblocks/sdk/model/FundsTest.java @@ -1837,6 +2039,7 @@ src/test/java/com/fireblocks/sdk/model/GetLinkedCollectionsPaginatedResponseTest src/test/java/com/fireblocks/sdk/model/GetMaxSpendableAmountResponseTest.java src/test/java/com/fireblocks/sdk/model/GetMpcKeysResponseTest.java src/test/java/com/fireblocks/sdk/model/GetNFTsResponseTest.java +src/test/java/com/fireblocks/sdk/model/GetOrdersResponseTest.java src/test/java/com/fireblocks/sdk/model/GetOtaStatusResponseTest.java src/test/java/com/fireblocks/sdk/model/GetOwnershipTokensResponseTest.java src/test/java/com/fireblocks/sdk/model/GetSigningKeyResponseDtoTest.java @@ -1846,10 +2049,13 @@ src/test/java/com/fireblocks/sdk/model/GetWhitelistIpAddressesResponseTest.java src/test/java/com/fireblocks/sdk/model/GetWorkspaceStatusResponseTest.java src/test/java/com/fireblocks/sdk/model/HttpContractDoesNotExistErrorTest.java src/test/java/com/fireblocks/sdk/model/IbanPaymentInfoTest.java +src/test/java/com/fireblocks/sdk/model/IdentificationTest.java src/test/java/com/fireblocks/sdk/model/IdlTypeTest.java +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/InternalReferenceTest.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 @@ -1887,10 +2093,16 @@ src/test/java/com/fireblocks/sdk/model/LegacyPolicyValidationTest.java src/test/java/com/fireblocks/sdk/model/LegacyPublishDraftRequestTest.java src/test/java/com/fireblocks/sdk/model/LegacyPublishResultTest.java src/test/java/com/fireblocks/sdk/model/LegacySrcOrDestAttributesInnerTest.java +src/test/java/com/fireblocks/sdk/model/LimitExecutionRequestDetailsTest.java +src/test/java/com/fireblocks/sdk/model/LimitExecutionResponseDetailsTest.java src/test/java/com/fireblocks/sdk/model/ListAssetsResponseTest.java src/test/java/com/fireblocks/sdk/model/ListBlockchainsResponseTest.java src/test/java/com/fireblocks/sdk/model/ListOwnedCollectionsResponseTest.java src/test/java/com/fireblocks/sdk/model/ListOwnedTokensResponseTest.java +src/test/java/com/fireblocks/sdk/model/ManifestTest.java +src/test/java/com/fireblocks/sdk/model/MarketExecutionRequestDetailsTest.java +src/test/java/com/fireblocks/sdk/model/MarketExecutionResponseDetailsTest.java +src/test/java/com/fireblocks/sdk/model/MarketRequoteRequestDetailsTest.java src/test/java/com/fireblocks/sdk/model/MediaEntityResponseTest.java src/test/java/com/fireblocks/sdk/model/MergeStakeAccountsRequestTest.java src/test/java/com/fireblocks/sdk/model/MergeStakeAccountsResponseTest.java @@ -1911,8 +2123,6 @@ src/test/java/com/fireblocks/sdk/model/NetworkIdRoutingPolicyValueTest.java src/test/java/com/fireblocks/sdk/model/NetworkIdTest.java src/test/java/com/fireblocks/sdk/model/NetworkRecordTest.java src/test/java/com/fireblocks/sdk/model/NewAddressTest.java -src/test/java/com/fireblocks/sdk/model/NonWalletQuoteFeeTest.java -src/test/java/com/fireblocks/sdk/model/NonWalletQuoteResponseTest.java src/test/java/com/fireblocks/sdk/model/NoneNetworkRoutingDestTest.java src/test/java/com/fireblocks/sdk/model/NotFoundExceptionTest.java src/test/java/com/fireblocks/sdk/model/NotificationAttemptTest.java @@ -1922,8 +2132,12 @@ src/test/java/com/fireblocks/sdk/model/NotificationStatusTest.java src/test/java/com/fireblocks/sdk/model/NotificationTest.java src/test/java/com/fireblocks/sdk/model/NotificationWithDataTest.java src/test/java/com/fireblocks/sdk/model/OneTimeAddressAccountTest.java +src/test/java/com/fireblocks/sdk/model/OneTimeAddressReferenceTest.java src/test/java/com/fireblocks/sdk/model/OneTimeAddressTest.java src/test/java/com/fireblocks/sdk/model/OperationExecutionFailureTest.java +src/test/java/com/fireblocks/sdk/model/OrderDetailsTest.java +src/test/java/com/fireblocks/sdk/model/OrderStatusTest.java +src/test/java/com/fireblocks/sdk/model/OrderSummaryTest.java src/test/java/com/fireblocks/sdk/model/PaginatedAddressResponsePagingTest.java src/test/java/com/fireblocks/sdk/model/PaginatedAddressResponseTest.java src/test/java/com/fireblocks/sdk/model/PaginatedAssetWalletResponsePagingTest.java @@ -1934,12 +2148,15 @@ src/test/java/com/fireblocks/sdk/model/PairApiKeyRequestTest.java src/test/java/com/fireblocks/sdk/model/PairApiKeyResponseTest.java src/test/java/com/fireblocks/sdk/model/ParameterTest.java src/test/java/com/fireblocks/sdk/model/ParameterWithValueTest.java +src/test/java/com/fireblocks/sdk/model/ParticipantRelationshipTypeTest.java +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/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/PaymentInstructionsTest.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 @@ -1948,7 +2165,11 @@ src/test/java/com/fireblocks/sdk/model/PayoutResponseTest.java src/test/java/com/fireblocks/sdk/model/PayoutStateTest.java src/test/java/com/fireblocks/sdk/model/PayoutStatusTest.java src/test/java/com/fireblocks/sdk/model/PeerAdapterInfoTest.java +src/test/java/com/fireblocks/sdk/model/PeerTypeTest.java +src/test/java/com/fireblocks/sdk/model/PersonalIdentificationFullNameTest.java +src/test/java/com/fireblocks/sdk/model/PersonalIdentificationTest.java src/test/java/com/fireblocks/sdk/model/PixPaymentInfoTest.java +src/test/java/com/fireblocks/sdk/model/PlatformAccountTest.java src/test/java/com/fireblocks/sdk/model/PlayersTest.java src/test/java/com/fireblocks/sdk/model/PolicyAndValidationResponseTest.java src/test/java/com/fireblocks/sdk/model/PolicyCheckResultTest.java @@ -1961,17 +2182,25 @@ src/test/java/com/fireblocks/sdk/model/PolicyRuleTest.java src/test/java/com/fireblocks/sdk/model/PolicyStatusTest.java src/test/java/com/fireblocks/sdk/model/PolicyTypeTest.java src/test/java/com/fireblocks/sdk/model/PolicyValidationTest.java +src/test/java/com/fireblocks/sdk/model/PostOrderSettlementTest.java +src/test/java/com/fireblocks/sdk/model/PostalAddressTest.java src/test/java/com/fireblocks/sdk/model/PreScreeningTest.java +src/test/java/com/fireblocks/sdk/model/PrefundedSettlementTest.java src/test/java/com/fireblocks/sdk/model/ProgramCallConfigTest.java -src/test/java/com/fireblocks/sdk/model/ProviderAdditionalDataTest.java -src/test/java/com/fireblocks/sdk/model/ProviderCategoryEnumTest.java +src/test/java/com/fireblocks/sdk/model/ProviderIDTest.java src/test/java/com/fireblocks/sdk/model/ProviderTest.java +src/test/java/com/fireblocks/sdk/model/ProvidersListResponseTest.java src/test/java/com/fireblocks/sdk/model/PublicKeyInformationTest.java src/test/java/com/fireblocks/sdk/model/PublishDraftRequestTest.java src/test/java/com/fireblocks/sdk/model/PublishResultTest.java -src/test/java/com/fireblocks/sdk/model/QuoteFeeTest.java -src/test/java/com/fireblocks/sdk/model/QuoteRequestTest.java -src/test/java/com/fireblocks/sdk/model/QuoteResponseTest.java +src/test/java/com/fireblocks/sdk/model/QuoteExecutionRequestDetailsTest.java +src/test/java/com/fireblocks/sdk/model/QuoteExecutionResponseDetailsTest.java +src/test/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteRequestDetailsAllOfReQuoteTest.java +src/test/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteRequestDetailsTest.java +src/test/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteResponseDetailsAllOfReQuoteTest.java +src/test/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteResponseDetailsTest.java +src/test/java/com/fireblocks/sdk/model/QuoteTest.java +src/test/java/com/fireblocks/sdk/model/QuotesResponseTest.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 @@ -1997,6 +2226,7 @@ src/test/java/com/fireblocks/sdk/model/ResendTransactionWebhooksRequestTest.java src/test/java/com/fireblocks/sdk/model/ResendWebhooksByTransactionIdResponseTest.java src/test/java/com/fireblocks/sdk/model/ResendWebhooksResponseTest.java src/test/java/com/fireblocks/sdk/model/RespondToConnectionRequestTest.java +src/test/java/com/fireblocks/sdk/model/RetryRequoteRequestDetailsTest.java src/test/java/com/fireblocks/sdk/model/RewardInfoTest.java src/test/java/com/fireblocks/sdk/model/RewardsInfoTest.java src/test/java/com/fireblocks/sdk/model/SOLAccountTest.java @@ -2040,6 +2270,8 @@ src/test/java/com/fireblocks/sdk/model/SetRoutingPolicyRequestTest.java src/test/java/com/fireblocks/sdk/model/SetRoutingPolicyResponseTest.java src/test/java/com/fireblocks/sdk/model/SettlementRequestBodyTest.java src/test/java/com/fireblocks/sdk/model/SettlementResponseTest.java +src/test/java/com/fireblocks/sdk/model/SettlementSourceAccountTest.java +src/test/java/com/fireblocks/sdk/model/SettlementTest.java src/test/java/com/fireblocks/sdk/model/SignedMessageSignatureTest.java src/test/java/com/fireblocks/sdk/model/SignedMessageTest.java src/test/java/com/fireblocks/sdk/model/SigningKeyDtoTest.java @@ -2088,21 +2320,13 @@ src/test/java/com/fireblocks/sdk/model/StakeResponseTest.java src/test/java/com/fireblocks/sdk/model/StakingProviderTest.java src/test/java/com/fireblocks/sdk/model/StatusTest.java src/test/java/com/fireblocks/sdk/model/StellarRippleCreateParamsDtoTest.java -src/test/java/com/fireblocks/sdk/model/SwapFlowErrorTest.java -src/test/java/com/fireblocks/sdk/model/SwapOperationRequestTest.java -src/test/java/com/fireblocks/sdk/model/SwapOperationTest.java -src/test/java/com/fireblocks/sdk/model/SwapOperationsPaginatedResponseTest.java -src/test/java/com/fireblocks/sdk/model/SwapProviderProtocolsEnumTest.java -src/test/java/com/fireblocks/sdk/model/SwapProviderTest.java -src/test/java/com/fireblocks/sdk/model/SwapProvidersPaginatedResponseTest.java -src/test/java/com/fireblocks/sdk/model/SwapRequiredActionTest.java -src/test/java/com/fireblocks/sdk/model/SwapRequiredActionsEnumTest.java src/test/java/com/fireblocks/sdk/model/SystemMessageInfoTest.java src/test/java/com/fireblocks/sdk/model/TagTest.java src/test/java/com/fireblocks/sdk/model/TagsPagedResponseTest.java src/test/java/com/fireblocks/sdk/model/TaskTest.java src/test/java/com/fireblocks/sdk/model/TemplatesPaginatedResponseTest.java src/test/java/com/fireblocks/sdk/model/ThirdPartyRoutingTest.java +src/test/java/com/fireblocks/sdk/model/TimeInForceTest.java src/test/java/com/fireblocks/sdk/model/TimePeriodConfigTest.java src/test/java/com/fireblocks/sdk/model/TimePeriodMatchTypeTest.java src/test/java/com/fireblocks/sdk/model/ToCollateralTransactionTest.java @@ -2120,6 +2344,9 @@ src/test/java/com/fireblocks/sdk/model/TokenOwnershipStatusUpdatePayloadTest.jav src/test/java/com/fireblocks/sdk/model/TokenResponseTest.java src/test/java/com/fireblocks/sdk/model/TokensPaginatedResponseTest.java src/test/java/com/fireblocks/sdk/model/TradingAccountTypeTest.java +src/test/java/com/fireblocks/sdk/model/TradingErrorResponseErrorTest.java +src/test/java/com/fireblocks/sdk/model/TradingErrorResponseTest.java +src/test/java/com/fireblocks/sdk/model/TradingProviderTest.java src/test/java/com/fireblocks/sdk/model/TransactionFeeTest.java src/test/java/com/fireblocks/sdk/model/TransactionOperationTest.java src/test/java/com/fireblocks/sdk/model/TransactionReceiptResponseTest.java @@ -2149,6 +2376,8 @@ src/test/java/com/fireblocks/sdk/model/TransferOperationPreviewTest.java src/test/java/com/fireblocks/sdk/model/TransferOperationTypeTest.java src/test/java/com/fireblocks/sdk/model/TransferPeerPathSubTypeTest.java src/test/java/com/fireblocks/sdk/model/TransferPeerPathTypeTest.java +src/test/java/com/fireblocks/sdk/model/TransferRailTest.java +src/test/java/com/fireblocks/sdk/model/TransferReceiptTest.java src/test/java/com/fireblocks/sdk/model/TransferValidationFailureTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleAddressTest.java src/test/java/com/fireblocks/sdk/model/TravelRuleCreateTransactionRequestTest.java @@ -2225,7 +2454,6 @@ src/test/java/com/fireblocks/sdk/model/VerdictConfigTest.java src/test/java/com/fireblocks/sdk/model/VersionTest.java src/test/java/com/fireblocks/sdk/model/WalletAssetAdditionalInfoTest.java src/test/java/com/fireblocks/sdk/model/WalletAssetTest.java -src/test/java/com/fireblocks/sdk/model/WalletQuoteResponseTest.java src/test/java/com/fireblocks/sdk/model/WebhookEventTest.java src/test/java/com/fireblocks/sdk/model/WebhookPaginatedResponseTest.java src/test/java/com/fireblocks/sdk/model/WebhookTest.java diff --git a/README.md b/README.md index 5bf04bca..77561f32 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Add this dependency to your project's POM: com.fireblocks.sdk fireblocks-sdk - 12.0.0 + 0.0.0 compile ``` @@ -42,7 +42,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.fireblocks.sdk:fireblocks-sdk:12.0.0" +compile "com.fireblocks.sdk:fireblocks-sdk:0.0.0" ``` ### Others @@ -55,7 +55,7 @@ mvn clean package Then manually install the following JARs: -- `target/fireblocks-sdk-12.0.0.jar` +- `target/fireblocks-sdk-0.0.0.jar` - `target/lib/*.jar` @@ -165,6 +165,11 @@ Class | Method | HTTP request | Description *ComplianceApi* | [**updateTravelRuleConfig**](docs/ComplianceApi.md#updateTravelRuleConfig) | **PUT** /screening/travel_rule/policy_configuration | Update Travel Rule Configuration *ComplianceScreeningConfigurationApi* | [**getAmlScreeningConfiguration**](docs/ComplianceScreeningConfigurationApi.md#getAmlScreeningConfiguration) | **GET** /screening/aml/policy_configuration | Get AML Screening Policy Configuration *ComplianceScreeningConfigurationApi* | [**getScreeningConfiguration**](docs/ComplianceScreeningConfigurationApi.md#getScreeningConfiguration) | **GET** /screening/travel_rule/policy_configuration | Get Travel Rule Screening Policy Configuration +*ConnectedAccountsBetaApi* | [**getConnectedAccount**](docs/ConnectedAccountsBetaApi.md#getConnectedAccount) | **GET** /connected_accounts/{accountId} | Get connected account +*ConnectedAccountsBetaApi* | [**getConnectedAccountBalances**](docs/ConnectedAccountsBetaApi.md#getConnectedAccountBalances) | **GET** /connected_accounts/{accountId}/balances | Get balances for an account +*ConnectedAccountsBetaApi* | [**getConnectedAccountRates**](docs/ConnectedAccountsBetaApi.md#getConnectedAccountRates) | **GET** /connected_accounts/{accountId}/rates | Get exchange rates for an account +*ConnectedAccountsBetaApi* | [**getConnectedAccountTradingPairs**](docs/ConnectedAccountsBetaApi.md#getConnectedAccountTradingPairs) | **GET** /connected_accounts/{accountId}/manifest/capabilities/trading/pairs | Get supported trading pairs for an account +*ConnectedAccountsBetaApi* | [**getConnectedAccounts**](docs/ConnectedAccountsBetaApi.md#getConnectedAccounts) | **GET** /connected_accounts | Get connected accounts *ConsoleUserApi* | [**createConsoleUser**](docs/ConsoleUserApi.md#createConsoleUser) | **POST** /management/users | Create console user *ConsoleUserApi* | [**getConsoleUsers**](docs/ConsoleUserApi.md#getConsoleUsers) | **GET** /management/users | Get console users *ContractInteractionsApi* | [**decodeContractData**](docs/ContractInteractionsApi.md#decodeContractData) | **POST** /contract_interactions/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/decode | Decode a function call data, error, or event log @@ -344,12 +349,6 @@ Class | Method | HTTP request | Description *StakingApi* | [**stake**](docs/StakingApi.md#stake) | **POST** /staking/chains/{chainDescriptor}/stake | Initiate Stake Operation *StakingApi* | [**unstake**](docs/StakingApi.md#unstake) | **POST** /staking/chains/{chainDescriptor}/unstake | Execute an Unstake operation *StakingApi* | [**withdraw**](docs/StakingApi.md#withdraw) | **POST** /staking/chains/{chainDescriptor}/withdraw | Execute a Withdraw operation -*SwapBetaApi* | [**approveTermsOfService**](docs/SwapBetaApi.md#approveTermsOfService) | **POST** /swap/providers/{providerId}/approve_terms | Approve terms of service -*SwapBetaApi* | [**createQuote**](docs/SwapBetaApi.md#createQuote) | **POST** /swap/providers/{providerId}/quote | Create a quote -*SwapBetaApi* | [**createSwapOperation**](docs/SwapBetaApi.md#createSwapOperation) | **POST** /swap/operations | Create swap operation -*SwapBetaApi* | [**getSwapOperationById**](docs/SwapBetaApi.md#getSwapOperationById) | **GET** /swap/operations/{operationId} | Get operation details -*SwapBetaApi* | [**getSwapOperations**](docs/SwapBetaApi.md#getSwapOperations) | **GET** /swap/operations | Get Operations list -*SwapBetaApi* | [**getSwapProviders**](docs/SwapBetaApi.md#getSwapProviders) | **GET** /swap/providers | Get Providers List *TagsApi* | [**createTag**](docs/TagsApi.md#createTag) | **POST** /tags | Create a tag *TagsApi* | [**deleteTag**](docs/TagsApi.md#deleteTag) | **DELETE** /tags/{tagId} | Delete a tag *TagsApi* | [**getTag**](docs/TagsApi.md#getTag) | **GET** /tags/{tagId} | Get a tag @@ -378,6 +377,11 @@ Class | Method | HTTP request | Description *TokenizationApi* | [**unlink**](docs/TokenizationApi.md#unlink) | **DELETE** /tokenization/tokens/{id} | Unlink a token *TokenizationApi* | [**unlinkCollection**](docs/TokenizationApi.md#unlinkCollection) | **DELETE** /tokenization/collections/{id} | Delete a collection link *TokenizationApi* | [**validateLayerZeroChannelConfig**](docs/TokenizationApi.md#validateLayerZeroChannelConfig) | **GET** /tokenization/multichain/bridge/layerzero/validate | Validate LayerZero channel configuration +*TradingBetaApi* | [**createOrder**](docs/TradingBetaApi.md#createOrder) | **POST** /trading/orders | Create an order +*TradingBetaApi* | [**createQuote**](docs/TradingBetaApi.md#createQuote) | **POST** /trading/quotes | Create a quote +*TradingBetaApi* | [**getOrder**](docs/TradingBetaApi.md#getOrder) | **GET** /trading/orders/{orderId} | Get order details +*TradingBetaApi* | [**getOrders**](docs/TradingBetaApi.md#getOrders) | **GET** /trading/orders | Get orders +*TradingBetaApi* | [**getTradingProviders**](docs/TradingBetaApi.md#getTradingProviders) | **GET** /trading/providers | Get providers *TransactionsApi* | [**cancelTransaction**](docs/TransactionsApi.md#cancelTransaction) | **POST** /transactions/{txId}/cancel | Cancel a transaction *TransactionsApi* | [**createTransaction**](docs/TransactionsApi.md#createTransaction) | **POST** /transactions | Create a new transaction *TransactionsApi* | [**dropTransaction**](docs/TransactionsApi.md#dropTransaction) | **POST** /transactions/{txId}/drop | Drop ETH transaction by ID @@ -461,9 +465,16 @@ Class | Method | HTTP request | Description - [APIUser](docs/APIUser.md) - [AbaPaymentInfo](docs/AbaPaymentInfo.md) - [AbiFunction](docs/AbiFunction.md) + - [AccessType](docs/AccessType.md) - [Account](docs/Account.md) + - [AccountAccess](docs/AccountAccess.md) + - [AccountBase](docs/AccountBase.md) + - [AccountBasedAccessProvider](docs/AccountBasedAccessProvider.md) - [AccountConfig](docs/AccountConfig.md) + - [AccountHolderDetails](docs/AccountHolderDetails.md) - [AccountIdentifier](docs/AccountIdentifier.md) + - [AccountProviderID](docs/AccountProviderID.md) + - [AccountReference](docs/AccountReference.md) - [AccountType](docs/AccountType.md) - [AccountType2](docs/AccountType2.md) - [AchPaymentInfo](docs/AchPaymentInfo.md) @@ -503,6 +514,7 @@ Class | Method | HTTP request | Description - [AssetConflictErrorResponse](docs/AssetConflictErrorResponse.md) - [AssetDetailsMetadata](docs/AssetDetailsMetadata.md) - [AssetDetailsOnchain](docs/AssetDetailsOnchain.md) + - [AssetFeature](docs/AssetFeature.md) - [AssetForbiddenErrorResponse](docs/AssetForbiddenErrorResponse.md) - [AssetInternalServerErrorResponse](docs/AssetInternalServerErrorResponse.md) - [AssetMedia](docs/AssetMedia.md) @@ -526,6 +538,7 @@ Class | Method | HTTP request | Description - [AuditorData](docs/AuditorData.md) - [AuthorizationGroups](docs/AuthorizationGroups.md) - [AuthorizationInfo](docs/AuthorizationInfo.md) + - [BaseProvider](docs/BaseProvider.md) - [BasicAddressRequest](docs/BasicAddressRequest.md) - [BlockInfo](docs/BlockInfo.md) - [BlockchainExplorer](docs/BlockchainExplorer.md) @@ -534,9 +547,13 @@ Class | Method | HTTP request | Description - [BlockchainNotFoundErrorResponse](docs/BlockchainNotFoundErrorResponse.md) - [BlockchainOnchain](docs/BlockchainOnchain.md) - [BlockchainResponse](docs/BlockchainResponse.md) + - [BlockchainTransfer](docs/BlockchainTransfer.md) + - [BpsFee](docs/BpsFee.md) + - [BusinessIdentification](docs/BusinessIdentification.md) - [CallbackHandler](docs/CallbackHandler.md) - [CallbackHandlerRequest](docs/CallbackHandlerRequest.md) - [CancelTransactionResponse](docs/CancelTransactionResponse.md) + - [Capability](docs/Capability.md) - [ChainDescriptor](docs/ChainDescriptor.md) - [ChainInfoResponse](docs/ChainInfoResponse.md) - [ChannelDvnConfigWithConfirmations](docs/ChannelDvnConfigWithConfirmations.md) @@ -552,6 +569,7 @@ Class | Method | HTTP request | Description - [CollectionTokenMetadataAttributeDto](docs/CollectionTokenMetadataAttributeDto.md) - [CollectionTokenMetadataDto](docs/CollectionTokenMetadataDto.md) - [CollectionType](docs/CollectionType.md) + - [CommittedQuoteType](docs/CommittedQuoteType.md) - [ComplianceResultFullPayload](docs/ComplianceResultFullPayload.md) - [ComplianceResultStatusesEnum](docs/ComplianceResultStatusesEnum.md) - [ComplianceResults](docs/ComplianceResults.md) @@ -564,6 +582,21 @@ Class | Method | HTTP request | Description - [ConfigOperationSnapshot](docs/ConfigOperationSnapshot.md) - [ConfigOperationStatus](docs/ConfigOperationStatus.md) - [ConfigTransferOperationSnapshot](docs/ConfigTransferOperationSnapshot.md) + - [ConnectedAccount](docs/ConnectedAccount.md) + - [ConnectedAccountApprovalStatus](docs/ConnectedAccountApprovalStatus.md) + - [ConnectedAccountAssetType](docs/ConnectedAccountAssetType.md) + - [ConnectedAccountBalances](docs/ConnectedAccountBalances.md) + - [ConnectedAccountBalancesResponse](docs/ConnectedAccountBalancesResponse.md) + - [ConnectedAccountCapability](docs/ConnectedAccountCapability.md) + - [ConnectedAccountManifest](docs/ConnectedAccountManifest.md) + - [ConnectedAccountRateResponse](docs/ConnectedAccountRateResponse.md) + - [ConnectedAccountTotalBalance](docs/ConnectedAccountTotalBalance.md) + - [ConnectedAccountTradingPair](docs/ConnectedAccountTradingPair.md) + - [ConnectedAccountTradingPairSupportedType](docs/ConnectedAccountTradingPairSupportedType.md) + - [ConnectedAccountTradingPairsResponse](docs/ConnectedAccountTradingPairsResponse.md) + - [ConnectedAccountsResponse](docs/ConnectedAccountsResponse.md) + - [ConnectedSingleAccount](docs/ConnectedSingleAccount.md) + - [ConnectedSingleAccountResponse](docs/ConnectedSingleAccountResponse.md) - [ConsoleUser](docs/ConsoleUser.md) - [ContractAbiResponseDto](docs/ContractAbiResponseDto.md) - [ContractAbiResponseDtoAbiInner](docs/ContractAbiResponseDtoAbiInner.md) @@ -620,7 +653,10 @@ Class | Method | HTTP request | Description - [CreateMultipleVaultAccountsJobStatus](docs/CreateMultipleVaultAccountsJobStatus.md) - [CreateNcwConnectionRequest](docs/CreateNcwConnectionRequest.md) - [CreateNetworkIdRequest](docs/CreateNetworkIdRequest.md) + - [CreateOrderRequest](docs/CreateOrderRequest.md) - [CreatePayoutRequest](docs/CreatePayoutRequest.md) + - [CreateQuote](docs/CreateQuote.md) + - [CreateQuoteScopeInner](docs/CreateQuoteScopeInner.md) - [CreateSigningKeyDto](docs/CreateSigningKeyDto.md) - [CreateSigningKeyDtoProofOfOwnership](docs/CreateSigningKeyDtoProofOfOwnership.md) - [CreateTagRequest](docs/CreateTagRequest.md) @@ -638,6 +674,7 @@ Class | Method | HTTP request | Description - [CreateWebhookRequest](docs/CreateWebhookRequest.md) - [CreateWorkflowExecutionRequestParamsInner](docs/CreateWorkflowExecutionRequestParamsInner.md) - [CustomRoutingDest](docs/CustomRoutingDest.md) + - [DVPSettlement](docs/DVPSettlement.md) - [DefaultNetworkRoutingDest](docs/DefaultNetworkRoutingDest.md) - [Delegation](docs/Delegation.md) - [DelegationSummary](docs/DelegationSummary.md) @@ -655,6 +692,8 @@ Class | Method | HTTP request | Description - [DestinationConfig](docs/DestinationConfig.md) - [DestinationTransferPeerPath](docs/DestinationTransferPeerPath.md) - [DestinationTransferPeerPathResponse](docs/DestinationTransferPeerPathResponse.md) + - [DirectAccess](docs/DirectAccess.md) + - [DirectAccessProvider](docs/DirectAccessProvider.md) - [DisbursementAmountInstruction](docs/DisbursementAmountInstruction.md) - [DisbursementConfigOperation](docs/DisbursementConfigOperation.md) - [DisbursementInstruction](docs/DisbursementInstruction.md) @@ -696,6 +735,7 @@ Class | Method | HTTP request | Description - [EmbeddedWalletPaginatedAssetsResponse](docs/EmbeddedWalletPaginatedAssetsResponse.md) - [EmbeddedWalletPaginatedWalletsResponse](docs/EmbeddedWalletPaginatedWalletsResponse.md) - [EmbeddedWalletSetUpStatus](docs/EmbeddedWalletSetUpStatus.md) + - [ErrorCodes](docs/ErrorCodes.md) - [ErrorResponse](docs/ErrorResponse.md) - [ErrorResponseError](docs/ErrorResponseError.md) - [ErrorSchema](docs/ErrorSchema.md) @@ -712,9 +752,20 @@ Class | Method | HTTP request | Description - [ExecutionConversionOperation](docs/ExecutionConversionOperation.md) - [ExecutionDisbursementOperation](docs/ExecutionDisbursementOperation.md) - [ExecutionOperationStatus](docs/ExecutionOperationStatus.md) + - [ExecutionRequestBaseDetails](docs/ExecutionRequestBaseDetails.md) + - [ExecutionRequestDetails](docs/ExecutionRequestDetails.md) + - [ExecutionResponseBaseDetails](docs/ExecutionResponseBaseDetails.md) + - [ExecutionResponseDetails](docs/ExecutionResponseDetails.md) - [ExecutionScreeningOperation](docs/ExecutionScreeningOperation.md) + - [ExecutionStep](docs/ExecutionStep.md) + - [ExecutionStepDetails](docs/ExecutionStepDetails.md) + - [ExecutionStepError](docs/ExecutionStepError.md) + - [ExecutionStepStatusEnum](docs/ExecutionStepStatusEnum.md) + - [ExecutionStepType](docs/ExecutionStepType.md) - [ExecutionTransferOperation](docs/ExecutionTransferOperation.md) + - [ExternalAccount](docs/ExternalAccount.md) - [ExternalWalletAsset](docs/ExternalWalletAsset.md) + - [Fee](docs/Fee.md) - [FeeBreakdown](docs/FeeBreakdown.md) - [FeeBreakdownOneOf](docs/FeeBreakdownOneOf.md) - [FeeBreakdownOneOf1](docs/FeeBreakdownOneOf1.md) @@ -724,6 +775,8 @@ Class | Method | HTTP request | Description - [FiatAccount](docs/FiatAccount.md) - [FiatAccountType](docs/FiatAccountType.md) - [FiatAsset](docs/FiatAsset.md) + - [FiatTransfer](docs/FiatTransfer.md) + - [FixedFee](docs/FixedFee.md) - [FreezeTransactionResponse](docs/FreezeTransactionResponse.md) - [FunctionDoc](docs/FunctionDoc.md) - [Funds](docs/Funds.md) @@ -745,6 +798,7 @@ Class | Method | HTTP request | Description - [GetMaxSpendableAmountResponse](docs/GetMaxSpendableAmountResponse.md) - [GetMpcKeysResponse](docs/GetMpcKeysResponse.md) - [GetNFTsResponse](docs/GetNFTsResponse.md) + - [GetOrdersResponse](docs/GetOrdersResponse.md) - [GetOtaStatusResponse](docs/GetOtaStatusResponse.md) - [GetOwnershipTokensResponse](docs/GetOwnershipTokensResponse.md) - [GetSigningKeyResponseDto](docs/GetSigningKeyResponseDto.md) @@ -754,10 +808,13 @@ Class | Method | HTTP request | Description - [GetWorkspaceStatusResponse](docs/GetWorkspaceStatusResponse.md) - [HttpContractDoesNotExistError](docs/HttpContractDoesNotExistError.md) - [IbanPaymentInfo](docs/IbanPaymentInfo.md) + - [Identification](docs/Identification.md) - [IdlType](docs/IdlType.md) + - [IndicativeQuoteType](docs/IndicativeQuoteType.md) - [InitiatorConfig](docs/InitiatorConfig.md) - [InitiatorConfigPattern](docs/InitiatorConfigPattern.md) - [InstructionAmount](docs/InstructionAmount.md) + - [InternalReference](docs/InternalReference.md) - [InternalTransferResponse](docs/InternalTransferResponse.md) - [InvalidParamaterValueError](docs/InvalidParamaterValueError.md) - [Job](docs/Job.md) @@ -795,10 +852,16 @@ Class | Method | HTTP request | Description - [LegacyPublishDraftRequest](docs/LegacyPublishDraftRequest.md) - [LegacyPublishResult](docs/LegacyPublishResult.md) - [LegacySrcOrDestAttributesInner](docs/LegacySrcOrDestAttributesInner.md) + - [LimitExecutionRequestDetails](docs/LimitExecutionRequestDetails.md) + - [LimitExecutionResponseDetails](docs/LimitExecutionResponseDetails.md) - [ListAssetsResponse](docs/ListAssetsResponse.md) - [ListBlockchainsResponse](docs/ListBlockchainsResponse.md) - [ListOwnedCollectionsResponse](docs/ListOwnedCollectionsResponse.md) - [ListOwnedTokensResponse](docs/ListOwnedTokensResponse.md) + - [Manifest](docs/Manifest.md) + - [MarketExecutionRequestDetails](docs/MarketExecutionRequestDetails.md) + - [MarketExecutionResponseDetails](docs/MarketExecutionResponseDetails.md) + - [MarketRequoteRequestDetails](docs/MarketRequoteRequestDetails.md) - [MediaEntityResponse](docs/MediaEntityResponse.md) - [MergeStakeAccountsRequest](docs/MergeStakeAccountsRequest.md) - [MergeStakeAccountsResponse](docs/MergeStakeAccountsResponse.md) @@ -819,8 +882,6 @@ Class | Method | HTTP request | Description - [NetworkIdRoutingPolicyValue](docs/NetworkIdRoutingPolicyValue.md) - [NetworkRecord](docs/NetworkRecord.md) - [NewAddress](docs/NewAddress.md) - - [NonWalletQuoteFee](docs/NonWalletQuoteFee.md) - - [NonWalletQuoteResponse](docs/NonWalletQuoteResponse.md) - [NoneNetworkRoutingDest](docs/NoneNetworkRoutingDest.md) - [NotFoundException](docs/NotFoundException.md) - [Notification](docs/Notification.md) @@ -831,7 +892,11 @@ Class | Method | HTTP request | Description - [NotificationWithData](docs/NotificationWithData.md) - [OneTimeAddress](docs/OneTimeAddress.md) - [OneTimeAddressAccount](docs/OneTimeAddressAccount.md) + - [OneTimeAddressReference](docs/OneTimeAddressReference.md) - [OperationExecutionFailure](docs/OperationExecutionFailure.md) + - [OrderDetails](docs/OrderDetails.md) + - [OrderStatus](docs/OrderStatus.md) + - [OrderSummary](docs/OrderSummary.md) - [PaginatedAddressResponse](docs/PaginatedAddressResponse.md) - [PaginatedAddressResponsePaging](docs/PaginatedAddressResponsePaging.md) - [PaginatedAssetWalletResponse](docs/PaginatedAssetWalletResponse.md) @@ -842,12 +907,15 @@ Class | Method | HTTP request | Description - [PairApiKeyResponse](docs/PairApiKeyResponse.md) - [Parameter](docs/Parameter.md) - [ParameterWithValue](docs/ParameterWithValue.md) + - [ParticipantRelationshipType](docs/ParticipantRelationshipType.md) + - [ParticipantsIdentification](docs/ParticipantsIdentification.md) - [PayeeAccount](docs/PayeeAccount.md) - [PayeeAccountResponse](docs/PayeeAccountResponse.md) - [PayeeAccountType](docs/PayeeAccountType.md) - [PaymentAccount](docs/PaymentAccount.md) - [PaymentAccountResponse](docs/PaymentAccountResponse.md) - [PaymentAccountType](docs/PaymentAccountType.md) + - [PaymentInstructions](docs/PaymentInstructions.md) - [PayoutInitMethod](docs/PayoutInitMethod.md) - [PayoutInstruction](docs/PayoutInstruction.md) - [PayoutInstructionResponse](docs/PayoutInstructionResponse.md) @@ -856,7 +924,11 @@ Class | Method | HTTP request | Description - [PayoutState](docs/PayoutState.md) - [PayoutStatus](docs/PayoutStatus.md) - [PeerAdapterInfo](docs/PeerAdapterInfo.md) + - [PeerType](docs/PeerType.md) + - [PersonalIdentification](docs/PersonalIdentification.md) + - [PersonalIdentificationFullName](docs/PersonalIdentificationFullName.md) - [PixPaymentInfo](docs/PixPaymentInfo.md) + - [PlatformAccount](docs/PlatformAccount.md) - [Players](docs/Players.md) - [PolicyAndValidationResponse](docs/PolicyAndValidationResponse.md) - [PolicyCheckResult](docs/PolicyCheckResult.md) @@ -869,17 +941,25 @@ Class | Method | HTTP request | Description - [PolicyStatus](docs/PolicyStatus.md) - [PolicyType](docs/PolicyType.md) - [PolicyValidation](docs/PolicyValidation.md) + - [PostOrderSettlement](docs/PostOrderSettlement.md) + - [PostalAddress](docs/PostalAddress.md) - [PreScreening](docs/PreScreening.md) + - [PrefundedSettlement](docs/PrefundedSettlement.md) - [ProgramCallConfig](docs/ProgramCallConfig.md) - [Provider](docs/Provider.md) - - [ProviderAdditionalData](docs/ProviderAdditionalData.md) - - [ProviderCategoryEnum](docs/ProviderCategoryEnum.md) + - [ProviderID](docs/ProviderID.md) + - [ProvidersListResponse](docs/ProvidersListResponse.md) - [PublicKeyInformation](docs/PublicKeyInformation.md) - [PublishDraftRequest](docs/PublishDraftRequest.md) - [PublishResult](docs/PublishResult.md) - - [QuoteFee](docs/QuoteFee.md) - - [QuoteRequest](docs/QuoteRequest.md) - - [QuoteResponse](docs/QuoteResponse.md) + - [Quote](docs/Quote.md) + - [QuoteExecutionRequestDetails](docs/QuoteExecutionRequestDetails.md) + - [QuoteExecutionResponseDetails](docs/QuoteExecutionResponseDetails.md) + - [QuoteExecutionWithRequoteRequestDetails](docs/QuoteExecutionWithRequoteRequestDetails.md) + - [QuoteExecutionWithRequoteRequestDetailsAllOfReQuote](docs/QuoteExecutionWithRequoteRequestDetailsAllOfReQuote.md) + - [QuoteExecutionWithRequoteResponseDetails](docs/QuoteExecutionWithRequoteResponseDetails.md) + - [QuoteExecutionWithRequoteResponseDetailsAllOfReQuote](docs/QuoteExecutionWithRequoteResponseDetailsAllOfReQuote.md) + - [QuotesResponse](docs/QuotesResponse.md) - [ReadAbiFunction](docs/ReadAbiFunction.md) - [ReadCallFunctionDto](docs/ReadCallFunctionDto.md) - [ReadCallFunctionDtoAbiFunction](docs/ReadCallFunctionDtoAbiFunction.md) @@ -905,6 +985,7 @@ Class | Method | HTTP request | Description - [ResendWebhooksByTransactionIdResponse](docs/ResendWebhooksByTransactionIdResponse.md) - [ResendWebhooksResponse](docs/ResendWebhooksResponse.md) - [RespondToConnectionRequest](docs/RespondToConnectionRequest.md) + - [RetryRequoteRequestDetails](docs/RetryRequoteRequestDetails.md) - [RewardInfo](docs/RewardInfo.md) - [RewardsInfo](docs/RewardsInfo.md) - [SOLAccount](docs/SOLAccount.md) @@ -946,8 +1027,10 @@ Class | Method | HTTP request | Description - [SetOtaStatusResponseOneOf](docs/SetOtaStatusResponseOneOf.md) - [SetRoutingPolicyRequest](docs/SetRoutingPolicyRequest.md) - [SetRoutingPolicyResponse](docs/SetRoutingPolicyResponse.md) + - [Settlement](docs/Settlement.md) - [SettlementRequestBody](docs/SettlementRequestBody.md) - [SettlementResponse](docs/SettlementResponse.md) + - [SettlementSourceAccount](docs/SettlementSourceAccount.md) - [SignedMessage](docs/SignedMessage.md) - [SignedMessageSignature](docs/SignedMessageSignature.md) - [SigningKeyDto](docs/SigningKeyDto.md) @@ -996,21 +1079,13 @@ Class | Method | HTTP request | Description - [StakingProvider](docs/StakingProvider.md) - [Status](docs/Status.md) - [StellarRippleCreateParamsDto](docs/StellarRippleCreateParamsDto.md) - - [SwapFlowError](docs/SwapFlowError.md) - - [SwapOperation](docs/SwapOperation.md) - - [SwapOperationRequest](docs/SwapOperationRequest.md) - - [SwapOperationsPaginatedResponse](docs/SwapOperationsPaginatedResponse.md) - - [SwapProvider](docs/SwapProvider.md) - - [SwapProviderProtocolsEnum](docs/SwapProviderProtocolsEnum.md) - - [SwapProvidersPaginatedResponse](docs/SwapProvidersPaginatedResponse.md) - - [SwapRequiredAction](docs/SwapRequiredAction.md) - - [SwapRequiredActionsEnum](docs/SwapRequiredActionsEnum.md) - [SystemMessageInfo](docs/SystemMessageInfo.md) - [Tag](docs/Tag.md) - [TagsPagedResponse](docs/TagsPagedResponse.md) - [Task](docs/Task.md) - [TemplatesPaginatedResponse](docs/TemplatesPaginatedResponse.md) - [ThirdPartyRouting](docs/ThirdPartyRouting.md) + - [TimeInForce](docs/TimeInForce.md) - [TimePeriodConfig](docs/TimePeriodConfig.md) - [TimePeriodMatchType](docs/TimePeriodMatchType.md) - [ToCollateralTransaction](docs/ToCollateralTransaction.md) @@ -1028,6 +1103,9 @@ Class | Method | HTTP request | Description - [TokenResponse](docs/TokenResponse.md) - [TokensPaginatedResponse](docs/TokensPaginatedResponse.md) - [TradingAccountType](docs/TradingAccountType.md) + - [TradingErrorResponse](docs/TradingErrorResponse.md) + - [TradingErrorResponseError](docs/TradingErrorResponseError.md) + - [TradingProvider](docs/TradingProvider.md) - [Transaction](docs/Transaction.md) - [TransactionFee](docs/TransactionFee.md) - [TransactionOperation](docs/TransactionOperation.md) @@ -1057,6 +1135,8 @@ Class | Method | HTTP request | Description - [TransferOperationType](docs/TransferOperationType.md) - [TransferPeerPathSubType](docs/TransferPeerPathSubType.md) - [TransferPeerPathType](docs/TransferPeerPathType.md) + - [TransferRail](docs/TransferRail.md) + - [TransferReceipt](docs/TransferReceipt.md) - [TransferValidationFailure](docs/TransferValidationFailure.md) - [TravelRuleAddress](docs/TravelRuleAddress.md) - [TravelRuleCreateTransactionRequest](docs/TravelRuleCreateTransactionRequest.md) @@ -1133,7 +1213,6 @@ Class | Method | HTTP request | Description - [Version](docs/Version.md) - [WalletAsset](docs/WalletAsset.md) - [WalletAssetAdditionalInfo](docs/WalletAssetAdditionalInfo.md) - - [WalletQuoteResponse](docs/WalletQuoteResponse.md) - [Webhook](docs/Webhook.md) - [WebhookEvent](docs/WebhookEvent.md) - [WebhookPaginatedResponse](docs/WebhookPaginatedResponse.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index c11e6810..b5a1ac9e 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -4766,6 +4766,377 @@ paths: x-content-type: application/json x-accepts: - application/json + /connected_accounts: + get: + description: | + Returns all connected accounts
+ **Note**: + - This endpoint is currently in beta and might be subject to changes. + operationId: getConnectedAccounts + parameters: + - description: Whether to include only main accounts in the response. + explode: true + in: query + name: mainAccounts + required: false + schema: + default: false + type: boolean + style: form + - description: Page size for pagination. + explode: true + in: query + name: pageSize + required: false + schema: + maximum: 100 + minimum: 1 + type: integer + style: form + - description: Page cursor for pagination. + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ConnectedAccountsResponse" + description: Get accounts response + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Get connected accounts + tags: + - Connected Accounts (Beta) + x-rate-limit-category: query + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.connectedAccountsBeta.getConnectedAccounts(connectedAccountsBetaApiGetConnectedAccountsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.connectedAccountsBeta().getConnectedAccounts(mainAccounts,\ + \ pageSize, pageCursor);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.connected_accounts_beta.get_connected_accounts(main_accounts,\ + \ page_size, page_cursor);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.connectedAccountsBeta.getConnectedAccounts(connectedAccountsBetaApiGetConnectedAccountsRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.connectedAccountsBeta().getConnectedAccounts(mainAccounts,\ + \ pageSize, pageCursor);" + - lang: Python + source: "response = fireblocks.connected_accounts_beta.get_connected_accounts(main_accounts,\ + \ page_size, page_cursor);" + x-accepts: + - application/json + /connected_accounts/{accountId}: + get: + description: | + Retrieve detailed information about a specific connected account by ID.
+ **Note**: + - This endpoint is currently in beta and might be subject to changes. + operationId: getConnectedAccount + parameters: + - description: The ID of the account to fetch. + explode: false + in: path + name: accountId + required: true + schema: + minLength: 1 + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ConnectedSingleAccountResponse" + description: Account response + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Get connected account + tags: + - Connected Accounts (Beta) + x-rate-limit-category: read + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.connectedAccountsBeta.getConnectedAccount(connectedAccountsBetaApiGetConnectedAccountRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: CompletableFuture> response + = fireblocks.connectedAccountsBeta().getConnectedAccount(accountId); + name: Fireblocks SDK Java example + - language: python + code: response = fireblocks.connected_accounts_beta.get_connected_account(account_id); + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.connectedAccountsBeta.getConnectedAccount(connectedAccountsBetaApiGetConnectedAccountRequest);" + - lang: Java + source: CompletableFuture> response + = fireblocks.connectedAccountsBeta().getConnectedAccount(accountId); + - lang: Python + source: response = fireblocks.connected_accounts_beta.get_connected_account(account_id); + x-accepts: + - application/json + /connected_accounts/{accountId}/balances: + get: + description: | + Retrieve current asset balances for a specific connected account as a flat list (one row per assetId, balanceType) +
+ **Note**: + - This endpoint is currently in beta and might be subject to changes. + operationId: getConnectedAccountBalances + parameters: + - description: The ID of the account to fetch balances for. + explode: false + in: path + name: accountId + required: true + schema: + minLength: 1 + type: string + style: simple + - description: Page size for pagination. + explode: true + in: query + name: pageSize + required: false + schema: + maximum: 1000 + minimum: 1 + type: integer + style: form + - description: Page cursor for pagination. + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ConnectedAccountBalancesResponse" + description: Account balances response + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Get balances for an account + tags: + - Connected Accounts (Beta) + x-rate-limit-category: query + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.connectedAccountsBeta.getConnectedAccountBalances(connectedAccountsBetaApiGetConnectedAccountBalancesRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>\ + \ response = fireblocks.connectedAccountsBeta().getConnectedAccountBalances(accountId,\ + \ pageSize, pageCursor);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.connected_accounts_beta.get_connected_account_balances(account_id,\ + \ page_size, page_cursor);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.connectedAccountsBeta.getConnectedAccountBalances(connectedAccountsBetaApiGetConnectedAccountBalancesRequest);" + - lang: Java + source: "CompletableFuture>\ + \ response = fireblocks.connectedAccountsBeta().getConnectedAccountBalances(accountId,\ + \ pageSize, pageCursor);" + - lang: Python + source: "response = fireblocks.connected_accounts_beta.get_connected_account_balances(account_id,\ + \ page_size, page_cursor);" + x-accepts: + - application/json + /connected_accounts/{accountId}/rates: + get: + description: Retrieve current exchange rates for converting between specific + assets in a connected account. + operationId: getConnectedAccountRates + parameters: + - description: The ID of the account to fetch rates for. + explode: false + in: path + name: accountId + required: true + schema: + minLength: 1 + type: string + style: simple + - description: The ID of the asset to fetch rates for. + explode: true + in: query + name: baseAssetId + required: true + schema: + minLength: 1 + type: string + style: form + - description: The ID of the asset to get the rates nominally. + explode: true + in: query + name: quoteAssetId + required: true + schema: + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ConnectedAccountRateResponse" + description: Rates response + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Get exchange rates for an account + tags: + - Connected Accounts (Beta) + x-rate-limit-category: read + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.connectedAccountsBeta.getConnectedAccountRates(connectedAccountsBetaApiGetConnectedAccountRatesRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture> response\ + \ = fireblocks.connectedAccountsBeta().getConnectedAccountRates(accountId,\ + \ baseAssetId, quoteAssetId);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.connected_accounts_beta.get_connected_account_rates(account_id,\ + \ base_asset_id, quote_asset_id);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.connectedAccountsBeta.getConnectedAccountRates(connectedAccountsBetaApiGetConnectedAccountRatesRequest);" + - lang: Java + source: "CompletableFuture> response\ + \ = fireblocks.connectedAccountsBeta().getConnectedAccountRates(accountId,\ + \ baseAssetId, quoteAssetId);" + - lang: Python + source: "response = fireblocks.connected_accounts_beta.get_connected_account_rates(account_id,\ + \ base_asset_id, quote_asset_id);" + x-accepts: + - application/json + /connected_accounts/{accountId}/manifest/capabilities/trading/pairs: + get: + description: "Retrieve all asset trading pairs supported by a specific connected\ + \ account, including the pair type (quote, market, onOffRamp)." + operationId: getConnectedAccountTradingPairs + parameters: + - description: The ID of the account to fetch supported pairs for. + explode: false + in: path + name: accountId + required: true + schema: + minLength: 1 + type: string + style: simple + - description: Page size for pagination. + explode: true + in: query + name: pageSize + required: false + schema: + default: 100 + maximum: 100 + minimum: 1 + type: integer + style: form + - description: Page cursor for pagination. + explode: true + in: query + name: pageCursor + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ConnectedAccountTradingPairsResponse" + description: Supported pairs response + headers: + X-Request-ID: + $ref: "#/components/headers/X-Request-ID" + default: + $ref: "#/components/responses/Error" + summary: Get supported trading pairs for an account + tags: + - Connected Accounts (Beta) + x-rate-limit-category: query + x-readme: + code-samples: + - language: typescript + code: "const response: Promise>\ + \ = fireblocks.connectedAccountsBeta.getConnectedAccountTradingPairs(connectedAccountsBetaApiGetConnectedAccountTradingPairsRequest);" + name: Fireblocks SDK TypeScript example + - language: java + code: "CompletableFuture>\ + \ response = fireblocks.connectedAccountsBeta().getConnectedAccountTradingPairs(accountId,\ + \ pageSize, pageCursor);" + name: Fireblocks SDK Java example + - language: python + code: "response = fireblocks.connected_accounts_beta.get_connected_account_trading_pairs(account_id,\ + \ page_size, page_cursor);" + name: Fireblocks SDK Python example + x-codeSamples: + - lang: TypeScript + source: "const response: Promise>\ + \ = fireblocks.connectedAccountsBeta.getConnectedAccountTradingPairs(connectedAccountsBetaApiGetConnectedAccountTradingPairsRequest);" + - lang: Java + source: "CompletableFuture>\ + \ response = fireblocks.connectedAccountsBeta().getConnectedAccountTradingPairs(accountId,\ + \ pageSize, pageCursor);" + - lang: Python + source: "response = fireblocks.connected_accounts_beta.get_connected_account_trading_pairs(account_id,\ + \ page_size, page_cursor);" + x-accepts: + - application/json /network_connections: get: description: | @@ -9417,7 +9788,7 @@ paths: summary: Estimate transaction fee tags: - Transactions - x-rate-limit-category: high_compute + x-rate-limit-category: async x-readme: code-samples: - language: python @@ -12634,7 +13005,7 @@ paths: description: | Resend notification by ID - Endpoint Permission: Owner, Admin, Non-Signing Admin. + Endpoint Permission: Owner, Admin, Non-Signing Admin, Editor, Signer. operationId: resendNotificationById parameters: - description: The ID of the webhook @@ -12705,7 +13076,7 @@ paths: description: | Resend notifications by resource Id - Endpoint Permission: Owner, Admin, Non-Signing Admin. + Endpoint Permission: Owner, Admin, Non-Signing Admin, Editor, Signer. operationId: resendNotificationsByResourceId parameters: - description: "A unique identifier for the request. If the request is sent\ @@ -12776,7 +13147,7 @@ paths: description: | Resend all failed notifications for a webhook in the last 24 hours - Endpoint Permission: Owner, Admin, Non-Signing Admin. + Endpoint Permission: Owner, Admin, Non-Signing Admin, Editor, Signer. operationId: resendFailedNotifications parameters: - description: "A unique identifier for the request. If the request is sent\ @@ -16833,165 +17204,99 @@ paths: \ idempotency_key);" x-accepts: - application/json - /swap/providers: + /trading/providers: get: description: |- - Return a list of all supported swap providers. + Retrieve a list of all available external providers supporting trading activities through the platform. Note: These endpoints are currently in beta and might be subject to changes. - If you want to participate and learn more about the Fireblocks Swap, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. + If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. - operationId: getSwapProviders + operationId: getTradingProviders parameters: - - description: Cursor of the required page + - description: Page size for pagination. explode: true in: query - name: pageCursor + name: pageSize required: false schema: - type: string + default: 20 + maximum: 100 + minimum: 1 + type: integer style: form - - description: "Number of items in a page, Acceptable values are 1-100. Maximum\ - \ value is 100" - example: 10 + - description: Page cursor for pagination. explode: true in: query - name: pageSize + name: pageCursor required: false schema: - default: 10 - maximum: 100 - minimum: 1 - type: number + type: string style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/SwapProvidersPaginatedResponse" - description: A paginated response containing ProviderDto objects - default: - $ref: "#/components/responses/Error" - summary: Get Providers List - tags: - - Swap (Beta) - x-rate-limit-category: query - x-readme: - code-samples: - - language: typescript - code: "const response: Promise>\ - \ = fireblocks.swapBeta.getSwapProviders(swapBetaApiGetSwapProvidersRequest);" - name: Fireblocks SDK TypeScript example - - language: java - code: "CompletableFuture> response\ - \ = fireblocks.swapBeta().getSwapProviders(pageCursor, pageSize);" - name: Fireblocks SDK Java example - - language: python - code: "response = fireblocks.swap_beta.get_swap_providers(page_cursor, page_size);" - name: Fireblocks SDK Python example - x-codeSamples: - - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.swapBeta.getSwapProviders(swapBetaApiGetSwapProvidersRequest);" - - lang: Java - source: "CompletableFuture> response\ - \ = fireblocks.swapBeta().getSwapProviders(pageCursor, pageSize);" - - lang: Python - source: "response = fireblocks.swap_beta.get_swap_providers(page_cursor, page_size);" - x-accepts: - - application/json - /swap/providers/{providerId}/approve_terms: - post: - description: |- - Approve the terms of service for a swap provider. - Some providers require this approval before performing a swap action for the first time. - - Note: These endpoints are currently in beta and might be subject to changes. - - If you want to participate and learn more about the Fireblocks Swap, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - - Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. - operationId: approveTermsOfService - parameters: - - explode: false - in: path - name: providerId - required: true - schema: - format: uuid - 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: - type: string - style: simple - responses: - "200": + $ref: "#/components/schemas/ProvidersListResponse" + description: Providers response + "401": content: application/json: schema: - $ref: "#/components/schemas/SwapProvider" - description: successfully approve terms of service - default: - $ref: "#/components/responses/Error" - summary: Approve terms of service + $ref: "#/components/schemas/TradingErrorResponse" + description: Unauthorized. Missing / invalid JWT token in Authorization + header. + "5XX": + content: + application/json: + schema: + $ref: "#/components/schemas/TradingErrorResponse" + description: Internal error. + summary: Get providers tags: - - Swap (Beta) - x-rate-limit-category: write + - Trading (Beta) + x-rate-limit-category: query x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.swapBeta.approveTermsOfService(swapBetaApiApproveTermsOfServiceRequest);" + code: "const response: Promise>\ + \ = fireblocks.tradingBeta.getTradingProviders(tradingBetaApiGetTradingProvidersRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.swapBeta().approveTermsOfService(providerId,\ - \ idempotencyKey);" + code: "CompletableFuture> response =\ + \ fireblocks.tradingBeta().getTradingProviders(pageSize, pageCursor);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.swap_beta.approve_terms_of_service(provider_id,\ - \ idempotency_key);" + code: "response = fireblocks.trading_beta.get_trading_providers(page_size,\ + \ page_cursor);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.swapBeta.approveTermsOfService(swapBetaApiApproveTermsOfServiceRequest);" + source: "const response: Promise>\ + \ = fireblocks.tradingBeta.getTradingProviders(tradingBetaApiGetTradingProvidersRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.swapBeta().approveTermsOfService(providerId,\ - \ idempotencyKey);" + source: "CompletableFuture> response =\ + \ fireblocks.tradingBeta().getTradingProviders(pageSize, pageCursor);" - lang: Python - source: "response = fireblocks.swap_beta.approve_terms_of_service(provider_id,\ - \ idempotency_key);" + source: "response = fireblocks.trading_beta.get_trading_providers(page_size,\ + \ page_cursor);" x-accepts: - application/json - /swap/providers/{providerId}/quote: + /trading/quotes: post: description: |- - Create a quote from specific swap provider. + Generate a time-limited quote for asset conversion, providing exchange rate and amount calculations. Note: These endpoints are currently in beta and might be subject to changes. - If you want to participate and learn more about the Fireblocks Swap, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. + If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. - Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. operationId: createQuote parameters: - - explode: false - in: path - name: providerId - required: true - schema: - format: uuid - 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\ @@ -17007,130 +17312,230 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/QuoteRequest" + $ref: "#/components/schemas/CreateQuote" required: true responses: "201": content: application/json: schema: - $ref: "#/components/schemas/QuoteResponse" - description: "The response can be one of two possible DTOs, depending if\ - \ the request contains the accountId property." - default: - $ref: "#/components/responses/Error" + $ref: "#/components/schemas/QuotesResponse" + description: Quote created + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/TradingErrorResponse" + description: Unauthorized. Missing / invalid JWT token in Authorization + header. + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/TradingErrorResponse" + description: Not found + "5XX": + content: + application/json: + schema: + $ref: "#/components/schemas/TradingErrorResponse" + description: Internal error. summary: Create a quote tags: - - Swap (Beta) + - Trading (Beta) x-rate-limit-category: write x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.swapBeta.createQuote(swapBetaApiCreateQuoteRequest);" + code: "const response: Promise> = fireblocks.tradingBeta.createQuote(tradingBetaApiCreateQuoteRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.swapBeta().createQuote(quoteRequest,\ - \ providerId, idempotencyKey);" + code: "CompletableFuture> response = fireblocks.tradingBeta().createQuote(createQuote,\ + \ idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.swap_beta.create_quote(quote_request, provider_id,\ - \ idempotency_key);" + code: "response = fireblocks.trading_beta.create_quote(create_quote, idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.swapBeta.createQuote(swapBetaApiCreateQuoteRequest);" + source: "const response: Promise> = fireblocks.tradingBeta.createQuote(tradingBetaApiCreateQuoteRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.swapBeta().createQuote(quoteRequest,\ - \ providerId, idempotencyKey);" + source: "CompletableFuture> response = fireblocks.tradingBeta().createQuote(createQuote,\ + \ idempotencyKey);" - lang: Python - source: "response = fireblocks.swap_beta.create_quote(quote_request, provider_id,\ - \ idempotency_key);" + source: "response = fireblocks.trading_beta.create_quote(create_quote, idempotency_key);" x-content-type: application/json x-accepts: - application/json - /swap/operations: + /trading/orders: get: description: |- - Return a list of swap operations for the specific workspace - The operations are sorted by creation date in descending order, meaning the most recent operation appears first. + Retrieve a paginated list of orders with optional filtering by account, provider, status, and time range. Note:These endpoints are currently in beta and might be subject to changes. - If you want to participate and learn more about the Fireblocks TAP, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. + If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. - operationId: getSwapOperations + operationId: getOrders parameters: - - description: Cursor of the required page + - description: pageSize for pagination. explode: true + in: query + name: pageSize + required: true + schema: + maximum: 100 + minimum: 1 + type: integer + style: form + - explode: true in: query name: pageCursor required: false schema: + minLength: 1 type: string style: form - - description: "Number of items in a page, Acceptable values are 1-100. Maximum\ - \ value is 100" - example: 10 + - description: ASC / DESC ordering (default DESC) explode: true in: query - name: pageSize + name: order required: false schema: - default: 10 - maximum: 100 - minimum: 1 - type: number + default: DESC + enum: + - ASC + - DESC + type: string + style: form + - description: Filter by accountId. + explode: true + in: query + name: accountId + required: false + schema: + items: + minLength: 1 + type: string + type: array + style: form + - description: Filter by providerId. + explode: true + in: query + name: providerId + required: false + schema: + items: + minLength: 1 + type: string + type: array + style: form + - description: Filter by order status. + explode: true + in: query + name: statuses + required: false + schema: + items: + $ref: "#/components/schemas/OrderStatus" + type: array + style: form + - explode: true + in: query + name: startTime + required: false + schema: + minimum: 0 + type: integer + style: form + - explode: true + in: query + name: endTime + required: false + schema: + minimum: 0 + type: integer + style: form + - explode: true + in: query + name: assetConversionType + required: false + schema: + description: Filter by asset conversion type. + enum: + - DIGITAL_ONLY + - FIAT + type: string style: form responses: "200": content: application/json: schema: - $ref: "#/components/schemas/SwapOperationsPaginatedResponse" - description: A paginated response containing OperationDto objects - default: - $ref: "#/components/responses/Error" - summary: Get Operations list + $ref: "#/components/schemas/GetOrdersResponse" + description: Orders response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/TradingErrorResponse" + description: Unauthorized. Missing / invalid JWT token in Authorization + header. + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/TradingErrorResponse" + description: Not found + "5XX": + content: + application/json: + schema: + $ref: "#/components/schemas/TradingErrorResponse" + description: Internal error. + summary: Get orders tags: - - Swap (Beta) + - Trading (Beta) x-rate-limit-category: read x-readme: code-samples: - language: typescript - code: "const response: Promise>\ - \ = fireblocks.swapBeta.getSwapOperations(swapBetaApiGetSwapOperationsRequest);" + code: "const response: Promise> =\ + \ fireblocks.tradingBeta.getOrders(tradingBetaApiGetOrdersRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response\ - \ = fireblocks.swapBeta().getSwapOperations(pageCursor, pageSize);" + code: "CompletableFuture> response = fireblocks.tradingBeta().getOrders(pageSize,\ + \ pageCursor, order, accountId, providerId, statuses, startTime, endTime,\ + \ assetConversionType);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.swap_beta.get_swap_operations(page_cursor,\ - \ page_size);" + code: "response = fireblocks.trading_beta.get_orders(page_size, page_cursor,\ + \ order, account_id, provider_id, statuses, start_time, end_time, asset_conversion_type);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise>\ - \ = fireblocks.swapBeta.getSwapOperations(swapBetaApiGetSwapOperationsRequest);" + source: "const response: Promise> =\ + \ fireblocks.tradingBeta.getOrders(tradingBetaApiGetOrdersRequest);" - lang: Java - source: "CompletableFuture> response\ - \ = fireblocks.swapBeta().getSwapOperations(pageCursor, pageSize);" + source: "CompletableFuture> response = fireblocks.tradingBeta().getOrders(pageSize,\ + \ pageCursor, order, accountId, providerId, statuses, startTime, endTime,\ + \ assetConversionType);" - lang: Python - source: "response = fireblocks.swap_beta.get_swap_operations(page_cursor,\ - \ page_size);" + source: "response = fireblocks.trading_beta.get_orders(page_size, page_cursor,\ + \ order, account_id, provider_id, statuses, start_time, end_time, asset_conversion_type);" x-accepts: - application/json post: description: |- - Create swap operation based on a provided quote Id + Create an order to buy or sell an asset. If no source is given, an external source will be use. Note: These endpoints are currently in beta and might be subject to changes. - If you want to participate and learn more about the Fireblocks Swap, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. + If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. - operationId: createSwapOperation + operationId: createOrder parameters: - description: "A unique identifier for the request. If the request is sent\ \ multiple times with the same idempotency key, the server will return the\ @@ -17147,63 +17552,82 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/SwapOperationRequest" + $ref: "#/components/schemas/CreateOrderRequest" required: true responses: - "201": + "202": content: application/json: schema: - $ref: "#/components/schemas/SwapOperation" - description: "" - default: - $ref: "#/components/responses/Error" - summary: Create swap operation + $ref: "#/components/schemas/OrderDetails" + description: Order creation response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/TradingErrorResponse" + description: Unauthorized. Missing / invalid JWT token in Authorization + header. + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/TradingErrorResponse" + description: Not found + "5XX": + content: + application/json: + schema: + $ref: "#/components/schemas/TradingErrorResponse" + description: Internal error. + summary: Create an order tags: - - Swap (Beta) + - Trading (Beta) x-rate-limit-category: write x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.swapBeta.createSwapOperation(swapBetaApiCreateSwapOperationRequest);" + code: "const response: Promise> = fireblocks.tradingBeta.createOrder(tradingBetaApiCreateOrderRequest);" name: Fireblocks SDK TypeScript example - language: java - code: "CompletableFuture> response = fireblocks.swapBeta().createSwapOperation(swapOperationRequest,\ + code: "CompletableFuture> response = fireblocks.tradingBeta().createOrder(createOrderRequest,\ \ idempotencyKey);" name: Fireblocks SDK Java example - language: python - code: "response = fireblocks.swap_beta.create_swap_operation(swap_operation_request,\ + code: "response = fireblocks.trading_beta.create_order(create_order_request,\ \ idempotency_key);" name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.swapBeta.createSwapOperation(swapBetaApiCreateSwapOperationRequest);" + source: "const response: Promise> = fireblocks.tradingBeta.createOrder(tradingBetaApiCreateOrderRequest);" - lang: Java - source: "CompletableFuture> response = fireblocks.swapBeta().createSwapOperation(swapOperationRequest,\ + source: "CompletableFuture> response = fireblocks.tradingBeta().createOrder(createOrderRequest,\ \ idempotencyKey);" - lang: Python - source: "response = fireblocks.swap_beta.create_swap_operation(swap_operation_request,\ + source: "response = fireblocks.trading_beta.create_order(create_order_request,\ \ idempotency_key);" x-content-type: application/json x-accepts: - application/json - /swap/operations/{operationId}: + /trading/orders/{orderId}: get: description: |- - Get swap operation Details by ID. + Retrieve detailed information about a specific order by its ID. Note:These endpoints are currently in beta and might be subject to changes. - If you want to participate and learn more about the Fireblocks Swap, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. + If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. - operationId: getSwapOperationById + operationId: getOrder parameters: - - explode: false + - description: The ID of the order to fetch. + explode: false in: path - name: operationId + name: orderId required: true schema: + minLength: 1 type: string style: simple responses: @@ -17211,32 +17635,49 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/SwapOperation" - description: "" - default: - $ref: "#/components/responses/Error" - summary: Get operation details + $ref: "#/components/schemas/OrderDetails" + description: Order response + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/TradingErrorResponse" + description: Unauthorized. Missing / invalid JWT token in Authorization + header. + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/TradingErrorResponse" + description: Not found + "5XX": + content: + application/json: + schema: + $ref: "#/components/schemas/TradingErrorResponse" + description: Internal error. + summary: Get order details tags: - - Swap (Beta) + - Trading (Beta) x-rate-limit-category: read x-readme: code-samples: - language: typescript - code: "const response: Promise> = fireblocks.swapBeta.getSwapOperationById(swapBetaApiGetSwapOperationByIdRequest);" + code: "const response: Promise> = fireblocks.tradingBeta.getOrder(tradingBetaApiGetOrderRequest);" name: Fireblocks SDK TypeScript example - language: java - code: CompletableFuture> response = fireblocks.swapBeta().getSwapOperationById(operationId); + code: CompletableFuture> response = fireblocks.tradingBeta().getOrder(orderId); name: Fireblocks SDK Java example - language: python - code: response = fireblocks.swap_beta.get_swap_operation_by_id(operation_id); + code: response = fireblocks.trading_beta.get_order(order_id); name: Fireblocks SDK Python example x-codeSamples: - lang: TypeScript - source: "const response: Promise> = fireblocks.swapBeta.getSwapOperationById(swapBetaApiGetSwapOperationByIdRequest);" + source: "const response: Promise> = fireblocks.tradingBeta.getOrder(tradingBetaApiGetOrderRequest);" - lang: Java - source: CompletableFuture> response = fireblocks.swapBeta().getSwapOperationById(operationId); + source: CompletableFuture> response = fireblocks.tradingBeta().getOrder(orderId); - lang: Python - source: response = fireblocks.swap_beta.get_swap_operation_by_id(operation_id); + source: response = fireblocks.trading_beta.get_order(order_id); x-accepts: - application/json /admin_quorum: @@ -25762,9 +26203,13 @@ components: type: string ExchangeAsset: example: + providerSymbol: BTC total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit @@ -25781,19 +26226,43 @@ components: type: string credit: type: string + assetId: + description: The id of the asset + example: 2306088f-97ed-4293-8d28-8ab627f272d7 + type: string + providerSymbol: + description: The provider symbol of the asset + example: BTC + type: string + assetSymbol: + description: The asset symbol of the asset + example: BTC + type: string + assetLegacyId: + description: The asset legacy id of the asset + example: BTC + type: string type: object ExchangeTradingAccount: example: assets: - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit @@ -25813,30 +26282,46 @@ components: example: tradingAccounts: - assets: - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit name: name type: type - assets: - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit @@ -25844,15 +26329,23 @@ components: type: type isSubaccount: true assets: - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit @@ -25941,30 +26434,46 @@ components: ExchangeAccount: - tradingAccounts: - assets: - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit name: name type: type - assets: - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit @@ -25972,15 +26481,23 @@ components: type: type isSubaccount: true assets: - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit @@ -25992,30 +26509,46 @@ components: status: status - tradingAccounts: - assets: - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit name: name type: type - assets: - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit @@ -26023,15 +26556,23 @@ components: type: type isSubaccount: true assets: - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit - - total: total + - providerSymbol: BTC + total: total lockedAmount: lockedAmount + assetSymbol: BTC balance: balance + assetId: 2306088f-97ed-4293-8d28-8ab627f272d7 + assetLegacyId: BTC available: available id: id credit: credit @@ -26237,6 +26778,388 @@ components: required: - success type: object + ConnectedAccountApprovalStatus: + enum: + - WAITING_FOR_APPROVAL + - APPROVED + - REJECTED + - CANCELLED + - FAILED + type: string + ConnectedAccountTotalBalance: + example: + amount: "1201.15" + denominatedAssetId: ea6c3cb7-355a-4ee3-82ff-267c69970214 + hasFullAssetCoverage: true + properties: + amount: + description: The denominated currency value of the account. + example: "1201.15" + type: string + denominatedAssetId: + description: The asset ID of the total balance. + example: ea6c3cb7-355a-4ee3-82ff-267c69970214 + type: string + hasFullAssetCoverage: + default: false + description: "Indicates whether the total amount represents the complete\ + \ balance of all assets in the account. When true, all asset balances\ + \ have been successfully converted to the denominated currency. When false,\ + \ some assets could not be included in the total due to missing exchange\ + \ rates or non-convertible assets." + example: true + type: boolean + required: + - amount + - denominatedAssetId + - hasFullAssetCoverage + type: object + ConnectedAccountAssetType: + enum: + - DIGITAL + - FIAT + type: string + ConnectedAccountCapability: + enum: + - WITHDRAWALS + - DEPOSITS + - TRADING + type: string + ConnectedAccountManifest: + example: + assetTypes: [] + capabilities: + - WITHDRAWALS + properties: + assetTypes: + description: Asset types supported by the connected account. + example: [] + items: + $ref: "#/components/schemas/ConnectedAccountAssetType" + type: array + capabilities: + description: | + Features supported for the connected account. Logic: - If account capabilities include ramp -> TRADING - If account capabilities include transfers -> DEPOSITS - If account capabilities include transfersBlockchain / transfersFiat / transfersPeerAccounts / transfersInternal -> WITHDRAWALS + example: + - WITHDRAWALS + items: + $ref: "#/components/schemas/ConnectedAccountCapability" + type: array + required: + - assetTypes + - capabilities + type: object + ConnectedAccount: + properties: + id: + description: Unique identifier of the connected account. + example: acc-123456 + type: string + name: + description: Human-readable name of the connected account. + example: Main Venue Account + type: string + providerId: + description: The ID of the venue the account belongs to. + example: BRIDGE + type: string + status: + $ref: "#/components/schemas/ConnectedAccountApprovalStatus" + totalBalance: + $ref: "#/components/schemas/ConnectedAccountTotalBalance" + manifest: + $ref: "#/components/schemas/ConnectedAccountManifest" + parentId: + description: "The ID of the parent main account, if this is a sub account." + example: acc-parent-001 + type: string + required: + - id + - manifest + - name + - providerId + - status + - totalBalance + type: object + ConnectedAccountsResponse: + example: + next: eyJwYWdlIjoyfQ== + total: 2 + data: + - id: acc-123456 + name: Main Venue Account + providerId: BRIDGE + status: APPROVED + totalBalance: + amount: "1201.15" + denominatedAssetId: ea6c3cb7-355a-4ee3-82ff-267c69970214 + hasFullAssetCoverage: true + manifest: + assetTypes: [] + capabilities: + - DEPOSITS + - WITHDRAWALS + - id: acc-654321 + name: Secondary Account + providerId: BRIDGE + status: WAITING_FOR_APPROVAL + totalBalance: + amount: "0.00" + denominatedAssetId: ea6c3cb7-355a-4ee3-82ff-267c69970214 + hasFullAssetCoverage: false + manifest: + assetTypes: [] + capabilities: + - WITHDRAWALS + properties: + data: + description: List of connected accounts matching the query. + example: + - id: acc-123456 + name: Main Venue Account + providerId: BRIDGE + status: APPROVED + totalBalance: + amount: "1201.15" + denominatedAssetId: ea6c3cb7-355a-4ee3-82ff-267c69970214 + hasFullAssetCoverage: true + manifest: + assetTypes: [] + capabilities: + - DEPOSITS + - WITHDRAWALS + - id: acc-654321 + name: Secondary Account + providerId: BRIDGE + status: WAITING_FOR_APPROVAL + totalBalance: + amount: "0.00" + denominatedAssetId: ea6c3cb7-355a-4ee3-82ff-267c69970214 + hasFullAssetCoverage: false + manifest: + assetTypes: [] + capabilities: + - WITHDRAWALS + items: + $ref: "#/components/schemas/ConnectedAccount" + type: array + total: + description: Total number of accounts by query. + example: 2 + type: integer + next: + description: "A cursor for the next page of results, if available." + example: eyJwYWdlIjoyfQ== + type: string + required: + - data + type: object + ConnectedSingleAccount: + properties: + subAccountsIds: + description: IDs of sub-accounts associated with this connected account. + example: + - acc-sub-001 + - acc-sub-002 + items: + type: string + type: array + type: object + ConnectedSingleAccountResponse: + allOf: + - $ref: "#/components/schemas/ConnectedAccount" + - $ref: "#/components/schemas/ConnectedSingleAccount" + example: + totalBalance: + amount: "1201.15" + denominatedAssetId: ea6c3cb7-355a-4ee3-82ff-267c69970214 + hasFullAssetCoverage: true + providerId: BRIDGE + manifest: + assetTypes: [] + capabilities: + - WITHDRAWALS + name: Main Venue Account + id: acc-123456 + parentId: acc-parent-001 + subAccountsIds: + - acc-sub-001 + - acc-sub-002 + status: WAITING_FOR_APPROVAL + ConnectedAccountBalances: + properties: + assetId: + description: "Asset identifier (e.g., BTC, ETH, USDC)." + example: BTC + type: string + availableAmount: + description: Amount available for use. + example: "100.00" + type: string + totalAmount: + description: Total amount including locked/held balances. + example: "120.00" + type: string + lockedAmount: + description: Amount currently locked/held. + example: "20.00" + type: string + creditAmount: + description: "Credit line amount, if applicable (0 when not used)." + example: "0" + type: string + balanceType: + description: "Wallet type/category (e.g., SPOT, MARGIN, FUNDING)." + example: FUNDING + type: string + balanceName: + description: Display name for the balance type (at the provider) + example: Trader1 Wallet + type: string + required: + - assetId + - availableAmount + - balanceType + - totalAmount + type: object + ConnectedAccountBalancesResponse: + example: + next: eyJwYWdlIjoyfQ== + total: 2 + data: + - assetId: BTC + availableAmount: "100.00" + totalAmount: "120.00" + balanceType: FUNDING + balanceName: Trader1 Wallet + properties: + data: + description: "Flat balance row for a single asset within an account and\ + \ wallet type. One row per (assetId, balanceType)." + example: + - assetId: BTC + availableAmount: "100.00" + totalAmount: "120.00" + balanceType: FUNDING + balanceName: Trader1 Wallet + items: + $ref: "#/components/schemas/ConnectedAccountBalances" + type: array + total: + description: Total number of balance rows by query. + example: 2 + type: integer + next: + description: "A cursor for the next page of results, if available." + example: eyJwYWdlIjoyfQ== + type: string + required: + - data + type: object + ConnectedAccountRateResponse: + example: + accountId: ea6c3cb7-355a-4ee3-82ff-267c69970210 + baseAssetId: BTC + rate: "1.2345" + quoteAssetId: USD + properties: + accountId: + description: The ID of the account that generated the quote. + example: ea6c3cb7-355a-4ee3-82ff-267c69970210 + type: string + baseAssetId: + description: The source asset identifier + example: BTC + type: string + quoteAssetId: + description: The target asset identifier + example: USD + type: string + rate: + description: The exchange rate value + example: "1.2345" + type: string + required: + - accountId + - baseAssetId + - quoteAssetId + - rate + type: object + ConnectedAccountTradingPairSupportedType: + enum: + - QUOTE + - MARKET + - LIMIT + type: string + ConnectedAccountTradingPair: + properties: + id: + description: The ID of the trading pair. + example: ea6c3cb7-355a-4ee3-82ff-267c69970210 + type: string + baseAssetId: + description: The Symbol of the base asset. + example: BTC + type: string + quoteAssetId: + description: The symbol of the quote asset. + example: USD + type: string + supportedTypes: + items: + $ref: "#/components/schemas/ConnectedAccountTradingPairSupportedType" + type: array + required: + - baseAssetId + - id + - quoteAssetId + - supportedTypes + type: object + ConnectedAccountTradingPairsResponse: + example: + next: next + total: 2 + data: + - id: ea6c3cb7-355a-4ee3-82ff-267c69970210 + baseAssetId: BTC + quoteAssetId: USD + supportedTypes: + - MARKET + - id: ea6c3cb7-355a-4ee3-82ff-267c69970211 + baseAssetId: ETH + quoteAssetId: USDC + supportedTypes: + - QUOTE + - MARKET + properties: + data: + example: + - id: ea6c3cb7-355a-4ee3-82ff-267c69970210 + baseAssetId: BTC + quoteAssetId: USD + supportedTypes: + - MARKET + - id: ea6c3cb7-355a-4ee3-82ff-267c69970211 + baseAssetId: ETH + quoteAssetId: USDC + supportedTypes: + - QUOTE + - MARKET + items: + $ref: "#/components/schemas/ConnectedAccountTradingPair" + type: array + total: + description: Total number of asset pairs matching the query. + example: 2 + type: integer + next: + description: "A cursor for the next page of results, if available." + nullable: true + type: string + example: null + required: + - data + type: object NetworkChannel: deprecated: true description: Deprecated in the only used reference - NetworkConnectionResponse @@ -27961,6 +28884,12 @@ components: - userId - userName type: object + AssetFeature: + description: Asset feature + enum: + - STABLECOIN + example: STABLECOIN + type: string AssetDetailsMetadata: example: note: @@ -27968,6 +28897,9 @@ components: userName: Test test userId: 056776ab-9efa-4219-9820-9ece0cc4d90d updatedAt: 2025-06-08T19:42:49Z + features: + - STABLECOIN + - STABLECOIN website: https://example.org scope: GLOBAL deprecated: false @@ -28008,6 +28940,11 @@ components: type: array note: $ref: "#/components/schemas/AssetNote" + features: + description: Asset features + items: + $ref: "#/components/schemas/AssetFeature" + type: array required: - deprecated - scope @@ -28022,6 +28959,9 @@ components: userName: Test test userId: 056776ab-9efa-4219-9820-9ece0cc4d90d updatedAt: 2025-06-08T19:42:49Z + features: + - STABLECOIN + - STABLECOIN website: https://example.org scope: GLOBAL deprecated: false @@ -28094,6 +29034,9 @@ components: userName: Test test userId: 056776ab-9efa-4219-9820-9ece0cc4d90d updatedAt: 2025-06-08T19:42:49Z + features: + - STABLECOIN + - STABLECOIN website: https://example.org scope: GLOBAL deprecated: false @@ -28127,6 +29070,9 @@ components: userName: Test test userId: 056776ab-9efa-4219-9820-9ece0cc4d90d updatedAt: 2025-06-08T19:42:49Z + features: + - STABLECOIN + - STABLECOIN website: https://example.org scope: GLOBAL deprecated: false @@ -43209,654 +44155,1625 @@ components: items: $ref: "#/components/schemas/Provider" type: array - SwapProviderProtocolsEnum: - description: Protocol options supported by each provider. `UNISWAP` supports - `UNISWAP_CLASSIC` and `UNISWAPX`. `WRAP_UNWRAP` supports `WRAP` and `UNWRAP.` - enum: - - UNISWAP_CLASSIC - - UNISWAPX - - WRAP - - UNWRAP - example: UNISWAP_CLASSIC - type: string - ProviderCategoryEnum: - description: "Category that classify the provider, Supported categories are:\ - \ `DEX`, `CEX`, `OTC`" - enum: - - DEX - - CEX - - OTC - - WRAP_UNWRAP - example: DEX - type: string - SwapProvider: - example: - termsOfServiceUrl: https://uniswap.org/terms-of-service - isTermsApprovalRequired: true - name: Uniswap - id: 3e2efee1-0d69-4276-a6e6-711531185e4f - protocols: - - UNISWAP_CLASSIC - - UNISWAPX - category: DEX - isTermsOfServiceApproved: true + BaseProvider: + example: + id: prov_7b4e2d9f1c8a5e3b + name: Global Exchange Partners + logo: https://example.com/logos/global-exchange-partners.png + accountBased: false properties: id: - description: The uuid that identifies the provider - example: 3e2efee1-0d69-4276-a6e6-711531185e4f - format: uuid + description: Unique identifier for the provider type: string name: - description: Name of the provider - example: Uniswap + description: Display name of the provider type: string - protocols: - description: List of supported protocols. Protocols are specific per provider - example: - - UNISWAP_CLASSIC - - UNISWAPX + logo: + description: URL to the logo image of the provider + type: string + accountBased: + description: Indicates whether the provider access model is through accounts + or directly + type: boolean + required: + - accountBased + - id + - name + type: object + Capability: + enum: + - WITHDRAWALS + - DEPOSITS + - TRADING + example: TRADING + type: string + Manifest: + example: + assetTypes: + - DIGITAL + - FIAT + capabilities: + - SPOT_TRADING + - LIMIT_ORDERS + properties: + assetTypes: items: - $ref: "#/components/schemas/SwapProviderProtocolsEnum" + enum: + - DIGITAL + - FIAT + type: string type: array - category: - $ref: "#/components/schemas/ProviderCategoryEnum" - isTermsApprovalRequired: - description: "Indicates whether the terms of service are required for the\ - \ provider. if `true`, the user must approve the terms of service before\ - \ using the provider. otherwise, `termsOfServiceUrl` and `isTermsOfServiceApproved`\ - \ are not shown under the provider data." - example: true - type: boolean - termsOfServiceUrl: - description: URL to the terms of service - example: https://uniswap.org/terms-of-service + capabilities: + items: + $ref: "#/components/schemas/Capability" + type: array + required: + - assetTypes + - capabilities + type: object + AccountBase: + example: + id: acc_9f4e2d8b1c6a5e73 + name: Main Trading Account + properties: + id: + description: The ID of the account + type: string + name: + description: The name of the account type: string - isTermsOfServiceApproved: - description: Indicates whether the terms of service are approved by the - user - example: true - type: boolean required: - - category - id - - isTermsApprovalRequired - name - - protocols type: object - SwapProvidersPaginatedResponse: + AccountBasedAccessProvider: + allOf: + - $ref: "#/components/schemas/BaseProvider" + - properties: + manifest: + $ref: "#/components/schemas/Manifest" + connected: + description: Whether the provider is currently connected + type: boolean + accounts: + items: + $ref: "#/components/schemas/AccountBase" + type: array + required: + - accountBased + - connected + - manifest + type: object + example: + id: prov_9a2c4e8f7b1d3a6e + name: Premium Trading Co + logo: https://example.com/logos/premium-trading-co.png + accountBased: true + manifest: + assetTypes: + - DIGITAL + - FIAT + capabilities: + - SPOT_TRADING + connected: true + accounts: + - id: acc_5f8e2d9c1a7b4e36 + name: Trading Account 1 + description: Primary trading account + DirectAccessProvider: + allOf: + - $ref: "#/components/schemas/BaseProvider" + - properties: + approved: + description: Whether the provider was approved for use + type: boolean + hasTermsOfService: + description: Whether the provider has terms of service + type: boolean + termsOfServiceUrl: + description: URL to the terms of service document + type: string + required: + - accountBased + - hasTermsOfService + type: object + example: + id: prov_2f8e1d9b4c7a5e3f + name: DirectTrade Solutions + logo: https://example.com/logos/directtrade-solutions.png + accountBased: false + approved: true + hasTermsOfService: true + termsOfServiceUrl: https://directtrade.example.com/terms + TradingProvider: + oneOf: + - $ref: "#/components/schemas/AccountBasedAccessProvider" + - $ref: "#/components/schemas/DirectAccessProvider" + ProvidersListResponse: example: - next: MjAyMy0xMi0xMyA====TNjowOC4zMDI=:MTEwMA== data: - - termsOfServiceUrl: https://uniswap.org/terms-of-service - isTermsApprovalRequired: true - name: Uniswap - id: 3e2efee1-0d69-4276-a6e6-711531185e4f - protocols: - - UNISWAP_CLASSIC - - UNISWAPX - category: DEX - isTermsOfServiceApproved: true - - termsOfServiceUrl: https://uniswap.org/terms-of-service - isTermsApprovalRequired: true - name: Uniswap - id: 3e2efee1-0d69-4276-a6e6-711531185e4f - protocols: - - UNISWAP_CLASSIC - - UNISWAPX - category: DEX - isTermsOfServiceApproved: true + - id: bridge-provider-001 + name: Bridge Provider + logo: https://example.com/logos/bridge.png + accountBased: true + manifest: + assetTypes: + - DIGITAL + - FIAT + capabilities: + - TRADING + - WITHDRAWALS + connected: true + accounts: + - id: acc_9f4e2d8b1c6a5e73 + name: Main Trading Account + - id: uniswap-v3-provider + name: Uniswap V3 + logo: https://example.com/logos/uniswap.png + accountBased: false + approved: true + hasTermsOfService: true + termsOfServiceUrl: https://uniswap.org/terms + total: 2 + next: cursor_abc123def456 properties: data: - description: The data of the current page + description: List of available providers items: - $ref: "#/components/schemas/SwapProvider" + $ref: "#/components/schemas/TradingProvider" type: array + total: + description: Total number of providers matching the query. + type: integer next: - description: "The cursor to fetch the next page of results, if absent or\ - \ null, there are no additional results." - example: MjAyMy0xMi0xMyA====TNjowOC4zMDI=:MTEwMA== - nullable: true + description: "A cursor for the next page of results, if available." type: string required: - data + - total + type: object + ErrorCodes: + enum: + - INVALID_TOKEN + - MISSING_PARAMETER + - INVALID_PARAMETER + - RESOURCE_NOT_FOUND + - INVALID_TIME_RANGE + - UNAUTHORIZED + - ACCOUNT_NOT_ACTIVE + - UNMANAGED_WALLET_NOT_APPROVED + example: INVALID_PARAMETER + type: string + TradingErrorResponse: + example: + error: + type: VALIDATION + message: "Invalid base amount: must be greater than 0" + errorCode: INVALID_AMOUNT + properties: + error: + $ref: "#/components/schemas/TradingErrorResponse_error" + required: + - error type: object - QuoteRequest: + AccountProviderID: example: - accountId: "1" - protocol: UNISWAP_CLASSIC - inputAsset: WETH - inputAmount: "10" - outputAsset: DAI - slippageTolerance: 0.5 + providerId: prov_8c3f1a4b2d6e9f7c + accountId: acc_5e9a2d1c4b7f3e8a properties: + providerId: + description: The ID of the provider associated with the account. + type: string accountId: - description: The id of the vault account or account id - example: "1" + description: The ID of the account associated with the provider. type: string - inputAmount: - description: "The amount of tokens the swapper will provide, positive number,\ - \ can be a decimal." - example: "10" + required: + - accountId + - providerId + type: object + ProviderID: + example: + providerId: prov_8c3f1a4b2d6e9f7c + properties: + providerId: + description: The ID of the provider associated with the account. + type: string + 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" + enum: + - BLOCKCHAIN + - INTERNAL + - PEER + - SWIFT + - IBAN + - US_WIRE + - ACH + - SEPA + - SPEI + - PIX + - LOCAL_BANK_TRANSFER_AFRICA + - MOBILE_MONEY + example: BLOCKCHAIN + type: string + PlatformAccount: + example: + type: VAULT_ACCOUNT + accountId: vault_acc_5e9a2d1c4b7f3e8a + properties: + type: + enum: + - VAULT_ACCOUNT + - CONNECTED_ACCOUNT + - FIAT_ACCOUNT type: string - inputAsset: - description: The id of the asset the swapper will provide - example: WETH + accountId: type: string - outputAsset: - description: The id of the asset the swapper will receive - example: DAI + required: + - accountId + - type + type: object + ExternalAccount: + example: + type: EXTERNAL + properties: + type: + enum: + - EXTERNAL type: string - slippageTolerance: - description: The slippage tolerance is a percentage. The slippage tolerance - is the maximum amount the price can change between the time the transaction - is submitted and the time it is executed - example: 0.5 - maximum: 100 - minimum: 0 + required: + - type + type: object + SettlementSourceAccount: + discriminator: + mapping: + VAULT_ACCOUNT: "#/components/schemas/PlatformAccount" + CONNECTED_ACCOUNT: "#/components/schemas/PlatformAccount" + FIAT_ACCOUNT: "#/components/schemas/PlatformAccount" + EXTERNAL: "#/components/schemas/ExternalAccount" + propertyName: type + oneOf: + - $ref: "#/components/schemas/PlatformAccount" + - $ref: "#/components/schemas/ExternalAccount" + PeerType: + enum: + - VAULT_ACCOUNT + - EXCHANGE_ACCOUNT + - INTERNAL_WALLET + - EXTERNAL_WALLET + - FIAT_ACCOUNT + example: VAULT_ACCOUNT + type: string + InternalReference: + example: + type: VAULT_ACCOUNT + accountId: vault_acc_9f3e2d1c4b8a7e5f + properties: + type: + $ref: "#/components/schemas/PeerType" + accountId: + type: string + required: + - accountId + - type + type: object + OneTimeAddressReference: + example: + type: ONE_TIME_ADDRESS + address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa + tag: destination-memo-123 + properties: + type: + enum: + - ONE_TIME_ADDRESS + type: string + address: + type: string + tag: + type: string + required: + - address + - type + type: object + AccountReference: + discriminator: + mapping: + VAULT_ACCOUNT: "#/components/schemas/InternalReference" + EXCHANGE_ACCOUNT: "#/components/schemas/InternalReference" + INTERNAL_WALLET: "#/components/schemas/InternalReference" + EXTERNAL_WALLET: "#/components/schemas/InternalReference" + FIAT_ACCOUNT: "#/components/schemas/InternalReference" + ONE_TIME_ADDRESS: "#/components/schemas/OneTimeAddressReference" + propertyName: type + oneOf: + - $ref: "#/components/schemas/InternalReference" + - $ref: "#/components/schemas/OneTimeAddressReference" + DVPSettlement: + description: Source/Destination accounts for the quote (must have for defi quotes) + example: + type: DVP + sourceAccount: + type: VAULT_ACCOUNT + id: vault_acc_3f7e1d9b2c5a8e4f + destinationAccount: + type: VAULT_ACCOUNT + id: vault_acc_7b2e5d8f1c4a9e3b + properties: + type: + enum: + - DVP + type: string + sourceAccount: + $ref: "#/components/schemas/SettlementSourceAccount" + destinationAccount: + $ref: "#/components/schemas/AccountReference" + required: + - destinationAccount + - sourceAccount + - type + type: object + CreateQuote: + example: + scope: + - providerId: prov_8c3f1a4b2d6e9f7c + accountId: acc_5e9a2d1c4b7f3e8a + baseAssetId: USD + baseAssetRail: FIAT_RAILS + quoteAssetId: BTC + quoteAssetRail: BLOCKCHAIN_RAILS + baseAmount: "1000.00" + side: BUY + slippageBps: 100 + settlement: + type: DVP + sourceAccount: + type: VAULT_ACCOUNT + id: vault_acc_3f7e1d9b2c5a8e4f + destinationAccount: + type: VAULT_ACCOUNT + id: vault_acc_7b2e5d8f1c4a9e3b + properties: + scope: + items: + $ref: "#/components/schemas/CreateQuote_scope_inner" + type: array + baseAssetId: + type: string + baseAssetRail: + $ref: "#/components/schemas/TransferRail" + quoteAssetId: + type: string + quoteAssetRail: + $ref: "#/components/schemas/TransferRail" + baseAmount: + description: The amount to convert from + example: "100.00" + pattern: ^\d+(\.\d+)?$ + type: string + slippageBps: + default: 50 + description: Slippage tolerance in basis points (bps) for defi quotes - + 1 is 0.01% and 10000 is 100% + maximum: 10000 + minimum: 1 type: number - protocol: - $ref: "#/components/schemas/SwapProviderProtocolsEnum" + settlement: + $ref: "#/components/schemas/DVPSettlement" + side: + description: Side of the order + enum: + - BUY + - SELL + type: string required: - - inputAmount - - inputAsset - - outputAsset - - protocol - - slippageTolerance + - baseAmount + - baseAssetId + - quoteAssetId + - scope + - side type: object - ProviderAdditionalData: - description: Provider specific additional data + AccountAccess: example: - priceImpact: "0.01" + type: PROVIDER_ACCOUNT + providerId: bridge-provider-001 + accountId: acc_9f4e2d8b1c6a5e73 properties: - priceImpact: - example: "0.01" + type: + description: Indicates this uses account-based access + enum: + - PROVIDER_ACCOUNT + type: string + providerId: + description: The ID of the provider + type: string + accountId: + description: The ID of the account type: string required: - - priceImpact + - accountId + - type type: object - SwapRequiredActionsEnum: + DirectAccess: + example: + type: PROVIDER + providerId: uniswap-v3-provider + properties: + type: + description: Indicates this uses direct provider access + enum: + - PROVIDER + type: string + providerId: + description: The ID of the provider + type: string + required: + - providerId + - type + type: object + AccessType: + discriminator: + mapping: + PROVIDER_ACCOUNT: "#/components/schemas/AccountAccess" + PROVIDER: "#/components/schemas/DirectAccess" + propertyName: type + oneOf: + - $ref: "#/components/schemas/AccountAccess" + - $ref: "#/components/schemas/DirectAccess" + ExecutionStepType: enum: - APPROVE - PERMIT - CONTRACT_CALL - example: APPROVE + - EXECUTE + - SETTLEMENT + example: EXECUTE type: string - QuoteFee: + FixedFee: + allOf: + - properties: + amountType: + enum: + - FIXED + type: string + amount: + description: The fixed amount of the fee + example: "0.01" + pattern: ^\d+(\.\d+)?$ + type: string + required: + - amount + - amountType + type: object example: - networkFeeAssetId: ETH - providerFee: "5742266" - providerFeeAssetId: DAI - providerFeeRate: 0.25 - networkApproveFee: "1478987585080628" - networkExecutionFee: "1478987585080628" + amountType: FIXED + amount: "0.01" + BpsFee: + allOf: + - properties: + amountType: + enum: + - BPS + type: string + amount: + description: "Fee in basis points (1 = 0.01%, 10000 = 100%)" + example: 50 + maximum: 10000 + minimum: 0 + type: number + required: + - amount + - amountType + type: object + example: + amountType: BPS + amount: 50 + Fee: + allOf: + - properties: + feeType: + description: | + The type of fee, such as ORDER, NETWORK, or SPREAD. ORDER - Fee for executing the order. NETWORK - Fee for network transactions. SPREAD - Fee for the difference between buy and sell prices. + enum: + - ORDER + - NETWORK + - SPREAD + type: string + assetId: + description: The asset identifier for the fee. + type: string + amountType: + description: "The type of amount for the fee, either FIXED or BPS (basis\ + \ points)." + enum: + - FIXED + - BPS + type: string + required: + - amountType + - assetId + - feeType + type: object + - discriminator: + mapping: + FIXED: "#/components/schemas/FixedFee" + BPS: "#/components/schemas/BpsFee" + propertyName: amountType + oneOf: + - $ref: "#/components/schemas/FixedFee" + - $ref: "#/components/schemas/BpsFee" + ExecutionStepDetails: + example: + type: MARKET_EXECUTION + fee: + feeType: ORDER + assetId: USD + amountType: FIXED + amount: "2.50" properties: - networkExecutionFee: - description: The gas fee in the asset unit. - example: "1478987585080628" - type: string - networkFeeAssetId: - description: The network fee in Fireblocks asset representation - example: ETH + type: + $ref: "#/components/schemas/ExecutionStepType" + fee: + $ref: "#/components/schemas/Fee" + required: + - type + type: object + CommittedQuoteType: + example: + type: COMMITTED + expiresAt: 2024-01-15T14:30:00.000Z + properties: + type: + description: Indicates this is a committed quote + enum: + - COMMITTED type: string - providerFee: - description: The provider fee in the asset unit. - example: "5742266" + expiresAt: + description: ISO 8601 timestamp of the expiration time of the quote. + format: date-time type: string - providerFeeAssetId: - description: The provider fee in Fireblocks asset representation - example: DAI + required: + - expiresAt + - type + type: object + IndicativeQuoteType: + example: + type: INDICATIVE + properties: + type: + description: Indicates this is an indicative quote + enum: + - INDICATIVE type: string - providerFeeRate: - description: Percentages of the provider fee out of the gross amount - example: 0.25 - type: number - networkApproveFee: - description: The gas fee in the asset unit. - example: "1478987585080628" - type: string - required: - - networkExecutionFee - - networkFeeAssetId - - providerFee - - providerFeeAssetId - - providerFeeRate - type: object - WalletQuoteResponse: - description: Return a quote with id that can be used for swap operation. - example: - expiredAt: 2023-07-13T15:55:34.256Z - protocol: UNISWAP_CLASSIC - requiredActions: - - APPROVE - - APPROVE - outputMinAmount: "10" - inputAsset: WETH - inputAmount: "10" - slippageTolerance: 0.5 - outputAsset: DAI - estimatedFees: - networkFeeAssetId: ETH - providerFee: "5742266" - providerFeeAssetId: DAI - providerFeeRate: 0.25 - networkApproveFee: "1478987585080628" - networkExecutionFee: "1478987585080628" - additionalData: - priceImpact: "0.01" - outputMaxAmount: "20" - providerQuoteId: 550e8400-e29b-41d4-a716-446655440000 + required: + - type + type: object + Quote: + allOf: + - properties: + via: + $ref: "#/components/schemas/AccessType" + id: + type: string + type: + enum: + - COMMITTED + - INDICATIVE + type: string + quoteAssetId: + type: string + baseAssetId: + type: string + baseAmount: + type: string + quoteAmount: + type: string + priceImpact: + type: number + quoteMinAmount: + type: string + executionSteps: + items: + $ref: "#/components/schemas/ExecutionStepDetails" + type: array + generalFees: + items: + $ref: "#/components/schemas/Fee" + type: array + side: + description: Side of the order + enum: + - BUY + - SELL + type: string + required: + - baseAmount + - baseAssetId + - id + - quoteAmount + - quoteAssetId + - side + - type + - via + type: object + - discriminator: + mapping: + COMMITTED: "#/components/schemas/CommittedQuoteType" + INDICATIVE: "#/components/schemas/IndicativeQuoteType" + propertyName: type + oneOf: + - $ref: "#/components/schemas/CommittedQuoteType" + - $ref: "#/components/schemas/IndicativeQuoteType" + QuotesResponse: + example: + quotes: + - via: + type: PROVIDER_ACCOUNT + providerId: bridge-provider-001 + accountId: acc_9f4e2d8b1c6a5e73 + id: quote_8f2e4d1a9c5b7e3f + type: COMMITTED + baseAssetId: USDC + quoteAssetId: BTC + baseAmount: "1000.00" + quoteAmount: "0.02458" + priceImpact: 0.005 + quoteMinAmount: "0.02450" + expiresAt: 2024-01-15T10:35:00.000Z + executionSteps: + - type: EXECUTE + fee: + feeType: ORDER + assetId: USDC + amountType: FIXED + amount: "2.50" + generalFees: + - feeType: ORDER + assetId: USDC + amountType: FIXED + amount: "2.50" + properties: + quotes: + items: + $ref: "#/components/schemas/Quote" + type: array + type: object + OrderStatus: + enum: + - CREATED + - PENDING_USER_ACTION + - PROCESSING + - CANCELED + - COMPLETED + - FAILED + example: PROCESSING + type: string + OrderSummary: + example: + id: ord_5f8e2d9c1a7b4e36 + via: + type: PROVIDER_ACCOUNT + providerId: prov_8c3f1a4b2d6e9f7c + accountId: acc_5e9a2d1c4b7f3e8a + side: BUY + baseAmount: "1000.00" + quoteAmount: "0.02458" + baseAssetId: USD + quoteAssetId: BTC + status: COMPLETED + destination: + type: VAULT_ACCOUNT + accountId: vault_acc_7b2e5d8f1c4a9e3b + source: + type: VAULT_ACCOUNT + accountId: vault_acc_3f7e1d9b2c5a8e4f + createdAt: 2024-01-15T10:30:00.000Z properties: - protocol: - $ref: "#/components/schemas/SwapProviderProtocolsEnum" - inputAmount: - description: The amount of tokens the swapper will provide - example: "10" + id: type: string - inputAsset: - description: The id of the asset the swapper will provide - example: WETH + via: + $ref: "#/components/schemas/AccessType" + side: + description: Side of the order + enum: + - BUY + - SELL type: string - slippageTolerance: - description: The slippage tolerance is a percentage. The slippage tolerance - is the maximum amount the price can change between the time the transaction - is submitted and the time it is executed - example: 0.5 - type: number - outputMinAmount: - description: The minimum amount of tokens the swapper will receive - example: "10" + baseAmount: type: string - outputMaxAmount: - description: Maximum amount of tokens that the swapper will receive - example: "20" + quoteAmount: type: string - outputAsset: - description: The id of the asset the swapper will receive - example: DAI + baseAssetId: type: string - additionalData: - $ref: "#/components/schemas/ProviderAdditionalData" - providerQuoteId: - description: An identifier that uniquely identifies the received quote - example: 550e8400-e29b-41d4-a716-446655440000 - format: uuid + quoteAssetId: type: string - expiredAt: - description: When was the received `providerQuoteId` is expired (ISO Date - time). - example: 2023-07-13T15:55:34.256Z + status: + $ref: "#/components/schemas/OrderStatus" + destination: + $ref: "#/components/schemas/AccountReference" + source: + $ref: "#/components/schemas/SettlementSourceAccount" + createdAt: format: date-time type: string - requiredActions: - description: The required actions for completing a swap operation + required: + - baseAmount + - baseAssetId + - createdAt + - destination + - id + - quoteAssetId + - side + - status + - via + type: object + GetOrdersResponse: + example: + data: + - id: ord_5f8e2d9c1a7b4e36 + via: + type: PROVIDER_ACCOUNT + providerId: prov_8c3f1a4b2d6e9f7c + accountId: acc_5e9a2d1c4b7f3e8a + baseAmount: "1000.00" + quoteAmount: "0.02458" + baseAssetId: USD + quoteAssetId: BTC + status: COMPLETED + destination: + type: VAULT_ACCOUNT + accountId: vault_acc_7b2e5d8f1c4a9e3b + createdAt: 2024-01-15T10:30:00.000Z + total: 1 + next: cursor_next_page_token + properties: + data: items: - $ref: "#/components/schemas/SwapRequiredActionsEnum" + $ref: "#/components/schemas/OrderSummary" type: array - estimatedFees: - $ref: "#/components/schemas/QuoteFee" + total: + description: Total number of orders matching the query. + type: integer + next: + description: "A cursor for the next page of results, if available." + type: string required: - - additionalData - - estimatedFees - - expiredAt - - inputAmount - - inputAsset - - outputAsset - - outputMaxAmount - - outputMinAmount - - protocol - - providerQuoteId - - requiredActions - - slippageTolerance + - data + - total type: object - NonWalletQuoteFee: - description: The estimated fees for the swap operation. - properties: - networkExecutionFee: - description: The gas fee in the asset unit. - example: "1478987585080628" + TimeInForce: + description: Time in force for limit orders + enum: + - FOK + example: FOK + type: string + ExecutionRequestBaseDetails: + example: + side: BUY + baseAmount: "1000.00" + baseAssetId: USDC + baseAssetRail: BLOCKCHAIN + quoteAssetId: BTC + quoteAssetRail: BLOCKCHAIN + properties: + side: + default: BUY + description: Side of the order + enum: + - BUY + - SELL type: string - networkFeeAssetId: - description: The network fee in Fireblocks asset representation - example: ETH + baseAmount: + description: Amount to convert type: string - providerFee: - description: The provider fee in the asset unit. - example: "5742266" + baseAssetId: + description: Source asset identifier type: string - providerFeeAssetId: - description: The provider fee in Fireblocks asset representation - example: DAI + baseAssetRail: + $ref: "#/components/schemas/TransferRail" + quoteAssetId: + description: Target asset identifier type: string - providerFeeRate: - description: Percentages of the provider fee out of the gross amount - example: 0.25 - type: number + quoteAssetRail: + $ref: "#/components/schemas/TransferRail" required: - - networkExecutionFee - - networkFeeAssetId - - providerFee - - providerFeeAssetId - - providerFeeRate + - baseAmount + - baseAssetId + - quoteAssetId + - side type: object - NonWalletQuoteResponse: - description: Return a quote that cannot be used for a swap operation. + LimitExecutionRequestDetails: + allOf: + - properties: + type: + description: Order type for limit orders + enum: + - LIMIT + type: string + timeInForce: + $ref: "#/components/schemas/TimeInForce" + limitPrice: + description: Price for limit orders + type: string + required: + - limitPrice + - timeInForce + - type + type: object + - $ref: "#/components/schemas/ExecutionRequestBaseDetails" + example: + type: LIMIT + timeInForce: GTC + limitPrice: "41000.00" + baseAssetId: USD + quoteAssetId: BTC + side: BUY + baseAmount: "1000.00" + MarketExecutionRequestDetails: + allOf: + - properties: + type: + description: Order type for market orders + enum: + - MARKET + type: string + required: + - type + type: object + - $ref: "#/components/schemas/ExecutionRequestBaseDetails" + example: + type: MARKET + baseAssetId: USD + quoteAssetId: BTC + side: BUY + baseAmount: "1000.00" + QuoteExecutionRequestDetails: + example: + type: QUOTE + quoteId: quote_8f2e4d1a9c5b7e3f properties: - protocol: - $ref: "#/components/schemas/SwapProviderProtocolsEnum" - inputAmount: - description: The amount of tokens the swapper will provide - example: "10" + type: + description: Order type for quote orders + enum: + - QUOTE type: string - inputAsset: - description: The id of the asset the swapper will provide - example: WETH + quoteId: + description: Quote ID for quote orders type: string - slippageTolerance: - description: The slippage tolerance is a percentage. The slippage tolerance - is the maximum amount the price can change between the time the transaction - is submitted and the time it is executed - example: 0.5 - type: number - outputMinAmount: - description: The minimum amount of tokens the swapper will receive - example: "10" + required: + - quoteId + - type + type: object + MarketRequoteRequestDetails: + example: + type: MARKET + properties: + type: + description: Indicates that the order should be re-quoted if the original + quote is expired. This will lead to a market order. + enum: + - MARKET type: string - outputMaxAmount: - description: Maximum amount of tokens that the swapper will receive - example: "20" + required: + - type + type: object + RetryRequoteRequestDetails: + example: + type: RETRY + count: 1 + slippageBps: 50 + properties: + type: + description: "Indicates that the order should be re-quoted if the original\ + \ quote is expired, trying to match the original quote." + enum: + - RETRY type: string - outputAsset: - description: The id of the asset the swapper will receive - example: DAI - type: string - additionalData: - $ref: "#/components/schemas/ProviderAdditionalData" - estimatedFees: - $ref: "#/components/schemas/NonWalletQuoteFee" - required: - - additionalData - - estimatedFees - - inputAmount - - inputAsset - - outputAsset - - outputMaxAmount - - outputMinAmount - - protocol - - slippageTolerance + count: + description: "If quote is expired, how many times to re-generate new quotes\ + \ to try having the order executed as in the original quote." + maximum: 10 + minimum: 1 + type: number + slippageBps: + default: 1 + description: Slippage tolerance in basis points (bps) for quote orders - + 1 is 0.01% and 10000 is 100% + maximum: 10000 + minimum: 1 + type: number + required: + - count + - type type: object - QuoteResponse: + QuoteExecutionWithRequoteRequestDetails: + allOf: + - $ref: "#/components/schemas/QuoteExecutionRequestDetails" + - properties: + reQuote: + $ref: "#/components/schemas/QuoteExecutionWithRequoteRequestDetails_allOf_reQuote" + type: object + example: + type: QUOTE + quoteId: quote_8f2e4d1a9c5b7e3f + reQuote: + type: RETRY + count: 1 + slippageBps: 50 + ExecutionRequestDetails: + description: Order execution details + discriminator: + mapping: + LIMIT: "#/components/schemas/LimitExecutionRequestDetails" + MARKET: "#/components/schemas/MarketExecutionRequestDetails" + QUOTE: "#/components/schemas/QuoteExecutionWithRequoteRequestDetails" + propertyName: type oneOf: - - $ref: "#/components/schemas/WalletQuoteResponse" - - $ref: "#/components/schemas/NonWalletQuoteResponse" - SwapRequiredAction: + - $ref: "#/components/schemas/LimitExecutionRequestDetails" + - $ref: "#/components/schemas/MarketExecutionRequestDetails" + - $ref: "#/components/schemas/QuoteExecutionWithRequoteRequestDetails" + PrefundedSettlement: example: - txId: fc69381c-1e35-48c2-8415-484d1c2f55cx - type: APPROVE - status: PENDING + type: PREFUNDED + destinationAccount: + type: VAULT_ACCOUNT + accountId: vault_acc_9f4e2d8b1c6a5e73 properties: type: - $ref: "#/components/schemas/SwapRequiredActionsEnum" - status: - description: The status of the required action enum: - - WAITING - - PROCESSING - - COMPLETED - - FAILED - - CANCELED - example: PENDING - type: string - txId: - description: The transaction id of the required action - example: fc69381c-1e35-48c2-8415-484d1c2f55cx + - PREFUNDED type: string + destinationAccount: + $ref: "#/components/schemas/AccountReference" required: - - status + - destinationAccount - type type: object - SwapFlowError: - description: The error message for the swap - example: expired - nullable: true + PostOrderSettlement: + example: + type: POST_ORDER properties: - code: - description: The code representing the error - example: "123" - type: string - message: - description: Error message - example: Failed to swap + type: + enum: + - POST_ORDER type: string required: - - code - - message + - type type: object - SwapOperation: - example: - outputFinalAmount: "15" - outputMinAmount: "10" - inputAmount: "10" - error: expired - outputMaxAmount: "20" - accountId: "1" - createdAt: 2023-07-13T15:55:34.256Z - protocol: UNISWAP_CLASSIC - requiredActions: - - txId: fc69381c-1e35-48c2-8415-484d1c2f55cx - type: APPROVE - status: PENDING - - txId: fc69381c-1e35-48c2-8415-484d1c2f55cx - type: APPROVE - status: PENDING - createdBy: 15a8f89f-f562-46ca-bcd3-56f8dd124816 - providerId: 3e2efee1-0d69-4276-a6e6-711531185e4f - inputAsset: WETH - slippageTolerance: 0.5 - outputAsset: DAI - id: 51cfb2c1-126d-4ff6-8512-ffba48f4b296 - category: DEX - status: CREATED - updatedAt: 2023-07-13T15:55:34.256Z + Settlement: + description: Settlement configuration for the order + discriminator: + mapping: + PREFUNDED: "#/components/schemas/PrefundedSettlement" + DVP: "#/components/schemas/DVPSettlement" + POST_ORDER: "#/components/schemas/PostOrderSettlement" + propertyName: type + oneOf: + - $ref: "#/components/schemas/PrefundedSettlement" + - $ref: "#/components/schemas/DVPSettlement" + - $ref: "#/components/schemas/PostOrderSettlement" + ParticipantRelationshipType: + enum: + - FirstParty + - SecondParty + - ThirdParty + example: FirstParty + type: string + PostalAddress: + example: + streetName: Fifth Avenue + buildingNumber: "350" + postalCode: "10118" + city: New York + subdivision: NY + district: Manhattan + country: US properties: - id: - description: The id of the swap operation - example: 51cfb2c1-126d-4ff6-8512-ffba48f4b296 + streetName: type: string - accountId: - description: The id of the vault account or account id - example: "1" + buildingNumber: type: string - providerId: - description: The uuid that identifies the provider - example: 3e2efee1-0d69-4276-a6e6-711531185e4f - format: uuid + postalCode: type: string - category: - $ref: "#/components/schemas/ProviderCategoryEnum" - protocol: - $ref: "#/components/schemas/SwapProviderProtocolsEnum" - status: - description: |- - **CREATED** – The swap request has been created but not yet started. - **PENDING_USER_ACTION** – Awaiting a user action (e.g. signature or approval). - **PENDING_PROVIDER_ACTION** – Awaiting the provider to process the request. - **PROCESSING** – The swap is actively being executed on‐chain. - **COMPLETED** – The swap has finished successfully. - **CANCELED** – The swap was cancelled by user or provider before completion. - **FAILED** – The swap attempted but encountered an error. + city: + type: string + subdivision: + type: string + district: + type: string + country: + type: string + required: + - buildingNumber + - city + - country + - district + - postalCode + - streetName + - subdivision + type: object + PersonalIdentification: + example: + externalReferenceId: person_ref_7f3e2d1c4b8a5e9f + entityType: INDIVIDUAL + participantRelationshipType: FirstParty + fullName: + firstName: Alexander + lastName: Johnson + dateOfBirth: 1985-03-15 + postalAddress: + streetName: Oak Street + buildingNumber: "742" + postalCode: "90210" + city: Beverly Hills + subdivision: CA + district: Los Angeles County + country: US + properties: + externalReferenceId: + type: string + entityType: enum: - - CREATED - - TRANSACTION_IN_PROGRESS - - PENDING_PROVIDER_ACTION - - COMPLETED - - CANCELED - - FAILED - example: CREATED + - INDIVIDUAL type: string - inputAmount: - description: The amount of tokens the swapper will provide - example: "10" + participantRelationshipType: + $ref: "#/components/schemas/ParticipantRelationshipType" + fullName: + $ref: "#/components/schemas/PersonalIdentification_fullName" + dateOfBirth: + format: date + type: string + postalAddress: + $ref: "#/components/schemas/PostalAddress" + required: + - dateOfBirth + - entityType + - externalReferenceId + - fullName + - participantRelationshipType + - postalAddress + type: object + BusinessIdentification: + example: + externalReferenceId: bus_ref_9f3e2d1c4b8a7e5f + entityType: BUSINESS + participantRelationshipType: COUNTERPARTY + businessName: TechCorp Solutions LLC + registrationNumber: TC-2023-001547 + postalAddress: + streetAddress: 789 Innovation Drive + city: San Francisco + state: CA + postalCode: "94105" + country: US + properties: + externalReferenceId: + type: string + entityType: + enum: + - BUSINESS + type: string + participantRelationshipType: + $ref: "#/components/schemas/ParticipantRelationshipType" + businessName: + type: string + registrationNumber: + type: string + postalAddress: + $ref: "#/components/schemas/PostalAddress" + required: + - businessName + - entityType + - externalReferenceId + - participantRelationshipType + - postalAddress + - registrationNumber + type: object + Identification: + discriminator: + mapping: + INDIVIDUAL: "#/components/schemas/PersonalIdentification" + BUSINESS: "#/components/schemas/BusinessIdentification" + propertyName: entityType + oneOf: + - $ref: "#/components/schemas/PersonalIdentification" + - $ref: "#/components/schemas/BusinessIdentification" + ParticipantsIdentification: + description: KYC/AML participant identification + example: + originator: + externalReferenceId: user_123456 + entityType: INDIVIDUAL + participantRelationshipType: FirstParty + fullName: + firstName: John + lastName: Smith + dateOfBirth: 1985-03-15 + postalAddress: + streetName: Main Street + buildingNumber: "123" + postalCode: "10001" + city: New York + subdivision: NY + district: Manhattan + country: US + beneficiary: + externalReferenceId: user_789012 + entityType: INDIVIDUAL + participantRelationshipType: ThirdParty + fullName: + firstName: Alice + lastName: Johnson + dateOfBirth: 1990-07-22 + postalAddress: + streetName: Broadway + buildingNumber: "456" + postalCode: "10002" + city: New York + subdivision: NY + district: Manhattan + country: US + properties: + originator: + $ref: "#/components/schemas/Identification" + beneficiary: + $ref: "#/components/schemas/Identification" + type: object + CreateOrderRequest: + example: + via: + type: PROVIDER_ACCOUNT + providerId: prov_8c3f1a4b2d6e9f7c + accountId: acc_5e9a2d1c4b7f3e8a + executionRequestDetails: + type: MARKET + baseAssetId: USD + quoteAssetId: BTC + side: BUY + baseAmount: "1000.00" + settlement: + type: DVP + sourceAccount: + type: VAULT_ACCOUNT + id: vault_acc_3f7e1d9b2c5a8e4f + destinationAccount: + type: VAULT_ACCOUNT + id: vault_acc_7b2e5d8f1c4a9e3b + customerInternalReferenceId: order_ref_2024_001 + note: Monthly investment order + properties: + via: + $ref: "#/components/schemas/AccessType" + executionRequestDetails: + $ref: "#/components/schemas/ExecutionRequestDetails" + settlement: + $ref: "#/components/schemas/Settlement" + participantsIdentification: + $ref: "#/components/schemas/ParticipantsIdentification" + customerInternalReferenceId: + description: Internal reference ID for the customer type: string - inputAsset: - description: The id of the asset the swapper will provide - example: WETH + note: + description: Optional note for the order + maxLength: 512 type: string - slippageTolerance: - description: The slippage tolerance is a percentage. The slippage tolerance - is the maximum amount the price can change between the time the transaction - is submitted and the time it is executed - example: 0.5 - type: number - outputMinAmount: - description: The minimum amount of tokens the swapper will receive - example: "10" + required: + - executionRequestDetails + - settlement + - via + type: object + BlockchainTransfer: + example: + type: BLOCKCHAIN + txHash: 0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b + amount: "250.75" + properties: + type: + enum: + - BLOCKCHAIN type: string - outputMaxAmount: - description: Maximum amount of tokens that the swapper will receive - example: "20" + txHash: + description: The hash of the transaction on the blockchain. type: string - outputAsset: - description: The id of the asset the swapper will receive - example: DAI + amount: + description: The amount of the transaction. type: string - outputFinalAmount: - description: Final amount of tokens that the swapper will receive - example: "15" - nullable: true + required: + - amount + type: object + FiatTransfer: + example: + type: FIAT + amount: "750.25" + referenceId: fiat_ref_2024_003_789 + properties: + type: + enum: + - FIAT type: string - requiredActions: - description: "The required actions for the swap, including the type of action,\ - \ the status of the action, and the transaction id" - items: - $ref: "#/components/schemas/SwapRequiredAction" - type: array - error: - $ref: "#/components/schemas/SwapFlowError" - createdAt: - description: The creation time of the swap operation (ISO Date time). - example: 2023-07-13T15:55:34.256Z - format: date-time + amount: + description: The amount of the fiat transfer. type: string - updatedAt: - description: The last update time of the swap operation (ISO Date time). - example: 2023-07-13T15:55:34.256Z - format: date-time + referenceId: + description: The reference ID for the fiat transfer. type: string - createdBy: - description: Fireblocks user id that issued the swap - example: 15a8f89f-f562-46ca-bcd3-56f8dd124816 - format: uuid + required: + - amount + type: object + TransferReceipt: + discriminator: + mapping: + BLOCKCHAIN: "#/components/schemas/BlockchainTransfer" + FIAT: "#/components/schemas/FiatTransfer" + propertyName: type + oneOf: + - $ref: "#/components/schemas/BlockchainTransfer" + - $ref: "#/components/schemas/FiatTransfer" + ExecutionStepStatusEnum: + enum: + - WAITING + - PROCESSING + - COMPLETED + - FAILED + - CANCELLED + example: PROCESSING + type: string + ExecutionStepError: + enum: + - INTERNAL_ERROR + - QUOTE_EXPIRED + - INSUFFICIENT_OUTPUT_AMOUNT + - INSUFFICIENT_FUNDS + - LAST_TRANSACTION_FAILED + - SWAP_APPROVAL_FAILED + - PROVIDER_EXECUTION_ERROR + example: INSUFFICIENT_FUNDS + type: string + ExecutionStep: + example: + type: EXECUTE + status: PROCESSING + fee: + feeType: NETWORK + assetId: ETH + amountType: FIXED + amount: "0.01" + txId: tx_abc123def456 + properties: + type: + $ref: "#/components/schemas/ExecutionStepType" + status: + $ref: "#/components/schemas/ExecutionStepStatusEnum" + fee: + $ref: "#/components/schemas/Fee" + txId: + type: string + txHash: type: string + error: + $ref: "#/components/schemas/ExecutionStepError" required: - - accountId - - category - - createdAt - - createdBy - - id - - inputAmount - - inputAsset - - outputAsset - - outputMaxAmount - - outputMinAmount - - protocol - - providerId - - requiredActions - - slippageTolerance - status - - updatedAt + - type type: object - SwapOperationsPaginatedResponse: + ExecutionResponseBaseDetails: example: - next: MjAyMy0xMi0xMyA====TNjowOC4zMDI=:MTEwMA== - data: - - outputFinalAmount: "15" - outputMinAmount: "10" - inputAmount: "10" - error: expired - outputMaxAmount: "20" - accountId: "1" - createdAt: 2023-07-13T15:55:34.256Z - protocol: UNISWAP_CLASSIC - requiredActions: - - txId: fc69381c-1e35-48c2-8415-484d1c2f55cx - type: APPROVE - status: PENDING - - txId: fc69381c-1e35-48c2-8415-484d1c2f55cx - type: APPROVE - status: PENDING - createdBy: 15a8f89f-f562-46ca-bcd3-56f8dd124816 - providerId: 3e2efee1-0d69-4276-a6e6-711531185e4f - inputAsset: WETH - slippageTolerance: 0.5 - outputAsset: DAI - id: 51cfb2c1-126d-4ff6-8512-ffba48f4b296 - category: DEX - status: CREATED - updatedAt: 2023-07-13T15:55:34.256Z - - outputFinalAmount: "15" - outputMinAmount: "10" - inputAmount: "10" - error: expired - outputMaxAmount: "20" - accountId: "1" - createdAt: 2023-07-13T15:55:34.256Z - protocol: UNISWAP_CLASSIC - requiredActions: - - txId: fc69381c-1e35-48c2-8415-484d1c2f55cx - type: APPROVE - status: PENDING - - txId: fc69381c-1e35-48c2-8415-484d1c2f55cx - type: APPROVE - status: PENDING - createdBy: 15a8f89f-f562-46ca-bcd3-56f8dd124816 - providerId: 3e2efee1-0d69-4276-a6e6-711531185e4f - inputAsset: WETH - slippageTolerance: 0.5 - outputAsset: DAI - id: 51cfb2c1-126d-4ff6-8512-ffba48f4b296 - category: DEX - status: CREATED - updatedAt: 2023-07-13T15:55:34.256Z + side: BUY + baseAmount: "1000.00" + baseAssetId: USDC + baseAssetRail: BLOCKCHAIN + quoteAssetId: BTC + quoteAssetRail: BLOCKCHAIN properties: - data: - description: The data of the current page - items: - $ref: "#/components/schemas/SwapOperation" - type: array - next: - description: "The cursor to fetch the next page of results, if absent or\ - \ null, there are no additional results." - example: MjAyMy0xMi0xMyA====TNjowOC4zMDI=:MTEwMA== - nullable: true + side: + default: BUY + description: Side of the order + enum: + - BUY + - SELL type: string + baseAmount: + description: Amount to convert + type: string + baseAssetId: + description: Source asset identifier + type: string + baseAssetRail: + $ref: "#/components/schemas/TransferRail" + quoteAssetId: + description: Target asset identifier + type: string + quoteAssetRail: + $ref: "#/components/schemas/TransferRail" required: - - data + - baseAmount + - baseAssetId + - quoteAssetId + - side type: object - SwapOperationRequest: + LimitExecutionResponseDetails: + allOf: + - properties: + type: + description: Order type for limit orders + enum: + - LIMIT + type: string + timeInForce: + $ref: "#/components/schemas/TimeInForce" + limitPrice: + description: Price for limit orders + type: string + required: + - limitPrice + - timeInForce + - type + type: object + - $ref: "#/components/schemas/ExecutionResponseBaseDetails" + example: + type: LIMIT + timeInForce: FOK + limitPrice: "41000.00" + side: BUY + baseAmount: "1000.00" + baseAssetId: USD + quoteAssetId: BTC + baseAssetRail: BLOCKCHAIN + quoteAssetRail: BLOCKCHAIN + MarketExecutionResponseDetails: + allOf: + - properties: + type: + description: Order type for market orders + enum: + - MARKET + type: string + required: + - type + type: object + - $ref: "#/components/schemas/ExecutionResponseBaseDetails" + example: + type: MARKET + side: BUY + baseAmount: "1000.00" + baseAssetId: USDC + baseAssetRail: BLOCKCHAIN + quoteAssetId: BTC + quoteAssetRail: BLOCKCHAIN + QuoteExecutionResponseDetails: + allOf: + - properties: + type: + description: Order type for quote orders + enum: + - QUOTE + type: string + quoteId: + description: Quote ID for quote orders + type: string + quoteAmount: + description: Quote amount for quote orders + type: string + required: + - quoteAmount + - quoteId + - type + type: object + - $ref: "#/components/schemas/ExecutionResponseBaseDetails" + example: + type: QUOTE + quoteId: quote_8f2e4d1a9c5b7e3f + quoteAmount: "0.02458" + side: BUY + baseAmount: "1000.00" + baseAssetId: USDC + baseAssetRail: BLOCKCHAIN + quoteAssetId: BTC + quoteAssetRail: BLOCKCHAIN + QuoteExecutionWithRequoteResponseDetails: + allOf: + - $ref: "#/components/schemas/QuoteExecutionResponseDetails" + - properties: + reQuote: + $ref: "#/components/schemas/QuoteExecutionWithRequoteResponseDetails_allOf_reQuote" + type: object example: - txNote: request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d - feeLevel: MEDIUM - providerQuoteId: 550e8400-e29b-41d4-a716-446655440000 + type: QUOTE + quoteId: quote_8f2e4d1a9c5b7e3f + side: BUY + baseAmount: "1000.00" + baseAssetId: USDC + baseAssetRail: BLOCKCHAIN + quoteAssetId: BTC + quoteAssetRail: BLOCKCHAIN + reQuote: + type: RETRY + count: 1 + slippageBps: 50 + ExecutionResponseDetails: + discriminator: + mapping: + LIMIT: "#/components/schemas/LimitExecutionResponseDetails" + MARKET: "#/components/schemas/MarketExecutionResponseDetails" + QUOTE: "#/components/schemas/QuoteExecutionWithRequoteResponseDetails" + propertyName: type + oneOf: + - $ref: "#/components/schemas/LimitExecutionResponseDetails" + - $ref: "#/components/schemas/MarketExecutionResponseDetails" + - $ref: "#/components/schemas/QuoteExecutionWithRequoteResponseDetails" + AccountHolderDetails: + example: + name: John Smith + city: New York + country: US + subdivision: NY + address: "123 Wall Street, Apt 4B" + postalCode: "10005" properties: - providerQuoteId: - description: An identifier that uniquely identifies the received quote - example: 550e8400-e29b-41d4-a716-446655440000 - format: uuid + name: + description: Full name of the account holder. type: string - feeLevel: - description: The fee level of the transaction + city: + type: string + country: + description: "Country code, as specified in ISO 3166-1 alpha-2." + type: string + subdivision: + description: "Country administrative subdivision, as specified in ISO 3166-2." + type: string + address: + description: Account holder street address. + type: string + postalCode: + type: string + required: + - name + type: object + PaymentInstructions: + example: + type: IBAN + address: + accountHolder: + name: John Smith + city: London + country: GB + subdivision: ENG + address: 123 King's Road + postalCode: SW3 4LX + iban: GB82WEST12345698765432 + referenceId: PAY_INST_abc123def456 + properties: + type: enum: - - LOW - - MEDIUM - - HIGH - example: MEDIUM + - IBAN + - SWIFT + - ACH + - US_WIRE + - SPEI + - SEPA + - PIX + - LOCAL_BANK_TRANSFER_AFRICA + - MOBILE_MONEY type: string - txNote: - description: user note on the transaction - example: request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d + address: + $ref: "#/components/schemas/AccountHolderDetails" + referenceId: type: string required: - - providerQuoteId + - address + - referenceId + - type + type: object + OrderDetails: + example: + id: order_9f4e2d8b1c6a5e73 + via: + type: PROVIDER_ACCOUNT + providerId: bridge-provider-001 + accountId: acc_9f4e2d8b1c6a5e73 + status: PROCESSING + createdAt: 2024-01-15T10:30:00.000Z + updatedAt: 2024-01-15T10:30:30.000Z + receipt: + type: BLOCKCHAIN + txHash: 0x1234567890abcdef + amount: "0.02458" + generalFees: + - feeType: ORDER + assetId: USDC + amountType: FIXED + amount: "5.00" + executionSteps: + - type: EXECUTE + status: PROCESSING + fee: + feeType: NETWORK + assetId: ETH + amountType: FIXED + amount: "0.01" + txId: tx_abc123def456 + executionResponseDetails: + type: MARKET + side: BUY + baseAmount: "1000.00" + baseAssetId: USDC + quoteAssetId: BTC + settlement: + type: PREFUNDED + destinationAccount: + type: VAULT_ACCOUNT + accountId: vault_acc_9f4e2d8b1c6a5e73 + createdBy: user_123abc456def789 + customerInternalReferenceId: order_ref_2024_001 + note: Monthly investment order + properties: + id: + type: string + via: + $ref: "#/components/schemas/AccessType" + status: + $ref: "#/components/schemas/OrderStatus" + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + receipt: + $ref: "#/components/schemas/TransferReceipt" + generalFees: + items: + $ref: "#/components/schemas/Fee" + type: array + executionSteps: + items: + $ref: "#/components/schemas/ExecutionStep" + type: array + executionResponseDetails: + $ref: "#/components/schemas/ExecutionResponseDetails" + settlement: + $ref: "#/components/schemas/Settlement" + participantsIdentification: + $ref: "#/components/schemas/ParticipantsIdentification" + paymentInstructions: + description: "Payment instructions for the order, the client can use one\ + \ of these to pay the order." + items: + $ref: "#/components/schemas/PaymentInstructions" + type: array + createdBy: + description: The ID of the user who created the order + type: string + customerInternalReferenceId: + description: Internal reference ID for the customer + type: string + note: + description: Optional note for the Order + maxLength: 512 + type: string + expiresAt: + format: date-time + type: string + required: + - createdAt + - createdBy + - executionResponseDetails + - executionSteps + - id + - settlement + - status + - via type: object SetAdminQuorumThresholdRequest: properties: @@ -55847,6 +57764,58 @@ components: oneOf: - $ref: "#/components/schemas/ContractDataEncodedDataString" - $ref: "#/components/schemas/ContractDataLogDataParam" + TradingErrorResponse_error: + properties: + type: + enum: + - INTERNAL + - AUTHENTICATION + - AUTHORIZATION + - VALIDATION + - NOT_FOUND + - UNPROCESSABLE_ENTITY + - FORBIDDEN + type: string + message: + type: string + errorCode: + $ref: "#/components/schemas/ErrorCodes" + required: + - message + - type + type: object + CreateQuote_scope_inner: + oneOf: + - $ref: "#/components/schemas/AccountProviderID" + - $ref: "#/components/schemas/ProviderID" + QuoteExecutionWithRequoteRequestDetails_allOf_reQuote: + discriminator: + mapping: + MARKET: "#/components/schemas/MarketRequoteRequestDetails" + RETRY: "#/components/schemas/RetryRequoteRequestDetails" + propertyName: type + oneOf: + - $ref: "#/components/schemas/MarketRequoteRequestDetails" + - $ref: "#/components/schemas/RetryRequoteRequestDetails" + PersonalIdentification_fullName: + properties: + firstName: + type: string + lastName: + type: string + required: + - firstName + - lastName + type: object + QuoteExecutionWithRequoteResponseDetails_allOf_reQuote: + discriminator: + mapping: + MARKET: "#/components/schemas/MarketRequoteRequestDetails" + RETRY: "#/components/schemas/RetryRequoteRequestDetails" + propertyName: type + oneOf: + - $ref: "#/components/schemas/MarketRequoteRequestDetails" + - $ref: "#/components/schemas/RetryRequoteRequestDetails" SetOtaStatusResponse_oneOf: example: message: No change needed. The current status is false diff --git a/build.gradle b/build.gradle index 5b38a778..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 = '12.0.0' +version = '0.0.0' buildscript { repositories { diff --git a/docs/AccessType.md b/docs/AccessType.md new file mode 100644 index 00000000..cbef0d85 --- /dev/null +++ b/docs/AccessType.md @@ -0,0 +1,37 @@ + + +# AccessType + +## oneOf schemas +* [AccountAccess](AccountAccess.md) +* [DirectAccess](DirectAccess.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.AccessType; +import com.fireblocks.sdk.model.AccountAccess; +import com.fireblocks.sdk.model.DirectAccess; + +public class Example { + public static void main(String[] args) { + AccessType exampleAccessType = new AccessType(); + + // create a new AccountAccess + AccountAccess exampleAccountAccess = new AccountAccess(); + // set AccessType to AccountAccess + exampleAccessType.setActualInstance(exampleAccountAccess); + // to get back the AccountAccess set earlier + AccountAccess testAccountAccess = (AccountAccess) exampleAccessType.getActualInstance(); + + // create a new DirectAccess + DirectAccess exampleDirectAccess = new DirectAccess(); + // set AccessType to DirectAccess + exampleAccessType.setActualInstance(exampleDirectAccess); + // to get back the DirectAccess set earlier + DirectAccess testDirectAccess = (DirectAccess) exampleAccessType.getActualInstance(); + } +} +``` + + diff --git a/docs/AccountAccess.md b/docs/AccountAccess.md new file mode 100644 index 00000000..6b1d2797 --- /dev/null +++ b/docs/AccountAccess.md @@ -0,0 +1,23 @@ + + +# AccountAccess + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Indicates this uses account-based access | | +|**providerId** | **String** | The ID of the provider | [optional] | +|**accountId** | **String** | The ID of the account | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| PROVIDER_ACCOUNT | "PROVIDER_ACCOUNT" | + + + diff --git a/docs/AccountBase.md b/docs/AccountBase.md new file mode 100644 index 00000000..f09957fb --- /dev/null +++ b/docs/AccountBase.md @@ -0,0 +1,14 @@ + + +# AccountBase + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The ID of the account | | +|**name** | **String** | The name of the account | | + + + diff --git a/docs/AccountBasedAccessProvider.md b/docs/AccountBasedAccessProvider.md new file mode 100644 index 00000000..4273f56f --- /dev/null +++ b/docs/AccountBasedAccessProvider.md @@ -0,0 +1,19 @@ + + +# AccountBasedAccessProvider + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique identifier for the provider | | +|**name** | **String** | Display name of the provider | | +|**logo** | **String** | URL to the logo image of the provider | [optional] | +|**accountBased** | **Boolean** | Indicates whether the provider access model is through accounts or directly | | +|**manifest** | [**Manifest**](Manifest.md) | | | +|**connected** | **Boolean** | Whether the provider is currently connected | | +|**accounts** | [**List<AccountBase>**](AccountBase.md) | | [optional] | + + + diff --git a/docs/AccountHolderDetails.md b/docs/AccountHolderDetails.md new file mode 100644 index 00000000..03956e64 --- /dev/null +++ b/docs/AccountHolderDetails.md @@ -0,0 +1,18 @@ + + +# AccountHolderDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Full name of the account holder. | | +|**city** | **String** | | [optional] | +|**country** | **String** | Country code, as specified in ISO 3166-1 alpha-2. | [optional] | +|**subdivision** | **String** | Country administrative subdivision, as specified in ISO 3166-2. | [optional] | +|**address** | **String** | Account holder street address. | [optional] | +|**postalCode** | **String** | | [optional] | + + + diff --git a/docs/AccountProviderID.md b/docs/AccountProviderID.md new file mode 100644 index 00000000..8c1464ad --- /dev/null +++ b/docs/AccountProviderID.md @@ -0,0 +1,14 @@ + + +# AccountProviderID + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**providerId** | **String** | The ID of the provider associated with the account. | | +|**accountId** | **String** | The ID of the account associated with the provider. | | + + + diff --git a/docs/AccountReference.md b/docs/AccountReference.md new file mode 100644 index 00000000..f10819a2 --- /dev/null +++ b/docs/AccountReference.md @@ -0,0 +1,37 @@ + + +# AccountReference + +## oneOf schemas +* [InternalReference](InternalReference.md) +* [OneTimeAddressReference](OneTimeAddressReference.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.AccountReference; +import com.fireblocks.sdk.model.InternalReference; +import com.fireblocks.sdk.model.OneTimeAddressReference; + +public class Example { + public static void main(String[] args) { + AccountReference exampleAccountReference = new AccountReference(); + + // create a new InternalReference + InternalReference exampleInternalReference = new InternalReference(); + // set AccountReference to InternalReference + exampleAccountReference.setActualInstance(exampleInternalReference); + // to get back the InternalReference set earlier + InternalReference testInternalReference = (InternalReference) exampleAccountReference.getActualInstance(); + + // create a new OneTimeAddressReference + OneTimeAddressReference exampleOneTimeAddressReference = new OneTimeAddressReference(); + // set AccountReference to OneTimeAddressReference + exampleAccountReference.setActualInstance(exampleOneTimeAddressReference); + // to get back the OneTimeAddressReference set earlier + OneTimeAddressReference testOneTimeAddressReference = (OneTimeAddressReference) exampleAccountReference.getActualInstance(); + } +} +``` + + diff --git a/docs/AssetDetailsMetadata.md b/docs/AssetDetailsMetadata.md index aaca6198..ddf1cf3e 100644 --- a/docs/AssetDetailsMetadata.md +++ b/docs/AssetDetailsMetadata.md @@ -14,6 +14,7 @@ |**website** | **String** | Vendor’s website | [optional] | |**media** | [**List<AssetMedia>**](AssetMedia.md) | Asset’s media | [optional] | |**note** | [**AssetNote**](AssetNote.md) | | [optional] | +|**features** | **List<AssetFeature>** | Asset features | [optional] | diff --git a/docs/AssetFeature.md b/docs/AssetFeature.md new file mode 100644 index 00000000..6689b6db --- /dev/null +++ b/docs/AssetFeature.md @@ -0,0 +1,11 @@ + + +# AssetFeature + +## Enum + + +* `STABLECOIN` (value: `"STABLECOIN"`) + + + diff --git a/docs/BaseProvider.md b/docs/BaseProvider.md new file mode 100644 index 00000000..50b9722c --- /dev/null +++ b/docs/BaseProvider.md @@ -0,0 +1,16 @@ + + +# BaseProvider + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique identifier for the provider | | +|**name** | **String** | Display name of the provider | | +|**logo** | **String** | URL to the logo image of the provider | [optional] | +|**accountBased** | **Boolean** | Indicates whether the provider access model is through accounts or directly | | + + + diff --git a/docs/BlockchainTransfer.md b/docs/BlockchainTransfer.md new file mode 100644 index 00000000..3cc160b8 --- /dev/null +++ b/docs/BlockchainTransfer.md @@ -0,0 +1,23 @@ + + +# BlockchainTransfer + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**txHash** | **String** | The hash of the transaction on the blockchain. | [optional] | +|**amount** | **String** | The amount of the transaction. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| BLOCKCHAIN | "BLOCKCHAIN" | + + + diff --git a/docs/BpsFee.md b/docs/BpsFee.md new file mode 100644 index 00000000..3836490d --- /dev/null +++ b/docs/BpsFee.md @@ -0,0 +1,22 @@ + + +# BpsFee + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amountType** | [**AmountTypeEnum**](#AmountTypeEnum) | | | +|**amount** | **BigDecimal** | Fee in basis points (1 = 0.01%, 10000 = 100%) | | + + + +## Enum: AmountTypeEnum + +| Name | Value | +|---- | -----| +| BPS | "BPS" | + + + diff --git a/docs/BusinessIdentification.md b/docs/BusinessIdentification.md new file mode 100644 index 00000000..22847e81 --- /dev/null +++ b/docs/BusinessIdentification.md @@ -0,0 +1,26 @@ + + +# BusinessIdentification + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**externalReferenceId** | **String** | | | +|**entityType** | [**EntityTypeEnum**](#EntityTypeEnum) | | | +|**participantRelationshipType** | **ParticipantRelationshipType** | | | +|**businessName** | **String** | | | +|**registrationNumber** | **String** | | | +|**postalAddress** | [**PostalAddress**](PostalAddress.md) | | | + + + +## Enum: EntityTypeEnum + +| Name | Value | +|---- | -----| +| BUSINESS | "BUSINESS" | + + + diff --git a/docs/Capability.md b/docs/Capability.md new file mode 100644 index 00000000..a567b4b1 --- /dev/null +++ b/docs/Capability.md @@ -0,0 +1,15 @@ + + +# Capability + +## Enum + + +* `WITHDRAWALS` (value: `"WITHDRAWALS"`) + +* `DEPOSITS` (value: `"DEPOSITS"`) + +* `TRADING` (value: `"TRADING"`) + + + diff --git a/docs/CommittedQuoteType.md b/docs/CommittedQuoteType.md new file mode 100644 index 00000000..a14fda20 --- /dev/null +++ b/docs/CommittedQuoteType.md @@ -0,0 +1,22 @@ + + +# CommittedQuoteType + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Indicates this is a committed quote | | +|**expiresAt** | **OffsetDateTime** | ISO 8601 timestamp of the expiration time of the quote. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| COMMITTED | "COMMITTED" | + + + diff --git a/docs/ConnectedAccount.md b/docs/ConnectedAccount.md new file mode 100644 index 00000000..efa39d39 --- /dev/null +++ b/docs/ConnectedAccount.md @@ -0,0 +1,19 @@ + + +# ConnectedAccount + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique identifier of the connected account. | | +|**name** | **String** | Human-readable name of the connected account. | | +|**providerId** | **String** | The ID of the venue the account belongs to. | | +|**status** | **ConnectedAccountApprovalStatus** | | | +|**totalBalance** | [**ConnectedAccountTotalBalance**](ConnectedAccountTotalBalance.md) | | | +|**manifest** | [**ConnectedAccountManifest**](ConnectedAccountManifest.md) | | | +|**parentId** | **String** | The ID of the parent main account, if this is a sub account. | [optional] | + + + diff --git a/docs/ConnectedAccountApprovalStatus.md b/docs/ConnectedAccountApprovalStatus.md new file mode 100644 index 00000000..4c5a5242 --- /dev/null +++ b/docs/ConnectedAccountApprovalStatus.md @@ -0,0 +1,19 @@ + + +# ConnectedAccountApprovalStatus + +## Enum + + +* `WAITING_FOR_APPROVAL` (value: `"WAITING_FOR_APPROVAL"`) + +* `APPROVED` (value: `"APPROVED"`) + +* `REJECTED` (value: `"REJECTED"`) + +* `CANCELLED` (value: `"CANCELLED"`) + +* `FAILED` (value: `"FAILED"`) + + + diff --git a/docs/ConnectedAccountAssetType.md b/docs/ConnectedAccountAssetType.md new file mode 100644 index 00000000..e8f2ea8d --- /dev/null +++ b/docs/ConnectedAccountAssetType.md @@ -0,0 +1,13 @@ + + +# ConnectedAccountAssetType + +## Enum + + +* `DIGITAL` (value: `"DIGITAL"`) + +* `FIAT` (value: `"FIAT"`) + + + diff --git a/docs/ConnectedAccountBalances.md b/docs/ConnectedAccountBalances.md new file mode 100644 index 00000000..caf70c17 --- /dev/null +++ b/docs/ConnectedAccountBalances.md @@ -0,0 +1,19 @@ + + +# ConnectedAccountBalances + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**assetId** | **String** | Asset identifier (e.g., BTC, ETH, USDC). | | +|**availableAmount** | **String** | Amount available for use. | | +|**totalAmount** | **String** | Total amount including locked/held balances. | | +|**lockedAmount** | **String** | Amount currently locked/held. | [optional] | +|**creditAmount** | **String** | Credit line amount, if applicable (0 when not used). | [optional] | +|**balanceType** | **String** | Wallet type/category (e.g., SPOT, MARGIN, FUNDING). | | +|**balanceName** | **String** | Display name for the balance type (at the provider) | [optional] | + + + diff --git a/docs/ConnectedAccountBalancesResponse.md b/docs/ConnectedAccountBalancesResponse.md new file mode 100644 index 00000000..8d33b5c0 --- /dev/null +++ b/docs/ConnectedAccountBalancesResponse.md @@ -0,0 +1,15 @@ + + +# ConnectedAccountBalancesResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<ConnectedAccountBalances>**](ConnectedAccountBalances.md) | Flat balance row for a single asset within an account and wallet type. One row per (assetId, balanceType). | | +|**total** | **Integer** | Total number of balance rows by query. | [optional] | +|**next** | **String** | A cursor for the next page of results, if available. | [optional] | + + + diff --git a/docs/ConnectedAccountCapability.md b/docs/ConnectedAccountCapability.md new file mode 100644 index 00000000..b8cafc9c --- /dev/null +++ b/docs/ConnectedAccountCapability.md @@ -0,0 +1,15 @@ + + +# ConnectedAccountCapability + +## Enum + + +* `WITHDRAWALS` (value: `"WITHDRAWALS"`) + +* `DEPOSITS` (value: `"DEPOSITS"`) + +* `TRADING` (value: `"TRADING"`) + + + diff --git a/docs/ConnectedAccountManifest.md b/docs/ConnectedAccountManifest.md new file mode 100644 index 00000000..7fc338f7 --- /dev/null +++ b/docs/ConnectedAccountManifest.md @@ -0,0 +1,14 @@ + + +# ConnectedAccountManifest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**assetTypes** | **List<ConnectedAccountAssetType>** | Asset types supported by the connected account. | | +|**capabilities** | **List<ConnectedAccountCapability>** | Features supported for the connected account. Logic: - If account capabilities include ramp -> TRADING - If account capabilities include transfers -> DEPOSITS - If account capabilities include transfersBlockchain / transfersFiat / transfersPeerAccounts / transfersInternal -> WITHDRAWALS | | + + + diff --git a/docs/ConnectedAccountRateResponse.md b/docs/ConnectedAccountRateResponse.md new file mode 100644 index 00000000..313037d8 --- /dev/null +++ b/docs/ConnectedAccountRateResponse.md @@ -0,0 +1,16 @@ + + +# ConnectedAccountRateResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accountId** | **String** | The ID of the account that generated the quote. | | +|**baseAssetId** | **String** | The source asset identifier | | +|**quoteAssetId** | **String** | The target asset identifier | | +|**rate** | **String** | The exchange rate value | | + + + diff --git a/docs/ConnectedAccountTotalBalance.md b/docs/ConnectedAccountTotalBalance.md new file mode 100644 index 00000000..47871eaf --- /dev/null +++ b/docs/ConnectedAccountTotalBalance.md @@ -0,0 +1,15 @@ + + +# ConnectedAccountTotalBalance + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amount** | **String** | The denominated currency value of the account. | | +|**denominatedAssetId** | **String** | The asset ID of the total balance. | | +|**hasFullAssetCoverage** | **Boolean** | Indicates whether the total amount represents the complete balance of all assets in the account. When true, all asset balances have been successfully converted to the denominated currency. When false, some assets could not be included in the total due to missing exchange rates or non-convertible assets. | | + + + diff --git a/docs/ConnectedAccountTradingPair.md b/docs/ConnectedAccountTradingPair.md new file mode 100644 index 00000000..4b4e32c4 --- /dev/null +++ b/docs/ConnectedAccountTradingPair.md @@ -0,0 +1,16 @@ + + +# ConnectedAccountTradingPair + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | The ID of the trading pair. | | +|**baseAssetId** | **String** | The Symbol of the base asset. | | +|**quoteAssetId** | **String** | The symbol of the quote asset. | | +|**supportedTypes** | **List<ConnectedAccountTradingPairSupportedType>** | | | + + + diff --git a/docs/ConnectedAccountTradingPairSupportedType.md b/docs/ConnectedAccountTradingPairSupportedType.md new file mode 100644 index 00000000..65ce9a2b --- /dev/null +++ b/docs/ConnectedAccountTradingPairSupportedType.md @@ -0,0 +1,15 @@ + + +# ConnectedAccountTradingPairSupportedType + +## Enum + + +* `QUOTE` (value: `"QUOTE"`) + +* `MARKET` (value: `"MARKET"`) + +* `LIMIT` (value: `"LIMIT"`) + + + diff --git a/docs/ConnectedAccountTradingPairsResponse.md b/docs/ConnectedAccountTradingPairsResponse.md new file mode 100644 index 00000000..6ef190fd --- /dev/null +++ b/docs/ConnectedAccountTradingPairsResponse.md @@ -0,0 +1,15 @@ + + +# ConnectedAccountTradingPairsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<ConnectedAccountTradingPair>**](ConnectedAccountTradingPair.md) | | | +|**total** | **Integer** | Total number of asset pairs matching the query. | [optional] | +|**next** | **String** | A cursor for the next page of results, if available. | [optional] | + + + diff --git a/docs/ConnectedAccountsBetaApi.md b/docs/ConnectedAccountsBetaApi.md new file mode 100644 index 00000000..88bdd8c8 --- /dev/null +++ b/docs/ConnectedAccountsBetaApi.md @@ -0,0 +1,444 @@ +# ConnectedAccountsBetaApi + +All URIs are relative to https://developers.fireblocks.com/reference/ + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getConnectedAccount**](ConnectedAccountsBetaApi.md#getConnectedAccount) | **GET** /connected_accounts/{accountId} | Get connected account | +| [**getConnectedAccountBalances**](ConnectedAccountsBetaApi.md#getConnectedAccountBalances) | **GET** /connected_accounts/{accountId}/balances | Get balances for an account | +| [**getConnectedAccountRates**](ConnectedAccountsBetaApi.md#getConnectedAccountRates) | **GET** /connected_accounts/{accountId}/rates | Get exchange rates for an account | +| [**getConnectedAccountTradingPairs**](ConnectedAccountsBetaApi.md#getConnectedAccountTradingPairs) | **GET** /connected_accounts/{accountId}/manifest/capabilities/trading/pairs | Get supported trading pairs for an account | +| [**getConnectedAccounts**](ConnectedAccountsBetaApi.md#getConnectedAccounts) | **GET** /connected_accounts | Get connected accounts | + + + +## getConnectedAccount + +> CompletableFuture> getConnectedAccount getConnectedAccount(accountId) + +Get connected account + +Retrieve detailed information about a specific connected account by ID. </br> **Note**: - This endpoint is currently in beta and might be subject to changes. + +### 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.ConnectedAccountsBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String accountId = "accountId_example"; // String | The ID of the account to fetch. + try { + CompletableFuture> response = fireblocks.connectedAccountsBeta().getConnectedAccount(accountId); + 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 ConnectedAccountsBetaApi#getConnectedAccount"); + 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 ConnectedAccountsBetaApi#getConnectedAccount"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The ID of the account to fetch. | | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Account response | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## getConnectedAccountBalances + +> CompletableFuture> getConnectedAccountBalances getConnectedAccountBalances(accountId, pageSize, pageCursor) + +Get balances for an account + +Retrieve current asset balances for a specific connected account as a flat list (one row per assetId, balanceType) </br> **Note**: - This endpoint is currently in beta and might be subject to changes. + +### 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.ConnectedAccountsBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String accountId = "accountId_example"; // String | The ID of the account to fetch balances for. + Integer pageSize = 56; // Integer | Page size for pagination. + String pageCursor = "pageCursor_example"; // String | Page cursor for pagination. + try { + CompletableFuture> response = fireblocks.connectedAccountsBeta().getConnectedAccountBalances(accountId, pageSize, pageCursor); + 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 ConnectedAccountsBetaApi#getConnectedAccountBalances"); + 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 ConnectedAccountsBetaApi#getConnectedAccountBalances"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The ID of the account to fetch balances for. | | +| **pageSize** | **Integer**| Page size for pagination. | [optional] | +| **pageCursor** | **String**| Page cursor for pagination. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Account balances response | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## getConnectedAccountRates + +> CompletableFuture> getConnectedAccountRates getConnectedAccountRates(accountId, baseAssetId, quoteAssetId) + +Get exchange rates for an account + +Retrieve current exchange rates for converting between specific assets in a connected account. + +### 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.ConnectedAccountsBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String accountId = "accountId_example"; // String | The ID of the account to fetch rates for. + String baseAssetId = "baseAssetId_example"; // String | The ID of the asset to fetch rates for. + String quoteAssetId = "quoteAssetId_example"; // String | The ID of the asset to get the rates nominally. + try { + CompletableFuture> response = fireblocks.connectedAccountsBeta().getConnectedAccountRates(accountId, baseAssetId, quoteAssetId); + 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 ConnectedAccountsBetaApi#getConnectedAccountRates"); + 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 ConnectedAccountsBetaApi#getConnectedAccountRates"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The ID of the account to fetch rates for. | | +| **baseAssetId** | **String**| The ID of the asset to fetch rates for. | | +| **quoteAssetId** | **String**| The ID of the asset to get the rates nominally. | | + +### 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** | Rates response | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## getConnectedAccountTradingPairs + +> CompletableFuture> getConnectedAccountTradingPairs getConnectedAccountTradingPairs(accountId, pageSize, pageCursor) + +Get supported trading pairs for an account + +Retrieve all asset trading pairs supported by a specific connected account, including the pair type (quote, market, onOffRamp). + +### 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.ConnectedAccountsBetaApi; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ExecutionException; + +public class Example { + public static void main(String[] args) { + ConfigurationOptions configurationOptions = new ConfigurationOptions() + .basePath(BasePath.Sandbox) + .apiKey("my-api-key") + .secretKey("my-secret-key"); + Fireblocks fireblocks = new Fireblocks(configurationOptions); + + String accountId = "accountId_example"; // String | The ID of the account to fetch supported pairs for. + Integer pageSize = 100; // Integer | Page size for pagination. + String pageCursor = "pageCursor_example"; // String | Page cursor for pagination. + try { + CompletableFuture> response = fireblocks.connectedAccountsBeta().getConnectedAccountTradingPairs(accountId, pageSize, pageCursor); + 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 ConnectedAccountsBetaApi#getConnectedAccountTradingPairs"); + 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 ConnectedAccountsBetaApi#getConnectedAccountTradingPairs"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **accountId** | **String**| The ID of the account to fetch supported pairs for. | | +| **pageSize** | **Integer**| Page size for pagination. | [optional] [default to 100] | +| **pageCursor** | **String**| Page cursor for pagination. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Supported pairs response | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + + +## getConnectedAccounts + +> CompletableFuture> getConnectedAccounts getConnectedAccounts(mainAccounts, pageSize, pageCursor) + +Get connected accounts + +Returns all connected accounts </br> **Note**: - This endpoint is currently in beta and might be subject to changes. + +### 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.ConnectedAccountsBetaApi; +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); + + Boolean mainAccounts = false; // Boolean | Whether to include only main accounts in the response. + Integer pageSize = 56; // Integer | Page size for pagination. + String pageCursor = "pageCursor_example"; // String | Page cursor for pagination. + try { + CompletableFuture> response = fireblocks.connectedAccountsBeta().getConnectedAccounts(mainAccounts, pageSize, pageCursor); + 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 ConnectedAccountsBetaApi#getConnectedAccounts"); + 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 ConnectedAccountsBetaApi#getConnectedAccounts"); + 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 | +|------------- | ------------- | ------------- | -------------| +| **mainAccounts** | **Boolean**| Whether to include only main accounts in the response. | [optional] [default to false] | +| **pageSize** | **Integer**| Page size for pagination. | [optional] | +| **pageCursor** | **String**| Page cursor for pagination. | [optional] | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Get accounts response | * X-Request-ID -
| +| **0** | Error Response | * X-Request-ID -
| + diff --git a/docs/ConnectedAccountsResponse.md b/docs/ConnectedAccountsResponse.md new file mode 100644 index 00000000..443f61b8 --- /dev/null +++ b/docs/ConnectedAccountsResponse.md @@ -0,0 +1,15 @@ + + +# ConnectedAccountsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<ConnectedAccount>**](ConnectedAccount.md) | List of connected accounts matching the query. | | +|**total** | **Integer** | Total number of accounts by query. | [optional] | +|**next** | **String** | A cursor for the next page of results, if available. | [optional] | + + + diff --git a/docs/ConnectedSingleAccount.md b/docs/ConnectedSingleAccount.md new file mode 100644 index 00000000..e836e24f --- /dev/null +++ b/docs/ConnectedSingleAccount.md @@ -0,0 +1,13 @@ + + +# ConnectedSingleAccount + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**subAccountsIds** | **List<String>** | IDs of sub-accounts associated with this connected account. | [optional] | + + + diff --git a/docs/ConnectedSingleAccountResponse.md b/docs/ConnectedSingleAccountResponse.md new file mode 100644 index 00000000..3a095d75 --- /dev/null +++ b/docs/ConnectedSingleAccountResponse.md @@ -0,0 +1,20 @@ + + +# ConnectedSingleAccountResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique identifier of the connected account. | | +|**name** | **String** | Human-readable name of the connected account. | | +|**providerId** | **String** | The ID of the venue the account belongs to. | | +|**status** | **ConnectedAccountApprovalStatus** | | | +|**totalBalance** | [**ConnectedAccountTotalBalance**](ConnectedAccountTotalBalance.md) | | | +|**manifest** | [**ConnectedAccountManifest**](ConnectedAccountManifest.md) | | | +|**parentId** | **String** | The ID of the parent main account, if this is a sub account. | [optional] | +|**subAccountsIds** | **List<String>** | IDs of sub-accounts associated with this connected account. | [optional] | + + + diff --git a/docs/CreateOrderRequest.md b/docs/CreateOrderRequest.md new file mode 100644 index 00000000..d2136342 --- /dev/null +++ b/docs/CreateOrderRequest.md @@ -0,0 +1,18 @@ + + +# CreateOrderRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**via** | [**AccessType**](AccessType.md) | | | +|**executionRequestDetails** | [**ExecutionRequestDetails**](ExecutionRequestDetails.md) | | | +|**settlement** | [**Settlement**](Settlement.md) | | | +|**participantsIdentification** | [**ParticipantsIdentification**](ParticipantsIdentification.md) | | [optional] | +|**customerInternalReferenceId** | **String** | Internal reference ID for the customer | [optional] | +|**note** | **String** | Optional note for the order | [optional] | + + + diff --git a/docs/CreateQuote.md b/docs/CreateQuote.md new file mode 100644 index 00000000..fbb15f57 --- /dev/null +++ b/docs/CreateQuote.md @@ -0,0 +1,30 @@ + + +# CreateQuote + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**scope** | [**List<CreateQuoteScopeInner>**](CreateQuoteScopeInner.md) | | | +|**baseAssetId** | **String** | | | +|**baseAssetRail** | **TransferRail** | | [optional] | +|**quoteAssetId** | **String** | | | +|**quoteAssetRail** | **TransferRail** | | [optional] | +|**baseAmount** | **String** | The amount to convert from | | +|**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** | [**SideEnum**](#SideEnum) | Side of the order | | + + + +## Enum: SideEnum + +| Name | Value | +|---- | -----| +| BUY | "BUY" | +| SELL | "SELL" | + + + diff --git a/docs/CreateQuoteScopeInner.md b/docs/CreateQuoteScopeInner.md new file mode 100644 index 00000000..67df5885 --- /dev/null +++ b/docs/CreateQuoteScopeInner.md @@ -0,0 +1,37 @@ + + +# CreateQuoteScopeInner + +## oneOf schemas +* [AccountProviderID](AccountProviderID.md) +* [ProviderID](ProviderID.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.CreateQuoteScopeInner; +import com.fireblocks.sdk.model.AccountProviderID; +import com.fireblocks.sdk.model.ProviderID; + +public class Example { + public static void main(String[] args) { + CreateQuoteScopeInner exampleCreateQuoteScopeInner = new CreateQuoteScopeInner(); + + // create a new AccountProviderID + AccountProviderID exampleAccountProviderID = new AccountProviderID(); + // set CreateQuoteScopeInner to AccountProviderID + exampleCreateQuoteScopeInner.setActualInstance(exampleAccountProviderID); + // to get back the AccountProviderID set earlier + AccountProviderID testAccountProviderID = (AccountProviderID) exampleCreateQuoteScopeInner.getActualInstance(); + + // create a new ProviderID + ProviderID exampleProviderID = new ProviderID(); + // set CreateQuoteScopeInner to ProviderID + exampleCreateQuoteScopeInner.setActualInstance(exampleProviderID); + // to get back the ProviderID set earlier + ProviderID testProviderID = (ProviderID) exampleCreateQuoteScopeInner.getActualInstance(); + } +} +``` + + diff --git a/docs/DVPSettlement.md b/docs/DVPSettlement.md new file mode 100644 index 00000000..656593f4 --- /dev/null +++ b/docs/DVPSettlement.md @@ -0,0 +1,24 @@ + + +# DVPSettlement + +Source/Destination accounts for the quote (must have for defi quotes) + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | | +|**sourceAccount** | [**SettlementSourceAccount**](SettlementSourceAccount.md) | | | +|**destinationAccount** | [**AccountReference**](AccountReference.md) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| DVP | "DVP" | + + + diff --git a/docs/DirectAccess.md b/docs/DirectAccess.md new file mode 100644 index 00000000..a94b6b52 --- /dev/null +++ b/docs/DirectAccess.md @@ -0,0 +1,22 @@ + + +# DirectAccess + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Indicates this uses direct provider access | | +|**providerId** | **String** | The ID of the provider | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| PROVIDER | "PROVIDER" | + + + diff --git a/docs/DirectAccessProvider.md b/docs/DirectAccessProvider.md new file mode 100644 index 00000000..416c2ef2 --- /dev/null +++ b/docs/DirectAccessProvider.md @@ -0,0 +1,19 @@ + + +# DirectAccessProvider + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | Unique identifier for the provider | | +|**name** | **String** | Display name of the provider | | +|**logo** | **String** | URL to the logo image of the provider | [optional] | +|**accountBased** | **Boolean** | Indicates whether the provider access model is through accounts or directly | | +|**approved** | **Boolean** | Whether the provider was approved for use | [optional] | +|**hasTermsOfService** | **Boolean** | Whether the provider has terms of service | | +|**termsOfServiceUrl** | **String** | URL to the terms of service document | [optional] | + + + diff --git a/docs/ErrorCodes.md b/docs/ErrorCodes.md new file mode 100644 index 00000000..206bfdcb --- /dev/null +++ b/docs/ErrorCodes.md @@ -0,0 +1,25 @@ + + +# ErrorCodes + +## Enum + + +* `INVALID_TOKEN` (value: `"INVALID_TOKEN"`) + +* `MISSING_PARAMETER` (value: `"MISSING_PARAMETER"`) + +* `INVALID_PARAMETER` (value: `"INVALID_PARAMETER"`) + +* `RESOURCE_NOT_FOUND` (value: `"RESOURCE_NOT_FOUND"`) + +* `INVALID_TIME_RANGE` (value: `"INVALID_TIME_RANGE"`) + +* `UNAUTHORIZED` (value: `"UNAUTHORIZED"`) + +* `ACCOUNT_NOT_ACTIVE` (value: `"ACCOUNT_NOT_ACTIVE"`) + +* `UNMANAGED_WALLET_NOT_APPROVED` (value: `"UNMANAGED_WALLET_NOT_APPROVED"`) + + + diff --git a/docs/ExchangeAsset.md b/docs/ExchangeAsset.md index 931d38aa..50d9c205 100644 --- a/docs/ExchangeAsset.md +++ b/docs/ExchangeAsset.md @@ -13,6 +13,10 @@ |**total** | **String** | | [optional] | |**available** | **String** | | [optional] | |**credit** | **String** | | [optional] | +|**assetId** | **String** | The id of the asset | [optional] | +|**providerSymbol** | **String** | The provider symbol of the asset | [optional] | +|**assetSymbol** | **String** | The asset symbol of the asset | [optional] | +|**assetLegacyId** | **String** | The asset legacy id of the asset | [optional] | diff --git a/docs/ExecutionRequestBaseDetails.md b/docs/ExecutionRequestBaseDetails.md new file mode 100644 index 00000000..a93b26b1 --- /dev/null +++ b/docs/ExecutionRequestBaseDetails.md @@ -0,0 +1,27 @@ + + +# ExecutionRequestBaseDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**side** | [**SideEnum**](#SideEnum) | Side of the order | | +|**baseAmount** | **String** | Amount to convert | | +|**baseAssetId** | **String** | Source asset identifier | | +|**baseAssetRail** | **TransferRail** | | [optional] | +|**quoteAssetId** | **String** | Target asset identifier | | +|**quoteAssetRail** | **TransferRail** | | [optional] | + + + +## Enum: SideEnum + +| Name | Value | +|---- | -----| +| BUY | "BUY" | +| SELL | "SELL" | + + + diff --git a/docs/ExecutionRequestDetails.md b/docs/ExecutionRequestDetails.md new file mode 100644 index 00000000..14699bf7 --- /dev/null +++ b/docs/ExecutionRequestDetails.md @@ -0,0 +1,48 @@ + + +# ExecutionRequestDetails + +Order execution details + +## oneOf schemas +* [LimitExecutionRequestDetails](LimitExecutionRequestDetails.md) +* [MarketExecutionRequestDetails](MarketExecutionRequestDetails.md) +* [QuoteExecutionWithRequoteRequestDetails](QuoteExecutionWithRequoteRequestDetails.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.ExecutionRequestDetails; +import com.fireblocks.sdk.model.LimitExecutionRequestDetails; +import com.fireblocks.sdk.model.MarketExecutionRequestDetails; +import com.fireblocks.sdk.model.QuoteExecutionWithRequoteRequestDetails; + +public class Example { + public static void main(String[] args) { + ExecutionRequestDetails exampleExecutionRequestDetails = new ExecutionRequestDetails(); + + // create a new LimitExecutionRequestDetails + LimitExecutionRequestDetails exampleLimitExecutionRequestDetails = new LimitExecutionRequestDetails(); + // set ExecutionRequestDetails to LimitExecutionRequestDetails + exampleExecutionRequestDetails.setActualInstance(exampleLimitExecutionRequestDetails); + // to get back the LimitExecutionRequestDetails set earlier + LimitExecutionRequestDetails testLimitExecutionRequestDetails = (LimitExecutionRequestDetails) exampleExecutionRequestDetails.getActualInstance(); + + // create a new MarketExecutionRequestDetails + MarketExecutionRequestDetails exampleMarketExecutionRequestDetails = new MarketExecutionRequestDetails(); + // set ExecutionRequestDetails to MarketExecutionRequestDetails + exampleExecutionRequestDetails.setActualInstance(exampleMarketExecutionRequestDetails); + // to get back the MarketExecutionRequestDetails set earlier + MarketExecutionRequestDetails testMarketExecutionRequestDetails = (MarketExecutionRequestDetails) exampleExecutionRequestDetails.getActualInstance(); + + // create a new QuoteExecutionWithRequoteRequestDetails + QuoteExecutionWithRequoteRequestDetails exampleQuoteExecutionWithRequoteRequestDetails = new QuoteExecutionWithRequoteRequestDetails(); + // set ExecutionRequestDetails to QuoteExecutionWithRequoteRequestDetails + exampleExecutionRequestDetails.setActualInstance(exampleQuoteExecutionWithRequoteRequestDetails); + // to get back the QuoteExecutionWithRequoteRequestDetails set earlier + QuoteExecutionWithRequoteRequestDetails testQuoteExecutionWithRequoteRequestDetails = (QuoteExecutionWithRequoteRequestDetails) exampleExecutionRequestDetails.getActualInstance(); + } +} +``` + + diff --git a/docs/ExecutionResponseBaseDetails.md b/docs/ExecutionResponseBaseDetails.md new file mode 100644 index 00000000..bccd4fb0 --- /dev/null +++ b/docs/ExecutionResponseBaseDetails.md @@ -0,0 +1,27 @@ + + +# ExecutionResponseBaseDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**side** | [**SideEnum**](#SideEnum) | Side of the order | | +|**baseAmount** | **String** | Amount to convert | | +|**baseAssetId** | **String** | Source asset identifier | | +|**baseAssetRail** | **TransferRail** | | [optional] | +|**quoteAssetId** | **String** | Target asset identifier | | +|**quoteAssetRail** | **TransferRail** | | [optional] | + + + +## Enum: SideEnum + +| Name | Value | +|---- | -----| +| BUY | "BUY" | +| SELL | "SELL" | + + + diff --git a/docs/ExecutionResponseDetails.md b/docs/ExecutionResponseDetails.md new file mode 100644 index 00000000..04307d28 --- /dev/null +++ b/docs/ExecutionResponseDetails.md @@ -0,0 +1,46 @@ + + +# ExecutionResponseDetails + +## oneOf schemas +* [LimitExecutionResponseDetails](LimitExecutionResponseDetails.md) +* [MarketExecutionResponseDetails](MarketExecutionResponseDetails.md) +* [QuoteExecutionWithRequoteResponseDetails](QuoteExecutionWithRequoteResponseDetails.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.ExecutionResponseDetails; +import com.fireblocks.sdk.model.LimitExecutionResponseDetails; +import com.fireblocks.sdk.model.MarketExecutionResponseDetails; +import com.fireblocks.sdk.model.QuoteExecutionWithRequoteResponseDetails; + +public class Example { + public static void main(String[] args) { + ExecutionResponseDetails exampleExecutionResponseDetails = new ExecutionResponseDetails(); + + // create a new LimitExecutionResponseDetails + LimitExecutionResponseDetails exampleLimitExecutionResponseDetails = new LimitExecutionResponseDetails(); + // set ExecutionResponseDetails to LimitExecutionResponseDetails + exampleExecutionResponseDetails.setActualInstance(exampleLimitExecutionResponseDetails); + // to get back the LimitExecutionResponseDetails set earlier + LimitExecutionResponseDetails testLimitExecutionResponseDetails = (LimitExecutionResponseDetails) exampleExecutionResponseDetails.getActualInstance(); + + // create a new MarketExecutionResponseDetails + MarketExecutionResponseDetails exampleMarketExecutionResponseDetails = new MarketExecutionResponseDetails(); + // set ExecutionResponseDetails to MarketExecutionResponseDetails + exampleExecutionResponseDetails.setActualInstance(exampleMarketExecutionResponseDetails); + // to get back the MarketExecutionResponseDetails set earlier + MarketExecutionResponseDetails testMarketExecutionResponseDetails = (MarketExecutionResponseDetails) exampleExecutionResponseDetails.getActualInstance(); + + // create a new QuoteExecutionWithRequoteResponseDetails + QuoteExecutionWithRequoteResponseDetails exampleQuoteExecutionWithRequoteResponseDetails = new QuoteExecutionWithRequoteResponseDetails(); + // set ExecutionResponseDetails to QuoteExecutionWithRequoteResponseDetails + exampleExecutionResponseDetails.setActualInstance(exampleQuoteExecutionWithRequoteResponseDetails); + // to get back the QuoteExecutionWithRequoteResponseDetails set earlier + QuoteExecutionWithRequoteResponseDetails testQuoteExecutionWithRequoteResponseDetails = (QuoteExecutionWithRequoteResponseDetails) exampleExecutionResponseDetails.getActualInstance(); + } +} +``` + + diff --git a/docs/ExecutionStep.md b/docs/ExecutionStep.md new file mode 100644 index 00000000..09919f13 --- /dev/null +++ b/docs/ExecutionStep.md @@ -0,0 +1,18 @@ + + +# ExecutionStep + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **ExecutionStepType** | | | +|**status** | **ExecutionStepStatusEnum** | | | +|**fee** | [**Fee**](Fee.md) | | [optional] | +|**txId** | **String** | | [optional] | +|**txHash** | **String** | | [optional] | +|**error** | **ExecutionStepError** | | [optional] | + + + diff --git a/docs/ExecutionStepDetails.md b/docs/ExecutionStepDetails.md new file mode 100644 index 00000000..437abb91 --- /dev/null +++ b/docs/ExecutionStepDetails.md @@ -0,0 +1,14 @@ + + +# ExecutionStepDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | **ExecutionStepType** | | | +|**fee** | [**Fee**](Fee.md) | | [optional] | + + + diff --git a/docs/ExecutionStepError.md b/docs/ExecutionStepError.md new file mode 100644 index 00000000..03358fe2 --- /dev/null +++ b/docs/ExecutionStepError.md @@ -0,0 +1,23 @@ + + +# ExecutionStepError + +## Enum + + +* `INTERNAL_ERROR` (value: `"INTERNAL_ERROR"`) + +* `QUOTE_EXPIRED` (value: `"QUOTE_EXPIRED"`) + +* `INSUFFICIENT_OUTPUT_AMOUNT` (value: `"INSUFFICIENT_OUTPUT_AMOUNT"`) + +* `INSUFFICIENT_FUNDS` (value: `"INSUFFICIENT_FUNDS"`) + +* `LAST_TRANSACTION_FAILED` (value: `"LAST_TRANSACTION_FAILED"`) + +* `SWAP_APPROVAL_FAILED` (value: `"SWAP_APPROVAL_FAILED"`) + +* `PROVIDER_EXECUTION_ERROR` (value: `"PROVIDER_EXECUTION_ERROR"`) + + + diff --git a/docs/ExecutionStepStatusEnum.md b/docs/ExecutionStepStatusEnum.md new file mode 100644 index 00000000..dbc9eb89 --- /dev/null +++ b/docs/ExecutionStepStatusEnum.md @@ -0,0 +1,19 @@ + + +# ExecutionStepStatusEnum + +## Enum + + +* `WAITING` (value: `"WAITING"`) + +* `PROCESSING` (value: `"PROCESSING"`) + +* `COMPLETED` (value: `"COMPLETED"`) + +* `FAILED` (value: `"FAILED"`) + +* `CANCELLED` (value: `"CANCELLED"`) + + + diff --git a/docs/SwapRequiredActionsEnum.md b/docs/ExecutionStepType.md similarity index 57% rename from docs/SwapRequiredActionsEnum.md rename to docs/ExecutionStepType.md index e4c97157..3efa0ac0 100644 --- a/docs/SwapRequiredActionsEnum.md +++ b/docs/ExecutionStepType.md @@ -1,6 +1,6 @@ -# SwapRequiredActionsEnum +# ExecutionStepType ## Enum @@ -11,5 +11,9 @@ * `CONTRACT_CALL` (value: `"CONTRACT_CALL"`) +* `EXECUTE` (value: `"EXECUTE"`) + +* `SETTLEMENT` (value: `"SETTLEMENT"`) + diff --git a/docs/ExternalAccount.md b/docs/ExternalAccount.md new file mode 100644 index 00000000..b477219b --- /dev/null +++ b/docs/ExternalAccount.md @@ -0,0 +1,21 @@ + + +# ExternalAccount + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| EXTERNAL | "EXTERNAL" | + + + diff --git a/docs/Fee.md b/docs/Fee.md new file mode 100644 index 00000000..0b75f6ec --- /dev/null +++ b/docs/Fee.md @@ -0,0 +1,34 @@ + + +# Fee + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**feeType** | [**FeeTypeEnum**](#FeeTypeEnum) | The type of fee, such as ORDER, NETWORK, or SPREAD. ORDER - Fee for executing the order. NETWORK - Fee for network transactions. SPREAD - Fee for the difference between buy and sell prices. | | +|**assetId** | **String** | The asset identifier for the fee. | | +|**amountType** | [**AmountTypeEnum**](#AmountTypeEnum) | | | +|**amount** | **BigDecimal** | Fee in basis points (1 = 0.01%, 10000 = 100%) | | + + + +## Enum: FeeTypeEnum + +| Name | Value | +|---- | -----| +| ORDER | "ORDER" | +| NETWORK | "NETWORK" | +| SPREAD | "SPREAD" | + + + +## Enum: AmountTypeEnum + +| Name | Value | +|---- | -----| +| BPS | "BPS" | + + + diff --git a/docs/FiatTransfer.md b/docs/FiatTransfer.md new file mode 100644 index 00000000..8c14376d --- /dev/null +++ b/docs/FiatTransfer.md @@ -0,0 +1,23 @@ + + +# FiatTransfer + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | +|**amount** | **String** | The amount of the fiat transfer. | | +|**referenceId** | **String** | The reference ID for the fiat transfer. | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| FIAT | "FIAT" | + + + diff --git a/docs/FixedFee.md b/docs/FixedFee.md new file mode 100644 index 00000000..ce5706b9 --- /dev/null +++ b/docs/FixedFee.md @@ -0,0 +1,22 @@ + + +# FixedFee + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amountType** | [**AmountTypeEnum**](#AmountTypeEnum) | | | +|**amount** | **String** | The fixed amount of the fee | | + + + +## Enum: AmountTypeEnum + +| Name | Value | +|---- | -----| +| FIXED | "FIXED" | + + + diff --git a/docs/GetOrdersResponse.md b/docs/GetOrdersResponse.md new file mode 100644 index 00000000..ab8bcd1c --- /dev/null +++ b/docs/GetOrdersResponse.md @@ -0,0 +1,15 @@ + + +# GetOrdersResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<OrderSummary>**](OrderSummary.md) | | | +|**total** | **Integer** | Total number of orders matching the query. | | +|**next** | **String** | A cursor for the next page of results, if available. | [optional] | + + + diff --git a/docs/Identification.md b/docs/Identification.md new file mode 100644 index 00000000..ba8266b5 --- /dev/null +++ b/docs/Identification.md @@ -0,0 +1,37 @@ + + +# Identification + +## oneOf schemas +* [BusinessIdentification](BusinessIdentification.md) +* [PersonalIdentification](PersonalIdentification.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.Identification; +import com.fireblocks.sdk.model.BusinessIdentification; +import com.fireblocks.sdk.model.PersonalIdentification; + +public class Example { + public static void main(String[] args) { + Identification exampleIdentification = new Identification(); + + // create a new BusinessIdentification + BusinessIdentification exampleBusinessIdentification = new BusinessIdentification(); + // set Identification to BusinessIdentification + exampleIdentification.setActualInstance(exampleBusinessIdentification); + // to get back the BusinessIdentification set earlier + BusinessIdentification testBusinessIdentification = (BusinessIdentification) exampleIdentification.getActualInstance(); + + // create a new PersonalIdentification + PersonalIdentification examplePersonalIdentification = new PersonalIdentification(); + // set Identification to PersonalIdentification + exampleIdentification.setActualInstance(examplePersonalIdentification); + // to get back the PersonalIdentification set earlier + PersonalIdentification testPersonalIdentification = (PersonalIdentification) exampleIdentification.getActualInstance(); + } +} +``` + + diff --git a/docs/IndicativeQuoteType.md b/docs/IndicativeQuoteType.md new file mode 100644 index 00000000..54b24391 --- /dev/null +++ b/docs/IndicativeQuoteType.md @@ -0,0 +1,21 @@ + + +# IndicativeQuoteType + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Indicates this is an indicative quote | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| INDICATIVE | "INDICATIVE" | + + + diff --git a/docs/ProviderAdditionalData.md b/docs/InternalReference.md similarity index 55% rename from docs/ProviderAdditionalData.md rename to docs/InternalReference.md index 6495986c..84983ccd 100644 --- a/docs/ProviderAdditionalData.md +++ b/docs/InternalReference.md @@ -1,14 +1,14 @@ -# ProviderAdditionalData +# InternalReference -Provider specific additional data ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**priceImpact** | **String** | | | +|**type** | **PeerType** | | | +|**accountId** | **String** | | | diff --git a/docs/LimitExecutionRequestDetails.md b/docs/LimitExecutionRequestDetails.md new file mode 100644 index 00000000..ecf9fa81 --- /dev/null +++ b/docs/LimitExecutionRequestDetails.md @@ -0,0 +1,38 @@ + + +# LimitExecutionRequestDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**side** | [**SideEnum**](#SideEnum) | Side of the order | | +|**baseAmount** | **String** | Amount to convert | | +|**baseAssetId** | **String** | Source asset identifier | | +|**baseAssetRail** | **TransferRail** | | [optional] | +|**quoteAssetId** | **String** | Target asset identifier | | +|**quoteAssetRail** | **TransferRail** | | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Order type for limit orders | | +|**timeInForce** | **TimeInForce** | | | +|**limitPrice** | **String** | Price for limit orders | | + + + +## Enum: SideEnum + +| Name | Value | +|---- | -----| +| BUY | "BUY" | +| SELL | "SELL" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIMIT | "LIMIT" | + + + diff --git a/docs/LimitExecutionResponseDetails.md b/docs/LimitExecutionResponseDetails.md new file mode 100644 index 00000000..9d722d01 --- /dev/null +++ b/docs/LimitExecutionResponseDetails.md @@ -0,0 +1,38 @@ + + +# LimitExecutionResponseDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**side** | [**SideEnum**](#SideEnum) | Side of the order | | +|**baseAmount** | **String** | Amount to convert | | +|**baseAssetId** | **String** | Source asset identifier | | +|**baseAssetRail** | **TransferRail** | | [optional] | +|**quoteAssetId** | **String** | Target asset identifier | | +|**quoteAssetRail** | **TransferRail** | | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Order type for limit orders | | +|**timeInForce** | **TimeInForce** | | | +|**limitPrice** | **String** | Price for limit orders | | + + + +## Enum: SideEnum + +| Name | Value | +|---- | -----| +| BUY | "BUY" | +| SELL | "SELL" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| LIMIT | "LIMIT" | + + + diff --git a/docs/Manifest.md b/docs/Manifest.md new file mode 100644 index 00000000..fd1d7653 --- /dev/null +++ b/docs/Manifest.md @@ -0,0 +1,23 @@ + + +# Manifest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**assetTypes** | [**List<AssetTypesEnum>**](#List<AssetTypesEnum>) | | | +|**capabilities** | **List<Capability>** | | | + + + +## Enum: List<AssetTypesEnum> + +| Name | Value | +|---- | -----| +| DIGITAL | "DIGITAL" | +| FIAT | "FIAT" | + + + diff --git a/docs/MarketExecutionRequestDetails.md b/docs/MarketExecutionRequestDetails.md new file mode 100644 index 00000000..c8bad98e --- /dev/null +++ b/docs/MarketExecutionRequestDetails.md @@ -0,0 +1,36 @@ + + +# MarketExecutionRequestDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**side** | [**SideEnum**](#SideEnum) | Side of the order | | +|**baseAmount** | **String** | Amount to convert | | +|**baseAssetId** | **String** | Source asset identifier | | +|**baseAssetRail** | **TransferRail** | | [optional] | +|**quoteAssetId** | **String** | Target asset identifier | | +|**quoteAssetRail** | **TransferRail** | | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Order type for market orders | | + + + +## Enum: SideEnum + +| Name | Value | +|---- | -----| +| BUY | "BUY" | +| SELL | "SELL" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| MARKET | "MARKET" | + + + diff --git a/docs/MarketExecutionResponseDetails.md b/docs/MarketExecutionResponseDetails.md new file mode 100644 index 00000000..a677be0e --- /dev/null +++ b/docs/MarketExecutionResponseDetails.md @@ -0,0 +1,36 @@ + + +# MarketExecutionResponseDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**side** | [**SideEnum**](#SideEnum) | Side of the order | | +|**baseAmount** | **String** | Amount to convert | | +|**baseAssetId** | **String** | Source asset identifier | | +|**baseAssetRail** | **TransferRail** | | [optional] | +|**quoteAssetId** | **String** | Target asset identifier | | +|**quoteAssetRail** | **TransferRail** | | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Order type for market orders | | + + + +## Enum: SideEnum + +| Name | Value | +|---- | -----| +| BUY | "BUY" | +| SELL | "SELL" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| MARKET | "MARKET" | + + + diff --git a/docs/MarketRequoteRequestDetails.md b/docs/MarketRequoteRequestDetails.md new file mode 100644 index 00000000..6080b598 --- /dev/null +++ b/docs/MarketRequoteRequestDetails.md @@ -0,0 +1,21 @@ + + +# MarketRequoteRequestDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Indicates that the order should be re-quoted if the original quote is expired. This will lead to a market order. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| MARKET | "MARKET" | + + + diff --git a/docs/NonWalletQuoteFee.md b/docs/NonWalletQuoteFee.md deleted file mode 100644 index 44f7413e..00000000 --- a/docs/NonWalletQuoteFee.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# NonWalletQuoteFee - -The estimated fees for the swap operation. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**networkExecutionFee** | **String** | The gas fee in the asset unit. | | -|**networkFeeAssetId** | **String** | The network fee in Fireblocks asset representation | | -|**providerFee** | **String** | The provider fee in the asset unit. | | -|**providerFeeAssetId** | **String** | The provider fee in Fireblocks asset representation | | -|**providerFeeRate** | **BigDecimal** | Percentages of the provider fee out of the gross amount | | - - - diff --git a/docs/NonWalletQuoteResponse.md b/docs/NonWalletQuoteResponse.md deleted file mode 100644 index 4053c9b6..00000000 --- a/docs/NonWalletQuoteResponse.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# NonWalletQuoteResponse - -Return a quote that cannot be used for a swap operation. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**protocol** | **SwapProviderProtocolsEnum** | | | -|**inputAmount** | **String** | The amount of tokens the swapper will provide | | -|**inputAsset** | **String** | The id of the asset the swapper will provide | | -|**slippageTolerance** | **BigDecimal** | The slippage tolerance is a percentage. The slippage tolerance is the maximum amount the price can change between the time the transaction is submitted and the time it is executed | | -|**outputMinAmount** | **String** | The minimum amount of tokens the swapper will receive | | -|**outputMaxAmount** | **String** | Maximum amount of tokens that the swapper will receive | | -|**outputAsset** | **String** | The id of the asset the swapper will receive | | -|**additionalData** | [**ProviderAdditionalData**](ProviderAdditionalData.md) | | | -|**estimatedFees** | [**NonWalletQuoteFee**](NonWalletQuoteFee.md) | | | - - - diff --git a/docs/OneTimeAddressReference.md b/docs/OneTimeAddressReference.md new file mode 100644 index 00000000..45269a3c --- /dev/null +++ b/docs/OneTimeAddressReference.md @@ -0,0 +1,23 @@ + + +# OneTimeAddressReference + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | | +|**address** | **String** | | | +|**tag** | **String** | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| ONE_TIME_ADDRESS | "ONE_TIME_ADDRESS" | + + + diff --git a/docs/OrderDetails.md b/docs/OrderDetails.md new file mode 100644 index 00000000..445c369b --- /dev/null +++ b/docs/OrderDetails.md @@ -0,0 +1,28 @@ + + +# OrderDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**via** | [**AccessType**](AccessType.md) | | | +|**status** | **OrderStatus** | | | +|**createdAt** | **OffsetDateTime** | | | +|**updatedAt** | **OffsetDateTime** | | [optional] | +|**receipt** | [**TransferReceipt**](TransferReceipt.md) | | [optional] | +|**generalFees** | [**List<Fee>**](Fee.md) | | [optional] | +|**executionSteps** | [**List<ExecutionStep>**](ExecutionStep.md) | | | +|**executionResponseDetails** | [**ExecutionResponseDetails**](ExecutionResponseDetails.md) | | | +|**settlement** | [**Settlement**](Settlement.md) | | | +|**participantsIdentification** | [**ParticipantsIdentification**](ParticipantsIdentification.md) | | [optional] | +|**paymentInstructions** | [**List<PaymentInstructions>**](PaymentInstructions.md) | Payment instructions for the order, the client can use one of these to pay the order. | [optional] | +|**createdBy** | **String** | The ID of the user who created the order | | +|**customerInternalReferenceId** | **String** | Internal reference ID for the customer | [optional] | +|**note** | **String** | Optional note for the Order | [optional] | +|**expiresAt** | **OffsetDateTime** | | [optional] | + + + diff --git a/docs/OrderStatus.md b/docs/OrderStatus.md new file mode 100644 index 00000000..0331114f --- /dev/null +++ b/docs/OrderStatus.md @@ -0,0 +1,21 @@ + + +# OrderStatus + +## Enum + + +* `CREATED` (value: `"CREATED"`) + +* `PENDING_USER_ACTION` (value: `"PENDING_USER_ACTION"`) + +* `PROCESSING` (value: `"PROCESSING"`) + +* `CANCELED` (value: `"CANCELED"`) + +* `COMPLETED` (value: `"COMPLETED"`) + +* `FAILED` (value: `"FAILED"`) + + + diff --git a/docs/OrderSummary.md b/docs/OrderSummary.md new file mode 100644 index 00000000..ccf985a1 --- /dev/null +++ b/docs/OrderSummary.md @@ -0,0 +1,32 @@ + + +# OrderSummary + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **String** | | | +|**via** | [**AccessType**](AccessType.md) | | | +|**side** | [**SideEnum**](#SideEnum) | Side of the order | | +|**baseAmount** | **String** | | | +|**quoteAmount** | **String** | | [optional] | +|**baseAssetId** | **String** | | | +|**quoteAssetId** | **String** | | | +|**status** | **OrderStatus** | | | +|**destination** | [**AccountReference**](AccountReference.md) | | | +|**source** | [**SettlementSourceAccount**](SettlementSourceAccount.md) | | [optional] | +|**createdAt** | **OffsetDateTime** | | | + + + +## Enum: SideEnum + +| Name | Value | +|---- | -----| +| BUY | "BUY" | +| SELL | "SELL" | + + + diff --git a/docs/ParticipantRelationshipType.md b/docs/ParticipantRelationshipType.md new file mode 100644 index 00000000..e51e48aa --- /dev/null +++ b/docs/ParticipantRelationshipType.md @@ -0,0 +1,15 @@ + + +# ParticipantRelationshipType + +## Enum + + +* `FIRST_PARTY` (value: `"FirstParty"`) + +* `SECOND_PARTY` (value: `"SecondParty"`) + +* `THIRD_PARTY` (value: `"ThirdParty"`) + + + diff --git a/docs/ParticipantsIdentification.md b/docs/ParticipantsIdentification.md new file mode 100644 index 00000000..07762ca0 --- /dev/null +++ b/docs/ParticipantsIdentification.md @@ -0,0 +1,15 @@ + + +# ParticipantsIdentification + +KYC/AML participant identification + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**originator** | [**Identification**](Identification.md) | | [optional] | +|**beneficiary** | [**Identification**](Identification.md) | | [optional] | + + + diff --git a/docs/PaymentInstructions.md b/docs/PaymentInstructions.md new file mode 100644 index 00000000..1a094861 --- /dev/null +++ b/docs/PaymentInstructions.md @@ -0,0 +1,31 @@ + + +# PaymentInstructions + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | | +|**address** | [**AccountHolderDetails**](AccountHolderDetails.md) | | | +|**referenceId** | **String** | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| IBAN | "IBAN" | +| SWIFT | "SWIFT" | +| ACH | "ACH" | +| US_WIRE | "US_WIRE" | +| SPEI | "SPEI" | +| SEPA | "SEPA" | +| PIX | "PIX" | +| LOCAL_BANK_TRANSFER_AFRICA | "LOCAL_BANK_TRANSFER_AFRICA" | +| MOBILE_MONEY | "MOBILE_MONEY" | + + + diff --git a/docs/PeerType.md b/docs/PeerType.md new file mode 100644 index 00000000..33d3a528 --- /dev/null +++ b/docs/PeerType.md @@ -0,0 +1,19 @@ + + +# PeerType + +## Enum + + +* `VAULT_ACCOUNT` (value: `"VAULT_ACCOUNT"`) + +* `EXCHANGE_ACCOUNT` (value: `"EXCHANGE_ACCOUNT"`) + +* `INTERNAL_WALLET` (value: `"INTERNAL_WALLET"`) + +* `EXTERNAL_WALLET` (value: `"EXTERNAL_WALLET"`) + +* `FIAT_ACCOUNT` (value: `"FIAT_ACCOUNT"`) + + + diff --git a/docs/PersonalIdentification.md b/docs/PersonalIdentification.md new file mode 100644 index 00000000..df54bf02 --- /dev/null +++ b/docs/PersonalIdentification.md @@ -0,0 +1,26 @@ + + +# PersonalIdentification + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**externalReferenceId** | **String** | | | +|**entityType** | [**EntityTypeEnum**](#EntityTypeEnum) | | | +|**participantRelationshipType** | **ParticipantRelationshipType** | | | +|**fullName** | [**PersonalIdentificationFullName**](PersonalIdentificationFullName.md) | | | +|**dateOfBirth** | **LocalDate** | | | +|**postalAddress** | [**PostalAddress**](PostalAddress.md) | | | + + + +## Enum: EntityTypeEnum + +| Name | Value | +|---- | -----| +| INDIVIDUAL | "INDIVIDUAL" | + + + diff --git a/docs/PersonalIdentificationFullName.md b/docs/PersonalIdentificationFullName.md new file mode 100644 index 00000000..301ac7f8 --- /dev/null +++ b/docs/PersonalIdentificationFullName.md @@ -0,0 +1,14 @@ + + +# PersonalIdentificationFullName + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**firstName** | **String** | | | +|**lastName** | **String** | | | + + + diff --git a/docs/PlatformAccount.md b/docs/PlatformAccount.md new file mode 100644 index 00000000..86a561f0 --- /dev/null +++ b/docs/PlatformAccount.md @@ -0,0 +1,24 @@ + + +# PlatformAccount + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | | +|**accountId** | **String** | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| VAULT_ACCOUNT | "VAULT_ACCOUNT" | +| CONNECTED_ACCOUNT | "CONNECTED_ACCOUNT" | +| FIAT_ACCOUNT | "FIAT_ACCOUNT" | + + + diff --git a/docs/PostOrderSettlement.md b/docs/PostOrderSettlement.md new file mode 100644 index 00000000..eaeadd51 --- /dev/null +++ b/docs/PostOrderSettlement.md @@ -0,0 +1,21 @@ + + +# PostOrderSettlement + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| POST_ORDER | "POST_ORDER" | + + + diff --git a/docs/PostalAddress.md b/docs/PostalAddress.md new file mode 100644 index 00000000..9a3fb74e --- /dev/null +++ b/docs/PostalAddress.md @@ -0,0 +1,19 @@ + + +# PostalAddress + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**streetName** | **String** | | | +|**buildingNumber** | **String** | | | +|**postalCode** | **String** | | | +|**city** | **String** | | | +|**subdivision** | **String** | | | +|**district** | **String** | | | +|**country** | **String** | | | + + + diff --git a/docs/PrefundedSettlement.md b/docs/PrefundedSettlement.md new file mode 100644 index 00000000..8a677828 --- /dev/null +++ b/docs/PrefundedSettlement.md @@ -0,0 +1,22 @@ + + +# PrefundedSettlement + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | | +|**destinationAccount** | [**AccountReference**](AccountReference.md) | | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| PREFUNDED | "PREFUNDED" | + + + diff --git a/docs/ProviderCategoryEnum.md b/docs/ProviderCategoryEnum.md deleted file mode 100644 index c60a4059..00000000 --- a/docs/ProviderCategoryEnum.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# ProviderCategoryEnum - -## Enum - - -* `DEX` (value: `"DEX"`) - -* `CEX` (value: `"CEX"`) - -* `OTC` (value: `"OTC"`) - -* `WRAP_UNWRAP` (value: `"WRAP_UNWRAP"`) - - - diff --git a/docs/ProviderID.md b/docs/ProviderID.md new file mode 100644 index 00000000..30bb6e86 --- /dev/null +++ b/docs/ProviderID.md @@ -0,0 +1,13 @@ + + +# ProviderID + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**providerId** | **String** | The ID of the provider associated with the account. | | + + + diff --git a/docs/ProvidersListResponse.md b/docs/ProvidersListResponse.md new file mode 100644 index 00000000..8c9962fb --- /dev/null +++ b/docs/ProvidersListResponse.md @@ -0,0 +1,15 @@ + + +# ProvidersListResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<TradingProvider>**](TradingProvider.md) | List of available providers | | +|**total** | **Integer** | Total number of providers matching the query. | | +|**next** | **String** | A cursor for the next page of results, if available. | [optional] | + + + diff --git a/docs/Quote.md b/docs/Quote.md new file mode 100644 index 00000000..c2af25ac --- /dev/null +++ b/docs/Quote.md @@ -0,0 +1,42 @@ + + +# Quote + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**via** | [**AccessType**](AccessType.md) | | | +|**id** | **String** | | | +|**type** | [**TypeEnum**](#TypeEnum) | Indicates this is an indicative quote | | +|**quoteAssetId** | **String** | | | +|**baseAssetId** | **String** | | | +|**baseAmount** | **String** | | | +|**quoteAmount** | **String** | | | +|**priceImpact** | **BigDecimal** | | [optional] | +|**quoteMinAmount** | **String** | | [optional] | +|**executionSteps** | [**List<ExecutionStepDetails>**](ExecutionStepDetails.md) | | [optional] | +|**generalFees** | [**List<Fee>**](Fee.md) | | [optional] | +|**side** | [**SideEnum**](#SideEnum) | Side of the order | | +|**expiresAt** | **OffsetDateTime** | ISO 8601 timestamp of the expiration time of the quote. | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| INDICATIVE | "INDICATIVE" | + + + +## Enum: SideEnum + +| Name | Value | +|---- | -----| +| BUY | "BUY" | +| SELL | "SELL" | + + + diff --git a/docs/QuoteExecutionRequestDetails.md b/docs/QuoteExecutionRequestDetails.md new file mode 100644 index 00000000..3aaf8a9c --- /dev/null +++ b/docs/QuoteExecutionRequestDetails.md @@ -0,0 +1,22 @@ + + +# QuoteExecutionRequestDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Order type for quote orders | | +|**quoteId** | **String** | Quote ID for quote orders | | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| QUOTE | "QUOTE" | + + + diff --git a/docs/QuoteExecutionResponseDetails.md b/docs/QuoteExecutionResponseDetails.md new file mode 100644 index 00000000..8d799761 --- /dev/null +++ b/docs/QuoteExecutionResponseDetails.md @@ -0,0 +1,38 @@ + + +# QuoteExecutionResponseDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**side** | [**SideEnum**](#SideEnum) | Side of the order | | +|**baseAmount** | **String** | Amount to convert | | +|**baseAssetId** | **String** | Source asset identifier | | +|**baseAssetRail** | **TransferRail** | | [optional] | +|**quoteAssetId** | **String** | Target asset identifier | | +|**quoteAssetRail** | **TransferRail** | | [optional] | +|**type** | [**TypeEnum**](#TypeEnum) | Order type for quote orders | | +|**quoteId** | **String** | Quote ID for quote orders | | +|**quoteAmount** | **String** | Quote amount for quote orders | | + + + +## Enum: SideEnum + +| Name | Value | +|---- | -----| +| BUY | "BUY" | +| SELL | "SELL" | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| QUOTE | "QUOTE" | + + + diff --git a/docs/QuoteExecutionWithRequoteRequestDetails.md b/docs/QuoteExecutionWithRequoteRequestDetails.md new file mode 100644 index 00000000..eb155f43 --- /dev/null +++ b/docs/QuoteExecutionWithRequoteRequestDetails.md @@ -0,0 +1,23 @@ + + +# QuoteExecutionWithRequoteRequestDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Order type for quote orders | | +|**quoteId** | **String** | Quote ID for quote orders | | +|**reQuote** | [**QuoteExecutionWithRequoteRequestDetailsAllOfReQuote**](QuoteExecutionWithRequoteRequestDetailsAllOfReQuote.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| QUOTE | "QUOTE" | + + + diff --git a/docs/QuoteExecutionWithRequoteRequestDetailsAllOfReQuote.md b/docs/QuoteExecutionWithRequoteRequestDetailsAllOfReQuote.md new file mode 100644 index 00000000..beeb76c5 --- /dev/null +++ b/docs/QuoteExecutionWithRequoteRequestDetailsAllOfReQuote.md @@ -0,0 +1,37 @@ + + +# QuoteExecutionWithRequoteRequestDetailsAllOfReQuote + +## oneOf schemas +* [MarketRequoteRequestDetails](MarketRequoteRequestDetails.md) +* [RetryRequoteRequestDetails](RetryRequoteRequestDetails.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.QuoteExecutionWithRequoteRequestDetailsAllOfReQuote; +import com.fireblocks.sdk.model.MarketRequoteRequestDetails; +import com.fireblocks.sdk.model.RetryRequoteRequestDetails; + +public class Example { + public static void main(String[] args) { + QuoteExecutionWithRequoteRequestDetailsAllOfReQuote exampleQuoteExecutionWithRequoteRequestDetailsAllOfReQuote = new QuoteExecutionWithRequoteRequestDetailsAllOfReQuote(); + + // create a new MarketRequoteRequestDetails + MarketRequoteRequestDetails exampleMarketRequoteRequestDetails = new MarketRequoteRequestDetails(); + // set QuoteExecutionWithRequoteRequestDetailsAllOfReQuote to MarketRequoteRequestDetails + exampleQuoteExecutionWithRequoteRequestDetailsAllOfReQuote.setActualInstance(exampleMarketRequoteRequestDetails); + // to get back the MarketRequoteRequestDetails set earlier + MarketRequoteRequestDetails testMarketRequoteRequestDetails = (MarketRequoteRequestDetails) exampleQuoteExecutionWithRequoteRequestDetailsAllOfReQuote.getActualInstance(); + + // create a new RetryRequoteRequestDetails + RetryRequoteRequestDetails exampleRetryRequoteRequestDetails = new RetryRequoteRequestDetails(); + // set QuoteExecutionWithRequoteRequestDetailsAllOfReQuote to RetryRequoteRequestDetails + exampleQuoteExecutionWithRequoteRequestDetailsAllOfReQuote.setActualInstance(exampleRetryRequoteRequestDetails); + // to get back the RetryRequoteRequestDetails set earlier + RetryRequoteRequestDetails testRetryRequoteRequestDetails = (RetryRequoteRequestDetails) exampleQuoteExecutionWithRequoteRequestDetailsAllOfReQuote.getActualInstance(); + } +} +``` + + diff --git a/docs/QuoteExecutionWithRequoteResponseDetails.md b/docs/QuoteExecutionWithRequoteResponseDetails.md new file mode 100644 index 00000000..53acee5c --- /dev/null +++ b/docs/QuoteExecutionWithRequoteResponseDetails.md @@ -0,0 +1,39 @@ + + +# QuoteExecutionWithRequoteResponseDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Order type for quote orders | | +|**quoteId** | **String** | Quote ID for quote orders | | +|**quoteAmount** | **String** | Quote amount for quote orders | | +|**side** | [**SideEnum**](#SideEnum) | Side of the order | | +|**baseAmount** | **String** | Amount to convert | | +|**baseAssetId** | **String** | Source asset identifier | | +|**baseAssetRail** | **TransferRail** | | [optional] | +|**quoteAssetId** | **String** | Target asset identifier | | +|**quoteAssetRail** | **TransferRail** | | [optional] | +|**reQuote** | [**QuoteExecutionWithRequoteResponseDetailsAllOfReQuote**](QuoteExecutionWithRequoteResponseDetailsAllOfReQuote.md) | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| QUOTE | "QUOTE" | + + + +## Enum: SideEnum + +| Name | Value | +|---- | -----| +| BUY | "BUY" | +| SELL | "SELL" | + + + diff --git a/docs/QuoteExecutionWithRequoteResponseDetailsAllOfReQuote.md b/docs/QuoteExecutionWithRequoteResponseDetailsAllOfReQuote.md new file mode 100644 index 00000000..208143ff --- /dev/null +++ b/docs/QuoteExecutionWithRequoteResponseDetailsAllOfReQuote.md @@ -0,0 +1,37 @@ + + +# QuoteExecutionWithRequoteResponseDetailsAllOfReQuote + +## oneOf schemas +* [MarketRequoteRequestDetails](MarketRequoteRequestDetails.md) +* [RetryRequoteRequestDetails](RetryRequoteRequestDetails.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.QuoteExecutionWithRequoteResponseDetailsAllOfReQuote; +import com.fireblocks.sdk.model.MarketRequoteRequestDetails; +import com.fireblocks.sdk.model.RetryRequoteRequestDetails; + +public class Example { + public static void main(String[] args) { + QuoteExecutionWithRequoteResponseDetailsAllOfReQuote exampleQuoteExecutionWithRequoteResponseDetailsAllOfReQuote = new QuoteExecutionWithRequoteResponseDetailsAllOfReQuote(); + + // create a new MarketRequoteRequestDetails + MarketRequoteRequestDetails exampleMarketRequoteRequestDetails = new MarketRequoteRequestDetails(); + // set QuoteExecutionWithRequoteResponseDetailsAllOfReQuote to MarketRequoteRequestDetails + exampleQuoteExecutionWithRequoteResponseDetailsAllOfReQuote.setActualInstance(exampleMarketRequoteRequestDetails); + // to get back the MarketRequoteRequestDetails set earlier + MarketRequoteRequestDetails testMarketRequoteRequestDetails = (MarketRequoteRequestDetails) exampleQuoteExecutionWithRequoteResponseDetailsAllOfReQuote.getActualInstance(); + + // create a new RetryRequoteRequestDetails + RetryRequoteRequestDetails exampleRetryRequoteRequestDetails = new RetryRequoteRequestDetails(); + // set QuoteExecutionWithRequoteResponseDetailsAllOfReQuote to RetryRequoteRequestDetails + exampleQuoteExecutionWithRequoteResponseDetailsAllOfReQuote.setActualInstance(exampleRetryRequoteRequestDetails); + // to get back the RetryRequoteRequestDetails set earlier + RetryRequoteRequestDetails testRetryRequoteRequestDetails = (RetryRequoteRequestDetails) exampleQuoteExecutionWithRequoteResponseDetailsAllOfReQuote.getActualInstance(); + } +} +``` + + diff --git a/docs/QuoteFee.md b/docs/QuoteFee.md deleted file mode 100644 index 4e15ed55..00000000 --- a/docs/QuoteFee.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# QuoteFee - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**networkExecutionFee** | **String** | The gas fee in the asset unit. | | -|**networkFeeAssetId** | **String** | The network fee in Fireblocks asset representation | | -|**providerFee** | **String** | The provider fee in the asset unit. | | -|**providerFeeAssetId** | **String** | The provider fee in Fireblocks asset representation | | -|**providerFeeRate** | **BigDecimal** | Percentages of the provider fee out of the gross amount | | -|**networkApproveFee** | **String** | The gas fee in the asset unit. | [optional] | - - - diff --git a/docs/QuoteRequest.md b/docs/QuoteRequest.md deleted file mode 100644 index bfff6e89..00000000 --- a/docs/QuoteRequest.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# QuoteRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**accountId** | **String** | The id of the vault account or account id | [optional] | -|**inputAmount** | **String** | The amount of tokens the swapper will provide, positive number, can be a decimal. | | -|**inputAsset** | **String** | The id of the asset the swapper will provide | | -|**outputAsset** | **String** | The id of the asset the swapper will receive | | -|**slippageTolerance** | **BigDecimal** | The slippage tolerance is a percentage. The slippage tolerance is the maximum amount the price can change between the time the transaction is submitted and the time it is executed | | -|**protocol** | **SwapProviderProtocolsEnum** | | | - - - diff --git a/docs/QuoteResponse.md b/docs/QuoteResponse.md deleted file mode 100644 index fcc392e0..00000000 --- a/docs/QuoteResponse.md +++ /dev/null @@ -1,37 +0,0 @@ - - -# QuoteResponse - -## oneOf schemas -* [NonWalletQuoteResponse](NonWalletQuoteResponse.md) -* [WalletQuoteResponse](WalletQuoteResponse.md) - -## Example -```java -// Import classes: -import com.fireblocks.sdk.model.QuoteResponse; -import com.fireblocks.sdk.model.NonWalletQuoteResponse; -import com.fireblocks.sdk.model.WalletQuoteResponse; - -public class Example { - public static void main(String[] args) { - QuoteResponse exampleQuoteResponse = new QuoteResponse(); - - // create a new NonWalletQuoteResponse - NonWalletQuoteResponse exampleNonWalletQuoteResponse = new NonWalletQuoteResponse(); - // set QuoteResponse to NonWalletQuoteResponse - exampleQuoteResponse.setActualInstance(exampleNonWalletQuoteResponse); - // to get back the NonWalletQuoteResponse set earlier - NonWalletQuoteResponse testNonWalletQuoteResponse = (NonWalletQuoteResponse) exampleQuoteResponse.getActualInstance(); - - // create a new WalletQuoteResponse - WalletQuoteResponse exampleWalletQuoteResponse = new WalletQuoteResponse(); - // set QuoteResponse to WalletQuoteResponse - exampleQuoteResponse.setActualInstance(exampleWalletQuoteResponse); - // to get back the WalletQuoteResponse set earlier - WalletQuoteResponse testWalletQuoteResponse = (WalletQuoteResponse) exampleQuoteResponse.getActualInstance(); - } -} -``` - - diff --git a/docs/QuotesResponse.md b/docs/QuotesResponse.md new file mode 100644 index 00000000..cec1d2c8 --- /dev/null +++ b/docs/QuotesResponse.md @@ -0,0 +1,13 @@ + + +# QuotesResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**quotes** | [**List<Quote>**](Quote.md) | | [optional] | + + + diff --git a/docs/RetryRequoteRequestDetails.md b/docs/RetryRequoteRequestDetails.md new file mode 100644 index 00000000..0cbc2900 --- /dev/null +++ b/docs/RetryRequoteRequestDetails.md @@ -0,0 +1,23 @@ + + +# RetryRequoteRequestDetails + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | Indicates that the order should be re-quoted if the original quote is expired, trying to match the original quote. | | +|**count** | **BigDecimal** | If quote is expired, how many times to re-generate new quotes to try having the order executed as in the original quote. | | +|**slippageBps** | **BigDecimal** | Slippage tolerance in basis points (bps) for quote orders - 1 is 0.01% and 10000 is 100% | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| RETRY | "RETRY" | + + + diff --git a/docs/Settlement.md b/docs/Settlement.md new file mode 100644 index 00000000..4fbbd389 --- /dev/null +++ b/docs/Settlement.md @@ -0,0 +1,48 @@ + + +# Settlement + +Settlement configuration for the order + +## oneOf schemas +* [DVPSettlement](DVPSettlement.md) +* [PostOrderSettlement](PostOrderSettlement.md) +* [PrefundedSettlement](PrefundedSettlement.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.Settlement; +import com.fireblocks.sdk.model.DVPSettlement; +import com.fireblocks.sdk.model.PostOrderSettlement; +import com.fireblocks.sdk.model.PrefundedSettlement; + +public class Example { + public static void main(String[] args) { + Settlement exampleSettlement = new Settlement(); + + // create a new DVPSettlement + DVPSettlement exampleDVPSettlement = new DVPSettlement(); + // set Settlement to DVPSettlement + exampleSettlement.setActualInstance(exampleDVPSettlement); + // to get back the DVPSettlement set earlier + DVPSettlement testDVPSettlement = (DVPSettlement) exampleSettlement.getActualInstance(); + + // create a new PostOrderSettlement + PostOrderSettlement examplePostOrderSettlement = new PostOrderSettlement(); + // set Settlement to PostOrderSettlement + exampleSettlement.setActualInstance(examplePostOrderSettlement); + // to get back the PostOrderSettlement set earlier + PostOrderSettlement testPostOrderSettlement = (PostOrderSettlement) exampleSettlement.getActualInstance(); + + // create a new PrefundedSettlement + PrefundedSettlement examplePrefundedSettlement = new PrefundedSettlement(); + // set Settlement to PrefundedSettlement + exampleSettlement.setActualInstance(examplePrefundedSettlement); + // to get back the PrefundedSettlement set earlier + PrefundedSettlement testPrefundedSettlement = (PrefundedSettlement) exampleSettlement.getActualInstance(); + } +} +``` + + diff --git a/docs/SettlementSourceAccount.md b/docs/SettlementSourceAccount.md new file mode 100644 index 00000000..cd7e7f59 --- /dev/null +++ b/docs/SettlementSourceAccount.md @@ -0,0 +1,37 @@ + + +# SettlementSourceAccount + +## oneOf schemas +* [ExternalAccount](ExternalAccount.md) +* [PlatformAccount](PlatformAccount.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.SettlementSourceAccount; +import com.fireblocks.sdk.model.ExternalAccount; +import com.fireblocks.sdk.model.PlatformAccount; + +public class Example { + public static void main(String[] args) { + SettlementSourceAccount exampleSettlementSourceAccount = new SettlementSourceAccount(); + + // create a new ExternalAccount + ExternalAccount exampleExternalAccount = new ExternalAccount(); + // set SettlementSourceAccount to ExternalAccount + exampleSettlementSourceAccount.setActualInstance(exampleExternalAccount); + // to get back the ExternalAccount set earlier + ExternalAccount testExternalAccount = (ExternalAccount) exampleSettlementSourceAccount.getActualInstance(); + + // create a new PlatformAccount + PlatformAccount examplePlatformAccount = new PlatformAccount(); + // set SettlementSourceAccount to PlatformAccount + exampleSettlementSourceAccount.setActualInstance(examplePlatformAccount); + // to get back the PlatformAccount set earlier + PlatformAccount testPlatformAccount = (PlatformAccount) exampleSettlementSourceAccount.getActualInstance(); + } +} +``` + + diff --git a/docs/SwapFlowError.md b/docs/SwapFlowError.md deleted file mode 100644 index af1af3d2..00000000 --- a/docs/SwapFlowError.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# SwapFlowError - -The error message for the swap - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **String** | The code representing the error | | -|**message** | **String** | Error message | | - - - diff --git a/docs/SwapOperation.md b/docs/SwapOperation.md deleted file mode 100644 index f2504ec4..00000000 --- a/docs/SwapOperation.md +++ /dev/null @@ -1,43 +0,0 @@ - - -# SwapOperation - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | The id of the swap operation | | -|**accountId** | **String** | The id of the vault account or account id | | -|**providerId** | **UUID** | The uuid that identifies the provider | | -|**category** | **ProviderCategoryEnum** | | | -|**protocol** | **SwapProviderProtocolsEnum** | | | -|**status** | [**StatusEnum**](#StatusEnum) | **CREATED** – The swap request has been created but not yet started. **PENDING_USER_ACTION** – Awaiting a user action (e.g. signature or approval). **PENDING_PROVIDER_ACTION** – Awaiting the provider to process the request. **PROCESSING** – The swap is actively being executed on‐chain. **COMPLETED** – The swap has finished successfully. **CANCELED** – The swap was cancelled by user or provider before completion. **FAILED** – The swap attempted but encountered an error. | | -|**inputAmount** | **String** | The amount of tokens the swapper will provide | | -|**inputAsset** | **String** | The id of the asset the swapper will provide | | -|**slippageTolerance** | **BigDecimal** | The slippage tolerance is a percentage. The slippage tolerance is the maximum amount the price can change between the time the transaction is submitted and the time it is executed | | -|**outputMinAmount** | **String** | The minimum amount of tokens the swapper will receive | | -|**outputMaxAmount** | **String** | Maximum amount of tokens that the swapper will receive | | -|**outputAsset** | **String** | The id of the asset the swapper will receive | | -|**outputFinalAmount** | **String** | Final amount of tokens that the swapper will receive | [optional] | -|**requiredActions** | [**List<SwapRequiredAction>**](SwapRequiredAction.md) | The required actions for the swap, including the type of action, the status of the action, and the transaction id | | -|**error** | [**SwapFlowError**](SwapFlowError.md) | | [optional] | -|**createdAt** | **OffsetDateTime** | The creation time of the swap operation (ISO Date time). | | -|**updatedAt** | **OffsetDateTime** | The last update time of the swap operation (ISO Date time). | | -|**createdBy** | **UUID** | Fireblocks user id that issued the swap | | - - - -## Enum: StatusEnum - -| Name | Value | -|---- | -----| -| CREATED | "CREATED" | -| TRANSACTION_IN_PROGRESS | "TRANSACTION_IN_PROGRESS" | -| PENDING_PROVIDER_ACTION | "PENDING_PROVIDER_ACTION" | -| COMPLETED | "COMPLETED" | -| CANCELED | "CANCELED" | -| FAILED | "FAILED" | - - - diff --git a/docs/SwapOperationRequest.md b/docs/SwapOperationRequest.md deleted file mode 100644 index 11cc3d1e..00000000 --- a/docs/SwapOperationRequest.md +++ /dev/null @@ -1,25 +0,0 @@ - - -# SwapOperationRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**providerQuoteId** | **UUID** | An identifier that uniquely identifies the received quote | | -|**feeLevel** | [**FeeLevelEnum**](#FeeLevelEnum) | The fee level of the transaction | [optional] | -|**txNote** | **String** | user note on the transaction | [optional] | - - - -## Enum: FeeLevelEnum - -| Name | Value | -|---- | -----| -| LOW | "LOW" | -| MEDIUM | "MEDIUM" | -| HIGH | "HIGH" | - - - diff --git a/docs/SwapOperationsPaginatedResponse.md b/docs/SwapOperationsPaginatedResponse.md deleted file mode 100644 index 9c40a831..00000000 --- a/docs/SwapOperationsPaginatedResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# SwapOperationsPaginatedResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**data** | [**List<SwapOperation>**](SwapOperation.md) | The data of the current page | | -|**next** | **String** | The cursor to fetch the next page of results, if absent or null, there are no additional results. | [optional] | - - - diff --git a/docs/SwapProvider.md b/docs/SwapProvider.md deleted file mode 100644 index 0c29917d..00000000 --- a/docs/SwapProvider.md +++ /dev/null @@ -1,19 +0,0 @@ - - -# SwapProvider - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **UUID** | The uuid that identifies the provider | | -|**name** | **String** | Name of the provider | | -|**protocols** | **List<SwapProviderProtocolsEnum>** | List of supported protocols. Protocols are specific per provider | | -|**category** | **ProviderCategoryEnum** | | | -|**isTermsApprovalRequired** | **Boolean** | Indicates whether the terms of service are required for the provider. if `true`, the user must approve the terms of service before using the provider. otherwise, `termsOfServiceUrl` and `isTermsOfServiceApproved` are not shown under the provider data. | | -|**termsOfServiceUrl** | **String** | URL to the terms of service | [optional] | -|**isTermsOfServiceApproved** | **Boolean** | Indicates whether the terms of service are approved by the user | [optional] | - - - diff --git a/docs/SwapProviderProtocolsEnum.md b/docs/SwapProviderProtocolsEnum.md deleted file mode 100644 index c856a278..00000000 --- a/docs/SwapProviderProtocolsEnum.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# SwapProviderProtocolsEnum - -## Enum - - -* `UNISWAP_CLASSIC` (value: `"UNISWAP_CLASSIC"`) - -* `UNISWAPX` (value: `"UNISWAPX"`) - -* `WRAP` (value: `"WRAP"`) - -* `UNWRAP` (value: `"UNWRAP"`) - - - diff --git a/docs/SwapProvidersPaginatedResponse.md b/docs/SwapProvidersPaginatedResponse.md deleted file mode 100644 index 7b28d369..00000000 --- a/docs/SwapProvidersPaginatedResponse.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# SwapProvidersPaginatedResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**data** | [**List<SwapProvider>**](SwapProvider.md) | The data of the current page | | -|**next** | **String** | The cursor to fetch the next page of results, if absent or null, there are no additional results. | [optional] | - - - diff --git a/docs/SwapRequiredAction.md b/docs/SwapRequiredAction.md deleted file mode 100644 index 4dbe597e..00000000 --- a/docs/SwapRequiredAction.md +++ /dev/null @@ -1,27 +0,0 @@ - - -# SwapRequiredAction - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | **SwapRequiredActionsEnum** | | | -|**status** | [**StatusEnum**](#StatusEnum) | The status of the required action | | -|**txId** | **String** | The transaction id of the required action | [optional] | - - - -## Enum: StatusEnum - -| Name | Value | -|---- | -----| -| WAITING | "WAITING" | -| PROCESSING | "PROCESSING" | -| COMPLETED | "COMPLETED" | -| FAILED | "FAILED" | -| CANCELED | "CANCELED" | - - - diff --git a/docs/TimeInForce.md b/docs/TimeInForce.md new file mode 100644 index 00000000..8a1208a3 --- /dev/null +++ b/docs/TimeInForce.md @@ -0,0 +1,11 @@ + + +# TimeInForce + +## Enum + + +* `FOK` (value: `"FOK"`) + + + diff --git a/docs/SwapBetaApi.md b/docs/TradingBetaApi.md similarity index 51% rename from docs/SwapBetaApi.md rename to docs/TradingBetaApi.md index 309aabcb..32e4f6dd 100644 --- a/docs/SwapBetaApi.md +++ b/docs/TradingBetaApi.md @@ -1,25 +1,24 @@ -# SwapBetaApi +# TradingBetaApi All URIs are relative to https://developers.fireblocks.com/reference/ | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**approveTermsOfService**](SwapBetaApi.md#approveTermsOfService) | **POST** /swap/providers/{providerId}/approve_terms | Approve terms of service | -| [**createQuote**](SwapBetaApi.md#createQuote) | **POST** /swap/providers/{providerId}/quote | Create a quote | -| [**createSwapOperation**](SwapBetaApi.md#createSwapOperation) | **POST** /swap/operations | Create swap operation | -| [**getSwapOperationById**](SwapBetaApi.md#getSwapOperationById) | **GET** /swap/operations/{operationId} | Get operation details | -| [**getSwapOperations**](SwapBetaApi.md#getSwapOperations) | **GET** /swap/operations | Get Operations list | -| [**getSwapProviders**](SwapBetaApi.md#getSwapProviders) | **GET** /swap/providers | Get Providers List | +| [**createOrder**](TradingBetaApi.md#createOrder) | **POST** /trading/orders | Create an order | +| [**createQuote**](TradingBetaApi.md#createQuote) | **POST** /trading/quotes | Create a quote | +| [**getOrder**](TradingBetaApi.md#getOrder) | **GET** /trading/orders/{orderId} | Get order details | +| [**getOrders**](TradingBetaApi.md#getOrders) | **GET** /trading/orders | Get orders | +| [**getTradingProviders**](TradingBetaApi.md#getTradingProviders) | **GET** /trading/providers | Get providers | -## approveTermsOfService +## createOrder -> CompletableFuture> approveTermsOfService approveTermsOfService(providerId, idempotencyKey) +> CompletableFuture> createOrder createOrder(createOrderRequest, idempotencyKey) -Approve terms of service +Create an order -Approve the terms of service for a swap provider. Some providers require this approval before performing a swap action for the first time. Note: These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Swap, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. +Create an order to buy or sell an asset. If no source is given, an external source will be use. Note: These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. ### Example @@ -32,7 +31,7 @@ import com.fireblocks.sdk.BasePath; import com.fireblocks.sdk.Fireblocks; import com.fireblocks.sdk.ConfigurationOptions; import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.SwapBetaApi; +import com.fireblocks.sdk.api.TradingBetaApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -44,22 +43,22 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - UUID providerId = UUID.randomUUID(); // UUID | + CreateOrderRequest createOrderRequest = new CreateOrderRequest(); // CreateOrderRequest | 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.swapBeta().approveTermsOfService(providerId, idempotencyKey); + CompletableFuture> response = fireblocks.tradingBeta().createOrder(createOrderRequest, 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 SwapBetaApi#approveTermsOfService"); + System.err.println("Exception when calling TradingBetaApi#createOrder"); 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 SwapBetaApi#approveTermsOfService"); + System.err.println("Exception when calling TradingBetaApi#createOrder"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -74,12 +73,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **providerId** | **UUID**| | | +| **createOrderRequest** | [**CreateOrderRequest**](CreateOrderRequest.md)| | | | **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> +CompletableFuture> ### Authorization @@ -88,110 +87,25 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successfully approve terms of service | - | -| **0** | Error Response | * X-Request-ID -
| +| **202** | Order creation response | - | +| **401** | Unauthorized. Missing / invalid JWT token in Authorization header. | - | +| **404** | Not found | - | +| **5XX** | Internal error. | - | ## createQuote -> CompletableFuture> createQuote createQuote(quoteRequest, providerId, idempotencyKey) +> CompletableFuture> createQuote createQuote(createQuote, idempotencyKey) Create a quote -Create a quote from specific swap provider. Note: These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Swap, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. - -### 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.SwapBetaApi; -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); - - QuoteRequest quoteRequest = new QuoteRequest(); // QuoteRequest | - UUID providerId = UUID.randomUUID(); // UUID | - 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.swapBeta().createQuote(quoteRequest, providerId, 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 SwapBetaApi#createQuote"); - 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 SwapBetaApi#createQuote"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **quoteRequest** | [**QuoteRequest**](QuoteRequest.md)| | | -| **providerId** | **UUID**| | | -| **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** | The response can be one of two possible DTOs, depending if the request contains the accountId property. | - | -| **0** | Error Response | * X-Request-ID -
| - - -## createSwapOperation - -> CompletableFuture> createSwapOperation createSwapOperation(swapOperationRequest, idempotencyKey) - -Create swap operation - -Create swap operation based on a provided quote Id Note: These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Swap, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. +Generate a time-limited quote for asset conversion, providing exchange rate and amount calculations. Note: These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. ### Example @@ -204,7 +118,7 @@ import com.fireblocks.sdk.BasePath; import com.fireblocks.sdk.Fireblocks; import com.fireblocks.sdk.ConfigurationOptions; import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.SwapBetaApi; +import com.fireblocks.sdk.api.TradingBetaApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -216,22 +130,22 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - SwapOperationRequest swapOperationRequest = new SwapOperationRequest(); // SwapOperationRequest | + CreateQuote createQuote = new CreateQuote(); // CreateQuote | 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.swapBeta().createSwapOperation(swapOperationRequest, idempotencyKey); + CompletableFuture> response = fireblocks.tradingBeta().createQuote(createQuote, 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 SwapBetaApi#createSwapOperation"); + System.err.println("Exception when calling TradingBetaApi#createQuote"); 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 SwapBetaApi#createSwapOperation"); + System.err.println("Exception when calling TradingBetaApi#createQuote"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -246,12 +160,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **swapOperationRequest** | [**SwapOperationRequest**](SwapOperationRequest.md)| | | +| **createQuote** | [**CreateQuote**](CreateQuote.md)| | | | **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> +CompletableFuture> ### Authorization @@ -266,17 +180,19 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | | - | -| **0** | Error Response | * X-Request-ID -
| +| **201** | Quote created | - | +| **401** | Unauthorized. Missing / invalid JWT token in Authorization header. | - | +| **404** | Not found | - | +| **5XX** | Internal error. | - | -## getSwapOperationById +## getOrder -> CompletableFuture> getSwapOperationById getSwapOperationById(operationId) +> CompletableFuture> getOrder getOrder(orderId) -Get operation details +Get order details -Get swap operation Details by ID. Note:These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Swap, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. +Retrieve detailed information about a specific order by its ID. Note:These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. ### Example @@ -289,7 +205,7 @@ import com.fireblocks.sdk.BasePath; import com.fireblocks.sdk.Fireblocks; import com.fireblocks.sdk.ConfigurationOptions; import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.SwapBetaApi; +import com.fireblocks.sdk.api.TradingBetaApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -301,21 +217,21 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - String operationId = "operationId_example"; // String | + String orderId = "orderId_example"; // String | The ID of the order to fetch. try { - CompletableFuture> response = fireblocks.swapBeta().getSwapOperationById(operationId); + CompletableFuture> response = fireblocks.tradingBeta().getOrder(orderId); 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 SwapBetaApi#getSwapOperationById"); + System.err.println("Exception when calling TradingBetaApi#getOrder"); 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 SwapBetaApi#getSwapOperationById"); + System.err.println("Exception when calling TradingBetaApi#getOrder"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -330,11 +246,11 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **operationId** | **String**| | | +| **orderId** | **String**| The ID of the order to fetch. | | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -349,17 +265,19 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | | - | -| **0** | Error Response | * X-Request-ID -
| +| **200** | Order response | - | +| **401** | Unauthorized. Missing / invalid JWT token in Authorization header. | - | +| **404** | Not found | - | +| **5XX** | Internal error. | - | -## getSwapOperations +## getOrders -> CompletableFuture> getSwapOperations getSwapOperations(pageCursor, pageSize) +> CompletableFuture> getOrders getOrders(pageSize, pageCursor, order, accountId, providerId, statuses, startTime, endTime, assetConversionType) -Get Operations list +Get orders -Return a list of swap operations for the specific workspace The operations are sorted by creation date in descending order, meaning the most recent operation appears first. Note:These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks TAP, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. +Retrieve a paginated list of orders with optional filtering by account, provider, status, and time range. Note:These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. ### Example @@ -372,7 +290,7 @@ import com.fireblocks.sdk.BasePath; import com.fireblocks.sdk.Fireblocks; import com.fireblocks.sdk.ConfigurationOptions; import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.SwapBetaApi; +import com.fireblocks.sdk.api.TradingBetaApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -384,22 +302,29 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - String pageCursor = "pageCursor_example"; // String | Cursor of the required page - BigDecimal pageSize = new BigDecimal("10"); // BigDecimal | Number of items in a page, Acceptable values are 1-100. Maximum value is 100 + Integer pageSize = 56; // Integer | pageSize for pagination. + String pageCursor = "pageCursor_example"; // String | + String order = "ASC"; // String | ASC / DESC ordering (default DESC) + List accountId = Arrays.asList(); // List | Filter by accountId. + List providerId = Arrays.asList(); // List | Filter by providerId. + List statuses = Arrays.asList(); // List | Filter by order status. + Integer startTime = 56; // Integer | + Integer endTime = 56; // Integer | + String assetConversionType = "DIGITAL_ONLY"; // String | try { - CompletableFuture> response = fireblocks.swapBeta().getSwapOperations(pageCursor, pageSize); + CompletableFuture> response = fireblocks.tradingBeta().getOrders(pageSize, pageCursor, order, accountId, providerId, statuses, startTime, endTime, assetConversionType); 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 SwapBetaApi#getSwapOperations"); + System.err.println("Exception when calling TradingBetaApi#getOrders"); 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 SwapBetaApi#getSwapOperations"); + System.err.println("Exception when calling TradingBetaApi#getOrders"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -414,12 +339,19 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **pageCursor** | **String**| Cursor of the required page | [optional] | -| **pageSize** | **BigDecimal**| Number of items in a page, Acceptable values are 1-100. Maximum value is 100 | [optional] [default to 10] | +| **pageSize** | **Integer**| pageSize for pagination. | | +| **pageCursor** | **String**| | [optional] | +| **order** | **String**| ASC / DESC ordering (default DESC) | [optional] [default to DESC] [enum: ASC, DESC] | +| **accountId** | [**List<String>**](String.md)| Filter by accountId. | [optional] | +| **providerId** | [**List<String>**](String.md)| Filter by providerId. | [optional] | +| **statuses** | [**List<OrderStatus>**](OrderStatus.md)| Filter by order status. | [optional] | +| **startTime** | **Integer**| | [optional] | +| **endTime** | **Integer**| | [optional] | +| **assetConversionType** | **String**| | [optional] [enum: DIGITAL_ONLY, FIAT] | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -434,17 +366,19 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | A paginated response containing OperationDto objects | - | -| **0** | Error Response | * X-Request-ID -
| +| **200** | Orders response | - | +| **401** | Unauthorized. Missing / invalid JWT token in Authorization header. | - | +| **404** | Not found | - | +| **5XX** | Internal error. | - | -## getSwapProviders +## getTradingProviders -> CompletableFuture> getSwapProviders getSwapProviders(pageCursor, pageSize) +> CompletableFuture> getTradingProviders getTradingProviders(pageSize, pageCursor) -Get Providers List +Get providers -Return a list of all supported swap providers. Note: These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Swap, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. +Retrieve a list of all available external providers supporting trading activities through the platform. Note: These endpoints are currently in beta and might be subject to changes. If you want to participate and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. ### Example @@ -457,7 +391,7 @@ import com.fireblocks.sdk.BasePath; import com.fireblocks.sdk.Fireblocks; import com.fireblocks.sdk.ConfigurationOptions; import com.fireblocks.sdk.model.*; -import com.fireblocks.sdk.api.SwapBetaApi; +import com.fireblocks.sdk.api.TradingBetaApi; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; @@ -469,22 +403,22 @@ public class Example { .secretKey("my-secret-key"); Fireblocks fireblocks = new Fireblocks(configurationOptions); - String pageCursor = "pageCursor_example"; // String | Cursor of the required page - BigDecimal pageSize = new BigDecimal("10"); // BigDecimal | Number of items in a page, Acceptable values are 1-100. Maximum value is 100 + Integer pageSize = 20; // Integer | Page size for pagination. + String pageCursor = "pageCursor_example"; // String | Page cursor for pagination. try { - CompletableFuture> response = fireblocks.swapBeta().getSwapProviders(pageCursor, pageSize); + CompletableFuture> response = fireblocks.tradingBeta().getTradingProviders(pageSize, pageCursor); 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 SwapBetaApi#getSwapProviders"); + System.err.println("Exception when calling TradingBetaApi#getTradingProviders"); 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 SwapBetaApi#getSwapProviders"); + System.err.println("Exception when calling TradingBetaApi#getTradingProviders"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -499,12 +433,12 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **pageCursor** | **String**| Cursor of the required page | [optional] | -| **pageSize** | **BigDecimal**| Number of items in a page, Acceptable values are 1-100. Maximum value is 100 | [optional] [default to 10] | +| **pageSize** | **Integer**| Page size for pagination. | [optional] [default to 20] | +| **pageCursor** | **String**| Page cursor for pagination. | [optional] | ### Return type -CompletableFuture> +CompletableFuture> ### Authorization @@ -519,6 +453,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | A paginated response containing ProviderDto objects | - | -| **0** | Error Response | * X-Request-ID -
| +| **200** | Providers response | - | +| **401** | Unauthorized. Missing / invalid JWT token in Authorization header. | - | +| **5XX** | Internal error. | - | diff --git a/docs/TradingErrorResponse.md b/docs/TradingErrorResponse.md new file mode 100644 index 00000000..b1a83e94 --- /dev/null +++ b/docs/TradingErrorResponse.md @@ -0,0 +1,13 @@ + + +# TradingErrorResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**error** | [**TradingErrorResponseError**](TradingErrorResponseError.md) | | | + + + diff --git a/docs/TradingErrorResponseError.md b/docs/TradingErrorResponseError.md new file mode 100644 index 00000000..6b1c3382 --- /dev/null +++ b/docs/TradingErrorResponseError.md @@ -0,0 +1,29 @@ + + +# TradingErrorResponseError + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**type** | [**TypeEnum**](#TypeEnum) | | | +|**message** | **String** | | | +|**errorCode** | **ErrorCodes** | | [optional] | + + + +## Enum: TypeEnum + +| Name | Value | +|---- | -----| +| INTERNAL | "INTERNAL" | +| AUTHENTICATION | "AUTHENTICATION" | +| AUTHORIZATION | "AUTHORIZATION" | +| VALIDATION | "VALIDATION" | +| NOT_FOUND | "NOT_FOUND" | +| UNPROCESSABLE_ENTITY | "UNPROCESSABLE_ENTITY" | +| FORBIDDEN | "FORBIDDEN" | + + + diff --git a/docs/TradingProvider.md b/docs/TradingProvider.md new file mode 100644 index 00000000..8560be90 --- /dev/null +++ b/docs/TradingProvider.md @@ -0,0 +1,37 @@ + + +# TradingProvider + +## oneOf schemas +* [AccountBasedAccessProvider](AccountBasedAccessProvider.md) +* [DirectAccessProvider](DirectAccessProvider.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.TradingProvider; +import com.fireblocks.sdk.model.AccountBasedAccessProvider; +import com.fireblocks.sdk.model.DirectAccessProvider; + +public class Example { + public static void main(String[] args) { + TradingProvider exampleTradingProvider = new TradingProvider(); + + // create a new AccountBasedAccessProvider + AccountBasedAccessProvider exampleAccountBasedAccessProvider = new AccountBasedAccessProvider(); + // set TradingProvider to AccountBasedAccessProvider + exampleTradingProvider.setActualInstance(exampleAccountBasedAccessProvider); + // to get back the AccountBasedAccessProvider set earlier + AccountBasedAccessProvider testAccountBasedAccessProvider = (AccountBasedAccessProvider) exampleTradingProvider.getActualInstance(); + + // create a new DirectAccessProvider + DirectAccessProvider exampleDirectAccessProvider = new DirectAccessProvider(); + // set TradingProvider to DirectAccessProvider + exampleTradingProvider.setActualInstance(exampleDirectAccessProvider); + // to get back the DirectAccessProvider set earlier + DirectAccessProvider testDirectAccessProvider = (DirectAccessProvider) exampleTradingProvider.getActualInstance(); + } +} +``` + + diff --git a/docs/TransferRail.md b/docs/TransferRail.md new file mode 100644 index 00000000..ab512e1a --- /dev/null +++ b/docs/TransferRail.md @@ -0,0 +1,33 @@ + + +# TransferRail + +## Enum + + +* `BLOCKCHAIN` (value: `"BLOCKCHAIN"`) + +* `INTERNAL` (value: `"INTERNAL"`) + +* `PEER` (value: `"PEER"`) + +* `SWIFT` (value: `"SWIFT"`) + +* `IBAN` (value: `"IBAN"`) + +* `US_WIRE` (value: `"US_WIRE"`) + +* `ACH` (value: `"ACH"`) + +* `SEPA` (value: `"SEPA"`) + +* `SPEI` (value: `"SPEI"`) + +* `PIX` (value: `"PIX"`) + +* `LOCAL_BANK_TRANSFER_AFRICA` (value: `"LOCAL_BANK_TRANSFER_AFRICA"`) + +* `MOBILE_MONEY` (value: `"MOBILE_MONEY"`) + + + diff --git a/docs/TransferReceipt.md b/docs/TransferReceipt.md new file mode 100644 index 00000000..c9f977e0 --- /dev/null +++ b/docs/TransferReceipt.md @@ -0,0 +1,37 @@ + + +# TransferReceipt + +## oneOf schemas +* [BlockchainTransfer](BlockchainTransfer.md) +* [FiatTransfer](FiatTransfer.md) + +## Example +```java +// Import classes: +import com.fireblocks.sdk.model.TransferReceipt; +import com.fireblocks.sdk.model.BlockchainTransfer; +import com.fireblocks.sdk.model.FiatTransfer; + +public class Example { + public static void main(String[] args) { + TransferReceipt exampleTransferReceipt = new TransferReceipt(); + + // create a new BlockchainTransfer + BlockchainTransfer exampleBlockchainTransfer = new BlockchainTransfer(); + // set TransferReceipt to BlockchainTransfer + exampleTransferReceipt.setActualInstance(exampleBlockchainTransfer); + // to get back the BlockchainTransfer set earlier + BlockchainTransfer testBlockchainTransfer = (BlockchainTransfer) exampleTransferReceipt.getActualInstance(); + + // create a new FiatTransfer + FiatTransfer exampleFiatTransfer = new FiatTransfer(); + // set TransferReceipt to FiatTransfer + exampleTransferReceipt.setActualInstance(exampleFiatTransfer); + // to get back the FiatTransfer set earlier + FiatTransfer testFiatTransfer = (FiatTransfer) exampleTransferReceipt.getActualInstance(); + } +} +``` + + diff --git a/docs/WalletQuoteResponse.md b/docs/WalletQuoteResponse.md deleted file mode 100644 index e4f1e9b5..00000000 --- a/docs/WalletQuoteResponse.md +++ /dev/null @@ -1,25 +0,0 @@ - - -# WalletQuoteResponse - -Return a quote with id that can be used for swap operation. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**protocol** | **SwapProviderProtocolsEnum** | | | -|**inputAmount** | **String** | The amount of tokens the swapper will provide | | -|**inputAsset** | **String** | The id of the asset the swapper will provide | | -|**slippageTolerance** | **BigDecimal** | The slippage tolerance is a percentage. The slippage tolerance is the maximum amount the price can change between the time the transaction is submitted and the time it is executed | | -|**outputMinAmount** | **String** | The minimum amount of tokens the swapper will receive | | -|**outputMaxAmount** | **String** | Maximum amount of tokens that the swapper will receive | | -|**outputAsset** | **String** | The id of the asset the swapper will receive | | -|**additionalData** | [**ProviderAdditionalData**](ProviderAdditionalData.md) | | | -|**providerQuoteId** | **UUID** | An identifier that uniquely identifies the received quote | | -|**expiredAt** | **OffsetDateTime** | When was the received `providerQuoteId` is expired (ISO Date time). | | -|**requiredActions** | **List<SwapRequiredActionsEnum>** | The required actions for completing a swap operation | | -|**estimatedFees** | [**QuoteFee**](QuoteFee.md) | | | - - - diff --git a/docs/WebhooksV2Api.md b/docs/WebhooksV2Api.md index 52c562b9..8f222c1e 100644 --- a/docs/WebhooksV2Api.md +++ b/docs/WebhooksV2Api.md @@ -725,7 +725,7 @@ No authorization required Resend failed notifications -Resend all failed notifications for a webhook in the last 24 hours Endpoint Permission: Owner, Admin, Non-Signing Admin. +Resend all failed notifications for a webhook in the last 24 hours Endpoint Permission: Owner, Admin, Non-Signing Admin, Editor, Signer. ### Example @@ -813,7 +813,7 @@ No authorization required Resend notification by id -Resend notification by ID Endpoint Permission: Owner, Admin, Non-Signing Admin. +Resend notification by ID Endpoint Permission: Owner, Admin, Non-Signing Admin, Editor, Signer. ### Example @@ -899,7 +899,7 @@ No authorization required Resend notifications by resource Id -Resend notifications by resource Id Endpoint Permission: Owner, Admin, Non-Signing Admin. +Resend notifications by resource Id Endpoint Permission: Owner, Admin, Non-Signing Admin, Editor, Signer. ### Example diff --git a/pom.xml b/pom.xml index 7e85c1b5..89176ce6 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fireblocks-sdk jar fireblocks-sdk - 12.0.0 + 0.0.0 https://github.com/fireblocks/java-sdk The Fireblocks Official SDK is a comprehensive software development kit that enables seamless integration and interaction with the Fireblocks platform. Fireblocks is a cutting-edge blockchain infrastructure platform that provides secure and scalable solutions for managing digital assets and transactions. This SDK empowers developers to build robust applications that can interact with the Fireblocks platform's features, including creating and managing vault accounts, initiating secure transactions, managing assets, and more. It abstracts complex interactions with the Fireblocks API, making it easier for developers to leverage the platform's capabilities while adhering to best practices in security and efficiency. diff --git a/src/main/java/com/fireblocks/sdk/Configuration.java b/src/main/java/com/fireblocks/sdk/Configuration.java index 5a888eaf..19e09ed9 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 = "12.0.0"; + public static final String VERSION = "0.0.0"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/src/main/java/com/fireblocks/sdk/Fireblocks.java b/src/main/java/com/fireblocks/sdk/Fireblocks.java index 372e4646..3ea0433f 100644 --- a/src/main/java/com/fireblocks/sdk/Fireblocks.java +++ b/src/main/java/com/fireblocks/sdk/Fireblocks.java @@ -42,6 +42,7 @@ public class Fireblocks { private BlockchainsAssetsApi blockchainsAssets; private ComplianceApi compliance; private ComplianceScreeningConfigurationApi complianceScreeningConfiguration; + private ConnectedAccountsBetaApi connectedAccountsBeta; private ConsoleUserApi consoleUser; private ContractInteractionsApi contractInteractions; private ContractTemplatesApi contractTemplates; @@ -67,9 +68,9 @@ public class Fireblocks { private ResetDeviceApi resetDevice; private SmartTransferApi smartTransfer; private StakingApi staking; - private SwapBetaApi swapBeta; private TagsApi tags; private TokenizationApi tokenization; + private TradingBetaApi tradingBeta; private TransactionsApi transactions; private TravelRuleApi travelRule; private UserGroupsBetaApi userGroupsBeta; @@ -261,6 +262,13 @@ public ComplianceScreeningConfigurationApi complianceScreeningConfiguration() { return complianceScreeningConfiguration; } + public ConnectedAccountsBetaApi connectedAccountsBeta() { + if (connectedAccountsBeta == null) { + connectedAccountsBeta = new ConnectedAccountsBetaApi(apiClient); + } + return connectedAccountsBeta; + } + public ConsoleUserApi consoleUser() { if (consoleUser == null) { consoleUser = new ConsoleUserApi(apiClient); @@ -436,13 +444,6 @@ public StakingApi staking() { return staking; } - public SwapBetaApi swapBeta() { - if (swapBeta == null) { - swapBeta = new SwapBetaApi(apiClient); - } - return swapBeta; - } - public TagsApi tags() { if (tags == null) { tags = new TagsApi(apiClient); @@ -457,6 +458,13 @@ public TokenizationApi tokenization() { return tokenization; } + public TradingBetaApi tradingBeta() { + if (tradingBeta == null) { + tradingBeta = new TradingBetaApi(apiClient); + } + return tradingBeta; + } + public TransactionsApi transactions() { if (transactions == null) { transactions = new TransactionsApi(apiClient); diff --git a/src/main/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApi.java b/src/main/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApi.java new file mode 100644 index 00000000..d237e8c4 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApi.java @@ -0,0 +1,518 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.Pair; +import com.fireblocks.sdk.ValidationUtils; +import com.fireblocks.sdk.model.ConnectedAccountBalancesResponse; +import com.fireblocks.sdk.model.ConnectedAccountRateResponse; +import com.fireblocks.sdk.model.ConnectedAccountTradingPairsResponse; +import com.fireblocks.sdk.model.ConnectedAccountsResponse; +import com.fireblocks.sdk.model.ConnectedSingleAccountResponse; +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.StringJoiner; +import java.util.concurrent.CompletableFuture; +import java.util.function.Consumer; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ConnectedAccountsBetaApi { + 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 ConnectedAccountsBetaApi() { + this(new ApiClient()); + } + + public ConnectedAccountsBetaApi(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 connected account Retrieve detailed information about a specific connected account by ID. + * </br> **Note**: - This endpoint is currently in beta and might be subject to changes. + * + * @param accountId The ID of the account to fetch. (required) + * @return CompletableFuture<ApiResponse<ConnectedSingleAccountResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getConnectedAccount( + String accountId) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getConnectedAccountRequestBuilder(accountId); + 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( + "getConnectedAccount", 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< + ConnectedSingleAccountResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getConnectedAccountRequestBuilder(String accountId) + throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("getConnectedAccount", "accountId", accountId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/connected_accounts/{accountId}" + .replace("{accountId}", ApiClient.urlEncode(accountId.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Get balances for an account Retrieve current asset balances for a specific connected account + * as a flat list (one row per assetId, balanceType) </br> **Note**: - This endpoint is + * currently in beta and might be subject to changes. + * + * @param accountId The ID of the account to fetch balances for. (required) + * @param pageSize Page size for pagination. (optional) + * @param pageCursor Page cursor for pagination. (optional) + * @return CompletableFuture<ApiResponse<ConnectedAccountBalancesResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> + getConnectedAccountBalances(String accountId, Integer pageSize, String pageCursor) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getConnectedAccountBalancesRequestBuilder(accountId, pageSize, pageCursor); + 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( + "getConnectedAccountBalances", + 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< + ConnectedAccountBalancesResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getConnectedAccountBalancesRequestBuilder( + String accountId, Integer pageSize, String pageCursor) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "getConnectedAccountBalances", "accountId", accountId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/connected_accounts/{accountId}/balances" + .replace("{accountId}", ApiClient.urlEncode(accountId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Get exchange rates for an account Retrieve current exchange rates for converting between + * specific assets in a connected account. + * + * @param accountId The ID of the account to fetch rates for. (required) + * @param baseAssetId The ID of the asset to fetch rates for. (required) + * @param quoteAssetId The ID of the asset to get the rates nominally. (required) + * @return CompletableFuture<ApiResponse<ConnectedAccountRateResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getConnectedAccountRates( + String accountId, String baseAssetId, String quoteAssetId) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getConnectedAccountRatesRequestBuilder(accountId, baseAssetId, quoteAssetId); + 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( + "getConnectedAccountRates", 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< + ConnectedAccountRateResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getConnectedAccountRatesRequestBuilder( + String accountId, String baseAssetId, String quoteAssetId) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "getConnectedAccountRates", "accountId", accountId); + ValidationUtils.assertParamExistsAndNotEmpty( + "getConnectedAccountRates", "baseAssetId", baseAssetId); + ValidationUtils.assertParamExistsAndNotEmpty( + "getConnectedAccountRates", "quoteAssetId", quoteAssetId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/connected_accounts/{accountId}/rates" + .replace("{accountId}", ApiClient.urlEncode(accountId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "baseAssetId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("baseAssetId", baseAssetId)); + localVarQueryParameterBaseName = "quoteAssetId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("quoteAssetId", quoteAssetId)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Get supported trading pairs for an account Retrieve all asset trading pairs supported by a + * specific connected account, including the pair type (quote, market, onOffRamp). + * + * @param accountId The ID of the account to fetch supported pairs for. (required) + * @param pageSize Page size for pagination. (optional, default to 100) + * @param pageCursor Page cursor for pagination. (optional) + * @return CompletableFuture<ApiResponse<ConnectedAccountTradingPairsResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> + getConnectedAccountTradingPairs(String accountId, Integer pageSize, String pageCursor) + throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getConnectedAccountTradingPairsRequestBuilder(accountId, pageSize, pageCursor); + 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( + "getConnectedAccountTradingPairs", + 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< + ConnectedAccountTradingPairsResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getConnectedAccountTradingPairsRequestBuilder( + String accountId, Integer pageSize, String pageCursor) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty( + "getConnectedAccountTradingPairs", "accountId", accountId); + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = + "/connected_accounts/{accountId}/manifest/capabilities/trading/pairs" + .replace("{accountId}", ApiClient.urlEncode(accountId.toString())); + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Get connected accounts Returns all connected accounts </br> **Note**: - This endpoint + * is currently in beta and might be subject to changes. + * + * @param mainAccounts Whether to include only main accounts in the response. (optional, default + * to false) + * @param pageSize Page size for pagination. (optional) + * @param pageCursor Page cursor for pagination. (optional) + * @return CompletableFuture<ApiResponse<ConnectedAccountsResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> getConnectedAccounts( + Boolean mainAccounts, Integer pageSize, String pageCursor) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = + getConnectedAccountsRequestBuilder(mainAccounts, pageSize, pageCursor); + 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( + "getConnectedAccounts", 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< + ConnectedAccountsResponse>() {}))); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder getConnectedAccountsRequestBuilder( + Boolean mainAccounts, Integer pageSize, String pageCursor) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/connected_accounts"; + + List localVarQueryParams = new ArrayList<>(); + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + localVarQueryParameterBaseName = "mainAccounts"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("mainAccounts", mainAccounts)); + localVarQueryParameterBaseName = "pageSize"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + + if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + if (localVarQueryStringJoiner.length() != 0) { + queryJoiner.add(localVarQueryStringJoiner.toString()); + } + localVarRequestBuilder.uri( + URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/src/main/java/com/fireblocks/sdk/api/SwapBetaApi.java b/src/main/java/com/fireblocks/sdk/api/TradingBetaApi.java similarity index 62% rename from src/main/java/com/fireblocks/sdk/api/SwapBetaApi.java rename to src/main/java/com/fireblocks/sdk/api/TradingBetaApi.java index 198c9c35..a1a23ca2 100644 --- a/src/main/java/com/fireblocks/sdk/api/SwapBetaApi.java +++ b/src/main/java/com/fireblocks/sdk/api/TradingBetaApi.java @@ -20,16 +20,15 @@ import com.fireblocks.sdk.ApiResponse; import com.fireblocks.sdk.Pair; import com.fireblocks.sdk.ValidationUtils; -import com.fireblocks.sdk.model.QuoteRequest; -import com.fireblocks.sdk.model.QuoteResponse; -import com.fireblocks.sdk.model.SwapOperation; -import com.fireblocks.sdk.model.SwapOperationRequest; -import com.fireblocks.sdk.model.SwapOperationsPaginatedResponse; -import com.fireblocks.sdk.model.SwapProvider; -import com.fireblocks.sdk.model.SwapProvidersPaginatedResponse; +import com.fireblocks.sdk.model.CreateOrderRequest; +import com.fireblocks.sdk.model.CreateQuote; +import com.fireblocks.sdk.model.GetOrdersResponse; +import com.fireblocks.sdk.model.OrderDetails; +import com.fireblocks.sdk.model.OrderStatus; +import com.fireblocks.sdk.model.ProvidersListResponse; +import com.fireblocks.sdk.model.QuotesResponse; import java.io.IOException; import java.io.InputStream; -import java.math.BigDecimal; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; @@ -38,14 +37,13 @@ import java.util.ArrayList; import java.util.List; import java.util.StringJoiner; -import java.util.UUID; 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 SwapBetaApi { +public class TradingBetaApi { private final HttpClient memberVarHttpClient; private final ObjectMapper memberVarObjectMapper; private final String memberVarBaseUri; @@ -54,11 +52,11 @@ public class SwapBetaApi { private final Consumer> memberVarResponseInterceptor; private final Consumer> memberVarAsyncResponseInterceptor; - public SwapBetaApi() { + public TradingBetaApi() { this(new ApiClient()); } - public SwapBetaApi(ApiClient apiClient) { + public TradingBetaApi(ApiClient apiClient) { memberVarHttpClient = apiClient.getHttpClient(); memberVarObjectMapper = apiClient.getObjectMapper(); memberVarBaseUri = apiClient.getBaseUri(); @@ -83,105 +81,24 @@ private String formatExceptionMessage(String operationId, int statusCode, String } /** - * Approve terms of service Approve the terms of service for a swap provider. Some providers - * require this approval before performing a swap action for the first time. Note: These - * endpoints are currently in beta and might be subject to changes. If you want to participate - * and learn more about the Fireblocks Swap, please contact your Fireblocks Customer Success - * Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, - * Non-Signing Admin, Signer, Editor. - * - * @param providerId (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<SwapProvider>> - * @throws ApiException if fails to make API call - */ - public CompletableFuture> approveTermsOfService( - UUID providerId, String idempotencyKey) throws ApiException { - try { - HttpRequest.Builder localVarRequestBuilder = - approveTermsOfServiceRequestBuilder(providerId, 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( - "approveTermsOfService", 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< - SwapProvider>() {}))); - } catch (IOException e) { - return CompletableFuture.failedFuture(new ApiException(e)); - } - }); - } catch (ApiException e) { - return CompletableFuture.failedFuture(e); - } - } - - private HttpRequest.Builder approveTermsOfServiceRequestBuilder( - UUID providerId, String idempotencyKey) throws ApiException { - ValidationUtils.assertParamExistsAndNotEmpty( - "approveTermsOfService", "providerId", providerId.toString()); - - HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - - String localVarPath = - "/swap/providers/{providerId}/approve_terms" - .replace("{providerId}", ApiClient.urlEncode(providerId.toString())); - - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - - if (idempotencyKey != null) { - localVarRequestBuilder.header("Idempotency-Key", idempotencyKey.toString()); - } - localVarRequestBuilder.header("Accept", "application/json"); - - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.noBody()); - if (memberVarReadTimeout != null) { - localVarRequestBuilder.timeout(memberVarReadTimeout); - } - if (memberVarInterceptor != null) { - memberVarInterceptor.accept(localVarRequestBuilder); - } - return localVarRequestBuilder; - } - /** - * Create a quote Create a quote from specific swap provider. Note: These endpoints are - * currently in beta and might be subject to changes. If you want to participate and learn more - * about the Fireblocks Swap, please contact your Fireblocks Customer Success Manager or send an - * email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, - * Approver, Editor, Viewer. + * Create an order Create an order to buy or sell an asset. If no source is given, an external + * source will be use. Note: These endpoints are currently in beta and might be subject to + * changes. If you want to participate and learn more about the Fireblocks Trading, please + * contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. + * Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. * - * @param quoteRequest (required) - * @param providerId (required) + * @param createOrderRequest (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<QuoteResponse>> + * @return CompletableFuture<ApiResponse<OrderDetails>> * @throws ApiException if fails to make API call */ - public CompletableFuture> createQuote( - QuoteRequest quoteRequest, UUID providerId, String idempotencyKey) throws ApiException { + public CompletableFuture> createOrder( + CreateOrderRequest createOrderRequest, String idempotencyKey) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = - createQuoteRequestBuilder(quoteRequest, providerId, idempotencyKey); + createOrderRequestBuilder(createOrderRequest, idempotencyKey); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -191,12 +108,12 @@ public CompletableFuture> createQuote( } if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( - getApiException("createQuote", localVarResponse)); + getApiException("createOrder", localVarResponse)); } try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -204,7 +121,7 @@ public CompletableFuture> createQuote( : memberVarObjectMapper.readValue( responseBody, new TypeReference< - QuoteResponse>() {}))); + OrderDetails>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -214,17 +131,13 @@ public CompletableFuture> createQuote( } } - private HttpRequest.Builder createQuoteRequestBuilder( - QuoteRequest quoteRequest, UUID providerId, String idempotencyKey) throws ApiException { - ValidationUtils.assertParamExists("createQuote", "quoteRequest", quoteRequest); - ValidationUtils.assertParamExistsAndNotEmpty( - "createQuote", "providerId", providerId.toString()); + private HttpRequest.Builder createOrderRequestBuilder( + CreateOrderRequest createOrderRequest, String idempotencyKey) throws ApiException { + ValidationUtils.assertParamExists("createOrder", "createOrderRequest", createOrderRequest); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = - "/swap/providers/{providerId}/quote" - .replace("{providerId}", ApiClient.urlEncode(providerId.toString())); + String localVarPath = "/trading/orders"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -235,7 +148,7 @@ private HttpRequest.Builder createQuoteRequestBuilder( localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(quoteRequest); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createOrderRequest); localVarRequestBuilder.method( "POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { @@ -250,24 +163,24 @@ private HttpRequest.Builder createQuoteRequestBuilder( return localVarRequestBuilder; } /** - * Create swap operation Create swap operation based on a provided quote Id Note: These - * endpoints are currently in beta and might be subject to changes. If you want to participate - * and learn more about the Fireblocks Swap, please contact your Fireblocks Customer Success - * Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, - * Non-Signing Admin, Signer, Editor. + * Create a quote Generate a time-limited quote for asset conversion, providing exchange rate + * and amount calculations. Note: These endpoints are currently in beta and might be subject to + * changes. If you want to participate and learn more about the Fireblocks Trading, please + * contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. + * Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. * - * @param swapOperationRequest (required) + * @param createQuote (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<SwapOperation>> + * @return CompletableFuture<ApiResponse<QuotesResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> createSwapOperation( - SwapOperationRequest swapOperationRequest, String idempotencyKey) throws ApiException { + public CompletableFuture> createQuote( + CreateQuote createQuote, String idempotencyKey) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = - createSwapOperationRequestBuilder(swapOperationRequest, idempotencyKey); + createQuoteRequestBuilder(createQuote, idempotencyKey); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -277,13 +190,12 @@ public CompletableFuture> createSwapOperation( } if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( - getApiException( - "createSwapOperation", localVarResponse)); + getApiException("createQuote", localVarResponse)); } try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -291,7 +203,7 @@ public CompletableFuture> createSwapOperation( : memberVarObjectMapper.readValue( responseBody, new TypeReference< - SwapOperation>() {}))); + QuotesResponse>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -301,14 +213,13 @@ public CompletableFuture> createSwapOperation( } } - private HttpRequest.Builder createSwapOperationRequestBuilder( - SwapOperationRequest swapOperationRequest, String idempotencyKey) throws ApiException { - ValidationUtils.assertParamExists( - "createSwapOperation", "swapOperationRequest", swapOperationRequest); + private HttpRequest.Builder createQuoteRequestBuilder( + CreateQuote createQuote, String idempotencyKey) throws ApiException { + ValidationUtils.assertParamExists("createQuote", "createQuote", createQuote); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/swap/operations"; + String localVarPath = "/trading/quotes"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -319,7 +230,7 @@ private HttpRequest.Builder createSwapOperationRequestBuilder( localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(swapOperationRequest); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(createQuote); localVarRequestBuilder.method( "POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { @@ -334,21 +245,20 @@ private HttpRequest.Builder createSwapOperationRequestBuilder( return localVarRequestBuilder; } /** - * Get operation details Get swap operation Details by ID. Note:These endpoints are currently in - * beta and might be subject to changes. If you want to participate and learn more about the - * Fireblocks Swap, please contact your Fireblocks Customer Success Manager or send an email - * to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, - * Approver, Editor, Viewer. + * Get order details Retrieve detailed information about a specific order by its ID. Note:These + * endpoints are currently in beta and might be subject to changes. If you want to participate + * and learn more about the Fireblocks Trading, please contact your Fireblocks Customer Success + * Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, + * Non-Signing Admin, Signer, Approver, Editor, Viewer. * - * @param operationId (required) - * @return CompletableFuture<ApiResponse<SwapOperation>> + * @param orderId The ID of the order to fetch. (required) + * @return CompletableFuture<ApiResponse<OrderDetails>> * @throws ApiException if fails to make API call */ - public CompletableFuture> getSwapOperationById(String operationId) + public CompletableFuture> getOrder(String orderId) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = - getSwapOperationByIdRequestBuilder(operationId); + HttpRequest.Builder localVarRequestBuilder = getOrderRequestBuilder(orderId); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -358,13 +268,12 @@ public CompletableFuture> getSwapOperationById(String } if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( - getApiException( - "getSwapOperationById", localVarResponse)); + getApiException("getOrder", localVarResponse)); } try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -372,7 +281,7 @@ public CompletableFuture> getSwapOperationById(String : memberVarObjectMapper.readValue( responseBody, new TypeReference< - SwapOperation>() {}))); + OrderDetails>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -382,16 +291,14 @@ public CompletableFuture> getSwapOperationById(String } } - private HttpRequest.Builder getSwapOperationByIdRequestBuilder(String operationId) - throws ApiException { - ValidationUtils.assertParamExistsAndNotEmpty( - "getSwapOperationById", "operationId", operationId); + private HttpRequest.Builder getOrderRequestBuilder(String orderId) throws ApiException { + ValidationUtils.assertParamExistsAndNotEmpty("getOrder", "orderId", orderId); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); String localVarPath = - "/swap/operations/{operationId}" - .replace("{operationId}", ApiClient.urlEncode(operationId.toString())); + "/trading/orders/{orderId}" + .replace("{orderId}", ApiClient.urlEncode(orderId.toString())); localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); @@ -407,24 +314,47 @@ private HttpRequest.Builder getSwapOperationByIdRequestBuilder(String operationI return localVarRequestBuilder; } /** - * Get Operations list Return a list of swap operations for the specific workspace The - * operations are sorted by creation date in descending order, meaning the most recent operation - * appears first. Note:These endpoints are currently in beta and might be subject to changes. If - * you want to participate and learn more about the Fireblocks TAP, please contact your - * Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint - * Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * Get orders Retrieve a paginated list of orders with optional filtering by account, provider, + * status, and time range. Note:These endpoints are currently in beta and might be subject to + * changes. If you want to participate and learn more about the Fireblocks Trading, please + * contact your Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. + * Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. * - * @param pageCursor Cursor of the required page (optional) - * @param pageSize Number of items in a page, Acceptable values are 1-100. Maximum value is 100 - * (optional, default to 10) - * @return CompletableFuture<ApiResponse<SwapOperationsPaginatedResponse>> + * @param pageSize pageSize for pagination. (required) + * @param pageCursor (optional) + * @param order ASC / DESC ordering (default DESC) (optional, default to DESC) + * @param accountId Filter by accountId. (optional + * @param providerId Filter by providerId. (optional + * @param statuses Filter by order status. (optional + * @param startTime (optional) + * @param endTime (optional) + * @param assetConversionType (optional) + * @return CompletableFuture<ApiResponse<GetOrdersResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> getSwapOperations( - String pageCursor, BigDecimal pageSize) throws ApiException { + public CompletableFuture> getOrders( + Integer pageSize, + String pageCursor, + String order, + List accountId, + List providerId, + List statuses, + Integer startTime, + Integer endTime, + String assetConversionType) + throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = - getSwapOperationsRequestBuilder(pageCursor, pageSize); + getOrdersRequestBuilder( + pageSize, + pageCursor, + order, + accountId, + providerId, + statuses, + startTime, + endTime, + assetConversionType); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -434,12 +364,12 @@ public CompletableFuture> getSwapOp } if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( - getApiException("getSwapOperations", localVarResponse)); + getApiException("getOrders", localVarResponse)); } try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -447,7 +377,7 @@ public CompletableFuture> getSwapOp : memberVarObjectMapper.readValue( responseBody, new TypeReference< - SwapOperationsPaginatedResponse>() {}))); + GetOrdersResponse>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -457,20 +387,45 @@ public CompletableFuture> getSwapOp } } - private HttpRequest.Builder getSwapOperationsRequestBuilder( - String pageCursor, BigDecimal pageSize) throws ApiException { + private HttpRequest.Builder getOrdersRequestBuilder( + Integer pageSize, + String pageCursor, + String order, + List accountId, + List providerId, + List statuses, + Integer startTime, + Integer endTime, + String assetConversionType) + throws ApiException { + ValidationUtils.assertParamExists("getOrders", "pageSize", pageSize); HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/swap/operations"; + String localVarPath = "/trading/orders"; List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "pageCursor"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); localVarQueryParameterBaseName = "pageSize"; localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); + localVarQueryParameterBaseName = "order"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("order", order)); + localVarQueryParameterBaseName = "accountId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "accountId", accountId)); + localVarQueryParameterBaseName = "providerId"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "providerId", providerId)); + localVarQueryParameterBaseName = "statuses"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "statuses", statuses)); + localVarQueryParameterBaseName = "startTime"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("startTime", startTime)); + localVarQueryParameterBaseName = "endTime"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("endTime", endTime)); + localVarQueryParameterBaseName = "assetConversionType"; + localVarQueryParams.addAll( + ApiClient.parameterToPairs("assetConversionType", assetConversionType)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); @@ -496,23 +451,23 @@ private HttpRequest.Builder getSwapOperationsRequestBuilder( return localVarRequestBuilder; } /** - * Get Providers List Return a list of all supported swap providers. Note: These endpoints are - * currently in beta and might be subject to changes. If you want to participate and learn more - * about the Fireblocks Swap, please contact your Fireblocks Customer Success Manager or send an - * email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, - * Approver, Editor, Viewer. + * Get providers Retrieve a list of all available external providers supporting trading + * activities through the platform. Note: These endpoints are currently in beta and might be + * subject to changes. If you want to participate and learn more about the Fireblocks Trading, + * please contact your Fireblocks Customer Success Manager or send an email to + * CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, + * Editor, Viewer. * - * @param pageCursor Cursor of the required page (optional) - * @param pageSize Number of items in a page, Acceptable values are 1-100. Maximum value is 100 - * (optional, default to 10) - * @return CompletableFuture<ApiResponse<SwapProvidersPaginatedResponse>> + * @param pageSize Page size for pagination. (optional, default to 20) + * @param pageCursor Page cursor for pagination. (optional) + * @return CompletableFuture<ApiResponse<ProvidersListResponse>> * @throws ApiException if fails to make API call */ - public CompletableFuture> getSwapProviders( - String pageCursor, BigDecimal pageSize) throws ApiException { + public CompletableFuture> getTradingProviders( + Integer pageSize, String pageCursor) throws ApiException { try { HttpRequest.Builder localVarRequestBuilder = - getSwapProvidersRequestBuilder(pageCursor, pageSize); + getTradingProvidersRequestBuilder(pageSize, pageCursor); return memberVarHttpClient .sendAsync(localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()) .thenComposeAsync( @@ -522,12 +477,13 @@ public CompletableFuture> getSwapPro } if (localVarResponse.statusCode() / 100 != 2) { return CompletableFuture.failedFuture( - getApiException("getSwapProviders", localVarResponse)); + getApiException( + "getTradingProviders", localVarResponse)); } try { String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - new ApiResponse( + new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.isBlank() @@ -535,7 +491,7 @@ public CompletableFuture> getSwapPro : memberVarObjectMapper.readValue( responseBody, new TypeReference< - SwapProvidersPaginatedResponse>() {}))); + ProvidersListResponse>() {}))); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); } @@ -545,20 +501,20 @@ public CompletableFuture> getSwapPro } } - private HttpRequest.Builder getSwapProvidersRequestBuilder( - String pageCursor, BigDecimal pageSize) throws ApiException { + private HttpRequest.Builder getTradingProvidersRequestBuilder( + Integer pageSize, String pageCursor) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/swap/providers"; + String localVarPath = "/trading/providers"; List localVarQueryParams = new ArrayList<>(); StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); String localVarQueryParameterBaseName; - localVarQueryParameterBaseName = "pageCursor"; - localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); localVarQueryParameterBaseName = "pageSize"; localVarQueryParams.addAll(ApiClient.parameterToPairs("pageSize", pageSize)); + localVarQueryParameterBaseName = "pageCursor"; + localVarQueryParams.addAll(ApiClient.parameterToPairs("pageCursor", pageCursor)); if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) { StringJoiner queryJoiner = new StringJoiner("&"); diff --git a/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java b/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java index 897b6768..0c007e40 100644 --- a/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java +++ b/src/main/java/com/fireblocks/sdk/api/WebhooksV2Api.java @@ -789,7 +789,7 @@ private HttpRequest.Builder getWebhooksRequestBuilder( } /** * Resend failed notifications Resend all failed notifications for a webhook in the last 24 - * hours Endpoint Permission: Owner, Admin, Non-Signing Admin. + * hours Endpoint Permission: Owner, Admin, Non-Signing Admin, Editor, Signer. * * @param resendFailedNotificationsRequest (required) * @param webhookId The ID of the webhook (required) @@ -886,7 +886,7 @@ private HttpRequest.Builder resendFailedNotificationsRequestBuilder( } /** * Resend notification by id Resend notification by ID Endpoint Permission: Owner, Admin, - * Non-Signing Admin. + * Non-Signing Admin, Editor, Signer. * * @param webhookId The ID of the webhook (required) * @param notificationId The ID of the notification (required) @@ -957,7 +957,7 @@ private HttpRequest.Builder resendNotificationByIdRequestBuilder( } /** * Resend notifications by resource Id Resend notifications by resource Id Endpoint Permission: - * Owner, Admin, Non-Signing Admin. + * Owner, Admin, Non-Signing Admin, Editor, Signer. * * @param resendNotificationsByResourceIdRequest (required) * @param webhookId The ID of the webhook (required) diff --git a/src/main/java/com/fireblocks/sdk/model/AccessType.java b/src/main/java/com/fireblocks/sdk/model/AccessType.java new file mode 100644 index 00000000..3e20aa97 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AccessType.java @@ -0,0 +1,323 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.fireblocks.sdk.JSON; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.StringJoiner; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +@JsonDeserialize(using = AccessType.AccessTypeDeserializer.class) +@JsonSerialize(using = AccessType.AccessTypeSerializer.class) +public class AccessType extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(AccessType.class.getName()); + + public static class AccessTypeSerializer extends StdSerializer { + public AccessTypeSerializer(Class t) { + super(t); + } + + public AccessTypeSerializer() { + this(null); + } + + @Override + public void serialize(AccessType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class AccessTypeDeserializer extends StdDeserializer { + public AccessTypeDeserializer() { + this(AccessType.class); + } + + public AccessTypeDeserializer(Class vc) { + super(vc); + } + + @Override + public AccessType deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize AccountAccess + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AccountAccess.class.equals(Integer.class) + || AccountAccess.class.equals(Long.class) + || AccountAccess.class.equals(Float.class) + || AccountAccess.class.equals(Double.class) + || AccountAccess.class.equals(Boolean.class) + || AccountAccess.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((AccountAccess.class.equals(Integer.class) + || AccountAccess.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((AccountAccess.class.equals(Float.class) + || AccountAccess.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (AccountAccess.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (AccountAccess.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(AccountAccess.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 'AccountAccess'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AccountAccess'", e); + } + + // deserialize DirectAccess + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DirectAccess.class.equals(Integer.class) + || DirectAccess.class.equals(Long.class) + || DirectAccess.class.equals(Float.class) + || DirectAccess.class.equals(Double.class) + || DirectAccess.class.equals(Boolean.class) + || DirectAccess.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((DirectAccess.class.equals(Integer.class) + || DirectAccess.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((DirectAccess.class.equals(Float.class) + || DirectAccess.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (DirectAccess.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (DirectAccess.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(DirectAccess.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 'DirectAccess'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'DirectAccess'", e); + } + + if (match == 1) { + AccessType ret = new AccessType(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for AccessType: %d classes match result," + + " expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public AccessType getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "AccessType cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public AccessType() { + super("oneOf", Boolean.FALSE); + } + + public AccessType(AccountAccess o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public AccessType(DirectAccess o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("AccountAccess", AccountAccess.class); + schemas.put("DirectAccess", DirectAccess.class); + JSON.registerDescendants(AccessType.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("PROVIDER", DirectAccess.class); + mappings.put("PROVIDER_ACCOUNT", AccountAccess.class); + mappings.put("AccountAccess", AccountAccess.class); + mappings.put("DirectAccess", DirectAccess.class); + mappings.put("AccessType", AccessType.class); + JSON.registerDiscriminator(AccessType.class, "type", mappings); + } + + @Override + public Map> getSchemas() { + return AccessType.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: AccountAccess, DirectAccess + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be + * a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(AccountAccess.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(DirectAccess.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be AccountAccess, DirectAccess"); + } + + /** + * Get the actual instance, which can be the following: AccountAccess, DirectAccess + * + * @return The actual instance (AccountAccess, DirectAccess) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AccountAccess`. If the actual instance is not `AccountAccess`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `AccountAccess` + * @throws ClassCastException if the instance is not `AccountAccess` + */ + public AccountAccess getAccountAccess() throws ClassCastException { + return (AccountAccess) super.getActualInstance(); + } + + /** + * Get the actual instance of `DirectAccess`. If the actual instance is not `DirectAccess`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `DirectAccess` + * @throws ClassCastException if the instance is not `DirectAccess` + */ + public DirectAccess getDirectAccess() throws ClassCastException { + return (DirectAccess) super.getActualInstance(); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof AccountAccess) { + if (getActualInstance() != null) { + joiner.add( + ((AccountAccess) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof DirectAccess) { + if (getActualInstance() != null) { + joiner.add( + ((DirectAccess) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AccountAccess.java b/src/main/java/com/fireblocks/sdk/model/AccountAccess.java new file mode 100644 index 00000000..1611e981 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AccountAccess.java @@ -0,0 +1,260 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** AccountAccess */ +@JsonPropertyOrder({ + AccountAccess.JSON_PROPERTY_TYPE, + AccountAccess.JSON_PROPERTY_PROVIDER_ID, + AccountAccess.JSON_PROPERTY_ACCOUNT_ID +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class AccountAccess { + /** Indicates this uses account-based access */ + public enum TypeEnum { + PROVIDER_ACCOUNT(String.valueOf("PROVIDER_ACCOUNT")); + + 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_PROVIDER_ID = "providerId"; + @jakarta.annotation.Nullable private String providerId; + + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + @jakarta.annotation.Nonnull private String accountId; + + public AccountAccess() {} + + @JsonCreator + public AccountAccess( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_ID, required = true) String accountId) { + this.type = type; + this.accountId = accountId; + } + + public AccountAccess type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Indicates this uses account-based access + * + * @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 AccountAccess providerId(@jakarta.annotation.Nullable String providerId) { + this.providerId = providerId; + return this; + } + + /** + * The ID of the provider + * + * @return providerId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProviderId() { + return providerId; + } + + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProviderId(@jakarta.annotation.Nullable String providerId) { + this.providerId = providerId; + } + + public AccountAccess accountId(@jakarta.annotation.Nonnull String accountId) { + this.accountId = accountId; + return this; + } + + /** + * The ID of the account + * + * @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 AccountAccess object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountAccess accountAccess = (AccountAccess) o; + return Objects.equals(this.type, accountAccess.type) + && Objects.equals(this.providerId, accountAccess.providerId) + && Objects.equals(this.accountId, accountAccess.accountId); + } + + @Override + public int hashCode() { + return Objects.hash(type, providerId, accountId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountAccess {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" providerId: ").append(toIndentedString(providerId)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `providerId` to the URL query string + if (getProviderId() != null) { + joiner.add( + String.format( + "%sproviderId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getProviderId())))); + } + + // 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/AccountBase.java b/src/main/java/com/fireblocks/sdk/model/AccountBase.java new file mode 100644 index 00000000..d16ee78e --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AccountBase.java @@ -0,0 +1,184 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** AccountBase */ +@JsonPropertyOrder({AccountBase.JSON_PROPERTY_ID, AccountBase.JSON_PROPERTY_NAME}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class AccountBase { + 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 AccountBase() {} + + @JsonCreator + public AccountBase( + @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 AccountBase id(@jakarta.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * The ID of the account + * + * @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 AccountBase name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The name of the account + * + * @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 AccountBase object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountBase accountBase = (AccountBase) o; + return Objects.equals(this.id, accountBase.id) + && Objects.equals(this.name, accountBase.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountBase {\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/main/java/com/fireblocks/sdk/model/AccountBasedAccessProvider.java b/src/main/java/com/fireblocks/sdk/model/AccountBasedAccessProvider.java new file mode 100644 index 00000000..92cc22a9 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AccountBasedAccessProvider.java @@ -0,0 +1,409 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** AccountBasedAccessProvider */ +@JsonPropertyOrder({ + AccountBasedAccessProvider.JSON_PROPERTY_ID, + AccountBasedAccessProvider.JSON_PROPERTY_NAME, + AccountBasedAccessProvider.JSON_PROPERTY_LOGO, + AccountBasedAccessProvider.JSON_PROPERTY_ACCOUNT_BASED, + AccountBasedAccessProvider.JSON_PROPERTY_MANIFEST, + AccountBasedAccessProvider.JSON_PROPERTY_CONNECTED, + AccountBasedAccessProvider.JSON_PROPERTY_ACCOUNTS +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class AccountBasedAccessProvider { + 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 static final String JSON_PROPERTY_LOGO = "logo"; + @jakarta.annotation.Nullable private String logo; + + public static final String JSON_PROPERTY_ACCOUNT_BASED = "accountBased"; + @jakarta.annotation.Nonnull private Boolean accountBased; + + public static final String JSON_PROPERTY_MANIFEST = "manifest"; + @jakarta.annotation.Nonnull private Manifest manifest; + + public static final String JSON_PROPERTY_CONNECTED = "connected"; + @jakarta.annotation.Nonnull private Boolean connected; + + public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; + @jakarta.annotation.Nullable private List accounts = new ArrayList<>(); + + public AccountBasedAccessProvider() {} + + @JsonCreator + public AccountBasedAccessProvider( + @JsonProperty(value = JSON_PROPERTY_ID, required = true) String id, + @JsonProperty(value = JSON_PROPERTY_NAME, required = true) String name, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_BASED, required = true) + Boolean accountBased, + @JsonProperty(value = JSON_PROPERTY_MANIFEST, required = true) Manifest manifest, + @JsonProperty(value = JSON_PROPERTY_CONNECTED, required = true) Boolean connected) { + this.id = id; + this.name = name; + this.accountBased = accountBased; + this.manifest = manifest; + this.connected = connected; + } + + public AccountBasedAccessProvider id(@jakarta.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique identifier for the provider + * + * @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 AccountBasedAccessProvider name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Display name of the provider + * + * @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; + } + + public AccountBasedAccessProvider logo(@jakarta.annotation.Nullable String logo) { + this.logo = logo; + return this; + } + + /** + * URL to the logo image of the provider + * + * @return logo + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLogo() { + return logo; + } + + @JsonProperty(JSON_PROPERTY_LOGO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLogo(@jakarta.annotation.Nullable String logo) { + this.logo = logo; + } + + public AccountBasedAccessProvider accountBased( + @jakarta.annotation.Nonnull Boolean accountBased) { + this.accountBased = accountBased; + return this; + } + + /** + * Indicates whether the provider access model is through accounts or directly + * + * @return accountBased + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_BASED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getAccountBased() { + return accountBased; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_BASED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountBased(@jakarta.annotation.Nonnull Boolean accountBased) { + this.accountBased = accountBased; + } + + public AccountBasedAccessProvider manifest(@jakarta.annotation.Nonnull Manifest manifest) { + this.manifest = manifest; + return this; + } + + /** + * Get manifest + * + * @return manifest + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MANIFEST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Manifest getManifest() { + return manifest; + } + + @JsonProperty(JSON_PROPERTY_MANIFEST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setManifest(@jakarta.annotation.Nonnull Manifest manifest) { + this.manifest = manifest; + } + + public AccountBasedAccessProvider connected(@jakarta.annotation.Nonnull Boolean connected) { + this.connected = connected; + return this; + } + + /** + * Whether the provider is currently connected + * + * @return connected + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CONNECTED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getConnected() { + return connected; + } + + @JsonProperty(JSON_PROPERTY_CONNECTED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setConnected(@jakarta.annotation.Nonnull Boolean connected) { + this.connected = connected; + } + + public AccountBasedAccessProvider accounts( + @jakarta.annotation.Nullable List accounts) { + this.accounts = accounts; + return this; + } + + public AccountBasedAccessProvider addAccountsItem(AccountBase accountsItem) { + if (this.accounts == null) { + this.accounts = new ArrayList<>(); + } + this.accounts.add(accountsItem); + return this; + } + + /** + * Get accounts + * + * @return accounts + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAccounts() { + return accounts; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccounts(@jakarta.annotation.Nullable List accounts) { + this.accounts = accounts; + } + + /** Return true if this AccountBasedAccessProvider object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountBasedAccessProvider accountBasedAccessProvider = (AccountBasedAccessProvider) o; + return Objects.equals(this.id, accountBasedAccessProvider.id) + && Objects.equals(this.name, accountBasedAccessProvider.name) + && Objects.equals(this.logo, accountBasedAccessProvider.logo) + && Objects.equals(this.accountBased, accountBasedAccessProvider.accountBased) + && Objects.equals(this.manifest, accountBasedAccessProvider.manifest) + && Objects.equals(this.connected, accountBasedAccessProvider.connected) + && Objects.equals(this.accounts, accountBasedAccessProvider.accounts); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, logo, accountBased, manifest, connected, accounts); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountBasedAccessProvider {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" logo: ").append(toIndentedString(logo)).append("\n"); + sb.append(" accountBased: ").append(toIndentedString(accountBased)).append("\n"); + sb.append(" manifest: ").append(toIndentedString(manifest)).append("\n"); + sb.append(" connected: ").append(toIndentedString(connected)).append("\n"); + sb.append(" accounts: ").append(toIndentedString(accounts)).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())))); + } + + // add `logo` to the URL query string + if (getLogo() != null) { + joiner.add( + String.format( + "%slogo%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getLogo())))); + } + + // add `accountBased` to the URL query string + if (getAccountBased() != null) { + joiner.add( + String.format( + "%saccountBased%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAccountBased())))); + } + + // add `manifest` to the URL query string + if (getManifest() != null) { + joiner.add(getManifest().toUrlQueryString(prefix + "manifest" + suffix)); + } + + // add `connected` to the URL query string + if (getConnected() != null) { + joiner.add( + String.format( + "%sconnected%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getConnected())))); + } + + // add `accounts` to the URL query string + if (getAccounts() != null) { + for (int i = 0; i < getAccounts().size(); i++) { + if (getAccounts().get(i) != null) { + joiner.add( + getAccounts() + .get(i) + .toUrlQueryString( + String.format( + "%saccounts%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AccountHolderDetails.java b/src/main/java/com/fireblocks/sdk/model/AccountHolderDetails.java new file mode 100644 index 00000000..82f8d48d --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AccountHolderDetails.java @@ -0,0 +1,343 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** AccountHolderDetails */ +@JsonPropertyOrder({ + AccountHolderDetails.JSON_PROPERTY_NAME, + AccountHolderDetails.JSON_PROPERTY_CITY, + AccountHolderDetails.JSON_PROPERTY_COUNTRY, + AccountHolderDetails.JSON_PROPERTY_SUBDIVISION, + AccountHolderDetails.JSON_PROPERTY_ADDRESS, + AccountHolderDetails.JSON_PROPERTY_POSTAL_CODE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class AccountHolderDetails { + public static final String JSON_PROPERTY_NAME = "name"; + @jakarta.annotation.Nonnull private String name; + + public static final String JSON_PROPERTY_CITY = "city"; + @jakarta.annotation.Nullable private String city; + + public static final String JSON_PROPERTY_COUNTRY = "country"; + @jakarta.annotation.Nullable private String country; + + public static final String JSON_PROPERTY_SUBDIVISION = "subdivision"; + @jakarta.annotation.Nullable private String subdivision; + + public static final String JSON_PROPERTY_ADDRESS = "address"; + @jakarta.annotation.Nullable private String address; + + public static final String JSON_PROPERTY_POSTAL_CODE = "postalCode"; + @jakarta.annotation.Nullable private String postalCode; + + public AccountHolderDetails() {} + + @JsonCreator + public AccountHolderDetails( + @JsonProperty(value = JSON_PROPERTY_NAME, required = true) String name) { + this.name = name; + } + + public AccountHolderDetails name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Full name of the account holder. + * + * @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; + } + + public AccountHolderDetails city(@jakarta.annotation.Nullable String city) { + this.city = city; + return this; + } + + /** + * Get city + * + * @return city + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCity() { + return city; + } + + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCity(@jakarta.annotation.Nullable String city) { + this.city = city; + } + + public AccountHolderDetails country(@jakarta.annotation.Nullable String country) { + this.country = country; + return this; + } + + /** + * Country code, as specified in ISO 3166-1 alpha-2. + * + * @return country + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCountry() { + return country; + } + + @JsonProperty(JSON_PROPERTY_COUNTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCountry(@jakarta.annotation.Nullable String country) { + this.country = country; + } + + public AccountHolderDetails subdivision(@jakarta.annotation.Nullable String subdivision) { + this.subdivision = subdivision; + return this; + } + + /** + * Country administrative subdivision, as specified in ISO 3166-2. + * + * @return subdivision + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBDIVISION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSubdivision() { + return subdivision; + } + + @JsonProperty(JSON_PROPERTY_SUBDIVISION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubdivision(@jakarta.annotation.Nullable String subdivision) { + this.subdivision = subdivision; + } + + public AccountHolderDetails address(@jakarta.annotation.Nullable String address) { + this.address = address; + return this; + } + + /** + * Account holder street address. + * + * @return address + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAddress() { + return address; + } + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAddress(@jakarta.annotation.Nullable String address) { + this.address = address; + } + + public AccountHolderDetails postalCode(@jakarta.annotation.Nullable String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * Get postalCode + * + * @return postalCode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPostalCode() { + return postalCode; + } + + @JsonProperty(JSON_PROPERTY_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPostalCode(@jakarta.annotation.Nullable String postalCode) { + this.postalCode = postalCode; + } + + /** Return true if this AccountHolderDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountHolderDetails accountHolderDetails = (AccountHolderDetails) o; + return Objects.equals(this.name, accountHolderDetails.name) + && Objects.equals(this.city, accountHolderDetails.city) + && Objects.equals(this.country, accountHolderDetails.country) + && Objects.equals(this.subdivision, accountHolderDetails.subdivision) + && Objects.equals(this.address, accountHolderDetails.address) + && Objects.equals(this.postalCode, accountHolderDetails.postalCode); + } + + @Override + public int hashCode() { + return Objects.hash(name, city, country, subdivision, address, postalCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountHolderDetails {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" subdivision: ").append(toIndentedString(subdivision)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).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 `name` to the URL query string + if (getName() != null) { + joiner.add( + String.format( + "%sname%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getName())))); + } + + // add `city` to the URL query string + if (getCity() != null) { + joiner.add( + String.format( + "%scity%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCity())))); + } + + // 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 `subdivision` to the URL query string + if (getSubdivision() != null) { + joiner.add( + String.format( + "%ssubdivision%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSubdivision())))); + } + + // add `address` to the URL query string + if (getAddress() != null) { + joiner.add( + String.format( + "%saddress%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAddress())))); + } + + // add `postalCode` to the URL query string + if (getPostalCode() != null) { + joiner.add( + String.format( + "%spostalCode%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getPostalCode())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AccountProviderID.java b/src/main/java/com/fireblocks/sdk/model/AccountProviderID.java new file mode 100644 index 00000000..d340e593 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AccountProviderID.java @@ -0,0 +1,189 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** AccountProviderID */ +@JsonPropertyOrder({ + AccountProviderID.JSON_PROPERTY_PROVIDER_ID, + AccountProviderID.JSON_PROPERTY_ACCOUNT_ID +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class AccountProviderID { + public static final String JSON_PROPERTY_PROVIDER_ID = "providerId"; + @jakarta.annotation.Nonnull private String providerId; + + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + @jakarta.annotation.Nonnull private String accountId; + + public AccountProviderID() {} + + @JsonCreator + public AccountProviderID( + @JsonProperty(value = JSON_PROPERTY_PROVIDER_ID, required = true) String providerId, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_ID, required = true) String accountId) { + this.providerId = providerId; + this.accountId = accountId; + } + + public AccountProviderID providerId(@jakarta.annotation.Nonnull String providerId) { + this.providerId = providerId; + return this; + } + + /** + * The ID of the provider associated with the account. + * + * @return providerId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProviderId() { + return providerId; + } + + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProviderId(@jakarta.annotation.Nonnull String providerId) { + this.providerId = providerId; + } + + public AccountProviderID accountId(@jakarta.annotation.Nonnull String accountId) { + this.accountId = accountId; + return this; + } + + /** + * The ID of the account associated with the provider. + * + * @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 AccountProviderID object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AccountProviderID accountProviderID = (AccountProviderID) o; + return Objects.equals(this.providerId, accountProviderID.providerId) + && Objects.equals(this.accountId, accountProviderID.accountId); + } + + @Override + public int hashCode() { + return Objects.hash(providerId, accountId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AccountProviderID {\n"); + sb.append(" providerId: ").append(toIndentedString(providerId)).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 `providerId` to the URL query string + if (getProviderId() != null) { + joiner.add( + String.format( + "%sproviderId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getProviderId())))); + } + + // 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/AccountReference.java b/src/main/java/com/fireblocks/sdk/model/AccountReference.java new file mode 100644 index 00000000..d43facba --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AccountReference.java @@ -0,0 +1,337 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.fireblocks.sdk.JSON; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.StringJoiner; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +@JsonDeserialize(using = AccountReference.AccountReferenceDeserializer.class) +@JsonSerialize(using = AccountReference.AccountReferenceSerializer.class) +public class AccountReference extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(AccountReference.class.getName()); + + public static class AccountReferenceSerializer extends StdSerializer { + public AccountReferenceSerializer(Class t) { + super(t); + } + + public AccountReferenceSerializer() { + this(null); + } + + @Override + public void serialize( + AccountReference value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class AccountReferenceDeserializer extends StdDeserializer { + public AccountReferenceDeserializer() { + this(AccountReference.class); + } + + public AccountReferenceDeserializer(Class vc) { + super(vc); + } + + @Override + public AccountReference deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize InternalReference + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (InternalReference.class.equals(Integer.class) + || InternalReference.class.equals(Long.class) + || InternalReference.class.equals(Float.class) + || InternalReference.class.equals(Double.class) + || InternalReference.class.equals(Boolean.class) + || InternalReference.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((InternalReference.class.equals(Integer.class) + || InternalReference.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((InternalReference.class.equals(Float.class) + || InternalReference.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (InternalReference.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (InternalReference.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(InternalReference.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 'InternalReference'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'InternalReference'", e); + } + + // deserialize OneTimeAddressReference + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (OneTimeAddressReference.class.equals(Integer.class) + || OneTimeAddressReference.class.equals(Long.class) + || OneTimeAddressReference.class.equals(Float.class) + || OneTimeAddressReference.class.equals(Double.class) + || OneTimeAddressReference.class.equals(Boolean.class) + || OneTimeAddressReference.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((OneTimeAddressReference.class.equals(Integer.class) + || OneTimeAddressReference.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((OneTimeAddressReference.class.equals(Float.class) + || OneTimeAddressReference.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (OneTimeAddressReference.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (OneTimeAddressReference.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(OneTimeAddressReference.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 'OneTimeAddressReference'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'OneTimeAddressReference'", + e); + } + + if (match == 1) { + AccountReference ret = new AccountReference(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for AccountReference: %d classes match result," + + " expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public AccountReference getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "AccountReference cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public AccountReference() { + super("oneOf", Boolean.FALSE); + } + + public AccountReference(InternalReference o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public AccountReference(OneTimeAddressReference o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("InternalReference", InternalReference.class); + schemas.put("OneTimeAddressReference", OneTimeAddressReference.class); + JSON.registerDescendants(AccountReference.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("EXCHANGE_ACCOUNT", InternalReference.class); + mappings.put("EXTERNAL_WALLET", InternalReference.class); + mappings.put("FIAT_ACCOUNT", InternalReference.class); + mappings.put("INTERNAL_WALLET", InternalReference.class); + mappings.put("ONE_TIME_ADDRESS", OneTimeAddressReference.class); + mappings.put("VAULT_ACCOUNT", InternalReference.class); + mappings.put("InternalReference", InternalReference.class); + mappings.put("OneTimeAddressReference", OneTimeAddressReference.class); + mappings.put("AccountReference", AccountReference.class); + JSON.registerDiscriminator(AccountReference.class, "type", mappings); + } + + @Override + public Map> getSchemas() { + return AccountReference.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: InternalReference, OneTimeAddressReference + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be + * a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(InternalReference.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(OneTimeAddressReference.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be InternalReference, OneTimeAddressReference"); + } + + /** + * Get the actual instance, which can be the following: InternalReference, + * OneTimeAddressReference + * + * @return The actual instance (InternalReference, OneTimeAddressReference) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `InternalReference`. If the actual instance is not + * `InternalReference`, the ClassCastException will be thrown. + * + * @return The actual instance of `InternalReference` + * @throws ClassCastException if the instance is not `InternalReference` + */ + public InternalReference getInternalReference() throws ClassCastException { + return (InternalReference) super.getActualInstance(); + } + + /** + * Get the actual instance of `OneTimeAddressReference`. If the actual instance is not + * `OneTimeAddressReference`, the ClassCastException will be thrown. + * + * @return The actual instance of `OneTimeAddressReference` + * @throws ClassCastException if the instance is not `OneTimeAddressReference` + */ + public OneTimeAddressReference getOneTimeAddressReference() throws ClassCastException { + return (OneTimeAddressReference) super.getActualInstance(); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof InternalReference) { + if (getActualInstance() != null) { + joiner.add( + ((InternalReference) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof OneTimeAddressReference) { + if (getActualInstance() != null) { + joiner.add( + ((OneTimeAddressReference) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/AssetDetailsMetadata.java b/src/main/java/com/fireblocks/sdk/model/AssetDetailsMetadata.java index 09b82eb8..e1a1311c 100644 --- a/src/main/java/com/fireblocks/sdk/model/AssetDetailsMetadata.java +++ b/src/main/java/com/fireblocks/sdk/model/AssetDetailsMetadata.java @@ -31,7 +31,8 @@ AssetDetailsMetadata.JSON_PROPERTY_DEPRECATION_REFERRAL_ID, AssetDetailsMetadata.JSON_PROPERTY_WEBSITE, AssetDetailsMetadata.JSON_PROPERTY_MEDIA, - AssetDetailsMetadata.JSON_PROPERTY_NOTE + AssetDetailsMetadata.JSON_PROPERTY_NOTE, + AssetDetailsMetadata.JSON_PROPERTY_FEATURES }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -58,6 +59,9 @@ public class AssetDetailsMetadata { public static final String JSON_PROPERTY_NOTE = "note"; @jakarta.annotation.Nullable private AssetNote note; + public static final String JSON_PROPERTY_FEATURES = "features"; + @jakarta.annotation.Nullable private List features = new ArrayList<>(); + public AssetDetailsMetadata() {} @JsonCreator @@ -241,6 +245,37 @@ public void setNote(@jakarta.annotation.Nullable AssetNote note) { this.note = note; } + public AssetDetailsMetadata features(@jakarta.annotation.Nullable List features) { + this.features = features; + return this; + } + + public AssetDetailsMetadata addFeaturesItem(AssetFeature featuresItem) { + if (this.features == null) { + this.features = new ArrayList<>(); + } + this.features.add(featuresItem); + return this; + } + + /** + * Asset features + * + * @return features + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEATURES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFeatures() { + return features; + } + + @JsonProperty(JSON_PROPERTY_FEATURES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFeatures(@jakarta.annotation.Nullable List features) { + this.features = features; + } + /** Return true if this AssetDetailsMetadata object is equal to o. */ @Override public boolean equals(Object o) { @@ -258,13 +293,14 @@ public boolean equals(Object o) { this.deprecationReferralId, assetDetailsMetadata.deprecationReferralId) && Objects.equals(this.website, assetDetailsMetadata.website) && Objects.equals(this.media, assetDetailsMetadata.media) - && Objects.equals(this.note, assetDetailsMetadata.note); + && Objects.equals(this.note, assetDetailsMetadata.note) + && Objects.equals(this.features, assetDetailsMetadata.features); } @Override public int hashCode() { return Objects.hash( - scope, verified, deprecated, deprecationReferralId, website, media, note); + scope, verified, deprecated, deprecationReferralId, website, media, note, features); } @Override @@ -280,6 +316,7 @@ public String toString() { sb.append(" website: ").append(toIndentedString(website)).append("\n"); sb.append(" media: ").append(toIndentedString(media)).append("\n"); sb.append(" note: ").append(toIndentedString(note)).append("\n"); + sb.append(" features: ").append(toIndentedString(features)).append("\n"); sb.append("}"); return sb.toString(); } @@ -406,6 +443,25 @@ public String toUrlQueryString(String prefix) { joiner.add(getNote().toUrlQueryString(prefix + "note" + suffix)); } + // add `features` to the URL query string + if (getFeatures() != null) { + for (int i = 0; i < getFeatures().size(); i++) { + if (getFeatures().get(i) != null) { + joiner.add( + String.format( + "%sfeatures%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode( + ApiClient.valueToString(getFeatures().get(i))))); + } + } + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/AssetFeature.java b/src/main/java/com/fireblocks/sdk/model/AssetFeature.java new file mode 100644 index 00000000..ac789633 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/AssetFeature.java @@ -0,0 +1,62 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Asset feature */ +public enum AssetFeature { + STABLECOIN("STABLECOIN"); + + private String value; + + AssetFeature(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AssetFeature fromValue(String value) { + for (AssetFeature b : AssetFeature.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/BaseProvider.java b/src/main/java/com/fireblocks/sdk/model/BaseProvider.java new file mode 100644 index 00000000..13511bdb --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/BaseProvider.java @@ -0,0 +1,268 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** BaseProvider */ +@JsonPropertyOrder({ + BaseProvider.JSON_PROPERTY_ID, + BaseProvider.JSON_PROPERTY_NAME, + BaseProvider.JSON_PROPERTY_LOGO, + BaseProvider.JSON_PROPERTY_ACCOUNT_BASED +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class BaseProvider { + 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 static final String JSON_PROPERTY_LOGO = "logo"; + @jakarta.annotation.Nullable private String logo; + + public static final String JSON_PROPERTY_ACCOUNT_BASED = "accountBased"; + @jakarta.annotation.Nonnull private Boolean accountBased; + + public BaseProvider() {} + + @JsonCreator + public BaseProvider( + @JsonProperty(value = JSON_PROPERTY_ID, required = true) String id, + @JsonProperty(value = JSON_PROPERTY_NAME, required = true) String name, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_BASED, required = true) + Boolean accountBased) { + this.id = id; + this.name = name; + this.accountBased = accountBased; + } + + public BaseProvider id(@jakarta.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique identifier for the provider + * + * @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 BaseProvider name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Display name of the provider + * + * @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; + } + + public BaseProvider logo(@jakarta.annotation.Nullable String logo) { + this.logo = logo; + return this; + } + + /** + * URL to the logo image of the provider + * + * @return logo + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLogo() { + return logo; + } + + @JsonProperty(JSON_PROPERTY_LOGO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLogo(@jakarta.annotation.Nullable String logo) { + this.logo = logo; + } + + public BaseProvider accountBased(@jakarta.annotation.Nonnull Boolean accountBased) { + this.accountBased = accountBased; + return this; + } + + /** + * Indicates whether the provider access model is through accounts or directly + * + * @return accountBased + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_BASED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getAccountBased() { + return accountBased; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_BASED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountBased(@jakarta.annotation.Nonnull Boolean accountBased) { + this.accountBased = accountBased; + } + + /** Return true if this BaseProvider object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BaseProvider baseProvider = (BaseProvider) o; + return Objects.equals(this.id, baseProvider.id) + && Objects.equals(this.name, baseProvider.name) + && Objects.equals(this.logo, baseProvider.logo) + && Objects.equals(this.accountBased, baseProvider.accountBased); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, logo, accountBased); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BaseProvider {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" logo: ").append(toIndentedString(logo)).append("\n"); + sb.append(" accountBased: ").append(toIndentedString(accountBased)).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())))); + } + + // add `logo` to the URL query string + if (getLogo() != null) { + joiner.add( + String.format( + "%slogo%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getLogo())))); + } + + // add `accountBased` to the URL query string + if (getAccountBased() != null) { + joiner.add( + String.format( + "%saccountBased%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAccountBased())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SwapOperationRequest.java b/src/main/java/com/fireblocks/sdk/model/BlockchainTransfer.java similarity index 52% rename from src/main/java/com/fireblocks/sdk/model/SwapOperationRequest.java rename to src/main/java/com/fireblocks/sdk/model/BlockchainTransfer.java index c2ec0779..e408f50b 100644 --- a/src/main/java/com/fireblocks/sdk/model/SwapOperationRequest.java +++ b/src/main/java/com/fireblocks/sdk/model/BlockchainTransfer.java @@ -21,32 +21,24 @@ import com.fireblocks.sdk.ApiClient; import java.util.Objects; import java.util.StringJoiner; -import java.util.UUID; -/** SwapOperationRequest */ +/** BlockchainTransfer */ @JsonPropertyOrder({ - SwapOperationRequest.JSON_PROPERTY_PROVIDER_QUOTE_ID, - SwapOperationRequest.JSON_PROPERTY_FEE_LEVEL, - SwapOperationRequest.JSON_PROPERTY_TX_NOTE + BlockchainTransfer.JSON_PROPERTY_TYPE, + BlockchainTransfer.JSON_PROPERTY_TX_HASH, + BlockchainTransfer.JSON_PROPERTY_AMOUNT }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") -public class SwapOperationRequest { - public static final String JSON_PROPERTY_PROVIDER_QUOTE_ID = "providerQuoteId"; - @jakarta.annotation.Nonnull private UUID providerQuoteId; - - /** The fee level of the transaction */ - public enum FeeLevelEnum { - LOW(String.valueOf("LOW")), - - MEDIUM(String.valueOf("MEDIUM")), - - HIGH(String.valueOf("HIGH")); +public class BlockchainTransfer { + /** Gets or Sets type */ + public enum TypeEnum { + BLOCKCHAIN(String.valueOf("BLOCKCHAIN")); private String value; - FeeLevelEnum(String value) { + TypeEnum(String value) { this.value = value; } @@ -61,8 +53,8 @@ public String toString() { } @JsonCreator - public static FeeLevelEnum fromValue(String value) { - for (FeeLevelEnum b : FeeLevelEnum.values()) { + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { if (b.value.equals(value)) { return b; } @@ -71,91 +63,93 @@ public static FeeLevelEnum fromValue(String value) { } } - public static final String JSON_PROPERTY_FEE_LEVEL = "feeLevel"; - @jakarta.annotation.Nullable private FeeLevelEnum feeLevel; + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nullable private TypeEnum type; + + public static final String JSON_PROPERTY_TX_HASH = "txHash"; + @jakarta.annotation.Nullable private String txHash; - public static final String JSON_PROPERTY_TX_NOTE = "txNote"; - @jakarta.annotation.Nullable private String txNote; + public static final String JSON_PROPERTY_AMOUNT = "amount"; + @jakarta.annotation.Nonnull private String amount; - public SwapOperationRequest() {} + public BlockchainTransfer() {} @JsonCreator - public SwapOperationRequest( - @JsonProperty(value = JSON_PROPERTY_PROVIDER_QUOTE_ID, required = true) - UUID providerQuoteId) { - this.providerQuoteId = providerQuoteId; + public BlockchainTransfer( + @JsonProperty(value = JSON_PROPERTY_AMOUNT, required = true) String amount) { + this.amount = amount; } - public SwapOperationRequest providerQuoteId(@jakarta.annotation.Nonnull UUID providerQuoteId) { - this.providerQuoteId = providerQuoteId; + public BlockchainTransfer type(@jakarta.annotation.Nullable TypeEnum type) { + this.type = type; return this; } /** - * An identifier that uniquely identifies the received quote + * Get type * - * @return providerQuoteId + * @return type */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_PROVIDER_QUOTE_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getProviderQuoteId() { - return providerQuoteId; + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; } - @JsonProperty(JSON_PROPERTY_PROVIDER_QUOTE_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setProviderQuoteId(@jakarta.annotation.Nonnull UUID providerQuoteId) { - this.providerQuoteId = providerQuoteId; + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(@jakarta.annotation.Nullable TypeEnum type) { + this.type = type; } - public SwapOperationRequest feeLevel(@jakarta.annotation.Nullable FeeLevelEnum feeLevel) { - this.feeLevel = feeLevel; + public BlockchainTransfer txHash(@jakarta.annotation.Nullable String txHash) { + this.txHash = txHash; return this; } /** - * The fee level of the transaction + * The hash of the transaction on the blockchain. * - * @return feeLevel + * @return txHash */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonProperty(JSON_PROPERTY_TX_HASH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FeeLevelEnum getFeeLevel() { - return feeLevel; + public String getTxHash() { + return txHash; } - @JsonProperty(JSON_PROPERTY_FEE_LEVEL) + @JsonProperty(JSON_PROPERTY_TX_HASH) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFeeLevel(@jakarta.annotation.Nullable FeeLevelEnum feeLevel) { - this.feeLevel = feeLevel; + public void setTxHash(@jakarta.annotation.Nullable String txHash) { + this.txHash = txHash; } - public SwapOperationRequest txNote(@jakarta.annotation.Nullable String txNote) { - this.txNote = txNote; + public BlockchainTransfer amount(@jakarta.annotation.Nonnull String amount) { + this.amount = amount; return this; } /** - * user note on the transaction + * The amount of the transaction. * - * @return txNote + * @return amount */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TX_NOTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTxNote() { - return txNote; + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAmount() { + return amount; } - @JsonProperty(JSON_PROPERTY_TX_NOTE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTxNote(@jakarta.annotation.Nullable String txNote) { - this.txNote = txNote; + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(@jakarta.annotation.Nonnull String amount) { + this.amount = amount; } - /** Return true if this SwapOperationRequest object is equal to o. */ + /** Return true if this BlockchainTransfer object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -164,24 +158,24 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SwapOperationRequest swapOperationRequest = (SwapOperationRequest) o; - return Objects.equals(this.providerQuoteId, swapOperationRequest.providerQuoteId) - && Objects.equals(this.feeLevel, swapOperationRequest.feeLevel) - && Objects.equals(this.txNote, swapOperationRequest.txNote); + BlockchainTransfer blockchainTransfer = (BlockchainTransfer) o; + return Objects.equals(this.type, blockchainTransfer.type) + && Objects.equals(this.txHash, blockchainTransfer.txHash) + && Objects.equals(this.amount, blockchainTransfer.amount); } @Override public int hashCode() { - return Objects.hash(providerQuoteId, feeLevel, txNote); + return Objects.hash(type, txHash, amount); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SwapOperationRequest {\n"); - sb.append(" providerQuoteId: ").append(toIndentedString(providerQuoteId)).append("\n"); - sb.append(" feeLevel: ").append(toIndentedString(feeLevel)).append("\n"); - sb.append(" txNote: ").append(toIndentedString(txNote)).append("\n"); + sb.append("class BlockchainTransfer {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" txHash: ").append(toIndentedString(txHash)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); sb.append("}"); return sb.toString(); } @@ -229,34 +223,34 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `providerQuoteId` to the URL query string - if (getProviderQuoteId() != null) { + // add `type` to the URL query string + if (getType() != null) { joiner.add( String.format( - "%sproviderQuoteId%s=%s", + "%stype%s=%s", prefix, suffix, - ApiClient.urlEncode(ApiClient.valueToString(getProviderQuoteId())))); + ApiClient.urlEncode(ApiClient.valueToString(getType())))); } - // add `feeLevel` to the URL query string - if (getFeeLevel() != null) { + // add `txHash` to the URL query string + if (getTxHash() != null) { joiner.add( String.format( - "%sfeeLevel%s=%s", + "%stxHash%s=%s", prefix, suffix, - ApiClient.urlEncode(ApiClient.valueToString(getFeeLevel())))); + ApiClient.urlEncode(ApiClient.valueToString(getTxHash())))); } - // add `txNote` to the URL query string - if (getTxNote() != null) { + // add `amount` to the URL query string + if (getAmount() != null) { joiner.add( String.format( - "%stxNote%s=%s", + "%samount%s=%s", prefix, suffix, - ApiClient.urlEncode(ApiClient.valueToString(getTxNote())))); + ApiClient.urlEncode(ApiClient.valueToString(getAmount())))); } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/BpsFee.java b/src/main/java/com/fireblocks/sdk/model/BpsFee.java new file mode 100644 index 00000000..38743066 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/BpsFee.java @@ -0,0 +1,220 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.math.BigDecimal; +import java.util.Objects; +import java.util.StringJoiner; + +/** BpsFee */ +@JsonPropertyOrder({BpsFee.JSON_PROPERTY_AMOUNT_TYPE, BpsFee.JSON_PROPERTY_AMOUNT}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class BpsFee { + /** Gets or Sets amountType */ + public enum AmountTypeEnum { + BPS(String.valueOf("BPS")); + + private String value; + + AmountTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AmountTypeEnum fromValue(String value) { + for (AmountTypeEnum b : AmountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_AMOUNT_TYPE = "amountType"; + @jakarta.annotation.Nonnull private AmountTypeEnum amountType; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + @jakarta.annotation.Nonnull private BigDecimal amount; + + public BpsFee() {} + + @JsonCreator + public BpsFee( + @JsonProperty(value = JSON_PROPERTY_AMOUNT_TYPE, required = true) + AmountTypeEnum amountType, + @JsonProperty(value = JSON_PROPERTY_AMOUNT, required = true) BigDecimal amount) { + this.amountType = amountType; + this.amount = amount; + } + + public BpsFee amountType(@jakarta.annotation.Nonnull AmountTypeEnum amountType) { + this.amountType = amountType; + return this; + } + + /** + * Get amountType + * + * @return amountType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AmountTypeEnum getAmountType() { + return amountType; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmountType(@jakarta.annotation.Nonnull AmountTypeEnum amountType) { + this.amountType = amountType; + } + + public BpsFee amount(@jakarta.annotation.Nonnull BigDecimal amount) { + this.amount = amount; + return this; + } + + /** + * Fee in basis points (1 = 0.01%, 10000 = 100%) minimum: 0 maximum: 10000 + * + * @return amount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(@jakarta.annotation.Nonnull BigDecimal amount) { + this.amount = amount; + } + + /** Return true if this BpsFee object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BpsFee bpsFee = (BpsFee) o; + return Objects.equals(this.amountType, bpsFee.amountType) + && Objects.equals(this.amount, bpsFee.amount); + } + + @Override + public int hashCode() { + return Objects.hash(amountType, amount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BpsFee {\n"); + sb.append(" amountType: ").append(toIndentedString(amountType)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).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 `amountType` to the URL query string + if (getAmountType() != null) { + joiner.add( + String.format( + "%samountType%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAmountType())))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAmount())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/BusinessIdentification.java b/src/main/java/com/fireblocks/sdk/model/BusinessIdentification.java new file mode 100644 index 00000000..f773d609 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/BusinessIdentification.java @@ -0,0 +1,409 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** BusinessIdentification */ +@JsonPropertyOrder({ + BusinessIdentification.JSON_PROPERTY_EXTERNAL_REFERENCE_ID, + BusinessIdentification.JSON_PROPERTY_ENTITY_TYPE, + BusinessIdentification.JSON_PROPERTY_PARTICIPANT_RELATIONSHIP_TYPE, + BusinessIdentification.JSON_PROPERTY_BUSINESS_NAME, + BusinessIdentification.JSON_PROPERTY_REGISTRATION_NUMBER, + BusinessIdentification.JSON_PROPERTY_POSTAL_ADDRESS +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class BusinessIdentification { + public static final String JSON_PROPERTY_EXTERNAL_REFERENCE_ID = "externalReferenceId"; + @jakarta.annotation.Nonnull private String externalReferenceId; + + /** Gets or Sets entityType */ + public enum EntityTypeEnum { + BUSINESS(String.valueOf("BUSINESS")); + + private String value; + + EntityTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EntityTypeEnum fromValue(String value) { + for (EntityTypeEnum b : EntityTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; + @jakarta.annotation.Nonnull private EntityTypeEnum entityType; + + public static final String JSON_PROPERTY_PARTICIPANT_RELATIONSHIP_TYPE = + "participantRelationshipType"; + @jakarta.annotation.Nonnull private ParticipantRelationshipType participantRelationshipType; + + public static final String JSON_PROPERTY_BUSINESS_NAME = "businessName"; + @jakarta.annotation.Nonnull private String businessName; + + public static final String JSON_PROPERTY_REGISTRATION_NUMBER = "registrationNumber"; + @jakarta.annotation.Nonnull private String registrationNumber; + + public static final String JSON_PROPERTY_POSTAL_ADDRESS = "postalAddress"; + @jakarta.annotation.Nonnull private PostalAddress postalAddress; + + public BusinessIdentification() {} + + @JsonCreator + public BusinessIdentification( + @JsonProperty(value = JSON_PROPERTY_EXTERNAL_REFERENCE_ID, required = true) + String externalReferenceId, + @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) + EntityTypeEnum entityType, + @JsonProperty(value = JSON_PROPERTY_PARTICIPANT_RELATIONSHIP_TYPE, required = true) + ParticipantRelationshipType participantRelationshipType, + @JsonProperty(value = JSON_PROPERTY_BUSINESS_NAME, required = true) String businessName, + @JsonProperty(value = JSON_PROPERTY_REGISTRATION_NUMBER, required = true) + String registrationNumber, + @JsonProperty(value = JSON_PROPERTY_POSTAL_ADDRESS, required = true) + PostalAddress postalAddress) { + this.externalReferenceId = externalReferenceId; + this.entityType = entityType; + this.participantRelationshipType = participantRelationshipType; + this.businessName = businessName; + this.registrationNumber = registrationNumber; + this.postalAddress = postalAddress; + } + + public BusinessIdentification externalReferenceId( + @jakarta.annotation.Nonnull String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + return this; + } + + /** + * Get externalReferenceId + * + * @return externalReferenceId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXTERNAL_REFERENCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getExternalReferenceId() { + return externalReferenceId; + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_REFERENCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExternalReferenceId(@jakarta.annotation.Nonnull String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + public BusinessIdentification entityType( + @jakarta.annotation.Nonnull EntityTypeEnum entityType) { + this.entityType = entityType; + return this; + } + + /** + * Get entityType + * + * @return entityType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EntityTypeEnum getEntityType() { + return entityType; + } + + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEntityType(@jakarta.annotation.Nonnull EntityTypeEnum entityType) { + this.entityType = entityType; + } + + public BusinessIdentification participantRelationshipType( + @jakarta.annotation.Nonnull ParticipantRelationshipType participantRelationshipType) { + this.participantRelationshipType = participantRelationshipType; + return this; + } + + /** + * Get participantRelationshipType + * + * @return participantRelationshipType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PARTICIPANT_RELATIONSHIP_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ParticipantRelationshipType getParticipantRelationshipType() { + return participantRelationshipType; + } + + @JsonProperty(JSON_PROPERTY_PARTICIPANT_RELATIONSHIP_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setParticipantRelationshipType( + @jakarta.annotation.Nonnull ParticipantRelationshipType participantRelationshipType) { + this.participantRelationshipType = participantRelationshipType; + } + + public BusinessIdentification businessName(@jakarta.annotation.Nonnull String businessName) { + this.businessName = businessName; + return this; + } + + /** + * Get businessName + * + * @return businessName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BUSINESS_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBusinessName() { + return businessName; + } + + @JsonProperty(JSON_PROPERTY_BUSINESS_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBusinessName(@jakarta.annotation.Nonnull String businessName) { + this.businessName = businessName; + } + + public BusinessIdentification registrationNumber( + @jakarta.annotation.Nonnull String registrationNumber) { + this.registrationNumber = registrationNumber; + return this; + } + + /** + * Get registrationNumber + * + * @return registrationNumber + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REGISTRATION_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRegistrationNumber() { + return registrationNumber; + } + + @JsonProperty(JSON_PROPERTY_REGISTRATION_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRegistrationNumber(@jakarta.annotation.Nonnull String registrationNumber) { + this.registrationNumber = registrationNumber; + } + + public BusinessIdentification postalAddress( + @jakarta.annotation.Nonnull PostalAddress postalAddress) { + this.postalAddress = postalAddress; + return this; + } + + /** + * Get postalAddress + * + * @return postalAddress + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_POSTAL_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PostalAddress getPostalAddress() { + return postalAddress; + } + + @JsonProperty(JSON_PROPERTY_POSTAL_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPostalAddress(@jakarta.annotation.Nonnull PostalAddress postalAddress) { + this.postalAddress = postalAddress; + } + + /** Return true if this BusinessIdentification object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BusinessIdentification businessIdentification = (BusinessIdentification) o; + return Objects.equals(this.externalReferenceId, businessIdentification.externalReferenceId) + && Objects.equals(this.entityType, businessIdentification.entityType) + && Objects.equals( + this.participantRelationshipType, + businessIdentification.participantRelationshipType) + && Objects.equals(this.businessName, businessIdentification.businessName) + && Objects.equals( + this.registrationNumber, businessIdentification.registrationNumber) + && Objects.equals(this.postalAddress, businessIdentification.postalAddress); + } + + @Override + public int hashCode() { + return Objects.hash( + externalReferenceId, + entityType, + participantRelationshipType, + businessName, + registrationNumber, + postalAddress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BusinessIdentification {\n"); + sb.append(" externalReferenceId: ") + .append(toIndentedString(externalReferenceId)) + .append("\n"); + sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" participantRelationshipType: ") + .append(toIndentedString(participantRelationshipType)) + .append("\n"); + sb.append(" businessName: ").append(toIndentedString(businessName)).append("\n"); + sb.append(" registrationNumber: ") + .append(toIndentedString(registrationNumber)) + .append("\n"); + sb.append(" postalAddress: ").append(toIndentedString(postalAddress)).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 `externalReferenceId` to the URL query string + if (getExternalReferenceId() != null) { + joiner.add( + String.format( + "%sexternalReferenceId%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getExternalReferenceId())))); + } + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add( + String.format( + "%sentityType%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `participantRelationshipType` to the URL query string + if (getParticipantRelationshipType() != null) { + joiner.add( + String.format( + "%sparticipantRelationshipType%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getParticipantRelationshipType())))); + } + + // add `businessName` to the URL query string + if (getBusinessName() != null) { + joiner.add( + String.format( + "%sbusinessName%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBusinessName())))); + } + + // add `registrationNumber` to the URL query string + if (getRegistrationNumber() != null) { + joiner.add( + String.format( + "%sregistrationNumber%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRegistrationNumber())))); + } + + // add `postalAddress` to the URL query string + if (getPostalAddress() != null) { + joiner.add(getPostalAddress().toUrlQueryString(prefix + "postalAddress" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/Capability.java b/src/main/java/com/fireblocks/sdk/model/Capability.java new file mode 100644 index 00000000..a515b093 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/Capability.java @@ -0,0 +1,66 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Gets or Sets Capability */ +public enum Capability { + WITHDRAWALS("WITHDRAWALS"), + + DEPOSITS("DEPOSITS"), + + TRADING("TRADING"); + + private String value; + + Capability(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static Capability fromValue(String value) { + for (Capability b : Capability.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/CommittedQuoteType.java b/src/main/java/com/fireblocks/sdk/model/CommittedQuoteType.java new file mode 100644 index 00000000..b4acda06 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CommittedQuoteType.java @@ -0,0 +1,223 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.StringJoiner; + +/** CommittedQuoteType */ +@JsonPropertyOrder({ + CommittedQuoteType.JSON_PROPERTY_TYPE, + CommittedQuoteType.JSON_PROPERTY_EXPIRES_AT +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class CommittedQuoteType { + /** Indicates this is a committed quote */ + public enum TypeEnum { + COMMITTED(String.valueOf("COMMITTED")); + + 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_EXPIRES_AT = "expiresAt"; + @jakarta.annotation.Nonnull private OffsetDateTime expiresAt; + + public CommittedQuoteType() {} + + @JsonCreator + public CommittedQuoteType( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_EXPIRES_AT, required = true) + OffsetDateTime expiresAt) { + this.type = type; + this.expiresAt = expiresAt; + } + + public CommittedQuoteType type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Indicates this is a committed quote + * + * @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 CommittedQuoteType expiresAt(@jakarta.annotation.Nonnull OffsetDateTime expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * ISO 8601 timestamp of the expiration time of the quote. + * + * @return expiresAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getExpiresAt() { + return expiresAt; + } + + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExpiresAt(@jakarta.annotation.Nonnull OffsetDateTime expiresAt) { + this.expiresAt = expiresAt; + } + + /** Return true if this CommittedQuoteType object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommittedQuoteType committedQuoteType = (CommittedQuoteType) o; + return Objects.equals(this.type, committedQuoteType.type) + && Objects.equals(this.expiresAt, committedQuoteType.expiresAt); + } + + @Override + public int hashCode() { + return Objects.hash(type, expiresAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommittedQuoteType {\n"); + sb.append(" type: ").append(toIndentedString(type)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // 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/ConnectedAccount.java b/src/main/java/com/fireblocks/sdk/model/ConnectedAccount.java new file mode 100644 index 00000000..fbc8fb4b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConnectedAccount.java @@ -0,0 +1,387 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConnectedAccount */ +@JsonPropertyOrder({ + ConnectedAccount.JSON_PROPERTY_ID, + ConnectedAccount.JSON_PROPERTY_NAME, + ConnectedAccount.JSON_PROPERTY_PROVIDER_ID, + ConnectedAccount.JSON_PROPERTY_STATUS, + ConnectedAccount.JSON_PROPERTY_TOTAL_BALANCE, + ConnectedAccount.JSON_PROPERTY_MANIFEST, + ConnectedAccount.JSON_PROPERTY_PARENT_ID +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ConnectedAccount { + 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 static final String JSON_PROPERTY_PROVIDER_ID = "providerId"; + @jakarta.annotation.Nonnull private String providerId; + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nonnull private ConnectedAccountApprovalStatus status; + + public static final String JSON_PROPERTY_TOTAL_BALANCE = "totalBalance"; + @jakarta.annotation.Nonnull private ConnectedAccountTotalBalance totalBalance; + + public static final String JSON_PROPERTY_MANIFEST = "manifest"; + @jakarta.annotation.Nonnull private ConnectedAccountManifest manifest; + + public static final String JSON_PROPERTY_PARENT_ID = "parentId"; + @jakarta.annotation.Nullable private String parentId; + + public ConnectedAccount() {} + + @JsonCreator + public ConnectedAccount( + @JsonProperty(value = JSON_PROPERTY_ID, required = true) String id, + @JsonProperty(value = JSON_PROPERTY_NAME, required = true) String name, + @JsonProperty(value = JSON_PROPERTY_PROVIDER_ID, required = true) String providerId, + @JsonProperty(value = JSON_PROPERTY_STATUS, required = true) + ConnectedAccountApprovalStatus status, + @JsonProperty(value = JSON_PROPERTY_TOTAL_BALANCE, required = true) + ConnectedAccountTotalBalance totalBalance, + @JsonProperty(value = JSON_PROPERTY_MANIFEST, required = true) + ConnectedAccountManifest manifest) { + this.id = id; + this.name = name; + this.providerId = providerId; + this.status = status; + this.totalBalance = totalBalance; + this.manifest = manifest; + } + + public ConnectedAccount id(@jakarta.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the connected account. + * + * @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 ConnectedAccount name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Human-readable name of the connected account. + * + * @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; + } + + public ConnectedAccount providerId(@jakarta.annotation.Nonnull String providerId) { + this.providerId = providerId; + return this; + } + + /** + * The ID of the venue the account belongs to. + * + * @return providerId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProviderId() { + return providerId; + } + + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProviderId(@jakarta.annotation.Nonnull String providerId) { + this.providerId = providerId; + } + + public ConnectedAccount status( + @jakarta.annotation.Nonnull ConnectedAccountApprovalStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConnectedAccountApprovalStatus getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@jakarta.annotation.Nonnull ConnectedAccountApprovalStatus status) { + this.status = status; + } + + public ConnectedAccount totalBalance( + @jakarta.annotation.Nonnull ConnectedAccountTotalBalance totalBalance) { + this.totalBalance = totalBalance; + return this; + } + + /** + * Get totalBalance + * + * @return totalBalance + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConnectedAccountTotalBalance getTotalBalance() { + return totalBalance; + } + + @JsonProperty(JSON_PROPERTY_TOTAL_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalBalance( + @jakarta.annotation.Nonnull ConnectedAccountTotalBalance totalBalance) { + this.totalBalance = totalBalance; + } + + public ConnectedAccount manifest( + @jakarta.annotation.Nonnull ConnectedAccountManifest manifest) { + this.manifest = manifest; + return this; + } + + /** + * Get manifest + * + * @return manifest + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MANIFEST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConnectedAccountManifest getManifest() { + return manifest; + } + + @JsonProperty(JSON_PROPERTY_MANIFEST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setManifest(@jakarta.annotation.Nonnull ConnectedAccountManifest manifest) { + this.manifest = manifest; + } + + public ConnectedAccount parentId(@jakarta.annotation.Nullable String parentId) { + this.parentId = parentId; + return this; + } + + /** + * The ID of the parent main account, if this is a sub account. + * + * @return parentId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getParentId() { + return parentId; + } + + @JsonProperty(JSON_PROPERTY_PARENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setParentId(@jakarta.annotation.Nullable String parentId) { + this.parentId = parentId; + } + + /** Return true if this ConnectedAccount object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectedAccount connectedAccount = (ConnectedAccount) o; + return Objects.equals(this.id, connectedAccount.id) + && Objects.equals(this.name, connectedAccount.name) + && Objects.equals(this.providerId, connectedAccount.providerId) + && Objects.equals(this.status, connectedAccount.status) + && Objects.equals(this.totalBalance, connectedAccount.totalBalance) + && Objects.equals(this.manifest, connectedAccount.manifest) + && Objects.equals(this.parentId, connectedAccount.parentId); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, providerId, status, totalBalance, manifest, parentId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectedAccount {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" providerId: ").append(toIndentedString(providerId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" totalBalance: ").append(toIndentedString(totalBalance)).append("\n"); + sb.append(" manifest: ").append(toIndentedString(manifest)).append("\n"); + sb.append(" parentId: ").append(toIndentedString(parentId)).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())))); + } + + // add `providerId` to the URL query string + if (getProviderId() != null) { + joiner.add( + String.format( + "%sproviderId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getProviderId())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `totalBalance` to the URL query string + if (getTotalBalance() != null) { + joiner.add(getTotalBalance().toUrlQueryString(prefix + "totalBalance" + suffix)); + } + + // add `manifest` to the URL query string + if (getManifest() != null) { + joiner.add(getManifest().toUrlQueryString(prefix + "manifest" + suffix)); + } + + // add `parentId` to the URL query string + if (getParentId() != null) { + joiner.add( + String.format( + "%sparentId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getParentId())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConnectedAccountApprovalStatus.java b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountApprovalStatus.java new file mode 100644 index 00000000..77243cc3 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountApprovalStatus.java @@ -0,0 +1,70 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Gets or Sets ConnectedAccountApprovalStatus */ +public enum ConnectedAccountApprovalStatus { + WAITING_FOR_APPROVAL("WAITING_FOR_APPROVAL"), + + APPROVED("APPROVED"), + + REJECTED("REJECTED"), + + CANCELLED("CANCELLED"), + + FAILED("FAILED"); + + private String value; + + ConnectedAccountApprovalStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ConnectedAccountApprovalStatus fromValue(String value) { + for (ConnectedAccountApprovalStatus b : ConnectedAccountApprovalStatus.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/SwapProviderProtocolsEnum.java b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountAssetType.java similarity index 69% rename from src/main/java/com/fireblocks/sdk/model/SwapProviderProtocolsEnum.java rename to src/main/java/com/fireblocks/sdk/model/ConnectedAccountAssetType.java index 657266f9..e3fb244f 100644 --- a/src/main/java/com/fireblocks/sdk/model/SwapProviderProtocolsEnum.java +++ b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountAssetType.java @@ -16,23 +16,15 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** - * Protocol options supported by each provider. `UNISWAP` supports - * `UNISWAP_CLASSIC` and `UNISWAPX`. `WRAP_UNWRAP` supports - * `WRAP` and `UNWRAP.` - */ -public enum SwapProviderProtocolsEnum { - UNISWAP_CLASSIC("UNISWAP_CLASSIC"), - - UNISWAPX("UNISWAPX"), - - WRAP("WRAP"), +/** Gets or Sets ConnectedAccountAssetType */ +public enum ConnectedAccountAssetType { + DIGITAL("DIGITAL"), - UNWRAP("UNWRAP"); + FIAT("FIAT"); private String value; - SwapProviderProtocolsEnum(String value) { + ConnectedAccountAssetType(String value) { this.value = value; } @@ -47,8 +39,8 @@ public String toString() { } @JsonCreator - public static SwapProviderProtocolsEnum fromValue(String value) { - for (SwapProviderProtocolsEnum b : SwapProviderProtocolsEnum.values()) { + public static ConnectedAccountAssetType fromValue(String value) { + for (ConnectedAccountAssetType b : ConnectedAccountAssetType.values()) { if (b.value.equals(value)) { return b; } diff --git a/src/main/java/com/fireblocks/sdk/model/ConnectedAccountBalances.java b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountBalances.java new file mode 100644 index 00000000..a8d90641 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountBalances.java @@ -0,0 +1,397 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConnectedAccountBalances */ +@JsonPropertyOrder({ + ConnectedAccountBalances.JSON_PROPERTY_ASSET_ID, + ConnectedAccountBalances.JSON_PROPERTY_AVAILABLE_AMOUNT, + ConnectedAccountBalances.JSON_PROPERTY_TOTAL_AMOUNT, + ConnectedAccountBalances.JSON_PROPERTY_LOCKED_AMOUNT, + ConnectedAccountBalances.JSON_PROPERTY_CREDIT_AMOUNT, + ConnectedAccountBalances.JSON_PROPERTY_BALANCE_TYPE, + ConnectedAccountBalances.JSON_PROPERTY_BALANCE_NAME +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ConnectedAccountBalances { + public static final String JSON_PROPERTY_ASSET_ID = "assetId"; + @jakarta.annotation.Nonnull private String assetId; + + public static final String JSON_PROPERTY_AVAILABLE_AMOUNT = "availableAmount"; + @jakarta.annotation.Nonnull private String availableAmount; + + public static final String JSON_PROPERTY_TOTAL_AMOUNT = "totalAmount"; + @jakarta.annotation.Nonnull private String totalAmount; + + public static final String JSON_PROPERTY_LOCKED_AMOUNT = "lockedAmount"; + @jakarta.annotation.Nullable private String lockedAmount; + + public static final String JSON_PROPERTY_CREDIT_AMOUNT = "creditAmount"; + @jakarta.annotation.Nullable private String creditAmount; + + public static final String JSON_PROPERTY_BALANCE_TYPE = "balanceType"; + @jakarta.annotation.Nonnull private String balanceType; + + public static final String JSON_PROPERTY_BALANCE_NAME = "balanceName"; + @jakarta.annotation.Nullable private String balanceName; + + public ConnectedAccountBalances() {} + + @JsonCreator + public ConnectedAccountBalances( + @JsonProperty(value = JSON_PROPERTY_ASSET_ID, required = true) String assetId, + @JsonProperty(value = JSON_PROPERTY_AVAILABLE_AMOUNT, required = true) + String availableAmount, + @JsonProperty(value = JSON_PROPERTY_TOTAL_AMOUNT, required = true) String totalAmount, + @JsonProperty(value = JSON_PROPERTY_BALANCE_TYPE, required = true) String balanceType) { + this.assetId = assetId; + this.availableAmount = availableAmount; + this.totalAmount = totalAmount; + this.balanceType = balanceType; + } + + public ConnectedAccountBalances assetId(@jakarta.annotation.Nonnull String assetId) { + this.assetId = assetId; + return this; + } + + /** + * Asset identifier (e.g., BTC, ETH, USDC). + * + * @return assetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAssetId() { + return assetId; + } + + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAssetId(@jakarta.annotation.Nonnull String assetId) { + this.assetId = assetId; + } + + public ConnectedAccountBalances availableAmount( + @jakarta.annotation.Nonnull String availableAmount) { + this.availableAmount = availableAmount; + return this; + } + + /** + * Amount available for use. + * + * @return availableAmount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AVAILABLE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAvailableAmount() { + return availableAmount; + } + + @JsonProperty(JSON_PROPERTY_AVAILABLE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAvailableAmount(@jakarta.annotation.Nonnull String availableAmount) { + this.availableAmount = availableAmount; + } + + public ConnectedAccountBalances totalAmount(@jakarta.annotation.Nonnull String totalAmount) { + this.totalAmount = totalAmount; + return this; + } + + /** + * Total amount including locked/held balances. + * + * @return totalAmount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTotalAmount() { + return totalAmount; + } + + @JsonProperty(JSON_PROPERTY_TOTAL_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalAmount(@jakarta.annotation.Nonnull String totalAmount) { + this.totalAmount = totalAmount; + } + + public ConnectedAccountBalances lockedAmount(@jakarta.annotation.Nullable String lockedAmount) { + this.lockedAmount = lockedAmount; + return this; + } + + /** + * Amount currently locked/held. + * + * @return lockedAmount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOCKED_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLockedAmount() { + return lockedAmount; + } + + @JsonProperty(JSON_PROPERTY_LOCKED_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLockedAmount(@jakarta.annotation.Nullable String lockedAmount) { + this.lockedAmount = lockedAmount; + } + + public ConnectedAccountBalances creditAmount(@jakarta.annotation.Nullable String creditAmount) { + this.creditAmount = creditAmount; + return this; + } + + /** + * Credit line amount, if applicable (0 when not used). + * + * @return creditAmount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREDIT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreditAmount() { + return creditAmount; + } + + @JsonProperty(JSON_PROPERTY_CREDIT_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreditAmount(@jakarta.annotation.Nullable String creditAmount) { + this.creditAmount = creditAmount; + } + + public ConnectedAccountBalances balanceType(@jakarta.annotation.Nonnull String balanceType) { + this.balanceType = balanceType; + return this; + } + + /** + * Wallet type/category (e.g., SPOT, MARGIN, FUNDING). + * + * @return balanceType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BALANCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBalanceType() { + return balanceType; + } + + @JsonProperty(JSON_PROPERTY_BALANCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBalanceType(@jakarta.annotation.Nonnull String balanceType) { + this.balanceType = balanceType; + } + + public ConnectedAccountBalances balanceName(@jakarta.annotation.Nullable String balanceName) { + this.balanceName = balanceName; + return this; + } + + /** + * Display name for the balance type (at the provider) + * + * @return balanceName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BALANCE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBalanceName() { + return balanceName; + } + + @JsonProperty(JSON_PROPERTY_BALANCE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBalanceName(@jakarta.annotation.Nullable String balanceName) { + this.balanceName = balanceName; + } + + /** Return true if this ConnectedAccountBalances object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectedAccountBalances connectedAccountBalances = (ConnectedAccountBalances) o; + return Objects.equals(this.assetId, connectedAccountBalances.assetId) + && Objects.equals(this.availableAmount, connectedAccountBalances.availableAmount) + && Objects.equals(this.totalAmount, connectedAccountBalances.totalAmount) + && Objects.equals(this.lockedAmount, connectedAccountBalances.lockedAmount) + && Objects.equals(this.creditAmount, connectedAccountBalances.creditAmount) + && Objects.equals(this.balanceType, connectedAccountBalances.balanceType) + && Objects.equals(this.balanceName, connectedAccountBalances.balanceName); + } + + @Override + public int hashCode() { + return Objects.hash( + assetId, + availableAmount, + totalAmount, + lockedAmount, + creditAmount, + balanceType, + balanceName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectedAccountBalances {\n"); + sb.append(" assetId: ").append(toIndentedString(assetId)).append("\n"); + sb.append(" availableAmount: ").append(toIndentedString(availableAmount)).append("\n"); + sb.append(" totalAmount: ").append(toIndentedString(totalAmount)).append("\n"); + sb.append(" lockedAmount: ").append(toIndentedString(lockedAmount)).append("\n"); + sb.append(" creditAmount: ").append(toIndentedString(creditAmount)).append("\n"); + sb.append(" balanceType: ").append(toIndentedString(balanceType)).append("\n"); + sb.append(" balanceName: ").append(toIndentedString(balanceName)).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 `assetId` to the URL query string + if (getAssetId() != null) { + joiner.add( + String.format( + "%sassetId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAssetId())))); + } + + // add `availableAmount` to the URL query string + if (getAvailableAmount() != null) { + joiner.add( + String.format( + "%savailableAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAvailableAmount())))); + } + + // add `totalAmount` to the URL query string + if (getTotalAmount() != null) { + joiner.add( + String.format( + "%stotalAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTotalAmount())))); + } + + // add `lockedAmount` to the URL query string + if (getLockedAmount() != null) { + joiner.add( + String.format( + "%slockedAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getLockedAmount())))); + } + + // add `creditAmount` to the URL query string + if (getCreditAmount() != null) { + joiner.add( + String.format( + "%screditAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCreditAmount())))); + } + + // add `balanceType` to the URL query string + if (getBalanceType() != null) { + joiner.add( + String.format( + "%sbalanceType%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBalanceType())))); + } + + // add `balanceName` to the URL query string + if (getBalanceName() != null) { + joiner.add( + String.format( + "%sbalanceName%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBalanceName())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConnectedAccountBalancesResponse.java b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountBalancesResponse.java new file mode 100644 index 00000000..7e7faefa --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountBalancesResponse.java @@ -0,0 +1,253 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConnectedAccountBalancesResponse */ +@JsonPropertyOrder({ + ConnectedAccountBalancesResponse.JSON_PROPERTY_DATA, + ConnectedAccountBalancesResponse.JSON_PROPERTY_TOTAL, + ConnectedAccountBalancesResponse.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ConnectedAccountBalancesResponse { + public static final String JSON_PROPERTY_DATA = "data"; + @jakarta.annotation.Nonnull private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL = "total"; + @jakarta.annotation.Nullable private Integer total; + + public static final String JSON_PROPERTY_NEXT = "next"; + @jakarta.annotation.Nullable private String next; + + public ConnectedAccountBalancesResponse() {} + + @JsonCreator + public ConnectedAccountBalancesResponse( + @JsonProperty(value = JSON_PROPERTY_DATA, required = true) + List data) { + this.data = data; + } + + public ConnectedAccountBalancesResponse data( + @jakarta.annotation.Nonnull List data) { + this.data = data; + return this; + } + + public ConnectedAccountBalancesResponse addDataItem(ConnectedAccountBalances dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Flat balance row for a single asset within an account and wallet type. One row per (assetId, + * balanceType). + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(@jakarta.annotation.Nonnull List data) { + this.data = data; + } + + public ConnectedAccountBalancesResponse total(@jakarta.annotation.Nullable Integer total) { + this.total = total; + return this; + } + + /** + * Total number of balance rows by query. + * + * @return total + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotal() { + return total; + } + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotal(@jakarta.annotation.Nullable Integer total) { + this.total = total; + } + + public ConnectedAccountBalancesResponse next(@jakarta.annotation.Nullable String next) { + this.next = next; + return this; + } + + /** + * A cursor for the next page of results, if available. + * + * @return next + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNext(@jakarta.annotation.Nullable String next) { + this.next = next; + } + + /** Return true if this ConnectedAccountBalancesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectedAccountBalancesResponse connectedAccountBalancesResponse = + (ConnectedAccountBalancesResponse) o; + return Objects.equals(this.data, connectedAccountBalancesResponse.data) + && Objects.equals(this.total, connectedAccountBalancesResponse.total) + && Objects.equals(this.next, connectedAccountBalancesResponse.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, total, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectedAccountBalancesResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add( + String.format( + "%stotal%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTotal())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add( + String.format( + "%snext%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConnectedAccountCapability.java b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountCapability.java new file mode 100644 index 00000000..dee3e902 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountCapability.java @@ -0,0 +1,66 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Gets or Sets ConnectedAccountCapability */ +public enum ConnectedAccountCapability { + WITHDRAWALS("WITHDRAWALS"), + + DEPOSITS("DEPOSITS"), + + TRADING("TRADING"); + + private String value; + + ConnectedAccountCapability(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ConnectedAccountCapability fromValue(String value) { + for (ConnectedAccountCapability b : ConnectedAccountCapability.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/ConnectedAccountManifest.java b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountManifest.java new file mode 100644 index 00000000..fec9e6b0 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountManifest.java @@ -0,0 +1,239 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConnectedAccountManifest */ +@JsonPropertyOrder({ + ConnectedAccountManifest.JSON_PROPERTY_ASSET_TYPES, + ConnectedAccountManifest.JSON_PROPERTY_CAPABILITIES +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ConnectedAccountManifest { + public static final String JSON_PROPERTY_ASSET_TYPES = "assetTypes"; + + @jakarta.annotation.Nonnull + private List assetTypes = new ArrayList<>(); + + public static final String JSON_PROPERTY_CAPABILITIES = "capabilities"; + + @jakarta.annotation.Nonnull + private List capabilities = new ArrayList<>(); + + public ConnectedAccountManifest() {} + + @JsonCreator + public ConnectedAccountManifest( + @JsonProperty(value = JSON_PROPERTY_ASSET_TYPES, required = true) + List assetTypes, + @JsonProperty(value = JSON_PROPERTY_CAPABILITIES, required = true) + List capabilities) { + this.assetTypes = assetTypes; + this.capabilities = capabilities; + } + + public ConnectedAccountManifest assetTypes( + @jakarta.annotation.Nonnull List assetTypes) { + this.assetTypes = assetTypes; + return this; + } + + public ConnectedAccountManifest addAssetTypesItem(ConnectedAccountAssetType assetTypesItem) { + if (this.assetTypes == null) { + this.assetTypes = new ArrayList<>(); + } + this.assetTypes.add(assetTypesItem); + return this; + } + + /** + * Asset types supported by the connected account. + * + * @return assetTypes + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSET_TYPES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAssetTypes() { + return assetTypes; + } + + @JsonProperty(JSON_PROPERTY_ASSET_TYPES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAssetTypes( + @jakarta.annotation.Nonnull List assetTypes) { + this.assetTypes = assetTypes; + } + + public ConnectedAccountManifest capabilities( + @jakarta.annotation.Nonnull List capabilities) { + this.capabilities = capabilities; + return this; + } + + public ConnectedAccountManifest addCapabilitiesItem( + ConnectedAccountCapability capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new ArrayList<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Features supported for the connected account. Logic: - If account capabilities include ramp + * -> TRADING - If account capabilities include transfers -> DEPOSITS - If account + * capabilities include transfersBlockchain / transfersFiat / transfersPeerAccounts / + * transfersInternal -> WITHDRAWALS + * + * @return capabilities + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CAPABILITIES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getCapabilities() { + return capabilities; + } + + @JsonProperty(JSON_PROPERTY_CAPABILITIES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCapabilities( + @jakarta.annotation.Nonnull List capabilities) { + this.capabilities = capabilities; + } + + /** Return true if this ConnectedAccountManifest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectedAccountManifest connectedAccountManifest = (ConnectedAccountManifest) o; + return Objects.equals(this.assetTypes, connectedAccountManifest.assetTypes) + && Objects.equals(this.capabilities, connectedAccountManifest.capabilities); + } + + @Override + public int hashCode() { + return Objects.hash(assetTypes, capabilities); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectedAccountManifest {\n"); + sb.append(" assetTypes: ").append(toIndentedString(assetTypes)).append("\n"); + sb.append(" capabilities: ").append(toIndentedString(capabilities)).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 `assetTypes` to the URL query string + if (getAssetTypes() != null) { + for (int i = 0; i < getAssetTypes().size(); i++) { + if (getAssetTypes().get(i) != null) { + joiner.add( + String.format( + "%sassetTypes%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode( + ApiClient.valueToString(getAssetTypes().get(i))))); + } + } + } + + // add `capabilities` to the URL query string + if (getCapabilities() != null) { + for (int i = 0; i < getCapabilities().size(); i++) { + if (getCapabilities().get(i) != null) { + joiner.add( + String.format( + "%scapabilities%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode( + ApiClient.valueToString(getCapabilities().get(i))))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConnectedAccountRateResponse.java b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountRateResponse.java new file mode 100644 index 00000000..418fedf8 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountRateResponse.java @@ -0,0 +1,275 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConnectedAccountRateResponse */ +@JsonPropertyOrder({ + ConnectedAccountRateResponse.JSON_PROPERTY_ACCOUNT_ID, + ConnectedAccountRateResponse.JSON_PROPERTY_BASE_ASSET_ID, + ConnectedAccountRateResponse.JSON_PROPERTY_QUOTE_ASSET_ID, + ConnectedAccountRateResponse.JSON_PROPERTY_RATE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ConnectedAccountRateResponse { + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + @jakarta.annotation.Nonnull private String accountId; + + public static final String JSON_PROPERTY_BASE_ASSET_ID = "baseAssetId"; + @jakarta.annotation.Nonnull private String baseAssetId; + + public static final String JSON_PROPERTY_QUOTE_ASSET_ID = "quoteAssetId"; + @jakarta.annotation.Nonnull private String quoteAssetId; + + public static final String JSON_PROPERTY_RATE = "rate"; + @jakarta.annotation.Nonnull private String rate; + + public ConnectedAccountRateResponse() {} + + @JsonCreator + public ConnectedAccountRateResponse( + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_ID, required = true) String accountId, + @JsonProperty(value = JSON_PROPERTY_BASE_ASSET_ID, required = true) String baseAssetId, + @JsonProperty(value = JSON_PROPERTY_QUOTE_ASSET_ID, required = true) + String quoteAssetId, + @JsonProperty(value = JSON_PROPERTY_RATE, required = true) String rate) { + this.accountId = accountId; + this.baseAssetId = baseAssetId; + this.quoteAssetId = quoteAssetId; + this.rate = rate; + } + + public ConnectedAccountRateResponse accountId(@jakarta.annotation.Nonnull String accountId) { + this.accountId = accountId; + return this; + } + + /** + * The ID of the account that generated the quote. + * + * @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; + } + + public ConnectedAccountRateResponse baseAssetId( + @jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * The source asset identifier + * + * @return baseAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + } + + public ConnectedAccountRateResponse quoteAssetId( + @jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + return this; + } + + /** + * The target asset identifier + * + * @return quoteAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteAssetId() { + return quoteAssetId; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteAssetId(@jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + } + + public ConnectedAccountRateResponse rate(@jakarta.annotation.Nonnull String rate) { + this.rate = rate; + return this; + } + + /** + * The exchange rate value + * + * @return rate + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRate() { + return rate; + } + + @JsonProperty(JSON_PROPERTY_RATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRate(@jakarta.annotation.Nonnull String rate) { + this.rate = rate; + } + + /** Return true if this ConnectedAccountRateResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectedAccountRateResponse connectedAccountRateResponse = + (ConnectedAccountRateResponse) o; + return Objects.equals(this.accountId, connectedAccountRateResponse.accountId) + && Objects.equals(this.baseAssetId, connectedAccountRateResponse.baseAssetId) + && Objects.equals(this.quoteAssetId, connectedAccountRateResponse.quoteAssetId) + && Objects.equals(this.rate, connectedAccountRateResponse.rate); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, baseAssetId, quoteAssetId, rate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectedAccountRateResponse {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" baseAssetId: ").append(toIndentedString(baseAssetId)).append("\n"); + sb.append(" quoteAssetId: ").append(toIndentedString(quoteAssetId)).append("\n"); + sb.append(" rate: ").append(toIndentedString(rate)).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 `accountId` to the URL query string + if (getAccountId() != null) { + joiner.add( + String.format( + "%saccountId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAccountId())))); + } + + // add `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBaseAssetId())))); + } + + // add `quoteAssetId` to the URL query string + if (getQuoteAssetId() != null) { + joiner.add( + String.format( + "%squoteAssetId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getQuoteAssetId())))); + } + + // add `rate` to the URL query string + if (getRate() != null) { + joiner.add( + String.format( + "%srate%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRate())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConnectedAccountTotalBalance.java b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountTotalBalance.java new file mode 100644 index 00000000..dd88a792 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountTotalBalance.java @@ -0,0 +1,246 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConnectedAccountTotalBalance */ +@JsonPropertyOrder({ + ConnectedAccountTotalBalance.JSON_PROPERTY_AMOUNT, + ConnectedAccountTotalBalance.JSON_PROPERTY_DENOMINATED_ASSET_ID, + ConnectedAccountTotalBalance.JSON_PROPERTY_HAS_FULL_ASSET_COVERAGE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ConnectedAccountTotalBalance { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + @jakarta.annotation.Nonnull private String amount; + + public static final String JSON_PROPERTY_DENOMINATED_ASSET_ID = "denominatedAssetId"; + @jakarta.annotation.Nonnull private String denominatedAssetId; + + public static final String JSON_PROPERTY_HAS_FULL_ASSET_COVERAGE = "hasFullAssetCoverage"; + @jakarta.annotation.Nonnull private Boolean hasFullAssetCoverage = false; + + public ConnectedAccountTotalBalance() {} + + @JsonCreator + public ConnectedAccountTotalBalance( + @JsonProperty(value = JSON_PROPERTY_AMOUNT, required = true) String amount, + @JsonProperty(value = JSON_PROPERTY_DENOMINATED_ASSET_ID, required = true) + String denominatedAssetId, + @JsonProperty(value = JSON_PROPERTY_HAS_FULL_ASSET_COVERAGE, required = true) + Boolean hasFullAssetCoverage) { + this.amount = amount; + this.denominatedAssetId = denominatedAssetId; + this.hasFullAssetCoverage = hasFullAssetCoverage; + } + + public ConnectedAccountTotalBalance amount(@jakarta.annotation.Nonnull String amount) { + this.amount = amount; + return this; + } + + /** + * The denominated currency value of the account. + * + * @return amount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(@jakarta.annotation.Nonnull String amount) { + this.amount = amount; + } + + public ConnectedAccountTotalBalance denominatedAssetId( + @jakarta.annotation.Nonnull String denominatedAssetId) { + this.denominatedAssetId = denominatedAssetId; + return this; + } + + /** + * The asset ID of the total balance. + * + * @return denominatedAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DENOMINATED_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDenominatedAssetId() { + return denominatedAssetId; + } + + @JsonProperty(JSON_PROPERTY_DENOMINATED_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDenominatedAssetId(@jakarta.annotation.Nonnull String denominatedAssetId) { + this.denominatedAssetId = denominatedAssetId; + } + + public ConnectedAccountTotalBalance hasFullAssetCoverage( + @jakarta.annotation.Nonnull Boolean hasFullAssetCoverage) { + this.hasFullAssetCoverage = hasFullAssetCoverage; + return this; + } + + /** + * Indicates whether the total amount represents the complete balance of all assets in the + * account. When true, all asset balances have been successfully converted to the denominated + * currency. When false, some assets could not be included in the total due to missing exchange + * rates or non-convertible assets. + * + * @return hasFullAssetCoverage + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HAS_FULL_ASSET_COVERAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getHasFullAssetCoverage() { + return hasFullAssetCoverage; + } + + @JsonProperty(JSON_PROPERTY_HAS_FULL_ASSET_COVERAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHasFullAssetCoverage(@jakarta.annotation.Nonnull Boolean hasFullAssetCoverage) { + this.hasFullAssetCoverage = hasFullAssetCoverage; + } + + /** Return true if this ConnectedAccountTotalBalance object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectedAccountTotalBalance connectedAccountTotalBalance = + (ConnectedAccountTotalBalance) o; + return Objects.equals(this.amount, connectedAccountTotalBalance.amount) + && Objects.equals( + this.denominatedAssetId, connectedAccountTotalBalance.denominatedAssetId) + && Objects.equals( + this.hasFullAssetCoverage, + connectedAccountTotalBalance.hasFullAssetCoverage); + } + + @Override + public int hashCode() { + return Objects.hash(amount, denominatedAssetId, hasFullAssetCoverage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectedAccountTotalBalance {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" denominatedAssetId: ") + .append(toIndentedString(denominatedAssetId)) + .append("\n"); + sb.append(" hasFullAssetCoverage: ") + .append(toIndentedString(hasFullAssetCoverage)) + .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 `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAmount())))); + } + + // add `denominatedAssetId` to the URL query string + if (getDenominatedAssetId() != null) { + joiner.add( + String.format( + "%sdenominatedAssetId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getDenominatedAssetId())))); + } + + // add `hasFullAssetCoverage` to the URL query string + if (getHasFullAssetCoverage() != null) { + joiner.add( + String.format( + "%shasFullAssetCoverage%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getHasFullAssetCoverage())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConnectedAccountTradingPair.java b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountTradingPair.java new file mode 100644 index 00000000..9771505b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountTradingPair.java @@ -0,0 +1,298 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConnectedAccountTradingPair */ +@JsonPropertyOrder({ + ConnectedAccountTradingPair.JSON_PROPERTY_ID, + ConnectedAccountTradingPair.JSON_PROPERTY_BASE_ASSET_ID, + ConnectedAccountTradingPair.JSON_PROPERTY_QUOTE_ASSET_ID, + ConnectedAccountTradingPair.JSON_PROPERTY_SUPPORTED_TYPES +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ConnectedAccountTradingPair { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull private String id; + + public static final String JSON_PROPERTY_BASE_ASSET_ID = "baseAssetId"; + @jakarta.annotation.Nonnull private String baseAssetId; + + public static final String JSON_PROPERTY_QUOTE_ASSET_ID = "quoteAssetId"; + @jakarta.annotation.Nonnull private String quoteAssetId; + + public static final String JSON_PROPERTY_SUPPORTED_TYPES = "supportedTypes"; + + @jakarta.annotation.Nonnull + private List supportedTypes = new ArrayList<>(); + + public ConnectedAccountTradingPair() {} + + @JsonCreator + public ConnectedAccountTradingPair( + @JsonProperty(value = JSON_PROPERTY_ID, required = true) String id, + @JsonProperty(value = JSON_PROPERTY_BASE_ASSET_ID, required = true) String baseAssetId, + @JsonProperty(value = JSON_PROPERTY_QUOTE_ASSET_ID, required = true) + String quoteAssetId, + @JsonProperty(value = JSON_PROPERTY_SUPPORTED_TYPES, required = true) + List supportedTypes) { + this.id = id; + this.baseAssetId = baseAssetId; + this.quoteAssetId = quoteAssetId; + this.supportedTypes = supportedTypes; + } + + public ConnectedAccountTradingPair id(@jakarta.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * The ID of the trading pair. + * + * @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 ConnectedAccountTradingPair baseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * The Symbol of the base asset. + * + * @return baseAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + } + + public ConnectedAccountTradingPair quoteAssetId( + @jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + return this; + } + + /** + * The symbol of the quote asset. + * + * @return quoteAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteAssetId() { + return quoteAssetId; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteAssetId(@jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + } + + public ConnectedAccountTradingPair supportedTypes( + @jakarta.annotation.Nonnull + List supportedTypes) { + this.supportedTypes = supportedTypes; + return this; + } + + public ConnectedAccountTradingPair addSupportedTypesItem( + ConnectedAccountTradingPairSupportedType supportedTypesItem) { + if (this.supportedTypes == null) { + this.supportedTypes = new ArrayList<>(); + } + this.supportedTypes.add(supportedTypesItem); + return this; + } + + /** + * Get supportedTypes + * + * @return supportedTypes + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUPPORTED_TYPES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSupportedTypes() { + return supportedTypes; + } + + @JsonProperty(JSON_PROPERTY_SUPPORTED_TYPES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSupportedTypes( + @jakarta.annotation.Nonnull + List supportedTypes) { + this.supportedTypes = supportedTypes; + } + + /** Return true if this ConnectedAccountTradingPair object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectedAccountTradingPair connectedAccountTradingPair = (ConnectedAccountTradingPair) o; + return Objects.equals(this.id, connectedAccountTradingPair.id) + && Objects.equals(this.baseAssetId, connectedAccountTradingPair.baseAssetId) + && Objects.equals(this.quoteAssetId, connectedAccountTradingPair.quoteAssetId) + && Objects.equals(this.supportedTypes, connectedAccountTradingPair.supportedTypes); + } + + @Override + public int hashCode() { + return Objects.hash(id, baseAssetId, quoteAssetId, supportedTypes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectedAccountTradingPair {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" baseAssetId: ").append(toIndentedString(baseAssetId)).append("\n"); + sb.append(" quoteAssetId: ").append(toIndentedString(quoteAssetId)).append("\n"); + sb.append(" supportedTypes: ").append(toIndentedString(supportedTypes)).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 `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBaseAssetId())))); + } + + // add `quoteAssetId` to the URL query string + if (getQuoteAssetId() != null) { + joiner.add( + String.format( + "%squoteAssetId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getQuoteAssetId())))); + } + + // add `supportedTypes` to the URL query string + if (getSupportedTypes() != null) { + for (int i = 0; i < getSupportedTypes().size(); i++) { + if (getSupportedTypes().get(i) != null) { + joiner.add( + String.format( + "%ssupportedTypes%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode( + ApiClient.valueToString(getSupportedTypes().get(i))))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConnectedAccountTradingPairSupportedType.java b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountTradingPairSupportedType.java new file mode 100644 index 00000000..8f863c7c --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountTradingPairSupportedType.java @@ -0,0 +1,67 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Gets or Sets ConnectedAccountTradingPairSupportedType */ +public enum ConnectedAccountTradingPairSupportedType { + QUOTE("QUOTE"), + + MARKET("MARKET"), + + LIMIT("LIMIT"); + + private String value; + + ConnectedAccountTradingPairSupportedType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ConnectedAccountTradingPairSupportedType fromValue(String value) { + for (ConnectedAccountTradingPairSupportedType b : + ConnectedAccountTradingPairSupportedType.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/ConnectedAccountTradingPairsResponse.java b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountTradingPairsResponse.java new file mode 100644 index 00000000..5700a27b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountTradingPairsResponse.java @@ -0,0 +1,252 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConnectedAccountTradingPairsResponse */ +@JsonPropertyOrder({ + ConnectedAccountTradingPairsResponse.JSON_PROPERTY_DATA, + ConnectedAccountTradingPairsResponse.JSON_PROPERTY_TOTAL, + ConnectedAccountTradingPairsResponse.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ConnectedAccountTradingPairsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + @jakarta.annotation.Nonnull private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL = "total"; + @jakarta.annotation.Nullable private Integer total; + + public static final String JSON_PROPERTY_NEXT = "next"; + @jakarta.annotation.Nullable private String next; + + public ConnectedAccountTradingPairsResponse() {} + + @JsonCreator + public ConnectedAccountTradingPairsResponse( + @JsonProperty(value = JSON_PROPERTY_DATA, required = true) + List data) { + this.data = data; + } + + public ConnectedAccountTradingPairsResponse data( + @jakarta.annotation.Nonnull List data) { + this.data = data; + return this; + } + + public ConnectedAccountTradingPairsResponse addDataItem(ConnectedAccountTradingPair dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(@jakarta.annotation.Nonnull List data) { + this.data = data; + } + + public ConnectedAccountTradingPairsResponse total(@jakarta.annotation.Nullable Integer total) { + this.total = total; + return this; + } + + /** + * Total number of asset pairs matching the query. + * + * @return total + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotal() { + return total; + } + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotal(@jakarta.annotation.Nullable Integer total) { + this.total = total; + } + + public ConnectedAccountTradingPairsResponse next(@jakarta.annotation.Nullable String next) { + this.next = next; + return this; + } + + /** + * A cursor for the next page of results, if available. + * + * @return next + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNext(@jakarta.annotation.Nullable String next) { + this.next = next; + } + + /** Return true if this ConnectedAccountTradingPairsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectedAccountTradingPairsResponse connectedAccountTradingPairsResponse = + (ConnectedAccountTradingPairsResponse) o; + return Objects.equals(this.data, connectedAccountTradingPairsResponse.data) + && Objects.equals(this.total, connectedAccountTradingPairsResponse.total) + && Objects.equals(this.next, connectedAccountTradingPairsResponse.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, total, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectedAccountTradingPairsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add( + String.format( + "%stotal%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTotal())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add( + String.format( + "%snext%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConnectedAccountsResponse.java b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountsResponse.java new file mode 100644 index 00000000..156488f9 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConnectedAccountsResponse.java @@ -0,0 +1,250 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConnectedAccountsResponse */ +@JsonPropertyOrder({ + ConnectedAccountsResponse.JSON_PROPERTY_DATA, + ConnectedAccountsResponse.JSON_PROPERTY_TOTAL, + ConnectedAccountsResponse.JSON_PROPERTY_NEXT +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ConnectedAccountsResponse { + public static final String JSON_PROPERTY_DATA = "data"; + @jakarta.annotation.Nonnull private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL = "total"; + @jakarta.annotation.Nullable private Integer total; + + public static final String JSON_PROPERTY_NEXT = "next"; + @jakarta.annotation.Nullable private String next; + + public ConnectedAccountsResponse() {} + + @JsonCreator + public ConnectedAccountsResponse( + @JsonProperty(value = JSON_PROPERTY_DATA, required = true) + List data) { + this.data = data; + } + + public ConnectedAccountsResponse data(@jakarta.annotation.Nonnull List data) { + this.data = data; + return this; + } + + public ConnectedAccountsResponse addDataItem(ConnectedAccount dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * List of connected accounts matching the query. + * + * @return data + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setData(@jakarta.annotation.Nonnull List data) { + this.data = data; + } + + public ConnectedAccountsResponse total(@jakarta.annotation.Nullable Integer total) { + this.total = total; + return this; + } + + /** + * Total number of accounts by query. + * + * @return total + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotal() { + return total; + } + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTotal(@jakarta.annotation.Nullable Integer total) { + this.total = total; + } + + public ConnectedAccountsResponse next(@jakarta.annotation.Nullable String next) { + this.next = next; + return this; + } + + /** + * A cursor for the next page of results, if available. + * + * @return next + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNext() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNext(@jakarta.annotation.Nullable String next) { + this.next = next; + } + + /** Return true if this ConnectedAccountsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectedAccountsResponse connectedAccountsResponse = (ConnectedAccountsResponse) o; + return Objects.equals(this.data, connectedAccountsResponse.data) + && Objects.equals(this.total, connectedAccountsResponse.total) + && Objects.equals(this.next, connectedAccountsResponse.next); + } + + @Override + public int hashCode() { + return Objects.hash(data, total, next); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectedAccountsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `data` to the URL query string + if (getData() != null) { + for (int i = 0; i < getData().size(); i++) { + if (getData().get(i) != null) { + joiner.add( + getData() + .get(i) + .toUrlQueryString( + String.format( + "%sdata%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add( + String.format( + "%stotal%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTotal())))); + } + + // add `next` to the URL query string + if (getNext() != null) { + joiner.add( + String.format( + "%snext%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getNext())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConnectedSingleAccount.java b/src/main/java/com/fireblocks/sdk/model/ConnectedSingleAccount.java new file mode 100644 index 00000000..07f8d85a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConnectedSingleAccount.java @@ -0,0 +1,157 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConnectedSingleAccount */ +@JsonPropertyOrder({ConnectedSingleAccount.JSON_PROPERTY_SUB_ACCOUNTS_IDS}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ConnectedSingleAccount { + public static final String JSON_PROPERTY_SUB_ACCOUNTS_IDS = "subAccountsIds"; + @jakarta.annotation.Nullable private List subAccountsIds = new ArrayList<>(); + + public ConnectedSingleAccount() {} + + public ConnectedSingleAccount subAccountsIds( + @jakarta.annotation.Nullable List subAccountsIds) { + this.subAccountsIds = subAccountsIds; + return this; + } + + public ConnectedSingleAccount addSubAccountsIdsItem(String subAccountsIdsItem) { + if (this.subAccountsIds == null) { + this.subAccountsIds = new ArrayList<>(); + } + this.subAccountsIds.add(subAccountsIdsItem); + return this; + } + + /** + * IDs of sub-accounts associated with this connected account. + * + * @return subAccountsIds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUB_ACCOUNTS_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSubAccountsIds() { + return subAccountsIds; + } + + @JsonProperty(JSON_PROPERTY_SUB_ACCOUNTS_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubAccountsIds(@jakarta.annotation.Nullable List subAccountsIds) { + this.subAccountsIds = subAccountsIds; + } + + /** Return true if this ConnectedSingleAccount object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectedSingleAccount connectedSingleAccount = (ConnectedSingleAccount) o; + return Objects.equals(this.subAccountsIds, connectedSingleAccount.subAccountsIds); + } + + @Override + public int hashCode() { + return Objects.hash(subAccountsIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectedSingleAccount {\n"); + sb.append(" subAccountsIds: ").append(toIndentedString(subAccountsIds)).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 `subAccountsIds` to the URL query string + if (getSubAccountsIds() != null) { + for (int i = 0; i < getSubAccountsIds().size(); i++) { + joiner.add( + String.format( + "%ssubAccountsIds%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode( + ApiClient.valueToString(getSubAccountsIds().get(i))))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ConnectedSingleAccountResponse.java b/src/main/java/com/fireblocks/sdk/model/ConnectedSingleAccountResponse.java new file mode 100644 index 00000000..50b82e2b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ConnectedSingleAccountResponse.java @@ -0,0 +1,448 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** ConnectedSingleAccountResponse */ +@JsonPropertyOrder({ + ConnectedSingleAccountResponse.JSON_PROPERTY_ID, + ConnectedSingleAccountResponse.JSON_PROPERTY_NAME, + ConnectedSingleAccountResponse.JSON_PROPERTY_PROVIDER_ID, + ConnectedSingleAccountResponse.JSON_PROPERTY_STATUS, + ConnectedSingleAccountResponse.JSON_PROPERTY_TOTAL_BALANCE, + ConnectedSingleAccountResponse.JSON_PROPERTY_MANIFEST, + ConnectedSingleAccountResponse.JSON_PROPERTY_PARENT_ID, + ConnectedSingleAccountResponse.JSON_PROPERTY_SUB_ACCOUNTS_IDS +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ConnectedSingleAccountResponse { + 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 static final String JSON_PROPERTY_PROVIDER_ID = "providerId"; + @jakarta.annotation.Nonnull private String providerId; + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nonnull private ConnectedAccountApprovalStatus status; + + public static final String JSON_PROPERTY_TOTAL_BALANCE = "totalBalance"; + @jakarta.annotation.Nonnull private ConnectedAccountTotalBalance totalBalance; + + public static final String JSON_PROPERTY_MANIFEST = "manifest"; + @jakarta.annotation.Nonnull private ConnectedAccountManifest manifest; + + public static final String JSON_PROPERTY_PARENT_ID = "parentId"; + @jakarta.annotation.Nullable private String parentId; + + public static final String JSON_PROPERTY_SUB_ACCOUNTS_IDS = "subAccountsIds"; + @jakarta.annotation.Nullable private List subAccountsIds = new ArrayList<>(); + + public ConnectedSingleAccountResponse() {} + + @JsonCreator + public ConnectedSingleAccountResponse( + @JsonProperty(value = JSON_PROPERTY_ID, required = true) String id, + @JsonProperty(value = JSON_PROPERTY_NAME, required = true) String name, + @JsonProperty(value = JSON_PROPERTY_PROVIDER_ID, required = true) String providerId, + @JsonProperty(value = JSON_PROPERTY_STATUS, required = true) + ConnectedAccountApprovalStatus status, + @JsonProperty(value = JSON_PROPERTY_TOTAL_BALANCE, required = true) + ConnectedAccountTotalBalance totalBalance, + @JsonProperty(value = JSON_PROPERTY_MANIFEST, required = true) + ConnectedAccountManifest manifest) { + this.id = id; + this.name = name; + this.providerId = providerId; + this.status = status; + this.totalBalance = totalBalance; + this.manifest = manifest; + } + + public ConnectedSingleAccountResponse id(@jakarta.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the connected account. + * + * @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 ConnectedSingleAccountResponse name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Human-readable name of the connected account. + * + * @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; + } + + public ConnectedSingleAccountResponse providerId( + @jakarta.annotation.Nonnull String providerId) { + this.providerId = providerId; + return this; + } + + /** + * The ID of the venue the account belongs to. + * + * @return providerId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProviderId() { + return providerId; + } + + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProviderId(@jakarta.annotation.Nonnull String providerId) { + this.providerId = providerId; + } + + public ConnectedSingleAccountResponse status( + @jakarta.annotation.Nonnull ConnectedAccountApprovalStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConnectedAccountApprovalStatus getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@jakarta.annotation.Nonnull ConnectedAccountApprovalStatus status) { + this.status = status; + } + + public ConnectedSingleAccountResponse totalBalance( + @jakarta.annotation.Nonnull ConnectedAccountTotalBalance totalBalance) { + this.totalBalance = totalBalance; + return this; + } + + /** + * Get totalBalance + * + * @return totalBalance + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConnectedAccountTotalBalance getTotalBalance() { + return totalBalance; + } + + @JsonProperty(JSON_PROPERTY_TOTAL_BALANCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotalBalance( + @jakarta.annotation.Nonnull ConnectedAccountTotalBalance totalBalance) { + this.totalBalance = totalBalance; + } + + public ConnectedSingleAccountResponse manifest( + @jakarta.annotation.Nonnull ConnectedAccountManifest manifest) { + this.manifest = manifest; + return this; + } + + /** + * Get manifest + * + * @return manifest + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_MANIFEST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ConnectedAccountManifest getManifest() { + return manifest; + } + + @JsonProperty(JSON_PROPERTY_MANIFEST) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setManifest(@jakarta.annotation.Nonnull ConnectedAccountManifest manifest) { + this.manifest = manifest; + } + + public ConnectedSingleAccountResponse parentId(@jakarta.annotation.Nullable String parentId) { + this.parentId = parentId; + return this; + } + + /** + * The ID of the parent main account, if this is a sub account. + * + * @return parentId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getParentId() { + return parentId; + } + + @JsonProperty(JSON_PROPERTY_PARENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setParentId(@jakarta.annotation.Nullable String parentId) { + this.parentId = parentId; + } + + public ConnectedSingleAccountResponse subAccountsIds( + @jakarta.annotation.Nullable List subAccountsIds) { + this.subAccountsIds = subAccountsIds; + return this; + } + + public ConnectedSingleAccountResponse addSubAccountsIdsItem(String subAccountsIdsItem) { + if (this.subAccountsIds == null) { + this.subAccountsIds = new ArrayList<>(); + } + this.subAccountsIds.add(subAccountsIdsItem); + return this; + } + + /** + * IDs of sub-accounts associated with this connected account. + * + * @return subAccountsIds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUB_ACCOUNTS_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSubAccountsIds() { + return subAccountsIds; + } + + @JsonProperty(JSON_PROPERTY_SUB_ACCOUNTS_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubAccountsIds(@jakarta.annotation.Nullable List subAccountsIds) { + this.subAccountsIds = subAccountsIds; + } + + /** Return true if this ConnectedSingleAccountResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectedSingleAccountResponse connectedSingleAccountResponse = + (ConnectedSingleAccountResponse) o; + return Objects.equals(this.id, connectedSingleAccountResponse.id) + && Objects.equals(this.name, connectedSingleAccountResponse.name) + && Objects.equals(this.providerId, connectedSingleAccountResponse.providerId) + && Objects.equals(this.status, connectedSingleAccountResponse.status) + && Objects.equals(this.totalBalance, connectedSingleAccountResponse.totalBalance) + && Objects.equals(this.manifest, connectedSingleAccountResponse.manifest) + && Objects.equals(this.parentId, connectedSingleAccountResponse.parentId) + && Objects.equals( + this.subAccountsIds, connectedSingleAccountResponse.subAccountsIds); + } + + @Override + public int hashCode() { + return Objects.hash( + id, name, providerId, status, totalBalance, manifest, parentId, subAccountsIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConnectedSingleAccountResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" providerId: ").append(toIndentedString(providerId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" totalBalance: ").append(toIndentedString(totalBalance)).append("\n"); + sb.append(" manifest: ").append(toIndentedString(manifest)).append("\n"); + sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); + sb.append(" subAccountsIds: ").append(toIndentedString(subAccountsIds)).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())))); + } + + // add `providerId` to the URL query string + if (getProviderId() != null) { + joiner.add( + String.format( + "%sproviderId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getProviderId())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `totalBalance` to the URL query string + if (getTotalBalance() != null) { + joiner.add(getTotalBalance().toUrlQueryString(prefix + "totalBalance" + suffix)); + } + + // add `manifest` to the URL query string + if (getManifest() != null) { + joiner.add(getManifest().toUrlQueryString(prefix + "manifest" + suffix)); + } + + // add `parentId` to the URL query string + if (getParentId() != null) { + joiner.add( + String.format( + "%sparentId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getParentId())))); + } + + // add `subAccountsIds` to the URL query string + if (getSubAccountsIds() != null) { + for (int i = 0; i < getSubAccountsIds().size(); i++) { + joiner.add( + String.format( + "%ssubAccountsIds%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode( + ApiClient.valueToString(getSubAccountsIds().get(i))))); + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateOrderRequest.java b/src/main/java/com/fireblocks/sdk/model/CreateOrderRequest.java new file mode 100644 index 00000000..5f274578 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateOrderRequest.java @@ -0,0 +1,359 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** CreateOrderRequest */ +@JsonPropertyOrder({ + CreateOrderRequest.JSON_PROPERTY_VIA, + CreateOrderRequest.JSON_PROPERTY_EXECUTION_REQUEST_DETAILS, + CreateOrderRequest.JSON_PROPERTY_SETTLEMENT, + CreateOrderRequest.JSON_PROPERTY_PARTICIPANTS_IDENTIFICATION, + CreateOrderRequest.JSON_PROPERTY_CUSTOMER_INTERNAL_REFERENCE_ID, + CreateOrderRequest.JSON_PROPERTY_NOTE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class CreateOrderRequest { + public static final String JSON_PROPERTY_VIA = "via"; + @jakarta.annotation.Nonnull private AccessType via; + + public static final String JSON_PROPERTY_EXECUTION_REQUEST_DETAILS = "executionRequestDetails"; + @jakarta.annotation.Nonnull private ExecutionRequestDetails executionRequestDetails; + + public static final String JSON_PROPERTY_SETTLEMENT = "settlement"; + @jakarta.annotation.Nonnull private Settlement settlement; + + public static final String JSON_PROPERTY_PARTICIPANTS_IDENTIFICATION = + "participantsIdentification"; + @jakarta.annotation.Nullable private ParticipantsIdentification participantsIdentification; + + public static final String JSON_PROPERTY_CUSTOMER_INTERNAL_REFERENCE_ID = + "customerInternalReferenceId"; + @jakarta.annotation.Nullable private String customerInternalReferenceId; + + public static final String JSON_PROPERTY_NOTE = "note"; + @jakarta.annotation.Nullable private String note; + + public CreateOrderRequest() {} + + @JsonCreator + public CreateOrderRequest( + @JsonProperty(value = JSON_PROPERTY_VIA, required = true) AccessType via, + @JsonProperty(value = JSON_PROPERTY_EXECUTION_REQUEST_DETAILS, required = true) + ExecutionRequestDetails executionRequestDetails, + @JsonProperty(value = JSON_PROPERTY_SETTLEMENT, required = true) + Settlement settlement) { + this.via = via; + this.executionRequestDetails = executionRequestDetails; + this.settlement = settlement; + } + + public CreateOrderRequest via(@jakarta.annotation.Nonnull AccessType via) { + this.via = via; + return this; + } + + /** + * Get via + * + * @return via + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VIA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AccessType getVia() { + return via; + } + + @JsonProperty(JSON_PROPERTY_VIA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVia(@jakarta.annotation.Nonnull AccessType via) { + this.via = via; + } + + public CreateOrderRequest executionRequestDetails( + @jakarta.annotation.Nonnull ExecutionRequestDetails executionRequestDetails) { + this.executionRequestDetails = executionRequestDetails; + return this; + } + + /** + * Get executionRequestDetails + * + * @return executionRequestDetails + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXECUTION_REQUEST_DETAILS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExecutionRequestDetails getExecutionRequestDetails() { + return executionRequestDetails; + } + + @JsonProperty(JSON_PROPERTY_EXECUTION_REQUEST_DETAILS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExecutionRequestDetails( + @jakarta.annotation.Nonnull ExecutionRequestDetails executionRequestDetails) { + this.executionRequestDetails = executionRequestDetails; + } + + public CreateOrderRequest settlement(@jakarta.annotation.Nonnull Settlement settlement) { + this.settlement = settlement; + return this; + } + + /** + * Get settlement + * + * @return settlement + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SETTLEMENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Settlement getSettlement() { + return settlement; + } + + @JsonProperty(JSON_PROPERTY_SETTLEMENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSettlement(@jakarta.annotation.Nonnull Settlement settlement) { + this.settlement = settlement; + } + + public CreateOrderRequest participantsIdentification( + @jakarta.annotation.Nullable ParticipantsIdentification participantsIdentification) { + this.participantsIdentification = participantsIdentification; + return this; + } + + /** + * Get participantsIdentification + * + * @return participantsIdentification + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARTICIPANTS_IDENTIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ParticipantsIdentification getParticipantsIdentification() { + return participantsIdentification; + } + + @JsonProperty(JSON_PROPERTY_PARTICIPANTS_IDENTIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setParticipantsIdentification( + @jakarta.annotation.Nullable ParticipantsIdentification participantsIdentification) { + this.participantsIdentification = participantsIdentification; + } + + public CreateOrderRequest customerInternalReferenceId( + @jakarta.annotation.Nullable String customerInternalReferenceId) { + this.customerInternalReferenceId = customerInternalReferenceId; + return this; + } + + /** + * Internal reference ID for the customer + * + * @return customerInternalReferenceId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_INTERNAL_REFERENCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomerInternalReferenceId() { + return customerInternalReferenceId; + } + + @JsonProperty(JSON_PROPERTY_CUSTOMER_INTERNAL_REFERENCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerInternalReferenceId( + @jakarta.annotation.Nullable String customerInternalReferenceId) { + this.customerInternalReferenceId = customerInternalReferenceId; + } + + public CreateOrderRequest note(@jakarta.annotation.Nullable String note) { + this.note = note; + return this; + } + + /** + * Optional note for the order + * + * @return note + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNote() { + return note; + } + + @JsonProperty(JSON_PROPERTY_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNote(@jakarta.annotation.Nullable String note) { + this.note = note; + } + + /** Return true if this CreateOrderRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateOrderRequest createOrderRequest = (CreateOrderRequest) o; + return Objects.equals(this.via, createOrderRequest.via) + && Objects.equals( + this.executionRequestDetails, createOrderRequest.executionRequestDetails) + && Objects.equals(this.settlement, createOrderRequest.settlement) + && Objects.equals( + this.participantsIdentification, + createOrderRequest.participantsIdentification) + && Objects.equals( + this.customerInternalReferenceId, + createOrderRequest.customerInternalReferenceId) + && Objects.equals(this.note, createOrderRequest.note); + } + + @Override + public int hashCode() { + return Objects.hash( + via, + executionRequestDetails, + settlement, + participantsIdentification, + customerInternalReferenceId, + note); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateOrderRequest {\n"); + sb.append(" via: ").append(toIndentedString(via)).append("\n"); + sb.append(" executionRequestDetails: ") + .append(toIndentedString(executionRequestDetails)) + .append("\n"); + sb.append(" settlement: ").append(toIndentedString(settlement)).append("\n"); + sb.append(" participantsIdentification: ") + .append(toIndentedString(participantsIdentification)) + .append("\n"); + sb.append(" customerInternalReferenceId: ") + .append(toIndentedString(customerInternalReferenceId)) + .append("\n"); + sb.append(" note: ").append(toIndentedString(note)).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 `via` to the URL query string + if (getVia() != null) { + joiner.add(getVia().toUrlQueryString(prefix + "via" + suffix)); + } + + // add `executionRequestDetails` to the URL query string + if (getExecutionRequestDetails() != null) { + joiner.add( + getExecutionRequestDetails() + .toUrlQueryString(prefix + "executionRequestDetails" + suffix)); + } + + // add `settlement` to the URL query string + if (getSettlement() != null) { + joiner.add(getSettlement().toUrlQueryString(prefix + "settlement" + suffix)); + } + + // add `participantsIdentification` to the URL query string + if (getParticipantsIdentification() != null) { + joiner.add( + getParticipantsIdentification() + .toUrlQueryString(prefix + "participantsIdentification" + suffix)); + } + + // add `customerInternalReferenceId` to the URL query string + if (getCustomerInternalReferenceId() != null) { + joiner.add( + String.format( + "%scustomerInternalReferenceId%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getCustomerInternalReferenceId())))); + } + + // add `note` to the URL query string + if (getNote() != null) { + joiner.add( + String.format( + "%snote%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getNote())))); + } + + 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 new file mode 100644 index 00000000..d5426127 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateQuote.java @@ -0,0 +1,533 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** CreateQuote */ +@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, + CreateQuote.JSON_PROPERTY_SIDE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class CreateQuote { + public static final String JSON_PROPERTY_SCOPE = "scope"; + @jakarta.annotation.Nonnull private List scope = new ArrayList<>(); + + 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; + + public static final String JSON_PROPERTY_SLIPPAGE_BPS = "slippageBps"; + @jakarta.annotation.Nullable private BigDecimal slippageBps = new BigDecimal("50"); + + public static final String JSON_PROPERTY_SETTLEMENT = "settlement"; + @jakarta.annotation.Nullable private DVPSettlement settlement; + + /** Side of the order */ + public enum SideEnum { + BUY(String.valueOf("BUY")), + + SELL(String.valueOf("SELL")); + + private String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIDE = "side"; + @jakarta.annotation.Nonnull private SideEnum side; + + public CreateQuote() {} + + @JsonCreator + public CreateQuote( + @JsonProperty(value = JSON_PROPERTY_SCOPE, required = true) + List scope, + @JsonProperty(value = JSON_PROPERTY_BASE_ASSET_ID, required = true) String baseAssetId, + @JsonProperty(value = JSON_PROPERTY_QUOTE_ASSET_ID, required = true) + String quoteAssetId, + @JsonProperty(value = JSON_PROPERTY_BASE_AMOUNT, required = true) String baseAmount, + @JsonProperty(value = JSON_PROPERTY_SIDE, required = true) SideEnum side) { + this.scope = scope; + this.baseAssetId = baseAssetId; + this.quoteAssetId = quoteAssetId; + this.baseAmount = baseAmount; + this.side = side; + } + + public CreateQuote scope(@jakarta.annotation.Nonnull List scope) { + this.scope = scope; + return this; + } + + public CreateQuote addScopeItem(CreateQuoteScopeInner scopeItem) { + if (this.scope == null) { + this.scope = new ArrayList<>(); + } + this.scope.add(scopeItem); + return this; + } + + /** + * Get scope + * + * @return scope + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getScope() { + return scope; + } + + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setScope(@jakarta.annotation.Nonnull List scope) { + this.scope = scope; + } + + public CreateQuote baseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * Get baseAssetId + * + * @return baseAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + 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; + } + + /** + * Get quoteAssetId + * + * @return quoteAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteAssetId() { + return quoteAssetId; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + 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 + * + * @return baseAmount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAmount() { + return baseAmount; + } + + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAmount(@jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + } + + public CreateQuote slippageBps(@jakarta.annotation.Nullable BigDecimal slippageBps) { + this.slippageBps = slippageBps; + return this; + } + + /** + * Slippage tolerance in basis points (bps) for defi quotes - 1 is 0.01% and 10000 is 100% + * minimum: 1 maximum: 10000 + * + * @return slippageBps + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLIPPAGE_BPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getSlippageBps() { + return slippageBps; + } + + @JsonProperty(JSON_PROPERTY_SLIPPAGE_BPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSlippageBps(@jakarta.annotation.Nullable BigDecimal slippageBps) { + this.slippageBps = slippageBps; + } + + public CreateQuote settlement(@jakarta.annotation.Nullable DVPSettlement settlement) { + this.settlement = settlement; + return this; + } + + /** + * Get settlement + * + * @return settlement + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTLEMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DVPSettlement getSettlement() { + return settlement; + } + + @JsonProperty(JSON_PROPERTY_SETTLEMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSettlement(@jakarta.annotation.Nullable DVPSettlement settlement) { + this.settlement = settlement; + } + + public CreateQuote side(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + return this; + } + + /** + * Side of the order + * + * @return side + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SideEnum getSide() { + return side; + } + + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSide(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + } + + /** Return true if this CreateQuote object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + 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) + && Objects.equals(this.side, createQuote.side); + } + + @Override + public int hashCode() { + return Objects.hash( + scope, + baseAssetId, + baseAssetRail, + quoteAssetId, + quoteAssetRail, + baseAmount, + slippageBps, + settlement, + side); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + 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"); + sb.append(" side: ").append(toIndentedString(side)).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 `scope` to the URL query string + if (getScope() != null) { + for (int i = 0; i < getScope().size(); i++) { + if (getScope().get(i) != null) { + joiner.add( + getScope() + .get(i) + .toUrlQueryString( + String.format( + "%sscope%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + 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( + String.format( + "%squoteAssetId%s=%s", + prefix, + suffix, + 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( + String.format( + "%sbaseAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBaseAmount())))); + } + + // add `slippageBps` to the URL query string + if (getSlippageBps() != null) { + joiner.add( + String.format( + "%sslippageBps%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSlippageBps())))); + } + + // add `settlement` to the URL query string + if (getSettlement() != null) { + joiner.add(getSettlement().toUrlQueryString(prefix + "settlement" + suffix)); + } + + // add `side` to the URL query string + if (getSide() != null) { + joiner.add( + String.format( + "%sside%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSide())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/CreateQuoteScopeInner.java b/src/main/java/com/fireblocks/sdk/model/CreateQuoteScopeInner.java new file mode 100644 index 00000000..98b6c41d --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CreateQuoteScopeInner.java @@ -0,0 +1,321 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.fireblocks.sdk.JSON; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.StringJoiner; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +@JsonDeserialize(using = CreateQuoteScopeInner.CreateQuoteScopeInnerDeserializer.class) +@JsonSerialize(using = CreateQuoteScopeInner.CreateQuoteScopeInnerSerializer.class) +public class CreateQuoteScopeInner extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(CreateQuoteScopeInner.class.getName()); + + public static class CreateQuoteScopeInnerSerializer + extends StdSerializer { + public CreateQuoteScopeInnerSerializer(Class t) { + super(t); + } + + public CreateQuoteScopeInnerSerializer() { + this(null); + } + + @Override + public void serialize( + CreateQuoteScopeInner value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class CreateQuoteScopeInnerDeserializer + extends StdDeserializer { + public CreateQuoteScopeInnerDeserializer() { + this(CreateQuoteScopeInner.class); + } + + public CreateQuoteScopeInnerDeserializer(Class vc) { + super(vc); + } + + @Override + public CreateQuoteScopeInner deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize AccountProviderID + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AccountProviderID.class.equals(Integer.class) + || AccountProviderID.class.equals(Long.class) + || AccountProviderID.class.equals(Float.class) + || AccountProviderID.class.equals(Double.class) + || AccountProviderID.class.equals(Boolean.class) + || AccountProviderID.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((AccountProviderID.class.equals(Integer.class) + || AccountProviderID.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((AccountProviderID.class.equals(Float.class) + || AccountProviderID.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (AccountProviderID.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (AccountProviderID.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(AccountProviderID.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 'AccountProviderID'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AccountProviderID'", e); + } + + // deserialize ProviderID + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ProviderID.class.equals(Integer.class) + || ProviderID.class.equals(Long.class) + || ProviderID.class.equals(Float.class) + || ProviderID.class.equals(Double.class) + || ProviderID.class.equals(Boolean.class) + || ProviderID.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ProviderID.class.equals(Integer.class) + || ProviderID.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ProviderID.class.equals(Float.class) + || ProviderID.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (ProviderID.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ProviderID.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ProviderID.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 'ProviderID'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ProviderID'", e); + } + + if (match == 1) { + CreateQuoteScopeInner ret = new CreateQuoteScopeInner(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for CreateQuoteScopeInner: %d classes match" + + " result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public CreateQuoteScopeInner getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "CreateQuoteScopeInner cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public CreateQuoteScopeInner() { + super("oneOf", Boolean.FALSE); + } + + public CreateQuoteScopeInner(AccountProviderID o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public CreateQuoteScopeInner(ProviderID o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("AccountProviderID", AccountProviderID.class); + schemas.put("ProviderID", ProviderID.class); + JSON.registerDescendants(CreateQuoteScopeInner.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map> getSchemas() { + return CreateQuoteScopeInner.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: AccountProviderID, ProviderID + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be + * a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(AccountProviderID.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(ProviderID.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be AccountProviderID, ProviderID"); + } + + /** + * Get the actual instance, which can be the following: AccountProviderID, ProviderID + * + * @return The actual instance (AccountProviderID, ProviderID) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AccountProviderID`. If the actual instance is not + * `AccountProviderID`, the ClassCastException will be thrown. + * + * @return The actual instance of `AccountProviderID` + * @throws ClassCastException if the instance is not `AccountProviderID` + */ + public AccountProviderID getAccountProviderID() throws ClassCastException { + return (AccountProviderID) super.getActualInstance(); + } + + /** + * Get the actual instance of `ProviderID`. If the actual instance is not `ProviderID`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `ProviderID` + * @throws ClassCastException if the instance is not `ProviderID` + */ + public ProviderID getProviderID() throws ClassCastException { + return (ProviderID) super.getActualInstance(); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof AccountProviderID) { + if (getActualInstance() != null) { + joiner.add( + ((AccountProviderID) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ProviderID) { + if (getActualInstance() != null) { + joiner.add( + ((ProviderID) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DVPSettlement.java b/src/main/java/com/fireblocks/sdk/model/DVPSettlement.java new file mode 100644 index 00000000..cdd22f37 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DVPSettlement.java @@ -0,0 +1,262 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** Source/Destination accounts for the quote (must have for defi quotes) */ +@JsonPropertyOrder({ + DVPSettlement.JSON_PROPERTY_TYPE, + DVPSettlement.JSON_PROPERTY_SOURCE_ACCOUNT, + DVPSettlement.JSON_PROPERTY_DESTINATION_ACCOUNT +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class DVPSettlement { + /** Gets or Sets type */ + public enum TypeEnum { + DVP(String.valueOf("DVP")); + + 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_SOURCE_ACCOUNT = "sourceAccount"; + @jakarta.annotation.Nonnull private SettlementSourceAccount sourceAccount; + + public static final String JSON_PROPERTY_DESTINATION_ACCOUNT = "destinationAccount"; + @jakarta.annotation.Nonnull private AccountReference destinationAccount; + + public DVPSettlement() {} + + @JsonCreator + public DVPSettlement( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_SOURCE_ACCOUNT, required = true) + SettlementSourceAccount sourceAccount, + @JsonProperty(value = JSON_PROPERTY_DESTINATION_ACCOUNT, required = true) + AccountReference destinationAccount) { + this.type = type; + this.sourceAccount = sourceAccount; + this.destinationAccount = destinationAccount; + } + + public DVPSettlement 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 DVPSettlement sourceAccount( + @jakarta.annotation.Nonnull SettlementSourceAccount sourceAccount) { + this.sourceAccount = sourceAccount; + return this; + } + + /** + * Get sourceAccount + * + * @return sourceAccount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SOURCE_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SettlementSourceAccount getSourceAccount() { + return sourceAccount; + } + + @JsonProperty(JSON_PROPERTY_SOURCE_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSourceAccount( + @jakarta.annotation.Nonnull SettlementSourceAccount sourceAccount) { + this.sourceAccount = sourceAccount; + } + + public DVPSettlement destinationAccount( + @jakarta.annotation.Nonnull AccountReference destinationAccount) { + this.destinationAccount = destinationAccount; + return this; + } + + /** + * Get destinationAccount + * + * @return destinationAccount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESTINATION_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AccountReference getDestinationAccount() { + return destinationAccount; + } + + @JsonProperty(JSON_PROPERTY_DESTINATION_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDestinationAccount( + @jakarta.annotation.Nonnull AccountReference destinationAccount) { + this.destinationAccount = destinationAccount; + } + + /** Return true if this DVPSettlement object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DVPSettlement dvPSettlement = (DVPSettlement) o; + return Objects.equals(this.type, dvPSettlement.type) + && Objects.equals(this.sourceAccount, dvPSettlement.sourceAccount) + && Objects.equals(this.destinationAccount, dvPSettlement.destinationAccount); + } + + @Override + public int hashCode() { + return Objects.hash(type, sourceAccount, destinationAccount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DVPSettlement {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" sourceAccount: ").append(toIndentedString(sourceAccount)).append("\n"); + sb.append(" destinationAccount: ") + .append(toIndentedString(destinationAccount)) + .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 `sourceAccount` to the URL query string + if (getSourceAccount() != null) { + joiner.add(getSourceAccount().toUrlQueryString(prefix + "sourceAccount" + suffix)); + } + + // add `destinationAccount` to the URL query string + if (getDestinationAccount() != null) { + joiner.add( + getDestinationAccount() + .toUrlQueryString(prefix + "destinationAccount" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DirectAccess.java b/src/main/java/com/fireblocks/sdk/model/DirectAccess.java new file mode 100644 index 00000000..fbff8b3f --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DirectAccess.java @@ -0,0 +1,218 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** DirectAccess */ +@JsonPropertyOrder({DirectAccess.JSON_PROPERTY_TYPE, DirectAccess.JSON_PROPERTY_PROVIDER_ID}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class DirectAccess { + /** Indicates this uses direct provider access */ + public enum TypeEnum { + PROVIDER(String.valueOf("PROVIDER")); + + 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_PROVIDER_ID = "providerId"; + @jakarta.annotation.Nonnull private String providerId; + + public DirectAccess() {} + + @JsonCreator + public DirectAccess( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_PROVIDER_ID, required = true) String providerId) { + this.type = type; + this.providerId = providerId; + } + + public DirectAccess type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Indicates this uses direct provider access + * + * @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 DirectAccess providerId(@jakarta.annotation.Nonnull String providerId) { + this.providerId = providerId; + return this; + } + + /** + * The ID of the provider + * + * @return providerId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getProviderId() { + return providerId; + } + + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setProviderId(@jakarta.annotation.Nonnull String providerId) { + this.providerId = providerId; + } + + /** Return true if this DirectAccess object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DirectAccess directAccess = (DirectAccess) o; + return Objects.equals(this.type, directAccess.type) + && Objects.equals(this.providerId, directAccess.providerId); + } + + @Override + public int hashCode() { + return Objects.hash(type, providerId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DirectAccess {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" providerId: ").append(toIndentedString(providerId)).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 `providerId` to the URL query string + if (getProviderId() != null) { + joiner.add( + String.format( + "%sproviderId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getProviderId())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/DirectAccessProvider.java b/src/main/java/com/fireblocks/sdk/model/DirectAccessProvider.java new file mode 100644 index 00000000..1cafc291 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/DirectAccessProvider.java @@ -0,0 +1,395 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** DirectAccessProvider */ +@JsonPropertyOrder({ + DirectAccessProvider.JSON_PROPERTY_ID, + DirectAccessProvider.JSON_PROPERTY_NAME, + DirectAccessProvider.JSON_PROPERTY_LOGO, + DirectAccessProvider.JSON_PROPERTY_ACCOUNT_BASED, + DirectAccessProvider.JSON_PROPERTY_APPROVED, + DirectAccessProvider.JSON_PROPERTY_HAS_TERMS_OF_SERVICE, + DirectAccessProvider.JSON_PROPERTY_TERMS_OF_SERVICE_URL +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class DirectAccessProvider { + 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 static final String JSON_PROPERTY_LOGO = "logo"; + @jakarta.annotation.Nullable private String logo; + + public static final String JSON_PROPERTY_ACCOUNT_BASED = "accountBased"; + @jakarta.annotation.Nonnull private Boolean accountBased; + + public static final String JSON_PROPERTY_APPROVED = "approved"; + @jakarta.annotation.Nullable private Boolean approved; + + public static final String JSON_PROPERTY_HAS_TERMS_OF_SERVICE = "hasTermsOfService"; + @jakarta.annotation.Nonnull private Boolean hasTermsOfService; + + public static final String JSON_PROPERTY_TERMS_OF_SERVICE_URL = "termsOfServiceUrl"; + @jakarta.annotation.Nullable private String termsOfServiceUrl; + + public DirectAccessProvider() {} + + @JsonCreator + public DirectAccessProvider( + @JsonProperty(value = JSON_PROPERTY_ID, required = true) String id, + @JsonProperty(value = JSON_PROPERTY_NAME, required = true) String name, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_BASED, required = true) + Boolean accountBased, + @JsonProperty(value = JSON_PROPERTY_HAS_TERMS_OF_SERVICE, required = true) + Boolean hasTermsOfService) { + this.id = id; + this.name = name; + this.accountBased = accountBased; + this.hasTermsOfService = hasTermsOfService; + } + + public DirectAccessProvider id(@jakarta.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Unique identifier for the provider + * + * @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 DirectAccessProvider name(@jakarta.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * Display name of the provider + * + * @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; + } + + public DirectAccessProvider logo(@jakarta.annotation.Nullable String logo) { + this.logo = logo; + return this; + } + + /** + * URL to the logo image of the provider + * + * @return logo + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLogo() { + return logo; + } + + @JsonProperty(JSON_PROPERTY_LOGO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLogo(@jakarta.annotation.Nullable String logo) { + this.logo = logo; + } + + public DirectAccessProvider accountBased(@jakarta.annotation.Nonnull Boolean accountBased) { + this.accountBased = accountBased; + return this; + } + + /** + * Indicates whether the provider access model is through accounts or directly + * + * @return accountBased + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_BASED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getAccountBased() { + return accountBased; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_BASED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountBased(@jakarta.annotation.Nonnull Boolean accountBased) { + this.accountBased = accountBased; + } + + public DirectAccessProvider approved(@jakarta.annotation.Nullable Boolean approved) { + this.approved = approved; + return this; + } + + /** + * Whether the provider was approved for use + * + * @return approved + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPROVED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getApproved() { + return approved; + } + + @JsonProperty(JSON_PROPERTY_APPROVED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setApproved(@jakarta.annotation.Nullable Boolean approved) { + this.approved = approved; + } + + public DirectAccessProvider hasTermsOfService( + @jakarta.annotation.Nonnull Boolean hasTermsOfService) { + this.hasTermsOfService = hasTermsOfService; + return this; + } + + /** + * Whether the provider has terms of service + * + * @return hasTermsOfService + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HAS_TERMS_OF_SERVICE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getHasTermsOfService() { + return hasTermsOfService; + } + + @JsonProperty(JSON_PROPERTY_HAS_TERMS_OF_SERVICE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHasTermsOfService(@jakarta.annotation.Nonnull Boolean hasTermsOfService) { + this.hasTermsOfService = hasTermsOfService; + } + + public DirectAccessProvider termsOfServiceUrl( + @jakarta.annotation.Nullable String termsOfServiceUrl) { + this.termsOfServiceUrl = termsOfServiceUrl; + return this; + } + + /** + * URL to the terms of service document + * + * @return termsOfServiceUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TERMS_OF_SERVICE_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTermsOfServiceUrl() { + return termsOfServiceUrl; + } + + @JsonProperty(JSON_PROPERTY_TERMS_OF_SERVICE_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTermsOfServiceUrl(@jakarta.annotation.Nullable String termsOfServiceUrl) { + this.termsOfServiceUrl = termsOfServiceUrl; + } + + /** Return true if this DirectAccessProvider object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DirectAccessProvider directAccessProvider = (DirectAccessProvider) o; + return Objects.equals(this.id, directAccessProvider.id) + && Objects.equals(this.name, directAccessProvider.name) + && Objects.equals(this.logo, directAccessProvider.logo) + && Objects.equals(this.accountBased, directAccessProvider.accountBased) + && Objects.equals(this.approved, directAccessProvider.approved) + && Objects.equals(this.hasTermsOfService, directAccessProvider.hasTermsOfService) + && Objects.equals(this.termsOfServiceUrl, directAccessProvider.termsOfServiceUrl); + } + + @Override + public int hashCode() { + return Objects.hash( + id, name, logo, accountBased, approved, hasTermsOfService, termsOfServiceUrl); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DirectAccessProvider {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" logo: ").append(toIndentedString(logo)).append("\n"); + sb.append(" accountBased: ").append(toIndentedString(accountBased)).append("\n"); + sb.append(" approved: ").append(toIndentedString(approved)).append("\n"); + sb.append(" hasTermsOfService: ") + .append(toIndentedString(hasTermsOfService)) + .append("\n"); + sb.append(" termsOfServiceUrl: ") + .append(toIndentedString(termsOfServiceUrl)) + .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())))); + } + + // add `logo` to the URL query string + if (getLogo() != null) { + joiner.add( + String.format( + "%slogo%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getLogo())))); + } + + // add `accountBased` to the URL query string + if (getAccountBased() != null) { + joiner.add( + String.format( + "%saccountBased%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAccountBased())))); + } + + // add `approved` to the URL query string + if (getApproved() != null) { + joiner.add( + String.format( + "%sapproved%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getApproved())))); + } + + // add `hasTermsOfService` to the URL query string + if (getHasTermsOfService() != null) { + joiner.add( + String.format( + "%shasTermsOfService%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getHasTermsOfService())))); + } + + // add `termsOfServiceUrl` to the URL query string + if (getTermsOfServiceUrl() != null) { + joiner.add( + String.format( + "%stermsOfServiceUrl%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTermsOfServiceUrl())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ErrorCodes.java b/src/main/java/com/fireblocks/sdk/model/ErrorCodes.java new file mode 100644 index 00000000..bee62cc3 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ErrorCodes.java @@ -0,0 +1,76 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Gets or Sets ErrorCodes */ +public enum ErrorCodes { + INVALID_TOKEN("INVALID_TOKEN"), + + MISSING_PARAMETER("MISSING_PARAMETER"), + + INVALID_PARAMETER("INVALID_PARAMETER"), + + RESOURCE_NOT_FOUND("RESOURCE_NOT_FOUND"), + + INVALID_TIME_RANGE("INVALID_TIME_RANGE"), + + UNAUTHORIZED("UNAUTHORIZED"), + + ACCOUNT_NOT_ACTIVE("ACCOUNT_NOT_ACTIVE"), + + UNMANAGED_WALLET_NOT_APPROVED("UNMANAGED_WALLET_NOT_APPROVED"); + + private String value; + + ErrorCodes(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ErrorCodes fromValue(String value) { + for (ErrorCodes b : ErrorCodes.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/ExchangeAsset.java b/src/main/java/com/fireblocks/sdk/model/ExchangeAsset.java index 6fd0e542..b678d0b8 100644 --- a/src/main/java/com/fireblocks/sdk/model/ExchangeAsset.java +++ b/src/main/java/com/fireblocks/sdk/model/ExchangeAsset.java @@ -27,7 +27,11 @@ ExchangeAsset.JSON_PROPERTY_LOCKED_AMOUNT, ExchangeAsset.JSON_PROPERTY_TOTAL, ExchangeAsset.JSON_PROPERTY_AVAILABLE, - ExchangeAsset.JSON_PROPERTY_CREDIT + ExchangeAsset.JSON_PROPERTY_CREDIT, + ExchangeAsset.JSON_PROPERTY_ASSET_ID, + ExchangeAsset.JSON_PROPERTY_PROVIDER_SYMBOL, + ExchangeAsset.JSON_PROPERTY_ASSET_SYMBOL, + ExchangeAsset.JSON_PROPERTY_ASSET_LEGACY_ID }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", @@ -51,6 +55,18 @@ public class ExchangeAsset { public static final String JSON_PROPERTY_CREDIT = "credit"; @jakarta.annotation.Nullable private String credit; + public static final String JSON_PROPERTY_ASSET_ID = "assetId"; + @jakarta.annotation.Nullable private String assetId; + + public static final String JSON_PROPERTY_PROVIDER_SYMBOL = "providerSymbol"; + @jakarta.annotation.Nullable private String providerSymbol; + + public static final String JSON_PROPERTY_ASSET_SYMBOL = "assetSymbol"; + @jakarta.annotation.Nullable private String assetSymbol; + + public static final String JSON_PROPERTY_ASSET_LEGACY_ID = "assetLegacyId"; + @jakarta.annotation.Nullable private String assetLegacyId; + public ExchangeAsset() {} public ExchangeAsset id(@jakarta.annotation.Nullable String id) { @@ -191,6 +207,98 @@ public void setCredit(@jakarta.annotation.Nullable String credit) { this.credit = credit; } + public ExchangeAsset assetId(@jakarta.annotation.Nullable String assetId) { + this.assetId = assetId; + return this; + } + + /** + * The id of the asset + * + * @return assetId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAssetId() { + return assetId; + } + + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAssetId(@jakarta.annotation.Nullable String assetId) { + this.assetId = assetId; + } + + public ExchangeAsset providerSymbol(@jakarta.annotation.Nullable String providerSymbol) { + this.providerSymbol = providerSymbol; + return this; + } + + /** + * The provider symbol of the asset + * + * @return providerSymbol + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROVIDER_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getProviderSymbol() { + return providerSymbol; + } + + @JsonProperty(JSON_PROPERTY_PROVIDER_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProviderSymbol(@jakarta.annotation.Nullable String providerSymbol) { + this.providerSymbol = providerSymbol; + } + + public ExchangeAsset assetSymbol(@jakarta.annotation.Nullable String assetSymbol) { + this.assetSymbol = assetSymbol; + return this; + } + + /** + * The asset symbol of the asset + * + * @return assetSymbol + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASSET_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAssetSymbol() { + return assetSymbol; + } + + @JsonProperty(JSON_PROPERTY_ASSET_SYMBOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAssetSymbol(@jakarta.annotation.Nullable String assetSymbol) { + this.assetSymbol = assetSymbol; + } + + public ExchangeAsset assetLegacyId(@jakarta.annotation.Nullable String assetLegacyId) { + this.assetLegacyId = assetLegacyId; + return this; + } + + /** + * The asset legacy id of the asset + * + * @return assetLegacyId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASSET_LEGACY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAssetLegacyId() { + return assetLegacyId; + } + + @JsonProperty(JSON_PROPERTY_ASSET_LEGACY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAssetLegacyId(@jakarta.annotation.Nullable String assetLegacyId) { + this.assetLegacyId = assetLegacyId; + } + /** Return true if this ExchangeAsset object is equal to o. */ @Override public boolean equals(Object o) { @@ -206,12 +314,26 @@ public boolean equals(Object o) { && Objects.equals(this.lockedAmount, exchangeAsset.lockedAmount) && Objects.equals(this.total, exchangeAsset.total) && Objects.equals(this.available, exchangeAsset.available) - && Objects.equals(this.credit, exchangeAsset.credit); + && Objects.equals(this.credit, exchangeAsset.credit) + && Objects.equals(this.assetId, exchangeAsset.assetId) + && Objects.equals(this.providerSymbol, exchangeAsset.providerSymbol) + && Objects.equals(this.assetSymbol, exchangeAsset.assetSymbol) + && Objects.equals(this.assetLegacyId, exchangeAsset.assetLegacyId); } @Override public int hashCode() { - return Objects.hash(id, balance, lockedAmount, total, available, credit); + return Objects.hash( + id, + balance, + lockedAmount, + total, + available, + credit, + assetId, + providerSymbol, + assetSymbol, + assetLegacyId); } @Override @@ -224,6 +346,10 @@ public String toString() { sb.append(" total: ").append(toIndentedString(total)).append("\n"); sb.append(" available: ").append(toIndentedString(available)).append("\n"); sb.append(" credit: ").append(toIndentedString(credit)).append("\n"); + sb.append(" assetId: ").append(toIndentedString(assetId)).append("\n"); + sb.append(" providerSymbol: ").append(toIndentedString(providerSymbol)).append("\n"); + sb.append(" assetSymbol: ").append(toIndentedString(assetSymbol)).append("\n"); + sb.append(" assetLegacyId: ").append(toIndentedString(assetLegacyId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -329,6 +455,46 @@ public String toUrlQueryString(String prefix) { ApiClient.urlEncode(ApiClient.valueToString(getCredit())))); } + // add `assetId` to the URL query string + if (getAssetId() != null) { + joiner.add( + String.format( + "%sassetId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAssetId())))); + } + + // add `providerSymbol` to the URL query string + if (getProviderSymbol() != null) { + joiner.add( + String.format( + "%sproviderSymbol%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getProviderSymbol())))); + } + + // add `assetSymbol` to the URL query string + if (getAssetSymbol() != null) { + joiner.add( + String.format( + "%sassetSymbol%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAssetSymbol())))); + } + + // add `assetLegacyId` to the URL query string + if (getAssetLegacyId() != null) { + joiner.add( + String.format( + "%sassetLegacyId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAssetLegacyId())))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/fireblocks/sdk/model/ExecutionRequestBaseDetails.java b/src/main/java/com/fireblocks/sdk/model/ExecutionRequestBaseDetails.java new file mode 100644 index 00000000..a975283c --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ExecutionRequestBaseDetails.java @@ -0,0 +1,388 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** ExecutionRequestBaseDetails */ +@JsonPropertyOrder({ + ExecutionRequestBaseDetails.JSON_PROPERTY_SIDE, + ExecutionRequestBaseDetails.JSON_PROPERTY_BASE_AMOUNT, + ExecutionRequestBaseDetails.JSON_PROPERTY_BASE_ASSET_ID, + ExecutionRequestBaseDetails.JSON_PROPERTY_BASE_ASSET_RAIL, + ExecutionRequestBaseDetails.JSON_PROPERTY_QUOTE_ASSET_ID, + ExecutionRequestBaseDetails.JSON_PROPERTY_QUOTE_ASSET_RAIL +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ExecutionRequestBaseDetails { + /** Side of the order */ + public enum SideEnum { + BUY(String.valueOf("BUY")), + + SELL(String.valueOf("SELL")); + + private String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIDE = "side"; + @jakarta.annotation.Nonnull private SideEnum side = SideEnum.BUY; + + public static final String JSON_PROPERTY_BASE_AMOUNT = "baseAmount"; + @jakarta.annotation.Nonnull private String baseAmount; + + 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 ExecutionRequestBaseDetails() {} + + @JsonCreator + public ExecutionRequestBaseDetails( + @JsonProperty(value = JSON_PROPERTY_SIDE, required = true) SideEnum side, + @JsonProperty(value = JSON_PROPERTY_BASE_AMOUNT, required = true) String baseAmount, + @JsonProperty(value = JSON_PROPERTY_BASE_ASSET_ID, required = true) String baseAssetId, + @JsonProperty(value = JSON_PROPERTY_QUOTE_ASSET_ID, required = true) + String quoteAssetId) { + this.side = side; + this.baseAmount = baseAmount; + this.baseAssetId = baseAssetId; + this.quoteAssetId = quoteAssetId; + } + + public ExecutionRequestBaseDetails side(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + return this; + } + + /** + * Side of the order + * + * @return side + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SideEnum getSide() { + return side; + } + + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSide(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + } + + public ExecutionRequestBaseDetails baseAmount(@jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + return this; + } + + /** + * Amount to convert + * + * @return baseAmount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAmount() { + return baseAmount; + } + + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAmount(@jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + } + + public ExecutionRequestBaseDetails baseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * Source asset identifier + * + * @return baseAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + } + + public ExecutionRequestBaseDetails 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 ExecutionRequestBaseDetails quoteAssetId( + @jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + return this; + } + + /** + * Target asset identifier + * + * @return quoteAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteAssetId() { + return quoteAssetId; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteAssetId(@jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + } + + public ExecutionRequestBaseDetails 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; + } + + /** Return true if this ExecutionRequestBaseDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecutionRequestBaseDetails executionRequestBaseDetails = (ExecutionRequestBaseDetails) o; + return Objects.equals(this.side, executionRequestBaseDetails.side) + && Objects.equals(this.baseAmount, executionRequestBaseDetails.baseAmount) + && Objects.equals(this.baseAssetId, executionRequestBaseDetails.baseAssetId) + && Objects.equals(this.baseAssetRail, executionRequestBaseDetails.baseAssetRail) + && Objects.equals(this.quoteAssetId, executionRequestBaseDetails.quoteAssetId) + && Objects.equals(this.quoteAssetRail, executionRequestBaseDetails.quoteAssetRail); + } + + @Override + public int hashCode() { + return Objects.hash( + side, baseAmount, baseAssetId, baseAssetRail, quoteAssetId, quoteAssetRail); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecutionRequestBaseDetails {\n"); + sb.append(" side: ").append(toIndentedString(side)).append("\n"); + sb.append(" baseAmount: ").append(toIndentedString(baseAmount)).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("}"); + 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 `side` to the URL query string + if (getSide() != null) { + joiner.add( + String.format( + "%sside%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSide())))); + } + + // add `baseAmount` to the URL query string + if (getBaseAmount() != null) { + joiner.add( + String.format( + "%sbaseAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBaseAmount())))); + } + + // add `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + 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( + String.format( + "%squoteAssetId%s=%s", + prefix, + suffix, + 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())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ExecutionRequestDetails.java b/src/main/java/com/fireblocks/sdk/model/ExecutionRequestDetails.java new file mode 100644 index 00000000..57077c5a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ExecutionRequestDetails.java @@ -0,0 +1,447 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.fireblocks.sdk.JSON; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.StringJoiner; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +@JsonDeserialize(using = ExecutionRequestDetails.ExecutionRequestDetailsDeserializer.class) +@JsonSerialize(using = ExecutionRequestDetails.ExecutionRequestDetailsSerializer.class) +public class ExecutionRequestDetails extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(ExecutionRequestDetails.class.getName()); + + public static class ExecutionRequestDetailsSerializer + extends StdSerializer { + public ExecutionRequestDetailsSerializer(Class t) { + super(t); + } + + public ExecutionRequestDetailsSerializer() { + this(null); + } + + @Override + public void serialize( + ExecutionRequestDetails value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class ExecutionRequestDetailsDeserializer + extends StdDeserializer { + public ExecutionRequestDetailsDeserializer() { + this(ExecutionRequestDetails.class); + } + + public ExecutionRequestDetailsDeserializer(Class vc) { + super(vc); + } + + @Override + public ExecutionRequestDetails deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize LimitExecutionRequestDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LimitExecutionRequestDetails.class.equals(Integer.class) + || LimitExecutionRequestDetails.class.equals(Long.class) + || LimitExecutionRequestDetails.class.equals(Float.class) + || LimitExecutionRequestDetails.class.equals(Double.class) + || LimitExecutionRequestDetails.class.equals(Boolean.class) + || LimitExecutionRequestDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((LimitExecutionRequestDetails.class.equals(Integer.class) + || LimitExecutionRequestDetails.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((LimitExecutionRequestDetails.class.equals(Float.class) + || LimitExecutionRequestDetails.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (LimitExecutionRequestDetails.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (LimitExecutionRequestDetails.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(LimitExecutionRequestDetails.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 'LimitExecutionRequestDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'LimitExecutionRequestDetails'", + e); + } + + // deserialize MarketExecutionRequestDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (MarketExecutionRequestDetails.class.equals(Integer.class) + || MarketExecutionRequestDetails.class.equals(Long.class) + || MarketExecutionRequestDetails.class.equals(Float.class) + || MarketExecutionRequestDetails.class.equals(Double.class) + || MarketExecutionRequestDetails.class.equals(Boolean.class) + || MarketExecutionRequestDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((MarketExecutionRequestDetails.class.equals(Integer.class) + || MarketExecutionRequestDetails.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((MarketExecutionRequestDetails.class.equals(Float.class) + || MarketExecutionRequestDetails.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (MarketExecutionRequestDetails.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (MarketExecutionRequestDetails.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(MarketExecutionRequestDetails.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 'MarketExecutionRequestDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'MarketExecutionRequestDetails'", + e); + } + + // deserialize QuoteExecutionWithRequoteRequestDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (QuoteExecutionWithRequoteRequestDetails.class.equals(Integer.class) + || QuoteExecutionWithRequoteRequestDetails.class.equals(Long.class) + || QuoteExecutionWithRequoteRequestDetails.class.equals(Float.class) + || QuoteExecutionWithRequoteRequestDetails.class.equals(Double.class) + || QuoteExecutionWithRequoteRequestDetails.class.equals(Boolean.class) + || QuoteExecutionWithRequoteRequestDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((QuoteExecutionWithRequoteRequestDetails.class.equals( + Integer.class) + || QuoteExecutionWithRequoteRequestDetails.class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((QuoteExecutionWithRequoteRequestDetails.class.equals(Float.class) + || QuoteExecutionWithRequoteRequestDetails.class + .equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (QuoteExecutionWithRequoteRequestDetails.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (QuoteExecutionWithRequoteRequestDetails.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(QuoteExecutionWithRequoteRequestDetails.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 'QuoteExecutionWithRequoteRequestDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'QuoteExecutionWithRequoteRequestDetails'", + e); + } + + if (match == 1) { + ExecutionRequestDetails ret = new ExecutionRequestDetails(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for ExecutionRequestDetails: %d classes match" + + " result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public ExecutionRequestDetails getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "ExecutionRequestDetails cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public ExecutionRequestDetails() { + super("oneOf", Boolean.FALSE); + } + + public ExecutionRequestDetails(LimitExecutionRequestDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public ExecutionRequestDetails(MarketExecutionRequestDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public ExecutionRequestDetails(QuoteExecutionWithRequoteRequestDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("LimitExecutionRequestDetails", LimitExecutionRequestDetails.class); + schemas.put("MarketExecutionRequestDetails", MarketExecutionRequestDetails.class); + schemas.put( + "QuoteExecutionWithRequoteRequestDetails", + QuoteExecutionWithRequoteRequestDetails.class); + JSON.registerDescendants( + ExecutionRequestDetails.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("LIMIT", LimitExecutionRequestDetails.class); + mappings.put("MARKET", MarketExecutionRequestDetails.class); + mappings.put("QUOTE", QuoteExecutionWithRequoteRequestDetails.class); + mappings.put("LimitExecutionRequestDetails", LimitExecutionRequestDetails.class); + mappings.put("MarketExecutionRequestDetails", MarketExecutionRequestDetails.class); + mappings.put( + "QuoteExecutionWithRequoteRequestDetails", + QuoteExecutionWithRequoteRequestDetails.class); + mappings.put("ExecutionRequestDetails", ExecutionRequestDetails.class); + JSON.registerDiscriminator(ExecutionRequestDetails.class, "type", mappings); + } + + @Override + public Map> getSchemas() { + return ExecutionRequestDetails.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: LimitExecutionRequestDetails, MarketExecutionRequestDetails, + * QuoteExecutionWithRequoteRequestDetails + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be + * a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf( + LimitExecutionRequestDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + MarketExecutionRequestDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + QuoteExecutionWithRequoteRequestDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be LimitExecutionRequestDetails," + + " MarketExecutionRequestDetails, QuoteExecutionWithRequoteRequestDetails"); + } + + /** + * Get the actual instance, which can be the following: LimitExecutionRequestDetails, + * MarketExecutionRequestDetails, QuoteExecutionWithRequoteRequestDetails + * + * @return The actual instance (LimitExecutionRequestDetails, MarketExecutionRequestDetails, + * QuoteExecutionWithRequoteRequestDetails) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `LimitExecutionRequestDetails`. If the actual instance is not + * `LimitExecutionRequestDetails`, the ClassCastException will be thrown. + * + * @return The actual instance of `LimitExecutionRequestDetails` + * @throws ClassCastException if the instance is not `LimitExecutionRequestDetails` + */ + public LimitExecutionRequestDetails getLimitExecutionRequestDetails() + throws ClassCastException { + return (LimitExecutionRequestDetails) super.getActualInstance(); + } + + /** + * Get the actual instance of `MarketExecutionRequestDetails`. If the actual instance is not + * `MarketExecutionRequestDetails`, the ClassCastException will be thrown. + * + * @return The actual instance of `MarketExecutionRequestDetails` + * @throws ClassCastException if the instance is not `MarketExecutionRequestDetails` + */ + public MarketExecutionRequestDetails getMarketExecutionRequestDetails() + throws ClassCastException { + return (MarketExecutionRequestDetails) super.getActualInstance(); + } + + /** + * Get the actual instance of `QuoteExecutionWithRequoteRequestDetails`. If the actual instance + * is not `QuoteExecutionWithRequoteRequestDetails`, the ClassCastException will be thrown. + * + * @return The actual instance of `QuoteExecutionWithRequoteRequestDetails` + * @throws ClassCastException if the instance is not `QuoteExecutionWithRequoteRequestDetails` + */ + public QuoteExecutionWithRequoteRequestDetails getQuoteExecutionWithRequoteRequestDetails() + throws ClassCastException { + return (QuoteExecutionWithRequoteRequestDetails) super.getActualInstance(); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof LimitExecutionRequestDetails) { + if (getActualInstance() != null) { + joiner.add( + ((LimitExecutionRequestDetails) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof MarketExecutionRequestDetails) { + if (getActualInstance() != null) { + joiner.add( + ((MarketExecutionRequestDetails) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof QuoteExecutionWithRequoteRequestDetails) { + if (getActualInstance() != null) { + joiner.add( + ((QuoteExecutionWithRequoteRequestDetails) getActualInstance()) + .toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ExecutionResponseBaseDetails.java b/src/main/java/com/fireblocks/sdk/model/ExecutionResponseBaseDetails.java new file mode 100644 index 00000000..31e4216a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ExecutionResponseBaseDetails.java @@ -0,0 +1,390 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** ExecutionResponseBaseDetails */ +@JsonPropertyOrder({ + ExecutionResponseBaseDetails.JSON_PROPERTY_SIDE, + ExecutionResponseBaseDetails.JSON_PROPERTY_BASE_AMOUNT, + ExecutionResponseBaseDetails.JSON_PROPERTY_BASE_ASSET_ID, + ExecutionResponseBaseDetails.JSON_PROPERTY_BASE_ASSET_RAIL, + ExecutionResponseBaseDetails.JSON_PROPERTY_QUOTE_ASSET_ID, + ExecutionResponseBaseDetails.JSON_PROPERTY_QUOTE_ASSET_RAIL +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ExecutionResponseBaseDetails { + /** Side of the order */ + public enum SideEnum { + BUY(String.valueOf("BUY")), + + SELL(String.valueOf("SELL")); + + private String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIDE = "side"; + @jakarta.annotation.Nonnull private SideEnum side = SideEnum.BUY; + + public static final String JSON_PROPERTY_BASE_AMOUNT = "baseAmount"; + @jakarta.annotation.Nonnull private String baseAmount; + + 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 ExecutionResponseBaseDetails() {} + + @JsonCreator + public ExecutionResponseBaseDetails( + @JsonProperty(value = JSON_PROPERTY_SIDE, required = true) SideEnum side, + @JsonProperty(value = JSON_PROPERTY_BASE_AMOUNT, required = true) String baseAmount, + @JsonProperty(value = JSON_PROPERTY_BASE_ASSET_ID, required = true) String baseAssetId, + @JsonProperty(value = JSON_PROPERTY_QUOTE_ASSET_ID, required = true) + String quoteAssetId) { + this.side = side; + this.baseAmount = baseAmount; + this.baseAssetId = baseAssetId; + this.quoteAssetId = quoteAssetId; + } + + public ExecutionResponseBaseDetails side(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + return this; + } + + /** + * Side of the order + * + * @return side + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SideEnum getSide() { + return side; + } + + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSide(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + } + + public ExecutionResponseBaseDetails baseAmount(@jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + return this; + } + + /** + * Amount to convert + * + * @return baseAmount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAmount() { + return baseAmount; + } + + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAmount(@jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + } + + public ExecutionResponseBaseDetails baseAssetId( + @jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * Source asset identifier + * + * @return baseAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + } + + public ExecutionResponseBaseDetails 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 ExecutionResponseBaseDetails quoteAssetId( + @jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + return this; + } + + /** + * Target asset identifier + * + * @return quoteAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteAssetId() { + return quoteAssetId; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteAssetId(@jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + } + + public ExecutionResponseBaseDetails 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; + } + + /** Return true if this ExecutionResponseBaseDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecutionResponseBaseDetails executionResponseBaseDetails = + (ExecutionResponseBaseDetails) o; + return Objects.equals(this.side, executionResponseBaseDetails.side) + && Objects.equals(this.baseAmount, executionResponseBaseDetails.baseAmount) + && Objects.equals(this.baseAssetId, executionResponseBaseDetails.baseAssetId) + && Objects.equals(this.baseAssetRail, executionResponseBaseDetails.baseAssetRail) + && Objects.equals(this.quoteAssetId, executionResponseBaseDetails.quoteAssetId) + && Objects.equals(this.quoteAssetRail, executionResponseBaseDetails.quoteAssetRail); + } + + @Override + public int hashCode() { + return Objects.hash( + side, baseAmount, baseAssetId, baseAssetRail, quoteAssetId, quoteAssetRail); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecutionResponseBaseDetails {\n"); + sb.append(" side: ").append(toIndentedString(side)).append("\n"); + sb.append(" baseAmount: ").append(toIndentedString(baseAmount)).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("}"); + 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 `side` to the URL query string + if (getSide() != null) { + joiner.add( + String.format( + "%sside%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSide())))); + } + + // add `baseAmount` to the URL query string + if (getBaseAmount() != null) { + joiner.add( + String.format( + "%sbaseAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBaseAmount())))); + } + + // add `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + 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( + String.format( + "%squoteAssetId%s=%s", + prefix, + suffix, + 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())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ExecutionResponseDetails.java b/src/main/java/com/fireblocks/sdk/model/ExecutionResponseDetails.java new file mode 100644 index 00000000..b7b3675a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ExecutionResponseDetails.java @@ -0,0 +1,450 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.fireblocks.sdk.JSON; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.StringJoiner; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +@JsonDeserialize(using = ExecutionResponseDetails.ExecutionResponseDetailsDeserializer.class) +@JsonSerialize(using = ExecutionResponseDetails.ExecutionResponseDetailsSerializer.class) +public class ExecutionResponseDetails extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(ExecutionResponseDetails.class.getName()); + + public static class ExecutionResponseDetailsSerializer + extends StdSerializer { + public ExecutionResponseDetailsSerializer(Class t) { + super(t); + } + + public ExecutionResponseDetailsSerializer() { + this(null); + } + + @Override + public void serialize( + ExecutionResponseDetails value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class ExecutionResponseDetailsDeserializer + extends StdDeserializer { + public ExecutionResponseDetailsDeserializer() { + this(ExecutionResponseDetails.class); + } + + public ExecutionResponseDetailsDeserializer(Class vc) { + super(vc); + } + + @Override + public ExecutionResponseDetails deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize LimitExecutionResponseDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LimitExecutionResponseDetails.class.equals(Integer.class) + || LimitExecutionResponseDetails.class.equals(Long.class) + || LimitExecutionResponseDetails.class.equals(Float.class) + || LimitExecutionResponseDetails.class.equals(Double.class) + || LimitExecutionResponseDetails.class.equals(Boolean.class) + || LimitExecutionResponseDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((LimitExecutionResponseDetails.class.equals(Integer.class) + || LimitExecutionResponseDetails.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((LimitExecutionResponseDetails.class.equals(Float.class) + || LimitExecutionResponseDetails.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (LimitExecutionResponseDetails.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (LimitExecutionResponseDetails.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(LimitExecutionResponseDetails.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 'LimitExecutionResponseDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'LimitExecutionResponseDetails'", + e); + } + + // deserialize MarketExecutionResponseDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (MarketExecutionResponseDetails.class.equals(Integer.class) + || MarketExecutionResponseDetails.class.equals(Long.class) + || MarketExecutionResponseDetails.class.equals(Float.class) + || MarketExecutionResponseDetails.class.equals(Double.class) + || MarketExecutionResponseDetails.class.equals(Boolean.class) + || MarketExecutionResponseDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((MarketExecutionResponseDetails.class.equals(Integer.class) + || MarketExecutionResponseDetails.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((MarketExecutionResponseDetails.class.equals(Float.class) + || MarketExecutionResponseDetails.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (MarketExecutionResponseDetails.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (MarketExecutionResponseDetails.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(MarketExecutionResponseDetails.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 'MarketExecutionResponseDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'MarketExecutionResponseDetails'", + e); + } + + // deserialize QuoteExecutionWithRequoteResponseDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (QuoteExecutionWithRequoteResponseDetails.class.equals(Integer.class) + || QuoteExecutionWithRequoteResponseDetails.class.equals(Long.class) + || QuoteExecutionWithRequoteResponseDetails.class.equals(Float.class) + || QuoteExecutionWithRequoteResponseDetails.class.equals(Double.class) + || QuoteExecutionWithRequoteResponseDetails.class.equals(Boolean.class) + || QuoteExecutionWithRequoteResponseDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((QuoteExecutionWithRequoteResponseDetails.class.equals( + Integer.class) + || QuoteExecutionWithRequoteResponseDetails.class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((QuoteExecutionWithRequoteResponseDetails.class.equals(Float.class) + || QuoteExecutionWithRequoteResponseDetails.class + .equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (QuoteExecutionWithRequoteResponseDetails.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (QuoteExecutionWithRequoteResponseDetails.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(QuoteExecutionWithRequoteResponseDetails.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 'QuoteExecutionWithRequoteResponseDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'QuoteExecutionWithRequoteResponseDetails'", + e); + } + + if (match == 1) { + ExecutionResponseDetails ret = new ExecutionResponseDetails(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for ExecutionResponseDetails: %d classes match" + + " result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public ExecutionResponseDetails getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "ExecutionResponseDetails cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public ExecutionResponseDetails() { + super("oneOf", Boolean.FALSE); + } + + public ExecutionResponseDetails(LimitExecutionResponseDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public ExecutionResponseDetails(MarketExecutionResponseDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public ExecutionResponseDetails(QuoteExecutionWithRequoteResponseDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("LimitExecutionResponseDetails", LimitExecutionResponseDetails.class); + schemas.put("MarketExecutionResponseDetails", MarketExecutionResponseDetails.class); + schemas.put( + "QuoteExecutionWithRequoteResponseDetails", + QuoteExecutionWithRequoteResponseDetails.class); + JSON.registerDescendants( + ExecutionResponseDetails.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("LIMIT", LimitExecutionResponseDetails.class); + mappings.put("MARKET", MarketExecutionResponseDetails.class); + mappings.put("QUOTE", QuoteExecutionWithRequoteResponseDetails.class); + mappings.put("LimitExecutionResponseDetails", LimitExecutionResponseDetails.class); + mappings.put("MarketExecutionResponseDetails", MarketExecutionResponseDetails.class); + mappings.put( + "QuoteExecutionWithRequoteResponseDetails", + QuoteExecutionWithRequoteResponseDetails.class); + mappings.put("ExecutionResponseDetails", ExecutionResponseDetails.class); + JSON.registerDiscriminator(ExecutionResponseDetails.class, "type", mappings); + } + + @Override + public Map> getSchemas() { + return ExecutionResponseDetails.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: LimitExecutionResponseDetails, + * MarketExecutionResponseDetails, QuoteExecutionWithRequoteResponseDetails + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be + * a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf( + LimitExecutionResponseDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + MarketExecutionResponseDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + QuoteExecutionWithRequoteResponseDetails.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be LimitExecutionResponseDetails," + + " MarketExecutionResponseDetails, QuoteExecutionWithRequoteResponseDetails"); + } + + /** + * Get the actual instance, which can be the following: LimitExecutionResponseDetails, + * MarketExecutionResponseDetails, QuoteExecutionWithRequoteResponseDetails + * + * @return The actual instance (LimitExecutionResponseDetails, MarketExecutionResponseDetails, + * QuoteExecutionWithRequoteResponseDetails) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `LimitExecutionResponseDetails`. If the actual instance is not + * `LimitExecutionResponseDetails`, the ClassCastException will be thrown. + * + * @return The actual instance of `LimitExecutionResponseDetails` + * @throws ClassCastException if the instance is not `LimitExecutionResponseDetails` + */ + public LimitExecutionResponseDetails getLimitExecutionResponseDetails() + throws ClassCastException { + return (LimitExecutionResponseDetails) super.getActualInstance(); + } + + /** + * Get the actual instance of `MarketExecutionResponseDetails`. If the actual instance is not + * `MarketExecutionResponseDetails`, the ClassCastException will be thrown. + * + * @return The actual instance of `MarketExecutionResponseDetails` + * @throws ClassCastException if the instance is not `MarketExecutionResponseDetails` + */ + public MarketExecutionResponseDetails getMarketExecutionResponseDetails() + throws ClassCastException { + return (MarketExecutionResponseDetails) super.getActualInstance(); + } + + /** + * Get the actual instance of `QuoteExecutionWithRequoteResponseDetails`. If the actual instance + * is not `QuoteExecutionWithRequoteResponseDetails`, the ClassCastException will be thrown. + * + * @return The actual instance of `QuoteExecutionWithRequoteResponseDetails` + * @throws ClassCastException if the instance is not `QuoteExecutionWithRequoteResponseDetails` + */ + public QuoteExecutionWithRequoteResponseDetails getQuoteExecutionWithRequoteResponseDetails() + throws ClassCastException { + return (QuoteExecutionWithRequoteResponseDetails) super.getActualInstance(); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof LimitExecutionResponseDetails) { + if (getActualInstance() != null) { + joiner.add( + ((LimitExecutionResponseDetails) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof MarketExecutionResponseDetails) { + if (getActualInstance() != null) { + joiner.add( + ((MarketExecutionResponseDetails) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof QuoteExecutionWithRequoteResponseDetails) { + if (getActualInstance() != null) { + joiner.add( + ((QuoteExecutionWithRequoteResponseDetails) getActualInstance()) + .toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ExecutionStep.java b/src/main/java/com/fireblocks/sdk/model/ExecutionStep.java new file mode 100644 index 00000000..8555dc20 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ExecutionStep.java @@ -0,0 +1,341 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** ExecutionStep */ +@JsonPropertyOrder({ + ExecutionStep.JSON_PROPERTY_TYPE, + ExecutionStep.JSON_PROPERTY_STATUS, + ExecutionStep.JSON_PROPERTY_FEE, + ExecutionStep.JSON_PROPERTY_TX_ID, + ExecutionStep.JSON_PROPERTY_TX_HASH, + ExecutionStep.JSON_PROPERTY_ERROR +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ExecutionStep { + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private ExecutionStepType type; + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nonnull private ExecutionStepStatusEnum status; + + public static final String JSON_PROPERTY_FEE = "fee"; + @jakarta.annotation.Nullable private Fee fee; + + public static final String JSON_PROPERTY_TX_ID = "txId"; + @jakarta.annotation.Nullable private String txId; + + public static final String JSON_PROPERTY_TX_HASH = "txHash"; + @jakarta.annotation.Nullable private String txHash; + + public static final String JSON_PROPERTY_ERROR = "error"; + @jakarta.annotation.Nullable private ExecutionStepError error; + + public ExecutionStep() {} + + @JsonCreator + public ExecutionStep( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) ExecutionStepType type, + @JsonProperty(value = JSON_PROPERTY_STATUS, required = true) + ExecutionStepStatusEnum status) { + this.type = type; + this.status = status; + } + + public ExecutionStep type(@jakarta.annotation.Nonnull ExecutionStepType type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExecutionStepType getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull ExecutionStepType type) { + this.type = type; + } + + public ExecutionStep status(@jakarta.annotation.Nonnull ExecutionStepStatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExecutionStepStatusEnum getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@jakarta.annotation.Nonnull ExecutionStepStatusEnum status) { + this.status = status; + } + + public ExecutionStep fee(@jakarta.annotation.Nullable Fee fee) { + this.fee = fee; + return this; + } + + /** + * Get fee + * + * @return fee + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Fee getFee() { + return fee; + } + + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFee(@jakarta.annotation.Nullable Fee fee) { + this.fee = fee; + } + + public ExecutionStep txId(@jakarta.annotation.Nullable String txId) { + this.txId = txId; + return this; + } + + /** + * Get txId + * + * @return txId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTxId() { + return txId; + } + + @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTxId(@jakarta.annotation.Nullable String txId) { + this.txId = txId; + } + + public ExecutionStep txHash(@jakarta.annotation.Nullable String txHash) { + this.txHash = txHash; + return this; + } + + /** + * Get txHash + * + * @return txHash + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TX_HASH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTxHash() { + return txHash; + } + + @JsonProperty(JSON_PROPERTY_TX_HASH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTxHash(@jakarta.annotation.Nullable String txHash) { + this.txHash = txHash; + } + + public ExecutionStep error(@jakarta.annotation.Nullable ExecutionStepError error) { + this.error = error; + return this; + } + + /** + * Get error + * + * @return error + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ExecutionStepError getError() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setError(@jakarta.annotation.Nullable ExecutionStepError error) { + this.error = error; + } + + /** Return true if this ExecutionStep object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecutionStep executionStep = (ExecutionStep) o; + return Objects.equals(this.type, executionStep.type) + && Objects.equals(this.status, executionStep.status) + && Objects.equals(this.fee, executionStep.fee) + && Objects.equals(this.txId, executionStep.txId) + && Objects.equals(this.txHash, executionStep.txHash) + && Objects.equals(this.error, executionStep.error); + } + + @Override + public int hashCode() { + return Objects.hash(type, status, fee, txId, txHash, error); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecutionStep {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).append("\n"); + sb.append(" txId: ").append(toIndentedString(txId)).append("\n"); + sb.append(" txHash: ").append(toIndentedString(txHash)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).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 `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `fee` to the URL query string + if (getFee() != null) { + joiner.add(getFee().toUrlQueryString(prefix + "fee" + suffix)); + } + + // add `txId` to the URL query string + if (getTxId() != null) { + joiner.add( + String.format( + "%stxId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTxId())))); + } + + // add `txHash` to the URL query string + if (getTxHash() != null) { + joiner.add( + String.format( + "%stxHash%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTxHash())))); + } + + // add `error` to the URL query string + if (getError() != null) { + joiner.add( + String.format( + "%serror%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getError())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ExecutionStepDetails.java b/src/main/java/com/fireblocks/sdk/model/ExecutionStepDetails.java new file mode 100644 index 00000000..cfa67af1 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ExecutionStepDetails.java @@ -0,0 +1,182 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** ExecutionStepDetails */ +@JsonPropertyOrder({ + ExecutionStepDetails.JSON_PROPERTY_TYPE, + ExecutionStepDetails.JSON_PROPERTY_FEE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ExecutionStepDetails { + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private ExecutionStepType type; + + public static final String JSON_PROPERTY_FEE = "fee"; + @jakarta.annotation.Nullable private Fee fee; + + public ExecutionStepDetails() {} + + @JsonCreator + public ExecutionStepDetails( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) ExecutionStepType type) { + this.type = type; + } + + public ExecutionStepDetails type(@jakarta.annotation.Nonnull ExecutionStepType type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExecutionStepType getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setType(@jakarta.annotation.Nonnull ExecutionStepType type) { + this.type = type; + } + + public ExecutionStepDetails fee(@jakarta.annotation.Nullable Fee fee) { + this.fee = fee; + return this; + } + + /** + * Get fee + * + * @return fee + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Fee getFee() { + return fee; + } + + @JsonProperty(JSON_PROPERTY_FEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFee(@jakarta.annotation.Nullable Fee fee) { + this.fee = fee; + } + + /** Return true if this ExecutionStepDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExecutionStepDetails executionStepDetails = (ExecutionStepDetails) o; + return Objects.equals(this.type, executionStepDetails.type) + && Objects.equals(this.fee, executionStepDetails.fee); + } + + @Override + public int hashCode() { + return Objects.hash(type, fee); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExecutionStepDetails {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" fee: ").append(toIndentedString(fee)).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 `fee` to the URL query string + if (getFee() != null) { + joiner.add(getFee().toUrlQueryString(prefix + "fee" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ExecutionStepError.java b/src/main/java/com/fireblocks/sdk/model/ExecutionStepError.java new file mode 100644 index 00000000..68925457 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ExecutionStepError.java @@ -0,0 +1,74 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Gets or Sets ExecutionStepError */ +public enum ExecutionStepError { + INTERNAL_ERROR("INTERNAL_ERROR"), + + QUOTE_EXPIRED("QUOTE_EXPIRED"), + + INSUFFICIENT_OUTPUT_AMOUNT("INSUFFICIENT_OUTPUT_AMOUNT"), + + INSUFFICIENT_FUNDS("INSUFFICIENT_FUNDS"), + + LAST_TRANSACTION_FAILED("LAST_TRANSACTION_FAILED"), + + SWAP_APPROVAL_FAILED("SWAP_APPROVAL_FAILED"), + + PROVIDER_EXECUTION_ERROR("PROVIDER_EXECUTION_ERROR"); + + private String value; + + ExecutionStepError(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ExecutionStepError fromValue(String value) { + for (ExecutionStepError b : ExecutionStepError.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/ProviderCategoryEnum.java b/src/main/java/com/fireblocks/sdk/model/ExecutionStepStatusEnum.java similarity index 75% rename from src/main/java/com/fireblocks/sdk/model/ProviderCategoryEnum.java rename to src/main/java/com/fireblocks/sdk/model/ExecutionStepStatusEnum.java index 21bbf7ed..147adfeb 100644 --- a/src/main/java/com/fireblocks/sdk/model/ProviderCategoryEnum.java +++ b/src/main/java/com/fireblocks/sdk/model/ExecutionStepStatusEnum.java @@ -16,22 +16,21 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** - * Category that classify the provider, Supported categories are: `DEX`, `CEX`, - * `OTC` - */ -public enum ProviderCategoryEnum { - DEX("DEX"), +/** Gets or Sets ExecutionStepStatusEnum */ +public enum ExecutionStepStatusEnum { + WAITING("WAITING"), + + PROCESSING("PROCESSING"), - CEX("CEX"), + COMPLETED("COMPLETED"), - OTC("OTC"), + FAILED("FAILED"), - WRAP_UNWRAP("WRAP_UNWRAP"); + CANCELLED("CANCELLED"); private String value; - ProviderCategoryEnum(String value) { + ExecutionStepStatusEnum(String value) { this.value = value; } @@ -46,8 +45,8 @@ public String toString() { } @JsonCreator - public static ProviderCategoryEnum fromValue(String value) { - for (ProviderCategoryEnum b : ProviderCategoryEnum.values()) { + public static ExecutionStepStatusEnum fromValue(String value) { + for (ExecutionStepStatusEnum b : ExecutionStepStatusEnum.values()) { if (b.value.equals(value)) { return b; } diff --git a/src/main/java/com/fireblocks/sdk/model/SwapRequiredActionsEnum.java b/src/main/java/com/fireblocks/sdk/model/ExecutionStepType.java similarity index 80% rename from src/main/java/com/fireblocks/sdk/model/SwapRequiredActionsEnum.java rename to src/main/java/com/fireblocks/sdk/model/ExecutionStepType.java index 15922f2b..4fafdc4e 100644 --- a/src/main/java/com/fireblocks/sdk/model/SwapRequiredActionsEnum.java +++ b/src/main/java/com/fireblocks/sdk/model/ExecutionStepType.java @@ -16,17 +16,21 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Gets or Sets SwapRequiredActionsEnum */ -public enum SwapRequiredActionsEnum { +/** Gets or Sets ExecutionStepType */ +public enum ExecutionStepType { APPROVE("APPROVE"), PERMIT("PERMIT"), - CONTRACT_CALL("CONTRACT_CALL"); + CONTRACT_CALL("CONTRACT_CALL"), + + EXECUTE("EXECUTE"), + + SETTLEMENT("SETTLEMENT"); private String value; - SwapRequiredActionsEnum(String value) { + ExecutionStepType(String value) { this.value = value; } @@ -41,8 +45,8 @@ public String toString() { } @JsonCreator - public static SwapRequiredActionsEnum fromValue(String value) { - for (SwapRequiredActionsEnum b : SwapRequiredActionsEnum.values()) { + public static ExecutionStepType fromValue(String value) { + for (ExecutionStepType b : ExecutionStepType.values()) { if (b.value.equals(value)) { return b; } diff --git a/src/main/java/com/fireblocks/sdk/model/ExternalAccount.java b/src/main/java/com/fireblocks/sdk/model/ExternalAccount.java new file mode 100644 index 00000000..0999b81c --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ExternalAccount.java @@ -0,0 +1,178 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** ExternalAccount */ +@JsonPropertyOrder({ExternalAccount.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ExternalAccount { + /** Gets or Sets type */ + public enum TypeEnum { + EXTERNAL(String.valueOf("EXTERNAL")); + + 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 ExternalAccount() {} + + @JsonCreator + public ExternalAccount( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type) { + this.type = type; + } + + public ExternalAccount 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; + } + + /** Return true if this ExternalAccount object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExternalAccount externalAccount = (ExternalAccount) o; + return Objects.equals(this.type, externalAccount.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExternalAccount {\n"); + sb.append(" type: ").append(toIndentedString(type)).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())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/Fee.java b/src/main/java/com/fireblocks/sdk/model/Fee.java new file mode 100644 index 00000000..355f2a02 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/Fee.java @@ -0,0 +1,368 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.JSON; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.StringJoiner; + +/** Fee */ +@JsonPropertyOrder({ + Fee.JSON_PROPERTY_FEE_TYPE, + Fee.JSON_PROPERTY_ASSET_ID, + Fee.JSON_PROPERTY_AMOUNT_TYPE, + Fee.JSON_PROPERTY_AMOUNT +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +@JsonIgnoreProperties( + value = "amountType", // ignore manually set amountType, it will be automatically generated + // by Jackson during serialization + allowSetters = true // allows the amountType to be set during deserialization + ) +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "amountType", + visible = true) +public class Fee { + /** + * The type of fee, such as ORDER, NETWORK, or SPREAD. ORDER - Fee for executing the order. + * NETWORK - Fee for network transactions. SPREAD - Fee for the difference between buy and sell + * prices. + */ + public enum FeeTypeEnum { + ORDER(String.valueOf("ORDER")), + + NETWORK(String.valueOf("NETWORK")), + + SPREAD(String.valueOf("SPREAD")); + + private String value; + + FeeTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static FeeTypeEnum fromValue(String value) { + for (FeeTypeEnum b : FeeTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_FEE_TYPE = "feeType"; + @jakarta.annotation.Nonnull private FeeTypeEnum feeType; + + public static final String JSON_PROPERTY_ASSET_ID = "assetId"; + @jakarta.annotation.Nonnull private String assetId; + + /** Gets or Sets amountType */ + public enum AmountTypeEnum { + BPS(String.valueOf("BPS")); + + private String value; + + AmountTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AmountTypeEnum fromValue(String value) { + for (AmountTypeEnum b : AmountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_AMOUNT_TYPE = "amountType"; + @jakarta.annotation.Nonnull private AmountTypeEnum amountType; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + @jakarta.annotation.Nonnull private BigDecimal amount; + + public Fee() {} + + @JsonCreator + public Fee( + @JsonProperty(value = JSON_PROPERTY_FEE_TYPE, required = true) FeeTypeEnum feeType, + @JsonProperty(value = JSON_PROPERTY_ASSET_ID, required = true) String assetId, + @JsonProperty(value = JSON_PROPERTY_AMOUNT_TYPE, required = true) + AmountTypeEnum amountType, + @JsonProperty(value = JSON_PROPERTY_AMOUNT, required = true) BigDecimal amount) { + this.feeType = feeType; + this.assetId = assetId; + this.amountType = amountType; + this.amount = amount; + } + + public Fee feeType(@jakarta.annotation.Nonnull FeeTypeEnum feeType) { + this.feeType = feeType; + return this; + } + + /** + * The type of fee, such as ORDER, NETWORK, or SPREAD. ORDER - Fee for executing the order. + * NETWORK - Fee for network transactions. SPREAD - Fee for the difference between buy and sell + * prices. + * + * @return feeType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FEE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FeeTypeEnum getFeeType() { + return feeType; + } + + @JsonProperty(JSON_PROPERTY_FEE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFeeType(@jakarta.annotation.Nonnull FeeTypeEnum feeType) { + this.feeType = feeType; + } + + public Fee assetId(@jakarta.annotation.Nonnull String assetId) { + this.assetId = assetId; + return this; + } + + /** + * The asset identifier for the fee. + * + * @return assetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAssetId() { + return assetId; + } + + @JsonProperty(JSON_PROPERTY_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAssetId(@jakarta.annotation.Nonnull String assetId) { + this.assetId = assetId; + } + + public Fee amountType(@jakarta.annotation.Nonnull AmountTypeEnum amountType) { + this.amountType = amountType; + return this; + } + + /** + * Get amountType + * + * @return amountType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AmountTypeEnum getAmountType() { + return amountType; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmountType(@jakarta.annotation.Nonnull AmountTypeEnum amountType) { + this.amountType = amountType; + } + + public Fee amount(@jakarta.annotation.Nonnull BigDecimal amount) { + this.amount = amount; + return this; + } + + /** + * Fee in basis points (1 = 0.01%, 10000 = 100%) minimum: 0 maximum: 10000 + * + * @return amount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(@jakarta.annotation.Nonnull BigDecimal amount) { + this.amount = amount; + } + + /** Return true if this Fee object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Fee fee = (Fee) o; + return Objects.equals(this.feeType, fee.feeType) + && Objects.equals(this.assetId, fee.assetId) + && Objects.equals(this.amountType, fee.amountType) + && Objects.equals(this.amount, fee.amount); + } + + @Override + public int hashCode() { + return Objects.hash(feeType, assetId, amountType, amount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Fee {\n"); + sb.append(" feeType: ").append(toIndentedString(feeType)).append("\n"); + sb.append(" assetId: ").append(toIndentedString(assetId)).append("\n"); + sb.append(" amountType: ").append(toIndentedString(amountType)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).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 `feeType` to the URL query string + if (getFeeType() != null) { + joiner.add( + String.format( + "%sfeeType%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getFeeType())))); + } + + // add `assetId` to the URL query string + if (getAssetId() != null) { + joiner.add( + String.format( + "%sassetId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAssetId())))); + } + + // add `amountType` to the URL query string + if (getAmountType() != null) { + joiner.add( + String.format( + "%samountType%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAmountType())))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAmount())))); + } + + return joiner.toString(); + } + + static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("Fee", Fee.class); + JSON.registerDiscriminator(Fee.class, "amountType", mappings); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/FiatTransfer.java b/src/main/java/com/fireblocks/sdk/model/FiatTransfer.java new file mode 100644 index 00000000..d87ca1ca --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/FiatTransfer.java @@ -0,0 +1,258 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** FiatTransfer */ +@JsonPropertyOrder({ + FiatTransfer.JSON_PROPERTY_TYPE, + FiatTransfer.JSON_PROPERTY_AMOUNT, + FiatTransfer.JSON_PROPERTY_REFERENCE_ID +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class FiatTransfer { + /** Gets or Sets type */ + public enum TypeEnum { + FIAT(String.valueOf("FIAT")); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nullable private TypeEnum type; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + @jakarta.annotation.Nonnull private String amount; + + public static final String JSON_PROPERTY_REFERENCE_ID = "referenceId"; + @jakarta.annotation.Nullable private String referenceId; + + public FiatTransfer() {} + + @JsonCreator + public FiatTransfer( + @JsonProperty(value = JSON_PROPERTY_AMOUNT, required = true) String amount) { + this.amount = amount; + } + + public FiatTransfer type(@jakarta.annotation.Nullable TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TypeEnum getType() { + return type; + } + + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setType(@jakarta.annotation.Nullable TypeEnum type) { + this.type = type; + } + + public FiatTransfer amount(@jakarta.annotation.Nonnull String amount) { + this.amount = amount; + return this; + } + + /** + * The amount of the fiat transfer. + * + * @return amount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(@jakarta.annotation.Nonnull String amount) { + this.amount = amount; + } + + public FiatTransfer referenceId(@jakarta.annotation.Nullable String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * The reference ID for the fiat transfer. + * + * @return referenceId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REFERENCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReferenceId() { + return referenceId; + } + + @JsonProperty(JSON_PROPERTY_REFERENCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReferenceId(@jakarta.annotation.Nullable String referenceId) { + this.referenceId = referenceId; + } + + /** Return true if this FiatTransfer object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FiatTransfer fiatTransfer = (FiatTransfer) o; + return Objects.equals(this.type, fiatTransfer.type) + && Objects.equals(this.amount, fiatTransfer.amount) + && Objects.equals(this.referenceId, fiatTransfer.referenceId); + } + + @Override + public int hashCode() { + return Objects.hash(type, amount, referenceId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FiatTransfer {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).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 `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAmount())))); + } + + // add `referenceId` to the URL query string + if (getReferenceId() != null) { + joiner.add( + String.format( + "%sreferenceId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getReferenceId())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/FixedFee.java b/src/main/java/com/fireblocks/sdk/model/FixedFee.java new file mode 100644 index 00000000..4f981d54 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/FixedFee.java @@ -0,0 +1,219 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** FixedFee */ +@JsonPropertyOrder({FixedFee.JSON_PROPERTY_AMOUNT_TYPE, FixedFee.JSON_PROPERTY_AMOUNT}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class FixedFee { + /** Gets or Sets amountType */ + public enum AmountTypeEnum { + FIXED(String.valueOf("FIXED")); + + private String value; + + AmountTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AmountTypeEnum fromValue(String value) { + for (AmountTypeEnum b : AmountTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_AMOUNT_TYPE = "amountType"; + @jakarta.annotation.Nonnull private AmountTypeEnum amountType; + + public static final String JSON_PROPERTY_AMOUNT = "amount"; + @jakarta.annotation.Nonnull private String amount; + + public FixedFee() {} + + @JsonCreator + public FixedFee( + @JsonProperty(value = JSON_PROPERTY_AMOUNT_TYPE, required = true) + AmountTypeEnum amountType, + @JsonProperty(value = JSON_PROPERTY_AMOUNT, required = true) String amount) { + this.amountType = amountType; + this.amount = amount; + } + + public FixedFee amountType(@jakarta.annotation.Nonnull AmountTypeEnum amountType) { + this.amountType = amountType; + return this; + } + + /** + * Get amountType + * + * @return amountType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AmountTypeEnum getAmountType() { + return amountType; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmountType(@jakarta.annotation.Nonnull AmountTypeEnum amountType) { + this.amountType = amountType; + } + + public FixedFee amount(@jakarta.annotation.Nonnull String amount) { + this.amount = amount; + return this; + } + + /** + * The fixed amount of the fee + * + * @return amount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAmount() { + return amount; + } + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAmount(@jakarta.annotation.Nonnull String amount) { + this.amount = amount; + } + + /** Return true if this FixedFee object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FixedFee fixedFee = (FixedFee) o; + return Objects.equals(this.amountType, fixedFee.amountType) + && Objects.equals(this.amount, fixedFee.amount); + } + + @Override + public int hashCode() { + return Objects.hash(amountType, amount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FixedFee {\n"); + sb.append(" amountType: ").append(toIndentedString(amountType)).append("\n"); + sb.append(" amount: ").append(toIndentedString(amount)).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 `amountType` to the URL query string + if (getAmountType() != null) { + joiner.add( + String.format( + "%samountType%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAmountType())))); + } + + // add `amount` to the URL query string + if (getAmount() != null) { + joiner.add( + String.format( + "%samount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAmount())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SwapProvidersPaginatedResponse.java b/src/main/java/com/fireblocks/sdk/model/GetOrdersResponse.java similarity index 69% rename from src/main/java/com/fireblocks/sdk/model/SwapProvidersPaginatedResponse.java rename to src/main/java/com/fireblocks/sdk/model/GetOrdersResponse.java index 339e305e..885db15f 100644 --- a/src/main/java/com/fireblocks/sdk/model/SwapProvidersPaginatedResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/GetOrdersResponse.java @@ -23,36 +23,41 @@ import java.util.Objects; import java.util.StringJoiner; -/** SwapProvidersPaginatedResponse */ +/** GetOrdersResponse */ @JsonPropertyOrder({ - SwapProvidersPaginatedResponse.JSON_PROPERTY_DATA, - SwapProvidersPaginatedResponse.JSON_PROPERTY_NEXT + GetOrdersResponse.JSON_PROPERTY_DATA, + GetOrdersResponse.JSON_PROPERTY_TOTAL, + GetOrdersResponse.JSON_PROPERTY_NEXT }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") -public class SwapProvidersPaginatedResponse { +public class GetOrdersResponse { public static final String JSON_PROPERTY_DATA = "data"; - @jakarta.annotation.Nonnull private List data = new ArrayList<>(); + @jakarta.annotation.Nonnull private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL = "total"; + @jakarta.annotation.Nonnull private Integer total; public static final String JSON_PROPERTY_NEXT = "next"; @jakarta.annotation.Nullable private String next; - public SwapProvidersPaginatedResponse() {} + public GetOrdersResponse() {} @JsonCreator - public SwapProvidersPaginatedResponse( - @JsonProperty(value = JSON_PROPERTY_DATA, required = true) List data) { + public GetOrdersResponse( + @JsonProperty(value = JSON_PROPERTY_DATA, required = true) List data, + @JsonProperty(value = JSON_PROPERTY_TOTAL, required = true) Integer total) { this.data = data; + this.total = total; } - public SwapProvidersPaginatedResponse data( - @jakarta.annotation.Nonnull List data) { + public GetOrdersResponse data(@jakarta.annotation.Nonnull List data) { this.data = data; return this; } - public SwapProvidersPaginatedResponse addDataItem(SwapProvider dataItem) { + public GetOrdersResponse addDataItem(OrderSummary dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -61,31 +66,53 @@ public SwapProvidersPaginatedResponse addDataItem(SwapProvider dataItem) { } /** - * The data of the current page + * Get data * * @return data */ @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { + public List getData() { return data; } @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setData(@jakarta.annotation.Nonnull List data) { + public void setData(@jakarta.annotation.Nonnull List data) { this.data = data; } - public SwapProvidersPaginatedResponse next(@jakarta.annotation.Nullable String next) { + public GetOrdersResponse total(@jakarta.annotation.Nonnull Integer total) { + this.total = total; + return this; + } + + /** + * Total number of orders matching the query. + * + * @return total + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotal() { + return total; + } + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotal(@jakarta.annotation.Nonnull Integer total) { + this.total = total; + } + + public GetOrdersResponse next(@jakarta.annotation.Nullable String next) { this.next = next; return this; } /** - * The cursor to fetch the next page of results, if absent or null, there are no additional - * results. + * A cursor for the next page of results, if available. * * @return next */ @@ -102,7 +129,7 @@ public void setNext(@jakarta.annotation.Nullable String next) { this.next = next; } - /** Return true if this SwapProvidersPaginatedResponse object is equal to o. */ + /** Return true if this GetOrdersResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -111,22 +138,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SwapProvidersPaginatedResponse swapProvidersPaginatedResponse = - (SwapProvidersPaginatedResponse) o; - return Objects.equals(this.data, swapProvidersPaginatedResponse.data) - && Objects.equals(this.next, swapProvidersPaginatedResponse.next); + GetOrdersResponse getOrdersResponse = (GetOrdersResponse) o; + return Objects.equals(this.data, getOrdersResponse.data) + && Objects.equals(this.total, getOrdersResponse.total) + && Objects.equals(this.next, getOrdersResponse.next); } @Override public int hashCode() { - return Objects.hash(data, next); + return Objects.hash(data, total, next); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SwapProvidersPaginatedResponse {\n"); + sb.append("class GetOrdersResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); sb.append(" next: ").append(toIndentedString(next)).append("\n"); sb.append("}"); return sb.toString(); @@ -198,6 +226,16 @@ public String toUrlQueryString(String prefix) { } } + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add( + String.format( + "%stotal%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTotal())))); + } + // add `next` to the URL query string if (getNext() != null) { joiner.add( diff --git a/src/main/java/com/fireblocks/sdk/model/Identification.java b/src/main/java/com/fireblocks/sdk/model/Identification.java new file mode 100644 index 00000000..8cdbac48 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/Identification.java @@ -0,0 +1,336 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.fireblocks.sdk.JSON; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.StringJoiner; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +@JsonDeserialize(using = Identification.IdentificationDeserializer.class) +@JsonSerialize(using = Identification.IdentificationSerializer.class) +public class Identification extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(Identification.class.getName()); + + public static class IdentificationSerializer extends StdSerializer { + public IdentificationSerializer(Class t) { + super(t); + } + + public IdentificationSerializer() { + this(null); + } + + @Override + public void serialize(Identification value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class IdentificationDeserializer extends StdDeserializer { + public IdentificationDeserializer() { + this(Identification.class); + } + + public IdentificationDeserializer(Class vc) { + super(vc); + } + + @Override + public Identification deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize BusinessIdentification + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (BusinessIdentification.class.equals(Integer.class) + || BusinessIdentification.class.equals(Long.class) + || BusinessIdentification.class.equals(Float.class) + || BusinessIdentification.class.equals(Double.class) + || BusinessIdentification.class.equals(Boolean.class) + || BusinessIdentification.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((BusinessIdentification.class.equals(Integer.class) + || BusinessIdentification.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((BusinessIdentification.class.equals(Float.class) + || BusinessIdentification.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (BusinessIdentification.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (BusinessIdentification.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(BusinessIdentification.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 'BusinessIdentification'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'BusinessIdentification'", + e); + } + + // deserialize PersonalIdentification + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PersonalIdentification.class.equals(Integer.class) + || PersonalIdentification.class.equals(Long.class) + || PersonalIdentification.class.equals(Float.class) + || PersonalIdentification.class.equals(Double.class) + || PersonalIdentification.class.equals(Boolean.class) + || PersonalIdentification.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((PersonalIdentification.class.equals(Integer.class) + || PersonalIdentification.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((PersonalIdentification.class.equals(Float.class) + || PersonalIdentification.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (PersonalIdentification.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (PersonalIdentification.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(PersonalIdentification.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 'PersonalIdentification'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'PersonalIdentification'", + e); + } + + if (match == 1) { + Identification ret = new Identification(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for Identification: %d classes match result," + + " expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public Identification getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "Identification cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public Identification() { + super("oneOf", Boolean.FALSE); + } + + public Identification(BusinessIdentification o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public Identification(PersonalIdentification o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("BusinessIdentification", BusinessIdentification.class); + schemas.put("PersonalIdentification", PersonalIdentification.class); + JSON.registerDescendants(Identification.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("BUSINESS", BusinessIdentification.class); + mappings.put("INDIVIDUAL", PersonalIdentification.class); + mappings.put("BusinessIdentification", BusinessIdentification.class); + mappings.put("PersonalIdentification", PersonalIdentification.class); + mappings.put("Identification", Identification.class); + JSON.registerDiscriminator(Identification.class, "entityType", mappings); + } + + @Override + public Map> getSchemas() { + return Identification.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: BusinessIdentification, PersonalIdentification + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be + * a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(BusinessIdentification.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PersonalIdentification.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be BusinessIdentification, PersonalIdentification"); + } + + /** + * Get the actual instance, which can be the following: BusinessIdentification, + * PersonalIdentification + * + * @return The actual instance (BusinessIdentification, PersonalIdentification) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `BusinessIdentification`. If the actual instance is not + * `BusinessIdentification`, the ClassCastException will be thrown. + * + * @return The actual instance of `BusinessIdentification` + * @throws ClassCastException if the instance is not `BusinessIdentification` + */ + public BusinessIdentification getBusinessIdentification() throws ClassCastException { + return (BusinessIdentification) super.getActualInstance(); + } + + /** + * Get the actual instance of `PersonalIdentification`. If the actual instance is not + * `PersonalIdentification`, the ClassCastException will be thrown. + * + * @return The actual instance of `PersonalIdentification` + * @throws ClassCastException if the instance is not `PersonalIdentification` + */ + public PersonalIdentification getPersonalIdentification() throws ClassCastException { + return (PersonalIdentification) super.getActualInstance(); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof PersonalIdentification) { + if (getActualInstance() != null) { + joiner.add( + ((PersonalIdentification) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof BusinessIdentification) { + if (getActualInstance() != null) { + joiner.add( + ((BusinessIdentification) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/IndicativeQuoteType.java b/src/main/java/com/fireblocks/sdk/model/IndicativeQuoteType.java new file mode 100644 index 00000000..05f4489e --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/IndicativeQuoteType.java @@ -0,0 +1,178 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** IndicativeQuoteType */ +@JsonPropertyOrder({IndicativeQuoteType.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class IndicativeQuoteType { + /** Indicates this is an indicative quote */ + public enum TypeEnum { + INDICATIVE(String.valueOf("INDICATIVE")); + + 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 IndicativeQuoteType() {} + + @JsonCreator + public IndicativeQuoteType( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type) { + this.type = type; + } + + public IndicativeQuoteType type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Indicates this is an indicative quote + * + * @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; + } + + /** Return true if this IndicativeQuoteType object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IndicativeQuoteType indicativeQuoteType = (IndicativeQuoteType) o; + return Objects.equals(this.type, indicativeQuoteType.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IndicativeQuoteType {\n"); + sb.append(" type: ").append(toIndentedString(type)).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())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SwapFlowError.java b/src/main/java/com/fireblocks/sdk/model/InternalReference.java similarity index 59% rename from src/main/java/com/fireblocks/sdk/model/SwapFlowError.java rename to src/main/java/com/fireblocks/sdk/model/InternalReference.java index fd8bcbcb..8061f69d 100644 --- a/src/main/java/com/fireblocks/sdk/model/SwapFlowError.java +++ b/src/main/java/com/fireblocks/sdk/model/InternalReference.java @@ -21,75 +21,78 @@ import java.util.Objects; import java.util.StringJoiner; -/** The error message for the swap */ -@JsonPropertyOrder({SwapFlowError.JSON_PROPERTY_CODE, SwapFlowError.JSON_PROPERTY_MESSAGE}) +/** InternalReference */ +@JsonPropertyOrder({ + InternalReference.JSON_PROPERTY_TYPE, + InternalReference.JSON_PROPERTY_ACCOUNT_ID +}) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") -public class SwapFlowError { - public static final String JSON_PROPERTY_CODE = "code"; - @jakarta.annotation.Nonnull private String code; +public class InternalReference { + public static final String JSON_PROPERTY_TYPE = "type"; + @jakarta.annotation.Nonnull private PeerType type; - public static final String JSON_PROPERTY_MESSAGE = "message"; - @jakarta.annotation.Nonnull private String message; + public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; + @jakarta.annotation.Nonnull private String accountId; - public SwapFlowError() {} + public InternalReference() {} @JsonCreator - public SwapFlowError( - @JsonProperty(value = JSON_PROPERTY_CODE, required = true) String code, - @JsonProperty(value = JSON_PROPERTY_MESSAGE, required = true) String message) { - this.code = code; - this.message = message; + public InternalReference( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) PeerType type, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_ID, required = true) String accountId) { + this.type = type; + this.accountId = accountId; } - public SwapFlowError code(@jakarta.annotation.Nonnull String code) { - this.code = code; + public InternalReference type(@jakarta.annotation.Nonnull PeerType type) { + this.type = type; return this; } /** - * The code representing the error + * Get type * - * @return code + * @return type */ @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CODE) + @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getCode() { - return code; + public PeerType getType() { + return type; } - @JsonProperty(JSON_PROPERTY_CODE) + @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCode(@jakarta.annotation.Nonnull String code) { - this.code = code; + public void setType(@jakarta.annotation.Nonnull PeerType type) { + this.type = type; } - public SwapFlowError message(@jakarta.annotation.Nonnull String message) { - this.message = message; + public InternalReference accountId(@jakarta.annotation.Nonnull String accountId) { + this.accountId = accountId; return this; } /** - * Error message + * Get accountId * - * @return message + * @return accountId */ @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMessage() { - return message; + public String getAccountId() { + return accountId; } - @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setMessage(@jakarta.annotation.Nonnull String message) { - this.message = message; + public void setAccountId(@jakarta.annotation.Nonnull String accountId) { + this.accountId = accountId; } - /** Return true if this SwapFlowError object is equal to o. */ + /** Return true if this InternalReference object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -98,22 +101,22 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SwapFlowError swapFlowError = (SwapFlowError) o; - return Objects.equals(this.code, swapFlowError.code) - && Objects.equals(this.message, swapFlowError.message); + InternalReference internalReference = (InternalReference) o; + return Objects.equals(this.type, internalReference.type) + && Objects.equals(this.accountId, internalReference.accountId); } @Override public int hashCode() { - return Objects.hash(code, message); + return Objects.hash(type, accountId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SwapFlowError {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append("class InternalReference {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -161,24 +164,24 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `code` to the URL query string - if (getCode() != null) { + // add `type` to the URL query string + if (getType() != null) { joiner.add( String.format( - "%scode%s=%s", + "%stype%s=%s", prefix, suffix, - ApiClient.urlEncode(ApiClient.valueToString(getCode())))); + ApiClient.urlEncode(ApiClient.valueToString(getType())))); } - // add `message` to the URL query string - if (getMessage() != null) { + // add `accountId` to the URL query string + if (getAccountId() != null) { joiner.add( String.format( - "%smessage%s=%s", + "%saccountId%s=%s", prefix, suffix, - ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + ApiClient.urlEncode(ApiClient.valueToString(getAccountId())))); } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/LimitExecutionRequestDetails.java b/src/main/java/com/fireblocks/sdk/model/LimitExecutionRequestDetails.java new file mode 100644 index 00000000..a0d71feb --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/LimitExecutionRequestDetails.java @@ -0,0 +1,554 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** LimitExecutionRequestDetails */ +@JsonPropertyOrder({ + LimitExecutionRequestDetails.JSON_PROPERTY_SIDE, + LimitExecutionRequestDetails.JSON_PROPERTY_BASE_AMOUNT, + LimitExecutionRequestDetails.JSON_PROPERTY_BASE_ASSET_ID, + LimitExecutionRequestDetails.JSON_PROPERTY_BASE_ASSET_RAIL, + LimitExecutionRequestDetails.JSON_PROPERTY_QUOTE_ASSET_ID, + LimitExecutionRequestDetails.JSON_PROPERTY_QUOTE_ASSET_RAIL, + LimitExecutionRequestDetails.JSON_PROPERTY_TYPE, + LimitExecutionRequestDetails.JSON_PROPERTY_TIME_IN_FORCE, + LimitExecutionRequestDetails.JSON_PROPERTY_LIMIT_PRICE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class LimitExecutionRequestDetails { + /** Side of the order */ + public enum SideEnum { + BUY(String.valueOf("BUY")), + + SELL(String.valueOf("SELL")); + + private String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIDE = "side"; + @jakarta.annotation.Nonnull private SideEnum side = SideEnum.BUY; + + public static final String JSON_PROPERTY_BASE_AMOUNT = "baseAmount"; + @jakarta.annotation.Nonnull private String baseAmount; + + 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; + + /** Order type for limit orders */ + public enum TypeEnum { + LIMIT(String.valueOf("LIMIT")); + + 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_TIME_IN_FORCE = "timeInForce"; + @jakarta.annotation.Nonnull private TimeInForce timeInForce; + + public static final String JSON_PROPERTY_LIMIT_PRICE = "limitPrice"; + @jakarta.annotation.Nonnull private String limitPrice; + + public LimitExecutionRequestDetails() {} + + @JsonCreator + public LimitExecutionRequestDetails( + @JsonProperty(value = JSON_PROPERTY_SIDE, required = true) SideEnum side, + @JsonProperty(value = JSON_PROPERTY_BASE_AMOUNT, required = true) String baseAmount, + @JsonProperty(value = JSON_PROPERTY_BASE_ASSET_ID, required = true) String baseAssetId, + @JsonProperty(value = JSON_PROPERTY_QUOTE_ASSET_ID, required = true) + String quoteAssetId, + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_TIME_IN_FORCE, required = true) + TimeInForce timeInForce, + @JsonProperty(value = JSON_PROPERTY_LIMIT_PRICE, required = true) String limitPrice) { + this.side = side; + this.baseAmount = baseAmount; + this.baseAssetId = baseAssetId; + this.quoteAssetId = quoteAssetId; + this.type = type; + this.timeInForce = timeInForce; + this.limitPrice = limitPrice; + } + + public LimitExecutionRequestDetails side(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + return this; + } + + /** + * Side of the order + * + * @return side + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SideEnum getSide() { + return side; + } + + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSide(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + } + + public LimitExecutionRequestDetails baseAmount(@jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + return this; + } + + /** + * Amount to convert + * + * @return baseAmount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAmount() { + return baseAmount; + } + + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAmount(@jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + } + + public LimitExecutionRequestDetails baseAssetId( + @jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * Source asset identifier + * + * @return baseAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + } + + public LimitExecutionRequestDetails 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 LimitExecutionRequestDetails quoteAssetId( + @jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + return this; + } + + /** + * Target asset identifier + * + * @return quoteAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteAssetId() { + return quoteAssetId; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteAssetId(@jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + } + + public LimitExecutionRequestDetails 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 LimitExecutionRequestDetails type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Order type for limit orders + * + * @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 LimitExecutionRequestDetails timeInForce( + @jakarta.annotation.Nonnull TimeInForce timeInForce) { + this.timeInForce = timeInForce; + return this; + } + + /** + * Get timeInForce + * + * @return timeInForce + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TIME_IN_FORCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TimeInForce getTimeInForce() { + return timeInForce; + } + + @JsonProperty(JSON_PROPERTY_TIME_IN_FORCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTimeInForce(@jakarta.annotation.Nonnull TimeInForce timeInForce) { + this.timeInForce = timeInForce; + } + + public LimitExecutionRequestDetails limitPrice(@jakarta.annotation.Nonnull String limitPrice) { + this.limitPrice = limitPrice; + return this; + } + + /** + * Price for limit orders + * + * @return limitPrice + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LIMIT_PRICE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLimitPrice() { + return limitPrice; + } + + @JsonProperty(JSON_PROPERTY_LIMIT_PRICE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLimitPrice(@jakarta.annotation.Nonnull String limitPrice) { + this.limitPrice = limitPrice; + } + + /** Return true if this LimitExecutionRequestDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LimitExecutionRequestDetails limitExecutionRequestDetails = + (LimitExecutionRequestDetails) o; + return Objects.equals(this.side, limitExecutionRequestDetails.side) + && Objects.equals(this.baseAmount, limitExecutionRequestDetails.baseAmount) + && Objects.equals(this.baseAssetId, limitExecutionRequestDetails.baseAssetId) + && Objects.equals(this.baseAssetRail, limitExecutionRequestDetails.baseAssetRail) + && Objects.equals(this.quoteAssetId, limitExecutionRequestDetails.quoteAssetId) + && Objects.equals(this.quoteAssetRail, limitExecutionRequestDetails.quoteAssetRail) + && Objects.equals(this.type, limitExecutionRequestDetails.type) + && Objects.equals(this.timeInForce, limitExecutionRequestDetails.timeInForce) + && Objects.equals(this.limitPrice, limitExecutionRequestDetails.limitPrice); + } + + @Override + public int hashCode() { + return Objects.hash( + side, + baseAmount, + baseAssetId, + baseAssetRail, + quoteAssetId, + quoteAssetRail, + type, + timeInForce, + limitPrice); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LimitExecutionRequestDetails {\n"); + sb.append(" side: ").append(toIndentedString(side)).append("\n"); + sb.append(" baseAmount: ").append(toIndentedString(baseAmount)).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(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); + sb.append(" limitPrice: ").append(toIndentedString(limitPrice)).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 `side` to the URL query string + if (getSide() != null) { + joiner.add( + String.format( + "%sside%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSide())))); + } + + // add `baseAmount` to the URL query string + if (getBaseAmount() != null) { + joiner.add( + String.format( + "%sbaseAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBaseAmount())))); + } + + // add `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + 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( + String.format( + "%squoteAssetId%s=%s", + prefix, + suffix, + 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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `timeInForce` to the URL query string + if (getTimeInForce() != null) { + joiner.add( + String.format( + "%stimeInForce%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTimeInForce())))); + } + + // add `limitPrice` to the URL query string + if (getLimitPrice() != null) { + joiner.add( + String.format( + "%slimitPrice%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getLimitPrice())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/LimitExecutionResponseDetails.java b/src/main/java/com/fireblocks/sdk/model/LimitExecutionResponseDetails.java new file mode 100644 index 00000000..62b8039a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/LimitExecutionResponseDetails.java @@ -0,0 +1,554 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** LimitExecutionResponseDetails */ +@JsonPropertyOrder({ + LimitExecutionResponseDetails.JSON_PROPERTY_SIDE, + LimitExecutionResponseDetails.JSON_PROPERTY_BASE_AMOUNT, + LimitExecutionResponseDetails.JSON_PROPERTY_BASE_ASSET_ID, + LimitExecutionResponseDetails.JSON_PROPERTY_BASE_ASSET_RAIL, + LimitExecutionResponseDetails.JSON_PROPERTY_QUOTE_ASSET_ID, + LimitExecutionResponseDetails.JSON_PROPERTY_QUOTE_ASSET_RAIL, + LimitExecutionResponseDetails.JSON_PROPERTY_TYPE, + LimitExecutionResponseDetails.JSON_PROPERTY_TIME_IN_FORCE, + LimitExecutionResponseDetails.JSON_PROPERTY_LIMIT_PRICE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class LimitExecutionResponseDetails { + /** Side of the order */ + public enum SideEnum { + BUY(String.valueOf("BUY")), + + SELL(String.valueOf("SELL")); + + private String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIDE = "side"; + @jakarta.annotation.Nonnull private SideEnum side = SideEnum.BUY; + + public static final String JSON_PROPERTY_BASE_AMOUNT = "baseAmount"; + @jakarta.annotation.Nonnull private String baseAmount; + + 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; + + /** Order type for limit orders */ + public enum TypeEnum { + LIMIT(String.valueOf("LIMIT")); + + 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_TIME_IN_FORCE = "timeInForce"; + @jakarta.annotation.Nonnull private TimeInForce timeInForce; + + public static final String JSON_PROPERTY_LIMIT_PRICE = "limitPrice"; + @jakarta.annotation.Nonnull private String limitPrice; + + public LimitExecutionResponseDetails() {} + + @JsonCreator + public LimitExecutionResponseDetails( + @JsonProperty(value = JSON_PROPERTY_SIDE, required = true) SideEnum side, + @JsonProperty(value = JSON_PROPERTY_BASE_AMOUNT, required = true) String baseAmount, + @JsonProperty(value = JSON_PROPERTY_BASE_ASSET_ID, required = true) String baseAssetId, + @JsonProperty(value = JSON_PROPERTY_QUOTE_ASSET_ID, required = true) + String quoteAssetId, + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_TIME_IN_FORCE, required = true) + TimeInForce timeInForce, + @JsonProperty(value = JSON_PROPERTY_LIMIT_PRICE, required = true) String limitPrice) { + this.side = side; + this.baseAmount = baseAmount; + this.baseAssetId = baseAssetId; + this.quoteAssetId = quoteAssetId; + this.type = type; + this.timeInForce = timeInForce; + this.limitPrice = limitPrice; + } + + public LimitExecutionResponseDetails side(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + return this; + } + + /** + * Side of the order + * + * @return side + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SideEnum getSide() { + return side; + } + + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSide(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + } + + public LimitExecutionResponseDetails baseAmount(@jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + return this; + } + + /** + * Amount to convert + * + * @return baseAmount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAmount() { + return baseAmount; + } + + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAmount(@jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + } + + public LimitExecutionResponseDetails baseAssetId( + @jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * Source asset identifier + * + * @return baseAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + } + + public LimitExecutionResponseDetails 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 LimitExecutionResponseDetails quoteAssetId( + @jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + return this; + } + + /** + * Target asset identifier + * + * @return quoteAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteAssetId() { + return quoteAssetId; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteAssetId(@jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + } + + public LimitExecutionResponseDetails 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 LimitExecutionResponseDetails type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Order type for limit orders + * + * @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 LimitExecutionResponseDetails timeInForce( + @jakarta.annotation.Nonnull TimeInForce timeInForce) { + this.timeInForce = timeInForce; + return this; + } + + /** + * Get timeInForce + * + * @return timeInForce + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TIME_IN_FORCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TimeInForce getTimeInForce() { + return timeInForce; + } + + @JsonProperty(JSON_PROPERTY_TIME_IN_FORCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTimeInForce(@jakarta.annotation.Nonnull TimeInForce timeInForce) { + this.timeInForce = timeInForce; + } + + public LimitExecutionResponseDetails limitPrice(@jakarta.annotation.Nonnull String limitPrice) { + this.limitPrice = limitPrice; + return this; + } + + /** + * Price for limit orders + * + * @return limitPrice + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LIMIT_PRICE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLimitPrice() { + return limitPrice; + } + + @JsonProperty(JSON_PROPERTY_LIMIT_PRICE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLimitPrice(@jakarta.annotation.Nonnull String limitPrice) { + this.limitPrice = limitPrice; + } + + /** Return true if this LimitExecutionResponseDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LimitExecutionResponseDetails limitExecutionResponseDetails = + (LimitExecutionResponseDetails) o; + return Objects.equals(this.side, limitExecutionResponseDetails.side) + && Objects.equals(this.baseAmount, limitExecutionResponseDetails.baseAmount) + && Objects.equals(this.baseAssetId, limitExecutionResponseDetails.baseAssetId) + && Objects.equals(this.baseAssetRail, limitExecutionResponseDetails.baseAssetRail) + && Objects.equals(this.quoteAssetId, limitExecutionResponseDetails.quoteAssetId) + && Objects.equals(this.quoteAssetRail, limitExecutionResponseDetails.quoteAssetRail) + && Objects.equals(this.type, limitExecutionResponseDetails.type) + && Objects.equals(this.timeInForce, limitExecutionResponseDetails.timeInForce) + && Objects.equals(this.limitPrice, limitExecutionResponseDetails.limitPrice); + } + + @Override + public int hashCode() { + return Objects.hash( + side, + baseAmount, + baseAssetId, + baseAssetRail, + quoteAssetId, + quoteAssetRail, + type, + timeInForce, + limitPrice); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LimitExecutionResponseDetails {\n"); + sb.append(" side: ").append(toIndentedString(side)).append("\n"); + sb.append(" baseAmount: ").append(toIndentedString(baseAmount)).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(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" timeInForce: ").append(toIndentedString(timeInForce)).append("\n"); + sb.append(" limitPrice: ").append(toIndentedString(limitPrice)).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 `side` to the URL query string + if (getSide() != null) { + joiner.add( + String.format( + "%sside%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSide())))); + } + + // add `baseAmount` to the URL query string + if (getBaseAmount() != null) { + joiner.add( + String.format( + "%sbaseAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBaseAmount())))); + } + + // add `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + 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( + String.format( + "%squoteAssetId%s=%s", + prefix, + suffix, + 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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `timeInForce` to the URL query string + if (getTimeInForce() != null) { + joiner.add( + String.format( + "%stimeInForce%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTimeInForce())))); + } + + // add `limitPrice` to the URL query string + if (getLimitPrice() != null) { + joiner.add( + String.format( + "%slimitPrice%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getLimitPrice())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/Manifest.java b/src/main/java/com/fireblocks/sdk/model/Manifest.java new file mode 100644 index 00000000..428de9bd --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/Manifest.java @@ -0,0 +1,256 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** Manifest */ +@JsonPropertyOrder({Manifest.JSON_PROPERTY_ASSET_TYPES, Manifest.JSON_PROPERTY_CAPABILITIES}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class Manifest { + /** Gets or Sets assetTypes */ + public enum AssetTypesEnum { + DIGITAL(String.valueOf("DIGITAL")), + + FIAT(String.valueOf("FIAT")); + + private String value; + + AssetTypesEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AssetTypesEnum fromValue(String value) { + for (AssetTypesEnum b : AssetTypesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ASSET_TYPES = "assetTypes"; + @jakarta.annotation.Nonnull private List assetTypes = new ArrayList<>(); + + public static final String JSON_PROPERTY_CAPABILITIES = "capabilities"; + @jakarta.annotation.Nonnull private List capabilities = new ArrayList<>(); + + public Manifest() {} + + @JsonCreator + public Manifest( + @JsonProperty(value = JSON_PROPERTY_ASSET_TYPES, required = true) + List assetTypes, + @JsonProperty(value = JSON_PROPERTY_CAPABILITIES, required = true) + List capabilities) { + this.assetTypes = assetTypes; + this.capabilities = capabilities; + } + + public Manifest assetTypes(@jakarta.annotation.Nonnull List assetTypes) { + this.assetTypes = assetTypes; + return this; + } + + public Manifest addAssetTypesItem(AssetTypesEnum assetTypesItem) { + if (this.assetTypes == null) { + this.assetTypes = new ArrayList<>(); + } + this.assetTypes.add(assetTypesItem); + return this; + } + + /** + * Get assetTypes + * + * @return assetTypes + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ASSET_TYPES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAssetTypes() { + return assetTypes; + } + + @JsonProperty(JSON_PROPERTY_ASSET_TYPES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAssetTypes(@jakarta.annotation.Nonnull List assetTypes) { + this.assetTypes = assetTypes; + } + + public Manifest capabilities(@jakarta.annotation.Nonnull List capabilities) { + this.capabilities = capabilities; + return this; + } + + public Manifest addCapabilitiesItem(Capability capabilitiesItem) { + if (this.capabilities == null) { + this.capabilities = new ArrayList<>(); + } + this.capabilities.add(capabilitiesItem); + return this; + } + + /** + * Get capabilities + * + * @return capabilities + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CAPABILITIES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getCapabilities() { + return capabilities; + } + + @JsonProperty(JSON_PROPERTY_CAPABILITIES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCapabilities(@jakarta.annotation.Nonnull List capabilities) { + this.capabilities = capabilities; + } + + /** Return true if this Manifest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Manifest manifest = (Manifest) o; + return Objects.equals(this.assetTypes, manifest.assetTypes) + && Objects.equals(this.capabilities, manifest.capabilities); + } + + @Override + public int hashCode() { + return Objects.hash(assetTypes, capabilities); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Manifest {\n"); + sb.append(" assetTypes: ").append(toIndentedString(assetTypes)).append("\n"); + sb.append(" capabilities: ").append(toIndentedString(capabilities)).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 `assetTypes` to the URL query string + if (getAssetTypes() != null) { + for (int i = 0; i < getAssetTypes().size(); i++) { + joiner.add( + String.format( + "%sassetTypes%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode( + ApiClient.valueToString(getAssetTypes().get(i))))); + } + } + + // add `capabilities` to the URL query string + if (getCapabilities() != null) { + for (int i = 0; i < getCapabilities().size(); i++) { + if (getCapabilities().get(i) != null) { + joiner.add( + String.format( + "%scapabilities%s%s=%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode( + ApiClient.valueToString(getCapabilities().get(i))))); + } + } + } + + 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 new file mode 100644 index 00000000..1170ec0e --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/MarketExecutionRequestDetails.java @@ -0,0 +1,462 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** MarketExecutionRequestDetails */ +@JsonPropertyOrder({ + MarketExecutionRequestDetails.JSON_PROPERTY_SIDE, + MarketExecutionRequestDetails.JSON_PROPERTY_BASE_AMOUNT, + MarketExecutionRequestDetails.JSON_PROPERTY_BASE_ASSET_ID, + MarketExecutionRequestDetails.JSON_PROPERTY_BASE_ASSET_RAIL, + MarketExecutionRequestDetails.JSON_PROPERTY_QUOTE_ASSET_ID, + MarketExecutionRequestDetails.JSON_PROPERTY_QUOTE_ASSET_RAIL, + MarketExecutionRequestDetails.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class MarketExecutionRequestDetails { + /** Side of the order */ + public enum SideEnum { + BUY(String.valueOf("BUY")), + + SELL(String.valueOf("SELL")); + + private String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIDE = "side"; + @jakarta.annotation.Nonnull private SideEnum side = SideEnum.BUY; + + public static final String JSON_PROPERTY_BASE_AMOUNT = "baseAmount"; + @jakarta.annotation.Nonnull private String baseAmount; + + 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; + + /** Order type for market orders */ + public enum TypeEnum { + MARKET(String.valueOf("MARKET")); + + 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 MarketExecutionRequestDetails() {} + + @JsonCreator + public MarketExecutionRequestDetails( + @JsonProperty(value = JSON_PROPERTY_SIDE, required = true) SideEnum side, + @JsonProperty(value = JSON_PROPERTY_BASE_AMOUNT, required = true) String baseAmount, + @JsonProperty(value = JSON_PROPERTY_BASE_ASSET_ID, required = true) String baseAssetId, + @JsonProperty(value = JSON_PROPERTY_QUOTE_ASSET_ID, required = true) + String quoteAssetId, + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type) { + this.side = side; + this.baseAmount = baseAmount; + this.baseAssetId = baseAssetId; + this.quoteAssetId = quoteAssetId; + this.type = type; + } + + public MarketExecutionRequestDetails side(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + return this; + } + + /** + * Side of the order + * + * @return side + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SideEnum getSide() { + return side; + } + + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSide(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + } + + public MarketExecutionRequestDetails baseAmount(@jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + return this; + } + + /** + * Amount to convert + * + * @return baseAmount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAmount() { + return baseAmount; + } + + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAmount(@jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + } + + public MarketExecutionRequestDetails baseAssetId( + @jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * Source asset identifier + * + * @return baseAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + } + + public MarketExecutionRequestDetails 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 MarketExecutionRequestDetails quoteAssetId( + @jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + return this; + } + + /** + * Target asset identifier + * + * @return quoteAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteAssetId() { + return quoteAssetId; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteAssetId(@jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + } + + public MarketExecutionRequestDetails 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 MarketExecutionRequestDetails type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Order type for market orders + * + * @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; + } + + /** Return true if this MarketExecutionRequestDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MarketExecutionRequestDetails marketExecutionRequestDetails = + (MarketExecutionRequestDetails) o; + return Objects.equals(this.side, marketExecutionRequestDetails.side) + && Objects.equals(this.baseAmount, marketExecutionRequestDetails.baseAmount) + && Objects.equals(this.baseAssetId, marketExecutionRequestDetails.baseAssetId) + && Objects.equals(this.baseAssetRail, marketExecutionRequestDetails.baseAssetRail) + && Objects.equals(this.quoteAssetId, marketExecutionRequestDetails.quoteAssetId) + && Objects.equals(this.quoteAssetRail, marketExecutionRequestDetails.quoteAssetRail) + && Objects.equals(this.type, marketExecutionRequestDetails.type); + } + + @Override + public int hashCode() { + return Objects.hash( + side, baseAmount, baseAssetId, baseAssetRail, quoteAssetId, quoteAssetRail, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MarketExecutionRequestDetails {\n"); + sb.append(" side: ").append(toIndentedString(side)).append("\n"); + sb.append(" baseAmount: ").append(toIndentedString(baseAmount)).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(" type: ").append(toIndentedString(type)).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 `side` to the URL query string + if (getSide() != null) { + joiner.add( + String.format( + "%sside%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSide())))); + } + + // add `baseAmount` to the URL query string + if (getBaseAmount() != null) { + joiner.add( + String.format( + "%sbaseAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBaseAmount())))); + } + + // add `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + 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( + String.format( + "%squoteAssetId%s=%s", + prefix, + suffix, + 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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/MarketExecutionResponseDetails.java b/src/main/java/com/fireblocks/sdk/model/MarketExecutionResponseDetails.java new file mode 100644 index 00000000..74951048 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/MarketExecutionResponseDetails.java @@ -0,0 +1,464 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** MarketExecutionResponseDetails */ +@JsonPropertyOrder({ + MarketExecutionResponseDetails.JSON_PROPERTY_SIDE, + MarketExecutionResponseDetails.JSON_PROPERTY_BASE_AMOUNT, + MarketExecutionResponseDetails.JSON_PROPERTY_BASE_ASSET_ID, + MarketExecutionResponseDetails.JSON_PROPERTY_BASE_ASSET_RAIL, + MarketExecutionResponseDetails.JSON_PROPERTY_QUOTE_ASSET_ID, + MarketExecutionResponseDetails.JSON_PROPERTY_QUOTE_ASSET_RAIL, + MarketExecutionResponseDetails.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class MarketExecutionResponseDetails { + /** Side of the order */ + public enum SideEnum { + BUY(String.valueOf("BUY")), + + SELL(String.valueOf("SELL")); + + private String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIDE = "side"; + @jakarta.annotation.Nonnull private SideEnum side = SideEnum.BUY; + + public static final String JSON_PROPERTY_BASE_AMOUNT = "baseAmount"; + @jakarta.annotation.Nonnull private String baseAmount; + + 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; + + /** Order type for market orders */ + public enum TypeEnum { + MARKET(String.valueOf("MARKET")); + + 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 MarketExecutionResponseDetails() {} + + @JsonCreator + public MarketExecutionResponseDetails( + @JsonProperty(value = JSON_PROPERTY_SIDE, required = true) SideEnum side, + @JsonProperty(value = JSON_PROPERTY_BASE_AMOUNT, required = true) String baseAmount, + @JsonProperty(value = JSON_PROPERTY_BASE_ASSET_ID, required = true) String baseAssetId, + @JsonProperty(value = JSON_PROPERTY_QUOTE_ASSET_ID, required = true) + String quoteAssetId, + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type) { + this.side = side; + this.baseAmount = baseAmount; + this.baseAssetId = baseAssetId; + this.quoteAssetId = quoteAssetId; + this.type = type; + } + + public MarketExecutionResponseDetails side(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + return this; + } + + /** + * Side of the order + * + * @return side + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SideEnum getSide() { + return side; + } + + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSide(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + } + + public MarketExecutionResponseDetails baseAmount( + @jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + return this; + } + + /** + * Amount to convert + * + * @return baseAmount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAmount() { + return baseAmount; + } + + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAmount(@jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + } + + public MarketExecutionResponseDetails baseAssetId( + @jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * Source asset identifier + * + * @return baseAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + } + + public MarketExecutionResponseDetails 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 MarketExecutionResponseDetails quoteAssetId( + @jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + return this; + } + + /** + * Target asset identifier + * + * @return quoteAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteAssetId() { + return quoteAssetId; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteAssetId(@jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + } + + public MarketExecutionResponseDetails 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 MarketExecutionResponseDetails type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Order type for market orders + * + * @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; + } + + /** Return true if this MarketExecutionResponseDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MarketExecutionResponseDetails marketExecutionResponseDetails = + (MarketExecutionResponseDetails) o; + return Objects.equals(this.side, marketExecutionResponseDetails.side) + && Objects.equals(this.baseAmount, marketExecutionResponseDetails.baseAmount) + && Objects.equals(this.baseAssetId, marketExecutionResponseDetails.baseAssetId) + && Objects.equals(this.baseAssetRail, marketExecutionResponseDetails.baseAssetRail) + && Objects.equals(this.quoteAssetId, marketExecutionResponseDetails.quoteAssetId) + && Objects.equals( + this.quoteAssetRail, marketExecutionResponseDetails.quoteAssetRail) + && Objects.equals(this.type, marketExecutionResponseDetails.type); + } + + @Override + public int hashCode() { + return Objects.hash( + side, baseAmount, baseAssetId, baseAssetRail, quoteAssetId, quoteAssetRail, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MarketExecutionResponseDetails {\n"); + sb.append(" side: ").append(toIndentedString(side)).append("\n"); + sb.append(" baseAmount: ").append(toIndentedString(baseAmount)).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(" type: ").append(toIndentedString(type)).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 `side` to the URL query string + if (getSide() != null) { + joiner.add( + String.format( + "%sside%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSide())))); + } + + // add `baseAmount` to the URL query string + if (getBaseAmount() != null) { + joiner.add( + String.format( + "%sbaseAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBaseAmount())))); + } + + // add `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + 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( + String.format( + "%squoteAssetId%s=%s", + prefix, + suffix, + 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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/MarketRequoteRequestDetails.java b/src/main/java/com/fireblocks/sdk/model/MarketRequoteRequestDetails.java new file mode 100644 index 00000000..75e157bb --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/MarketRequoteRequestDetails.java @@ -0,0 +1,182 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** MarketRequoteRequestDetails */ +@JsonPropertyOrder({MarketRequoteRequestDetails.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class MarketRequoteRequestDetails { + /** + * Indicates that the order should be re-quoted if the original quote is expired. This will lead + * to a market order. + */ + public enum TypeEnum { + MARKET(String.valueOf("MARKET")); + + 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 MarketRequoteRequestDetails() {} + + @JsonCreator + public MarketRequoteRequestDetails( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type) { + this.type = type; + } + + public MarketRequoteRequestDetails type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Indicates that the order should be re-quoted if the original quote is expired. This will lead + * to a market order. + * + * @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; + } + + /** Return true if this MarketRequoteRequestDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MarketRequoteRequestDetails marketRequoteRequestDetails = (MarketRequoteRequestDetails) o; + return Objects.equals(this.type, marketRequoteRequestDetails.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MarketRequoteRequestDetails {\n"); + sb.append(" type: ").append(toIndentedString(type)).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())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/NonWalletQuoteFee.java b/src/main/java/com/fireblocks/sdk/model/NonWalletQuoteFee.java deleted file mode 100644 index 76873fd7..00000000 --- a/src/main/java/com/fireblocks/sdk/model/NonWalletQuoteFee.java +++ /dev/null @@ -1,333 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.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.math.BigDecimal; -import java.util.Objects; -import java.util.StringJoiner; - -/** The estimated fees for the swap operation. */ -@JsonPropertyOrder({ - NonWalletQuoteFee.JSON_PROPERTY_NETWORK_EXECUTION_FEE, - NonWalletQuoteFee.JSON_PROPERTY_NETWORK_FEE_ASSET_ID, - NonWalletQuoteFee.JSON_PROPERTY_PROVIDER_FEE, - NonWalletQuoteFee.JSON_PROPERTY_PROVIDER_FEE_ASSET_ID, - NonWalletQuoteFee.JSON_PROPERTY_PROVIDER_FEE_RATE -}) -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.14.0") -public class NonWalletQuoteFee { - public static final String JSON_PROPERTY_NETWORK_EXECUTION_FEE = "networkExecutionFee"; - @jakarta.annotation.Nonnull private String networkExecutionFee; - - public static final String JSON_PROPERTY_NETWORK_FEE_ASSET_ID = "networkFeeAssetId"; - @jakarta.annotation.Nonnull private String networkFeeAssetId; - - public static final String JSON_PROPERTY_PROVIDER_FEE = "providerFee"; - @jakarta.annotation.Nonnull private String providerFee; - - public static final String JSON_PROPERTY_PROVIDER_FEE_ASSET_ID = "providerFeeAssetId"; - @jakarta.annotation.Nonnull private String providerFeeAssetId; - - public static final String JSON_PROPERTY_PROVIDER_FEE_RATE = "providerFeeRate"; - @jakarta.annotation.Nonnull private BigDecimal providerFeeRate; - - public NonWalletQuoteFee() {} - - @JsonCreator - public NonWalletQuoteFee( - @JsonProperty(value = JSON_PROPERTY_NETWORK_EXECUTION_FEE, required = true) - String networkExecutionFee, - @JsonProperty(value = JSON_PROPERTY_NETWORK_FEE_ASSET_ID, required = true) - String networkFeeAssetId, - @JsonProperty(value = JSON_PROPERTY_PROVIDER_FEE, required = true) String providerFee, - @JsonProperty(value = JSON_PROPERTY_PROVIDER_FEE_ASSET_ID, required = true) - String providerFeeAssetId, - @JsonProperty(value = JSON_PROPERTY_PROVIDER_FEE_RATE, required = true) - BigDecimal providerFeeRate) { - this.networkExecutionFee = networkExecutionFee; - this.networkFeeAssetId = networkFeeAssetId; - this.providerFee = providerFee; - this.providerFeeAssetId = providerFeeAssetId; - this.providerFeeRate = providerFeeRate; - } - - public NonWalletQuoteFee networkExecutionFee( - @jakarta.annotation.Nonnull String networkExecutionFee) { - this.networkExecutionFee = networkExecutionFee; - return this; - } - - /** - * The gas fee in the asset unit. - * - * @return networkExecutionFee - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NETWORK_EXECUTION_FEE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getNetworkExecutionFee() { - return networkExecutionFee; - } - - @JsonProperty(JSON_PROPERTY_NETWORK_EXECUTION_FEE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNetworkExecutionFee(@jakarta.annotation.Nonnull String networkExecutionFee) { - this.networkExecutionFee = networkExecutionFee; - } - - public NonWalletQuoteFee networkFeeAssetId( - @jakarta.annotation.Nonnull String networkFeeAssetId) { - this.networkFeeAssetId = networkFeeAssetId; - return this; - } - - /** - * The network fee in Fireblocks asset representation - * - * @return networkFeeAssetId - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NETWORK_FEE_ASSET_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getNetworkFeeAssetId() { - return networkFeeAssetId; - } - - @JsonProperty(JSON_PROPERTY_NETWORK_FEE_ASSET_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNetworkFeeAssetId(@jakarta.annotation.Nonnull String networkFeeAssetId) { - this.networkFeeAssetId = networkFeeAssetId; - } - - public NonWalletQuoteFee providerFee(@jakarta.annotation.Nonnull String providerFee) { - this.providerFee = providerFee; - return this; - } - - /** - * The provider fee in the asset unit. - * - * @return providerFee - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_PROVIDER_FEE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getProviderFee() { - return providerFee; - } - - @JsonProperty(JSON_PROPERTY_PROVIDER_FEE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setProviderFee(@jakarta.annotation.Nonnull String providerFee) { - this.providerFee = providerFee; - } - - public NonWalletQuoteFee providerFeeAssetId( - @jakarta.annotation.Nonnull String providerFeeAssetId) { - this.providerFeeAssetId = providerFeeAssetId; - return this; - } - - /** - * The provider fee in Fireblocks asset representation - * - * @return providerFeeAssetId - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_PROVIDER_FEE_ASSET_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getProviderFeeAssetId() { - return providerFeeAssetId; - } - - @JsonProperty(JSON_PROPERTY_PROVIDER_FEE_ASSET_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setProviderFeeAssetId(@jakarta.annotation.Nonnull String providerFeeAssetId) { - this.providerFeeAssetId = providerFeeAssetId; - } - - public NonWalletQuoteFee providerFeeRate( - @jakarta.annotation.Nonnull BigDecimal providerFeeRate) { - this.providerFeeRate = providerFeeRate; - return this; - } - - /** - * Percentages of the provider fee out of the gross amount - * - * @return providerFeeRate - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_PROVIDER_FEE_RATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BigDecimal getProviderFeeRate() { - return providerFeeRate; - } - - @JsonProperty(JSON_PROPERTY_PROVIDER_FEE_RATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setProviderFeeRate(@jakarta.annotation.Nonnull BigDecimal providerFeeRate) { - this.providerFeeRate = providerFeeRate; - } - - /** Return true if this NonWalletQuoteFee object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NonWalletQuoteFee nonWalletQuoteFee = (NonWalletQuoteFee) o; - return Objects.equals(this.networkExecutionFee, nonWalletQuoteFee.networkExecutionFee) - && Objects.equals(this.networkFeeAssetId, nonWalletQuoteFee.networkFeeAssetId) - && Objects.equals(this.providerFee, nonWalletQuoteFee.providerFee) - && Objects.equals(this.providerFeeAssetId, nonWalletQuoteFee.providerFeeAssetId) - && Objects.equals(this.providerFeeRate, nonWalletQuoteFee.providerFeeRate); - } - - @Override - public int hashCode() { - return Objects.hash( - networkExecutionFee, - networkFeeAssetId, - providerFee, - providerFeeAssetId, - providerFeeRate); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NonWalletQuoteFee {\n"); - sb.append(" networkExecutionFee: ") - .append(toIndentedString(networkExecutionFee)) - .append("\n"); - sb.append(" networkFeeAssetId: ") - .append(toIndentedString(networkFeeAssetId)) - .append("\n"); - sb.append(" providerFee: ").append(toIndentedString(providerFee)).append("\n"); - sb.append(" providerFeeAssetId: ") - .append(toIndentedString(providerFeeAssetId)) - .append("\n"); - sb.append(" providerFeeRate: ").append(toIndentedString(providerFeeRate)).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 `networkExecutionFee` to the URL query string - if (getNetworkExecutionFee() != null) { - joiner.add( - String.format( - "%snetworkExecutionFee%s=%s", - prefix, - suffix, - ApiClient.urlEncode( - ApiClient.valueToString(getNetworkExecutionFee())))); - } - - // add `networkFeeAssetId` to the URL query string - if (getNetworkFeeAssetId() != null) { - joiner.add( - String.format( - "%snetworkFeeAssetId%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getNetworkFeeAssetId())))); - } - - // add `providerFee` to the URL query string - if (getProviderFee() != null) { - joiner.add( - String.format( - "%sproviderFee%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getProviderFee())))); - } - - // add `providerFeeAssetId` to the URL query string - if (getProviderFeeAssetId() != null) { - joiner.add( - String.format( - "%sproviderFeeAssetId%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getProviderFeeAssetId())))); - } - - // add `providerFeeRate` to the URL query string - if (getProviderFeeRate() != null) { - joiner.add( - String.format( - "%sproviderFeeRate%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getProviderFeeRate())))); - } - - return joiner.toString(); - } -} diff --git a/src/main/java/com/fireblocks/sdk/model/NonWalletQuoteResponse.java b/src/main/java/com/fireblocks/sdk/model/NonWalletQuoteResponse.java deleted file mode 100644 index acf4b59e..00000000 --- a/src/main/java/com/fireblocks/sdk/model/NonWalletQuoteResponse.java +++ /dev/null @@ -1,492 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.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.math.BigDecimal; -import java.util.Objects; -import java.util.StringJoiner; - -/** Return a quote that cannot be used for a swap operation. */ -@JsonPropertyOrder({ - NonWalletQuoteResponse.JSON_PROPERTY_PROTOCOL, - NonWalletQuoteResponse.JSON_PROPERTY_INPUT_AMOUNT, - NonWalletQuoteResponse.JSON_PROPERTY_INPUT_ASSET, - NonWalletQuoteResponse.JSON_PROPERTY_SLIPPAGE_TOLERANCE, - NonWalletQuoteResponse.JSON_PROPERTY_OUTPUT_MIN_AMOUNT, - NonWalletQuoteResponse.JSON_PROPERTY_OUTPUT_MAX_AMOUNT, - NonWalletQuoteResponse.JSON_PROPERTY_OUTPUT_ASSET, - NonWalletQuoteResponse.JSON_PROPERTY_ADDITIONAL_DATA, - NonWalletQuoteResponse.JSON_PROPERTY_ESTIMATED_FEES -}) -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.14.0") -public class NonWalletQuoteResponse { - public static final String JSON_PROPERTY_PROTOCOL = "protocol"; - @jakarta.annotation.Nonnull private SwapProviderProtocolsEnum protocol; - - public static final String JSON_PROPERTY_INPUT_AMOUNT = "inputAmount"; - @jakarta.annotation.Nonnull private String inputAmount; - - public static final String JSON_PROPERTY_INPUT_ASSET = "inputAsset"; - @jakarta.annotation.Nonnull private String inputAsset; - - public static final String JSON_PROPERTY_SLIPPAGE_TOLERANCE = "slippageTolerance"; - @jakarta.annotation.Nonnull private BigDecimal slippageTolerance; - - public static final String JSON_PROPERTY_OUTPUT_MIN_AMOUNT = "outputMinAmount"; - @jakarta.annotation.Nonnull private String outputMinAmount; - - public static final String JSON_PROPERTY_OUTPUT_MAX_AMOUNT = "outputMaxAmount"; - @jakarta.annotation.Nonnull private String outputMaxAmount; - - public static final String JSON_PROPERTY_OUTPUT_ASSET = "outputAsset"; - @jakarta.annotation.Nonnull private String outputAsset; - - public static final String JSON_PROPERTY_ADDITIONAL_DATA = "additionalData"; - @jakarta.annotation.Nonnull private ProviderAdditionalData additionalData; - - public static final String JSON_PROPERTY_ESTIMATED_FEES = "estimatedFees"; - @jakarta.annotation.Nonnull private NonWalletQuoteFee estimatedFees; - - public NonWalletQuoteResponse() {} - - @JsonCreator - public NonWalletQuoteResponse( - @JsonProperty(value = JSON_PROPERTY_PROTOCOL, required = true) - SwapProviderProtocolsEnum protocol, - @JsonProperty(value = JSON_PROPERTY_INPUT_AMOUNT, required = true) String inputAmount, - @JsonProperty(value = JSON_PROPERTY_INPUT_ASSET, required = true) String inputAsset, - @JsonProperty(value = JSON_PROPERTY_SLIPPAGE_TOLERANCE, required = true) - BigDecimal slippageTolerance, - @JsonProperty(value = JSON_PROPERTY_OUTPUT_MIN_AMOUNT, required = true) - String outputMinAmount, - @JsonProperty(value = JSON_PROPERTY_OUTPUT_MAX_AMOUNT, required = true) - String outputMaxAmount, - @JsonProperty(value = JSON_PROPERTY_OUTPUT_ASSET, required = true) String outputAsset, - @JsonProperty(value = JSON_PROPERTY_ADDITIONAL_DATA, required = true) - ProviderAdditionalData additionalData, - @JsonProperty(value = JSON_PROPERTY_ESTIMATED_FEES, required = true) - NonWalletQuoteFee estimatedFees) { - this.protocol = protocol; - this.inputAmount = inputAmount; - this.inputAsset = inputAsset; - this.slippageTolerance = slippageTolerance; - this.outputMinAmount = outputMinAmount; - this.outputMaxAmount = outputMaxAmount; - this.outputAsset = outputAsset; - this.additionalData = additionalData; - this.estimatedFees = estimatedFees; - } - - public NonWalletQuoteResponse protocol( - @jakarta.annotation.Nonnull SwapProviderProtocolsEnum protocol) { - this.protocol = protocol; - return this; - } - - /** - * Get protocol - * - * @return protocol - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_PROTOCOL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SwapProviderProtocolsEnum getProtocol() { - return protocol; - } - - @JsonProperty(JSON_PROPERTY_PROTOCOL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setProtocol(@jakarta.annotation.Nonnull SwapProviderProtocolsEnum protocol) { - this.protocol = protocol; - } - - public NonWalletQuoteResponse inputAmount(@jakarta.annotation.Nonnull String inputAmount) { - this.inputAmount = inputAmount; - return this; - } - - /** - * The amount of tokens the swapper will provide - * - * @return inputAmount - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_INPUT_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getInputAmount() { - return inputAmount; - } - - @JsonProperty(JSON_PROPERTY_INPUT_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setInputAmount(@jakarta.annotation.Nonnull String inputAmount) { - this.inputAmount = inputAmount; - } - - public NonWalletQuoteResponse inputAsset(@jakarta.annotation.Nonnull String inputAsset) { - this.inputAsset = inputAsset; - return this; - } - - /** - * The id of the asset the swapper will provide - * - * @return inputAsset - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_INPUT_ASSET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getInputAsset() { - return inputAsset; - } - - @JsonProperty(JSON_PROPERTY_INPUT_ASSET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setInputAsset(@jakarta.annotation.Nonnull String inputAsset) { - this.inputAsset = inputAsset; - } - - public NonWalletQuoteResponse slippageTolerance( - @jakarta.annotation.Nonnull BigDecimal slippageTolerance) { - this.slippageTolerance = slippageTolerance; - return this; - } - - /** - * The slippage tolerance is a percentage. The slippage tolerance is the maximum amount the - * price can change between the time the transaction is submitted and the time it is executed - * - * @return slippageTolerance - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SLIPPAGE_TOLERANCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BigDecimal getSlippageTolerance() { - return slippageTolerance; - } - - @JsonProperty(JSON_PROPERTY_SLIPPAGE_TOLERANCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSlippageTolerance(@jakarta.annotation.Nonnull BigDecimal slippageTolerance) { - this.slippageTolerance = slippageTolerance; - } - - public NonWalletQuoteResponse outputMinAmount( - @jakarta.annotation.Nonnull String outputMinAmount) { - this.outputMinAmount = outputMinAmount; - return this; - } - - /** - * The minimum amount of tokens the swapper will receive - * - * @return outputMinAmount - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_OUTPUT_MIN_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getOutputMinAmount() { - return outputMinAmount; - } - - @JsonProperty(JSON_PROPERTY_OUTPUT_MIN_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOutputMinAmount(@jakarta.annotation.Nonnull String outputMinAmount) { - this.outputMinAmount = outputMinAmount; - } - - public NonWalletQuoteResponse outputMaxAmount( - @jakarta.annotation.Nonnull String outputMaxAmount) { - this.outputMaxAmount = outputMaxAmount; - return this; - } - - /** - * Maximum amount of tokens that the swapper will receive - * - * @return outputMaxAmount - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_OUTPUT_MAX_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getOutputMaxAmount() { - return outputMaxAmount; - } - - @JsonProperty(JSON_PROPERTY_OUTPUT_MAX_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOutputMaxAmount(@jakarta.annotation.Nonnull String outputMaxAmount) { - this.outputMaxAmount = outputMaxAmount; - } - - public NonWalletQuoteResponse outputAsset(@jakarta.annotation.Nonnull String outputAsset) { - this.outputAsset = outputAsset; - return this; - } - - /** - * The id of the asset the swapper will receive - * - * @return outputAsset - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_OUTPUT_ASSET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getOutputAsset() { - return outputAsset; - } - - @JsonProperty(JSON_PROPERTY_OUTPUT_ASSET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOutputAsset(@jakarta.annotation.Nonnull String outputAsset) { - this.outputAsset = outputAsset; - } - - public NonWalletQuoteResponse additionalData( - @jakarta.annotation.Nonnull ProviderAdditionalData additionalData) { - this.additionalData = additionalData; - return this; - } - - /** - * Get additionalData - * - * @return additionalData - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ADDITIONAL_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ProviderAdditionalData getAdditionalData() { - return additionalData; - } - - @JsonProperty(JSON_PROPERTY_ADDITIONAL_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAdditionalData( - @jakarta.annotation.Nonnull ProviderAdditionalData additionalData) { - this.additionalData = additionalData; - } - - public NonWalletQuoteResponse estimatedFees( - @jakarta.annotation.Nonnull NonWalletQuoteFee estimatedFees) { - this.estimatedFees = estimatedFees; - return this; - } - - /** - * Get estimatedFees - * - * @return estimatedFees - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ESTIMATED_FEES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public NonWalletQuoteFee getEstimatedFees() { - return estimatedFees; - } - - @JsonProperty(JSON_PROPERTY_ESTIMATED_FEES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEstimatedFees(@jakarta.annotation.Nonnull NonWalletQuoteFee estimatedFees) { - this.estimatedFees = estimatedFees; - } - - /** Return true if this NonWalletQuoteResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NonWalletQuoteResponse nonWalletQuoteResponse = (NonWalletQuoteResponse) o; - return Objects.equals(this.protocol, nonWalletQuoteResponse.protocol) - && Objects.equals(this.inputAmount, nonWalletQuoteResponse.inputAmount) - && Objects.equals(this.inputAsset, nonWalletQuoteResponse.inputAsset) - && Objects.equals(this.slippageTolerance, nonWalletQuoteResponse.slippageTolerance) - && Objects.equals(this.outputMinAmount, nonWalletQuoteResponse.outputMinAmount) - && Objects.equals(this.outputMaxAmount, nonWalletQuoteResponse.outputMaxAmount) - && Objects.equals(this.outputAsset, nonWalletQuoteResponse.outputAsset) - && Objects.equals(this.additionalData, nonWalletQuoteResponse.additionalData) - && Objects.equals(this.estimatedFees, nonWalletQuoteResponse.estimatedFees); - } - - @Override - public int hashCode() { - return Objects.hash( - protocol, - inputAmount, - inputAsset, - slippageTolerance, - outputMinAmount, - outputMaxAmount, - outputAsset, - additionalData, - estimatedFees); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NonWalletQuoteResponse {\n"); - sb.append(" protocol: ").append(toIndentedString(protocol)).append("\n"); - sb.append(" inputAmount: ").append(toIndentedString(inputAmount)).append("\n"); - sb.append(" inputAsset: ").append(toIndentedString(inputAsset)).append("\n"); - sb.append(" slippageTolerance: ") - .append(toIndentedString(slippageTolerance)) - .append("\n"); - sb.append(" outputMinAmount: ").append(toIndentedString(outputMinAmount)).append("\n"); - sb.append(" outputMaxAmount: ").append(toIndentedString(outputMaxAmount)).append("\n"); - sb.append(" outputAsset: ").append(toIndentedString(outputAsset)).append("\n"); - sb.append(" additionalData: ").append(toIndentedString(additionalData)).append("\n"); - sb.append(" estimatedFees: ").append(toIndentedString(estimatedFees)).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 `protocol` to the URL query string - if (getProtocol() != null) { - joiner.add( - String.format( - "%sprotocol%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getProtocol())))); - } - - // add `inputAmount` to the URL query string - if (getInputAmount() != null) { - joiner.add( - String.format( - "%sinputAmount%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getInputAmount())))); - } - - // add `inputAsset` to the URL query string - if (getInputAsset() != null) { - joiner.add( - String.format( - "%sinputAsset%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getInputAsset())))); - } - - // add `slippageTolerance` to the URL query string - if (getSlippageTolerance() != null) { - joiner.add( - String.format( - "%sslippageTolerance%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getSlippageTolerance())))); - } - - // add `outputMinAmount` to the URL query string - if (getOutputMinAmount() != null) { - joiner.add( - String.format( - "%soutputMinAmount%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getOutputMinAmount())))); - } - - // add `outputMaxAmount` to the URL query string - if (getOutputMaxAmount() != null) { - joiner.add( - String.format( - "%soutputMaxAmount%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getOutputMaxAmount())))); - } - - // add `outputAsset` to the URL query string - if (getOutputAsset() != null) { - joiner.add( - String.format( - "%soutputAsset%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getOutputAsset())))); - } - - // add `additionalData` to the URL query string - if (getAdditionalData() != null) { - joiner.add(getAdditionalData().toUrlQueryString(prefix + "additionalData" + suffix)); - } - - // add `estimatedFees` to the URL query string - if (getEstimatedFees() != null) { - joiner.add(getEstimatedFees().toUrlQueryString(prefix + "estimatedFees" + suffix)); - } - - return joiner.toString(); - } -} diff --git a/src/main/java/com/fireblocks/sdk/model/SwapRequiredAction.java b/src/main/java/com/fireblocks/sdk/model/OneTimeAddressReference.java similarity index 61% rename from src/main/java/com/fireblocks/sdk/model/SwapRequiredAction.java rename to src/main/java/com/fireblocks/sdk/model/OneTimeAddressReference.java index 36bc394b..ab5a89a2 100644 --- a/src/main/java/com/fireblocks/sdk/model/SwapRequiredAction.java +++ b/src/main/java/com/fireblocks/sdk/model/OneTimeAddressReference.java @@ -22,34 +22,23 @@ import java.util.Objects; import java.util.StringJoiner; -/** SwapRequiredAction */ +/** OneTimeAddressReference */ @JsonPropertyOrder({ - SwapRequiredAction.JSON_PROPERTY_TYPE, - SwapRequiredAction.JSON_PROPERTY_STATUS, - SwapRequiredAction.JSON_PROPERTY_TX_ID + OneTimeAddressReference.JSON_PROPERTY_TYPE, + OneTimeAddressReference.JSON_PROPERTY_ADDRESS, + OneTimeAddressReference.JSON_PROPERTY_TAG }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") -public class SwapRequiredAction { - public static final String JSON_PROPERTY_TYPE = "type"; - @jakarta.annotation.Nonnull private SwapRequiredActionsEnum type; - - /** The status of the required action */ - public enum StatusEnum { - WAITING(String.valueOf("WAITING")), - - PROCESSING(String.valueOf("PROCESSING")), - - COMPLETED(String.valueOf("COMPLETED")), - - FAILED(String.valueOf("FAILED")), - - CANCELED(String.valueOf("CANCELED")); +public class OneTimeAddressReference { + /** Gets or Sets type */ + public enum TypeEnum { + ONE_TIME_ADDRESS(String.valueOf("ONE_TIME_ADDRESS")); private String value; - StatusEnum(String value) { + TypeEnum(String value) { this.value = value; } @@ -64,8 +53,8 @@ public String toString() { } @JsonCreator - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { if (b.value.equals(value)) { return b; } @@ -74,23 +63,26 @@ public static StatusEnum fromValue(String value) { } } - public static final String JSON_PROPERTY_STATUS = "status"; - @jakarta.annotation.Nonnull private StatusEnum status; + 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 String address; - public static final String JSON_PROPERTY_TX_ID = "txId"; - @jakarta.annotation.Nullable private String txId; + public static final String JSON_PROPERTY_TAG = "tag"; + @jakarta.annotation.Nullable private String tag; - public SwapRequiredAction() {} + public OneTimeAddressReference() {} @JsonCreator - public SwapRequiredAction( - @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) SwapRequiredActionsEnum type, - @JsonProperty(value = JSON_PROPERTY_STATUS, required = true) StatusEnum status) { + public OneTimeAddressReference( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_ADDRESS, required = true) String address) { this.type = type; - this.status = status; + this.address = address; } - public SwapRequiredAction type(@jakarta.annotation.Nonnull SwapRequiredActionsEnum type) { + public OneTimeAddressReference type(@jakarta.annotation.Nonnull TypeEnum type) { this.type = type; return this; } @@ -103,63 +95,63 @@ public SwapRequiredAction type(@jakarta.annotation.Nonnull SwapRequiredActionsEn @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SwapRequiredActionsEnum getType() { + public TypeEnum getType() { return type; } @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setType(@jakarta.annotation.Nonnull SwapRequiredActionsEnum type) { + public void setType(@jakarta.annotation.Nonnull TypeEnum type) { this.type = type; } - public SwapRequiredAction status(@jakarta.annotation.Nonnull StatusEnum status) { - this.status = status; + public OneTimeAddressReference address(@jakarta.annotation.Nonnull String address) { + this.address = address; return this; } /** - * The status of the required action + * Get address * - * @return status + * @return address */ @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_STATUS) + @JsonProperty(JSON_PROPERTY_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public StatusEnum getStatus() { - return status; + public String getAddress() { + return address; } - @JsonProperty(JSON_PROPERTY_STATUS) + @JsonProperty(JSON_PROPERTY_ADDRESS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setStatus(@jakarta.annotation.Nonnull StatusEnum status) { - this.status = status; + public void setAddress(@jakarta.annotation.Nonnull String address) { + this.address = address; } - public SwapRequiredAction txId(@jakarta.annotation.Nullable String txId) { - this.txId = txId; + public OneTimeAddressReference tag(@jakarta.annotation.Nullable String tag) { + this.tag = tag; return this; } /** - * The transaction id of the required action + * Get tag * - * @return txId + * @return tag */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonProperty(JSON_PROPERTY_TAG) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTxId() { - return txId; + public String getTag() { + return tag; } - @JsonProperty(JSON_PROPERTY_TX_ID) + @JsonProperty(JSON_PROPERTY_TAG) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTxId(@jakarta.annotation.Nullable String txId) { - this.txId = txId; + public void setTag(@jakarta.annotation.Nullable String tag) { + this.tag = tag; } - /** Return true if this SwapRequiredAction object is equal to o. */ + /** Return true if this OneTimeAddressReference object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -168,24 +160,24 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SwapRequiredAction swapRequiredAction = (SwapRequiredAction) o; - return Objects.equals(this.type, swapRequiredAction.type) - && Objects.equals(this.status, swapRequiredAction.status) - && Objects.equals(this.txId, swapRequiredAction.txId); + OneTimeAddressReference oneTimeAddressReference = (OneTimeAddressReference) o; + return Objects.equals(this.type, oneTimeAddressReference.type) + && Objects.equals(this.address, oneTimeAddressReference.address) + && Objects.equals(this.tag, oneTimeAddressReference.tag); } @Override public int hashCode() { - return Objects.hash(type, status, txId); + return Objects.hash(type, address, tag); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SwapRequiredAction {\n"); + sb.append("class OneTimeAddressReference {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" txId: ").append(toIndentedString(txId)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); sb.append("}"); return sb.toString(); } @@ -243,24 +235,24 @@ public String toUrlQueryString(String prefix) { ApiClient.urlEncode(ApiClient.valueToString(getType())))); } - // add `status` to the URL query string - if (getStatus() != null) { + // add `address` to the URL query string + if (getAddress() != null) { joiner.add( String.format( - "%sstatus%s=%s", + "%saddress%s=%s", prefix, suffix, - ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + ApiClient.urlEncode(ApiClient.valueToString(getAddress())))); } - // add `txId` to the URL query string - if (getTxId() != null) { + // add `tag` to the URL query string + if (getTag() != null) { joiner.add( String.format( - "%stxId%s=%s", + "%stag%s=%s", prefix, suffix, - ApiClient.urlEncode(ApiClient.valueToString(getTxId())))); + ApiClient.urlEncode(ApiClient.valueToString(getTag())))); } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/OrderDetails.java b/src/main/java/com/fireblocks/sdk/model/OrderDetails.java new file mode 100644 index 00000000..e5c287d1 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/OrderDetails.java @@ -0,0 +1,835 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** OrderDetails */ +@JsonPropertyOrder({ + OrderDetails.JSON_PROPERTY_ID, + OrderDetails.JSON_PROPERTY_VIA, + OrderDetails.JSON_PROPERTY_STATUS, + OrderDetails.JSON_PROPERTY_CREATED_AT, + OrderDetails.JSON_PROPERTY_UPDATED_AT, + OrderDetails.JSON_PROPERTY_RECEIPT, + OrderDetails.JSON_PROPERTY_GENERAL_FEES, + OrderDetails.JSON_PROPERTY_EXECUTION_STEPS, + OrderDetails.JSON_PROPERTY_EXECUTION_RESPONSE_DETAILS, + OrderDetails.JSON_PROPERTY_SETTLEMENT, + OrderDetails.JSON_PROPERTY_PARTICIPANTS_IDENTIFICATION, + OrderDetails.JSON_PROPERTY_PAYMENT_INSTRUCTIONS, + OrderDetails.JSON_PROPERTY_CREATED_BY, + OrderDetails.JSON_PROPERTY_CUSTOMER_INTERNAL_REFERENCE_ID, + OrderDetails.JSON_PROPERTY_NOTE, + OrderDetails.JSON_PROPERTY_EXPIRES_AT +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class OrderDetails { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull private String id; + + public static final String JSON_PROPERTY_VIA = "via"; + @jakarta.annotation.Nonnull private AccessType via; + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nonnull private OrderStatus status; + + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + @jakarta.annotation.Nonnull private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; + @jakarta.annotation.Nullable private OffsetDateTime updatedAt; + + public static final String JSON_PROPERTY_RECEIPT = "receipt"; + @jakarta.annotation.Nullable private TransferReceipt receipt; + + public static final String JSON_PROPERTY_GENERAL_FEES = "generalFees"; + @jakarta.annotation.Nullable private List generalFees = new ArrayList<>(); + + public static final String JSON_PROPERTY_EXECUTION_STEPS = "executionSteps"; + @jakarta.annotation.Nonnull private List executionSteps = new ArrayList<>(); + + public static final String JSON_PROPERTY_EXECUTION_RESPONSE_DETAILS = + "executionResponseDetails"; + @jakarta.annotation.Nonnull private ExecutionResponseDetails executionResponseDetails; + + public static final String JSON_PROPERTY_SETTLEMENT = "settlement"; + @jakarta.annotation.Nonnull private Settlement settlement; + + public static final String JSON_PROPERTY_PARTICIPANTS_IDENTIFICATION = + "participantsIdentification"; + @jakarta.annotation.Nullable private ParticipantsIdentification participantsIdentification; + + public static final String JSON_PROPERTY_PAYMENT_INSTRUCTIONS = "paymentInstructions"; + + @jakarta.annotation.Nullable + private List paymentInstructions = new ArrayList<>(); + + public static final String JSON_PROPERTY_CREATED_BY = "createdBy"; + @jakarta.annotation.Nonnull private String createdBy; + + public static final String JSON_PROPERTY_CUSTOMER_INTERNAL_REFERENCE_ID = + "customerInternalReferenceId"; + @jakarta.annotation.Nullable private String customerInternalReferenceId; + + public static final String JSON_PROPERTY_NOTE = "note"; + @jakarta.annotation.Nullable private String note; + + public static final String JSON_PROPERTY_EXPIRES_AT = "expiresAt"; + @jakarta.annotation.Nullable private OffsetDateTime expiresAt; + + public OrderDetails() {} + + @JsonCreator + public OrderDetails( + @JsonProperty(value = JSON_PROPERTY_ID, required = true) String id, + @JsonProperty(value = JSON_PROPERTY_VIA, required = true) AccessType via, + @JsonProperty(value = JSON_PROPERTY_STATUS, required = true) OrderStatus status, + @JsonProperty(value = JSON_PROPERTY_CREATED_AT, required = true) + OffsetDateTime createdAt, + @JsonProperty(value = JSON_PROPERTY_EXECUTION_STEPS, required = true) + List executionSteps, + @JsonProperty(value = JSON_PROPERTY_EXECUTION_RESPONSE_DETAILS, required = true) + ExecutionResponseDetails executionResponseDetails, + @JsonProperty(value = JSON_PROPERTY_SETTLEMENT, required = true) Settlement settlement, + @JsonProperty(value = JSON_PROPERTY_CREATED_BY, required = true) String createdBy) { + this.id = id; + this.via = via; + this.status = status; + this.createdAt = createdAt; + this.executionSteps = executionSteps; + this.executionResponseDetails = executionResponseDetails; + this.settlement = settlement; + this.createdBy = createdBy; + } + + public OrderDetails id(@jakarta.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @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 OrderDetails via(@jakarta.annotation.Nonnull AccessType via) { + this.via = via; + return this; + } + + /** + * Get via + * + * @return via + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VIA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AccessType getVia() { + return via; + } + + @JsonProperty(JSON_PROPERTY_VIA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVia(@jakarta.annotation.Nonnull AccessType via) { + this.via = via; + } + + public OrderDetails status(@jakarta.annotation.Nonnull OrderStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OrderStatus getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@jakarta.annotation.Nonnull OrderStatus status) { + this.status = status; + } + + public OrderDetails createdAt(@jakarta.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * + * @return createdAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(@jakarta.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public OrderDetails updatedAt(@jakarta.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * + * @return updatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(@jakarta.annotation.Nullable OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + public OrderDetails receipt(@jakarta.annotation.Nullable TransferReceipt receipt) { + this.receipt = receipt; + return this; + } + + /** + * Get receipt + * + * @return receipt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECEIPT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransferReceipt getReceipt() { + return receipt; + } + + @JsonProperty(JSON_PROPERTY_RECEIPT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReceipt(@jakarta.annotation.Nullable TransferReceipt receipt) { + this.receipt = receipt; + } + + public OrderDetails generalFees(@jakarta.annotation.Nullable List generalFees) { + this.generalFees = generalFees; + return this; + } + + public OrderDetails addGeneralFeesItem(Fee generalFeesItem) { + if (this.generalFees == null) { + this.generalFees = new ArrayList<>(); + } + this.generalFees.add(generalFeesItem); + return this; + } + + /** + * Get generalFees + * + * @return generalFees + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GENERAL_FEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getGeneralFees() { + return generalFees; + } + + @JsonProperty(JSON_PROPERTY_GENERAL_FEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGeneralFees(@jakarta.annotation.Nullable List generalFees) { + this.generalFees = generalFees; + } + + public OrderDetails executionSteps( + @jakarta.annotation.Nonnull List executionSteps) { + this.executionSteps = executionSteps; + return this; + } + + public OrderDetails addExecutionStepsItem(ExecutionStep executionStepsItem) { + if (this.executionSteps == null) { + this.executionSteps = new ArrayList<>(); + } + this.executionSteps.add(executionStepsItem); + return this; + } + + /** + * Get executionSteps + * + * @return executionSteps + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXECUTION_STEPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getExecutionSteps() { + return executionSteps; + } + + @JsonProperty(JSON_PROPERTY_EXECUTION_STEPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExecutionSteps(@jakarta.annotation.Nonnull List executionSteps) { + this.executionSteps = executionSteps; + } + + public OrderDetails executionResponseDetails( + @jakarta.annotation.Nonnull ExecutionResponseDetails executionResponseDetails) { + this.executionResponseDetails = executionResponseDetails; + return this; + } + + /** + * Get executionResponseDetails + * + * @return executionResponseDetails + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXECUTION_RESPONSE_DETAILS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ExecutionResponseDetails getExecutionResponseDetails() { + return executionResponseDetails; + } + + @JsonProperty(JSON_PROPERTY_EXECUTION_RESPONSE_DETAILS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExecutionResponseDetails( + @jakarta.annotation.Nonnull ExecutionResponseDetails executionResponseDetails) { + this.executionResponseDetails = executionResponseDetails; + } + + public OrderDetails settlement(@jakarta.annotation.Nonnull Settlement settlement) { + this.settlement = settlement; + return this; + } + + /** + * Get settlement + * + * @return settlement + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SETTLEMENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Settlement getSettlement() { + return settlement; + } + + @JsonProperty(JSON_PROPERTY_SETTLEMENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSettlement(@jakarta.annotation.Nonnull Settlement settlement) { + this.settlement = settlement; + } + + public OrderDetails participantsIdentification( + @jakarta.annotation.Nullable ParticipantsIdentification participantsIdentification) { + this.participantsIdentification = participantsIdentification; + return this; + } + + /** + * Get participantsIdentification + * + * @return participantsIdentification + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARTICIPANTS_IDENTIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ParticipantsIdentification getParticipantsIdentification() { + return participantsIdentification; + } + + @JsonProperty(JSON_PROPERTY_PARTICIPANTS_IDENTIFICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setParticipantsIdentification( + @jakarta.annotation.Nullable ParticipantsIdentification participantsIdentification) { + this.participantsIdentification = participantsIdentification; + } + + public OrderDetails paymentInstructions( + @jakarta.annotation.Nullable List paymentInstructions) { + this.paymentInstructions = paymentInstructions; + return this; + } + + public OrderDetails addPaymentInstructionsItem(PaymentInstructions paymentInstructionsItem) { + if (this.paymentInstructions == null) { + this.paymentInstructions = new ArrayList<>(); + } + this.paymentInstructions.add(paymentInstructionsItem); + return this; + } + + /** + * Payment instructions for the order, the client can use one of these to pay the order. + * + * @return paymentInstructions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUCTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getPaymentInstructions() { + return paymentInstructions; + } + + @JsonProperty(JSON_PROPERTY_PAYMENT_INSTRUCTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPaymentInstructions( + @jakarta.annotation.Nullable List paymentInstructions) { + this.paymentInstructions = paymentInstructions; + } + + public OrderDetails createdBy(@jakarta.annotation.Nonnull String createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * The ID of the user who created the order + * + * @return createdBy + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedBy() { + return createdBy; + } + + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedBy(@jakarta.annotation.Nonnull String createdBy) { + this.createdBy = createdBy; + } + + public OrderDetails customerInternalReferenceId( + @jakarta.annotation.Nullable String customerInternalReferenceId) { + this.customerInternalReferenceId = customerInternalReferenceId; + return this; + } + + /** + * Internal reference ID for the customer + * + * @return customerInternalReferenceId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_INTERNAL_REFERENCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomerInternalReferenceId() { + return customerInternalReferenceId; + } + + @JsonProperty(JSON_PROPERTY_CUSTOMER_INTERNAL_REFERENCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomerInternalReferenceId( + @jakarta.annotation.Nullable String customerInternalReferenceId) { + this.customerInternalReferenceId = customerInternalReferenceId; + } + + public OrderDetails note(@jakarta.annotation.Nullable String note) { + this.note = note; + return this; + } + + /** + * Optional note for the Order + * + * @return note + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNote() { + return note; + } + + @JsonProperty(JSON_PROPERTY_NOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNote(@jakarta.annotation.Nullable String note) { + this.note = note; + } + + public OrderDetails expiresAt(@jakarta.annotation.Nullable OffsetDateTime expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * Get expiresAt + * + * @return expiresAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getExpiresAt() { + return expiresAt; + } + + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpiresAt(@jakarta.annotation.Nullable OffsetDateTime expiresAt) { + this.expiresAt = expiresAt; + } + + /** Return true if this OrderDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderDetails orderDetails = (OrderDetails) o; + return Objects.equals(this.id, orderDetails.id) + && Objects.equals(this.via, orderDetails.via) + && Objects.equals(this.status, orderDetails.status) + && Objects.equals(this.createdAt, orderDetails.createdAt) + && Objects.equals(this.updatedAt, orderDetails.updatedAt) + && Objects.equals(this.receipt, orderDetails.receipt) + && Objects.equals(this.generalFees, orderDetails.generalFees) + && Objects.equals(this.executionSteps, orderDetails.executionSteps) + && Objects.equals( + this.executionResponseDetails, orderDetails.executionResponseDetails) + && Objects.equals(this.settlement, orderDetails.settlement) + && Objects.equals( + this.participantsIdentification, orderDetails.participantsIdentification) + && Objects.equals(this.paymentInstructions, orderDetails.paymentInstructions) + && Objects.equals(this.createdBy, orderDetails.createdBy) + && Objects.equals( + this.customerInternalReferenceId, orderDetails.customerInternalReferenceId) + && Objects.equals(this.note, orderDetails.note) + && Objects.equals(this.expiresAt, orderDetails.expiresAt); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + via, + status, + createdAt, + updatedAt, + receipt, + generalFees, + executionSteps, + executionResponseDetails, + settlement, + participantsIdentification, + paymentInstructions, + createdBy, + customerInternalReferenceId, + note, + expiresAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderDetails {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" via: ").append(toIndentedString(via)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" receipt: ").append(toIndentedString(receipt)).append("\n"); + sb.append(" generalFees: ").append(toIndentedString(generalFees)).append("\n"); + sb.append(" executionSteps: ").append(toIndentedString(executionSteps)).append("\n"); + sb.append(" executionResponseDetails: ") + .append(toIndentedString(executionResponseDetails)) + .append("\n"); + sb.append(" settlement: ").append(toIndentedString(settlement)).append("\n"); + sb.append(" participantsIdentification: ") + .append(toIndentedString(participantsIdentification)) + .append("\n"); + sb.append(" paymentInstructions: ") + .append(toIndentedString(paymentInstructions)) + .append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" customerInternalReferenceId: ") + .append(toIndentedString(customerInternalReferenceId)) + .append("\n"); + sb.append(" note: ").append(toIndentedString(note)).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 `id` to the URL query string + if (getId() != null) { + joiner.add( + String.format( + "%sid%s=%s", + prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `via` to the URL query string + if (getVia() != null) { + joiner.add(getVia().toUrlQueryString(prefix + "via" + suffix)); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add( + String.format( + "%screatedAt%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + // add `updatedAt` to the URL query string + if (getUpdatedAt() != null) { + joiner.add( + String.format( + "%supdatedAt%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); + } + + // add `receipt` to the URL query string + if (getReceipt() != null) { + joiner.add(getReceipt().toUrlQueryString(prefix + "receipt" + suffix)); + } + + // add `generalFees` to the URL query string + if (getGeneralFees() != null) { + for (int i = 0; i < getGeneralFees().size(); i++) { + if (getGeneralFees().get(i) != null) { + joiner.add( + getGeneralFees() + .get(i) + .toUrlQueryString( + String.format( + "%sgeneralFees%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `executionSteps` to the URL query string + if (getExecutionSteps() != null) { + for (int i = 0; i < getExecutionSteps().size(); i++) { + if (getExecutionSteps().get(i) != null) { + joiner.add( + getExecutionSteps() + .get(i) + .toUrlQueryString( + String.format( + "%sexecutionSteps%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `executionResponseDetails` to the URL query string + if (getExecutionResponseDetails() != null) { + joiner.add( + getExecutionResponseDetails() + .toUrlQueryString(prefix + "executionResponseDetails" + suffix)); + } + + // add `settlement` to the URL query string + if (getSettlement() != null) { + joiner.add(getSettlement().toUrlQueryString(prefix + "settlement" + suffix)); + } + + // add `participantsIdentification` to the URL query string + if (getParticipantsIdentification() != null) { + joiner.add( + getParticipantsIdentification() + .toUrlQueryString(prefix + "participantsIdentification" + suffix)); + } + + // add `paymentInstructions` to the URL query string + if (getPaymentInstructions() != null) { + for (int i = 0; i < getPaymentInstructions().size(); i++) { + if (getPaymentInstructions().get(i) != null) { + joiner.add( + getPaymentInstructions() + .get(i) + .toUrlQueryString( + String.format( + "%spaymentInstructions%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `createdBy` to the URL query string + if (getCreatedBy() != null) { + joiner.add( + String.format( + "%screatedBy%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCreatedBy())))); + } + + // add `customerInternalReferenceId` to the URL query string + if (getCustomerInternalReferenceId() != null) { + joiner.add( + String.format( + "%scustomerInternalReferenceId%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getCustomerInternalReferenceId())))); + } + + // add `note` to the URL query string + if (getNote() != null) { + joiner.add( + String.format( + "%snote%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getNote())))); + } + + // 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/OrderStatus.java b/src/main/java/com/fireblocks/sdk/model/OrderStatus.java new file mode 100644 index 00000000..39bb359a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/OrderStatus.java @@ -0,0 +1,72 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Gets or Sets OrderStatus */ +public enum OrderStatus { + CREATED("CREATED"), + + PENDING_USER_ACTION("PENDING_USER_ACTION"), + + PROCESSING("PROCESSING"), + + CANCELED("CANCELED"), + + COMPLETED("COMPLETED"), + + FAILED("FAILED"); + + private String value; + + OrderStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OrderStatus fromValue(String value) { + for (OrderStatus b : OrderStatus.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/OrderSummary.java b/src/main/java/com/fireblocks/sdk/model/OrderSummary.java new file mode 100644 index 00000000..62e91558 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/OrderSummary.java @@ -0,0 +1,586 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.StringJoiner; + +/** OrderSummary */ +@JsonPropertyOrder({ + OrderSummary.JSON_PROPERTY_ID, + OrderSummary.JSON_PROPERTY_VIA, + OrderSummary.JSON_PROPERTY_SIDE, + OrderSummary.JSON_PROPERTY_BASE_AMOUNT, + OrderSummary.JSON_PROPERTY_QUOTE_AMOUNT, + OrderSummary.JSON_PROPERTY_BASE_ASSET_ID, + OrderSummary.JSON_PROPERTY_QUOTE_ASSET_ID, + OrderSummary.JSON_PROPERTY_STATUS, + OrderSummary.JSON_PROPERTY_DESTINATION, + OrderSummary.JSON_PROPERTY_SOURCE, + OrderSummary.JSON_PROPERTY_CREATED_AT +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class OrderSummary { + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull private String id; + + public static final String JSON_PROPERTY_VIA = "via"; + @jakarta.annotation.Nonnull private AccessType via; + + /** Side of the order */ + public enum SideEnum { + BUY(String.valueOf("BUY")), + + SELL(String.valueOf("SELL")); + + private String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIDE = "side"; + @jakarta.annotation.Nonnull private SideEnum side; + + public static final String JSON_PROPERTY_BASE_AMOUNT = "baseAmount"; + @jakarta.annotation.Nonnull private String baseAmount; + + public static final String JSON_PROPERTY_QUOTE_AMOUNT = "quoteAmount"; + @jakarta.annotation.Nullable private String quoteAmount; + + public static final String JSON_PROPERTY_BASE_ASSET_ID = "baseAssetId"; + @jakarta.annotation.Nonnull private String baseAssetId; + + public static final String JSON_PROPERTY_QUOTE_ASSET_ID = "quoteAssetId"; + @jakarta.annotation.Nonnull private String quoteAssetId; + + public static final String JSON_PROPERTY_STATUS = "status"; + @jakarta.annotation.Nonnull private OrderStatus status; + + public static final String JSON_PROPERTY_DESTINATION = "destination"; + @jakarta.annotation.Nonnull private AccountReference destination; + + public static final String JSON_PROPERTY_SOURCE = "source"; + @jakarta.annotation.Nullable private SettlementSourceAccount source; + + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; + @jakarta.annotation.Nonnull private OffsetDateTime createdAt; + + public OrderSummary() {} + + @JsonCreator + public OrderSummary( + @JsonProperty(value = JSON_PROPERTY_ID, required = true) String id, + @JsonProperty(value = JSON_PROPERTY_VIA, required = true) AccessType via, + @JsonProperty(value = JSON_PROPERTY_SIDE, required = true) SideEnum side, + @JsonProperty(value = JSON_PROPERTY_BASE_AMOUNT, required = true) String baseAmount, + @JsonProperty(value = JSON_PROPERTY_BASE_ASSET_ID, required = true) String baseAssetId, + @JsonProperty(value = JSON_PROPERTY_QUOTE_ASSET_ID, required = true) + String quoteAssetId, + @JsonProperty(value = JSON_PROPERTY_STATUS, required = true) OrderStatus status, + @JsonProperty(value = JSON_PROPERTY_DESTINATION, required = true) + AccountReference destination, + @JsonProperty(value = JSON_PROPERTY_CREATED_AT, required = true) + OffsetDateTime createdAt) { + this.id = id; + this.via = via; + this.side = side; + this.baseAmount = baseAmount; + this.baseAssetId = baseAssetId; + this.quoteAssetId = quoteAssetId; + this.status = status; + this.destination = destination; + this.createdAt = createdAt; + } + + public OrderSummary id(@jakarta.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @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 OrderSummary via(@jakarta.annotation.Nonnull AccessType via) { + this.via = via; + return this; + } + + /** + * Get via + * + * @return via + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VIA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AccessType getVia() { + return via; + } + + @JsonProperty(JSON_PROPERTY_VIA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVia(@jakarta.annotation.Nonnull AccessType via) { + this.via = via; + } + + public OrderSummary side(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + return this; + } + + /** + * Side of the order + * + * @return side + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SideEnum getSide() { + return side; + } + + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSide(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + } + + public OrderSummary baseAmount(@jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + return this; + } + + /** + * Get baseAmount + * + * @return baseAmount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAmount() { + return baseAmount; + } + + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAmount(@jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + } + + public OrderSummary quoteAmount(@jakarta.annotation.Nullable String quoteAmount) { + this.quoteAmount = quoteAmount; + return this; + } + + /** + * Get quoteAmount + * + * @return quoteAmount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUOTE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getQuoteAmount() { + return quoteAmount; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setQuoteAmount(@jakarta.annotation.Nullable String quoteAmount) { + this.quoteAmount = quoteAmount; + } + + public OrderSummary baseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * Get baseAssetId + * + * @return baseAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + } + + public OrderSummary quoteAssetId(@jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + return this; + } + + /** + * Get quoteAssetId + * + * @return quoteAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteAssetId() { + return quoteAssetId; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteAssetId(@jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + } + + public OrderSummary status(@jakarta.annotation.Nonnull OrderStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * + * @return status + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OrderStatus getStatus() { + return status; + } + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStatus(@jakarta.annotation.Nonnull OrderStatus status) { + this.status = status; + } + + public OrderSummary destination(@jakarta.annotation.Nonnull AccountReference destination) { + this.destination = destination; + return this; + } + + /** + * Get destination + * + * @return destination + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESTINATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AccountReference getDestination() { + return destination; + } + + @JsonProperty(JSON_PROPERTY_DESTINATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDestination(@jakarta.annotation.Nonnull AccountReference destination) { + this.destination = destination; + } + + public OrderSummary source(@jakarta.annotation.Nullable SettlementSourceAccount source) { + this.source = source; + return this; + } + + /** + * Get source + * + * @return source + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SettlementSourceAccount getSource() { + return source; + } + + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSource(@jakarta.annotation.Nullable SettlementSourceAccount source) { + this.source = source; + } + + public OrderSummary createdAt(@jakarta.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * + * @return createdAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCreatedAt(@jakarta.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + /** Return true if this OrderSummary object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrderSummary orderSummary = (OrderSummary) o; + return Objects.equals(this.id, orderSummary.id) + && Objects.equals(this.via, orderSummary.via) + && Objects.equals(this.side, orderSummary.side) + && Objects.equals(this.baseAmount, orderSummary.baseAmount) + && Objects.equals(this.quoteAmount, orderSummary.quoteAmount) + && Objects.equals(this.baseAssetId, orderSummary.baseAssetId) + && Objects.equals(this.quoteAssetId, orderSummary.quoteAssetId) + && Objects.equals(this.status, orderSummary.status) + && Objects.equals(this.destination, orderSummary.destination) + && Objects.equals(this.source, orderSummary.source) + && Objects.equals(this.createdAt, orderSummary.createdAt); + } + + @Override + public int hashCode() { + return Objects.hash( + id, + via, + side, + baseAmount, + quoteAmount, + baseAssetId, + quoteAssetId, + status, + destination, + source, + createdAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrderSummary {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" via: ").append(toIndentedString(via)).append("\n"); + sb.append(" side: ").append(toIndentedString(side)).append("\n"); + sb.append(" baseAmount: ").append(toIndentedString(baseAmount)).append("\n"); + sb.append(" quoteAmount: ").append(toIndentedString(quoteAmount)).append("\n"); + sb.append(" baseAssetId: ").append(toIndentedString(baseAssetId)).append("\n"); + sb.append(" quoteAssetId: ").append(toIndentedString(quoteAssetId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" destination: ").append(toIndentedString(destination)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).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 `via` to the URL query string + if (getVia() != null) { + joiner.add(getVia().toUrlQueryString(prefix + "via" + suffix)); + } + + // add `side` to the URL query string + if (getSide() != null) { + joiner.add( + String.format( + "%sside%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSide())))); + } + + // add `baseAmount` to the URL query string + if (getBaseAmount() != null) { + joiner.add( + String.format( + "%sbaseAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBaseAmount())))); + } + + // add `quoteAmount` to the URL query string + if (getQuoteAmount() != null) { + joiner.add( + String.format( + "%squoteAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getQuoteAmount())))); + } + + // add `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBaseAssetId())))); + } + + // add `quoteAssetId` to the URL query string + if (getQuoteAssetId() != null) { + joiner.add( + String.format( + "%squoteAssetId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getQuoteAssetId())))); + } + + // add `status` to the URL query string + if (getStatus() != null) { + joiner.add( + String.format( + "%sstatus%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); + } + + // add `destination` to the URL query string + if (getDestination() != null) { + joiner.add(getDestination().toUrlQueryString(prefix + "destination" + suffix)); + } + + // add `source` to the URL query string + if (getSource() != null) { + joiner.add(getSource().toUrlQueryString(prefix + "source" + suffix)); + } + + // add `createdAt` to the URL query string + if (getCreatedAt() != null) { + joiner.add( + String.format( + "%screatedAt%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ParticipantRelationshipType.java b/src/main/java/com/fireblocks/sdk/model/ParticipantRelationshipType.java new file mode 100644 index 00000000..7ab88864 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ParticipantRelationshipType.java @@ -0,0 +1,66 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Gets or Sets ParticipantRelationshipType */ +public enum ParticipantRelationshipType { + FIRST_PARTY("FirstParty"), + + SECOND_PARTY("SecondParty"), + + THIRD_PARTY("ThirdParty"); + + private String value; + + ParticipantRelationshipType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ParticipantRelationshipType fromValue(String value) { + for (ParticipantRelationshipType b : ParticipantRelationshipType.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/ParticipantsIdentification.java b/src/main/java/com/fireblocks/sdk/model/ParticipantsIdentification.java new file mode 100644 index 00000000..4eb32cf6 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/ParticipantsIdentification.java @@ -0,0 +1,171 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; +import java.util.StringJoiner; + +/** KYC/AML participant identification */ +@JsonPropertyOrder({ + ParticipantsIdentification.JSON_PROPERTY_ORIGINATOR, + ParticipantsIdentification.JSON_PROPERTY_BENEFICIARY +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class ParticipantsIdentification { + public static final String JSON_PROPERTY_ORIGINATOR = "originator"; + @jakarta.annotation.Nullable private Identification originator; + + public static final String JSON_PROPERTY_BENEFICIARY = "beneficiary"; + @jakarta.annotation.Nullable private Identification beneficiary; + + public ParticipantsIdentification() {} + + public ParticipantsIdentification originator( + @jakarta.annotation.Nullable Identification originator) { + this.originator = originator; + return this; + } + + /** + * Get originator + * + * @return originator + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORIGINATOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Identification getOriginator() { + return originator; + } + + @JsonProperty(JSON_PROPERTY_ORIGINATOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOriginator(@jakarta.annotation.Nullable Identification originator) { + this.originator = originator; + } + + public ParticipantsIdentification beneficiary( + @jakarta.annotation.Nullable Identification beneficiary) { + this.beneficiary = beneficiary; + return this; + } + + /** + * Get beneficiary + * + * @return beneficiary + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BENEFICIARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Identification getBeneficiary() { + return beneficiary; + } + + @JsonProperty(JSON_PROPERTY_BENEFICIARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBeneficiary(@jakarta.annotation.Nullable Identification beneficiary) { + this.beneficiary = beneficiary; + } + + /** Return true if this ParticipantsIdentification object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ParticipantsIdentification participantsIdentification = (ParticipantsIdentification) o; + return Objects.equals(this.originator, participantsIdentification.originator) + && Objects.equals(this.beneficiary, participantsIdentification.beneficiary); + } + + @Override + public int hashCode() { + return Objects.hash(originator, beneficiary); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ParticipantsIdentification {\n"); + sb.append(" originator: ").append(toIndentedString(originator)).append("\n"); + sb.append(" beneficiary: ").append(toIndentedString(beneficiary)).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 `originator` to the URL query string + if (getOriginator() != null) { + joiner.add(getOriginator().toUrlQueryString(prefix + "originator" + suffix)); + } + + // add `beneficiary` to the URL query string + if (getBeneficiary() != null) { + joiner.add(getBeneficiary().toUrlQueryString(prefix + "beneficiary" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/PaymentInstructions.java b/src/main/java/com/fireblocks/sdk/model/PaymentInstructions.java new file mode 100644 index 00000000..bd925050 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/PaymentInstructions.java @@ -0,0 +1,274 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** PaymentInstructions */ +@JsonPropertyOrder({ + PaymentInstructions.JSON_PROPERTY_TYPE, + PaymentInstructions.JSON_PROPERTY_ADDRESS, + PaymentInstructions.JSON_PROPERTY_REFERENCE_ID +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class PaymentInstructions { + /** Gets or Sets type */ + public enum TypeEnum { + IBAN(String.valueOf("IBAN")), + + SWIFT(String.valueOf("SWIFT")), + + ACH(String.valueOf("ACH")), + + US_WIRE(String.valueOf("US_WIRE")), + + SPEI(String.valueOf("SPEI")), + + SEPA(String.valueOf("SEPA")), + + PIX(String.valueOf("PIX")), + + LOCAL_BANK_TRANSFER_AFRICA(String.valueOf("LOCAL_BANK_TRANSFER_AFRICA")), + + MOBILE_MONEY(String.valueOf("MOBILE_MONEY")); + + 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 AccountHolderDetails address; + + public static final String JSON_PROPERTY_REFERENCE_ID = "referenceId"; + @jakarta.annotation.Nonnull private String referenceId; + + public PaymentInstructions() {} + + @JsonCreator + public PaymentInstructions( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_ADDRESS, required = true) + AccountHolderDetails address, + @JsonProperty(value = JSON_PROPERTY_REFERENCE_ID, required = true) String referenceId) { + this.type = type; + this.address = address; + this.referenceId = referenceId; + } + + public PaymentInstructions 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 PaymentInstructions address(@jakarta.annotation.Nonnull AccountHolderDetails address) { + this.address = address; + return this; + } + + /** + * Get address + * + * @return address + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AccountHolderDetails getAddress() { + return address; + } + + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddress(@jakarta.annotation.Nonnull AccountHolderDetails address) { + this.address = address; + } + + public PaymentInstructions referenceId(@jakarta.annotation.Nonnull String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Get referenceId + * + * @return referenceId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_REFERENCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getReferenceId() { + return referenceId; + } + + @JsonProperty(JSON_PROPERTY_REFERENCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setReferenceId(@jakarta.annotation.Nonnull String referenceId) { + this.referenceId = referenceId; + } + + /** Return true if this PaymentInstructions object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PaymentInstructions paymentInstructions = (PaymentInstructions) o; + return Objects.equals(this.type, paymentInstructions.type) + && Objects.equals(this.address, paymentInstructions.address) + && Objects.equals(this.referenceId, paymentInstructions.referenceId); + } + + @Override + public int hashCode() { + return Objects.hash(type, address, referenceId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PaymentInstructions {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" referenceId: ").append(toIndentedString(referenceId)).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)); + } + + // add `referenceId` to the URL query string + if (getReferenceId() != null) { + joiner.add( + String.format( + "%sreferenceId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getReferenceId())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/PeerType.java b/src/main/java/com/fireblocks/sdk/model/PeerType.java new file mode 100644 index 00000000..fab2b05b --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/PeerType.java @@ -0,0 +1,70 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Gets or Sets PeerType */ +public enum PeerType { + VAULT_ACCOUNT("VAULT_ACCOUNT"), + + EXCHANGE_ACCOUNT("EXCHANGE_ACCOUNT"), + + INTERNAL_WALLET("INTERNAL_WALLET"), + + EXTERNAL_WALLET("EXTERNAL_WALLET"), + + FIAT_ACCOUNT("FIAT_ACCOUNT"); + + private String value; + + PeerType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PeerType fromValue(String value) { + for (PeerType b : PeerType.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/PersonalIdentification.java b/src/main/java/com/fireblocks/sdk/model/PersonalIdentification.java new file mode 100644 index 00000000..4dea1851 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/PersonalIdentification.java @@ -0,0 +1,403 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.time.LocalDate; +import java.util.Objects; +import java.util.StringJoiner; + +/** PersonalIdentification */ +@JsonPropertyOrder({ + PersonalIdentification.JSON_PROPERTY_EXTERNAL_REFERENCE_ID, + PersonalIdentification.JSON_PROPERTY_ENTITY_TYPE, + PersonalIdentification.JSON_PROPERTY_PARTICIPANT_RELATIONSHIP_TYPE, + PersonalIdentification.JSON_PROPERTY_FULL_NAME, + PersonalIdentification.JSON_PROPERTY_DATE_OF_BIRTH, + PersonalIdentification.JSON_PROPERTY_POSTAL_ADDRESS +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class PersonalIdentification { + public static final String JSON_PROPERTY_EXTERNAL_REFERENCE_ID = "externalReferenceId"; + @jakarta.annotation.Nonnull private String externalReferenceId; + + /** Gets or Sets entityType */ + public enum EntityTypeEnum { + INDIVIDUAL(String.valueOf("INDIVIDUAL")); + + private String value; + + EntityTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EntityTypeEnum fromValue(String value) { + for (EntityTypeEnum b : EntityTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ENTITY_TYPE = "entityType"; + @jakarta.annotation.Nonnull private EntityTypeEnum entityType; + + public static final String JSON_PROPERTY_PARTICIPANT_RELATIONSHIP_TYPE = + "participantRelationshipType"; + @jakarta.annotation.Nonnull private ParticipantRelationshipType participantRelationshipType; + + public static final String JSON_PROPERTY_FULL_NAME = "fullName"; + @jakarta.annotation.Nonnull private PersonalIdentificationFullName fullName; + + public static final String JSON_PROPERTY_DATE_OF_BIRTH = "dateOfBirth"; + @jakarta.annotation.Nonnull private LocalDate dateOfBirth; + + public static final String JSON_PROPERTY_POSTAL_ADDRESS = "postalAddress"; + @jakarta.annotation.Nonnull private PostalAddress postalAddress; + + public PersonalIdentification() {} + + @JsonCreator + public PersonalIdentification( + @JsonProperty(value = JSON_PROPERTY_EXTERNAL_REFERENCE_ID, required = true) + String externalReferenceId, + @JsonProperty(value = JSON_PROPERTY_ENTITY_TYPE, required = true) + EntityTypeEnum entityType, + @JsonProperty(value = JSON_PROPERTY_PARTICIPANT_RELATIONSHIP_TYPE, required = true) + ParticipantRelationshipType participantRelationshipType, + @JsonProperty(value = JSON_PROPERTY_FULL_NAME, required = true) + PersonalIdentificationFullName fullName, + @JsonProperty(value = JSON_PROPERTY_DATE_OF_BIRTH, required = true) + LocalDate dateOfBirth, + @JsonProperty(value = JSON_PROPERTY_POSTAL_ADDRESS, required = true) + PostalAddress postalAddress) { + this.externalReferenceId = externalReferenceId; + this.entityType = entityType; + this.participantRelationshipType = participantRelationshipType; + this.fullName = fullName; + this.dateOfBirth = dateOfBirth; + this.postalAddress = postalAddress; + } + + public PersonalIdentification externalReferenceId( + @jakarta.annotation.Nonnull String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + return this; + } + + /** + * Get externalReferenceId + * + * @return externalReferenceId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXTERNAL_REFERENCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getExternalReferenceId() { + return externalReferenceId; + } + + @JsonProperty(JSON_PROPERTY_EXTERNAL_REFERENCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExternalReferenceId(@jakarta.annotation.Nonnull String externalReferenceId) { + this.externalReferenceId = externalReferenceId; + } + + public PersonalIdentification entityType( + @jakarta.annotation.Nonnull EntityTypeEnum entityType) { + this.entityType = entityType; + return this; + } + + /** + * Get entityType + * + * @return entityType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EntityTypeEnum getEntityType() { + return entityType; + } + + @JsonProperty(JSON_PROPERTY_ENTITY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEntityType(@jakarta.annotation.Nonnull EntityTypeEnum entityType) { + this.entityType = entityType; + } + + public PersonalIdentification participantRelationshipType( + @jakarta.annotation.Nonnull ParticipantRelationshipType participantRelationshipType) { + this.participantRelationshipType = participantRelationshipType; + return this; + } + + /** + * Get participantRelationshipType + * + * @return participantRelationshipType + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PARTICIPANT_RELATIONSHIP_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ParticipantRelationshipType getParticipantRelationshipType() { + return participantRelationshipType; + } + + @JsonProperty(JSON_PROPERTY_PARTICIPANT_RELATIONSHIP_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setParticipantRelationshipType( + @jakarta.annotation.Nonnull ParticipantRelationshipType participantRelationshipType) { + this.participantRelationshipType = participantRelationshipType; + } + + public PersonalIdentification fullName( + @jakarta.annotation.Nonnull PersonalIdentificationFullName fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get fullName + * + * @return fullName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PersonalIdentificationFullName getFullName() { + return fullName; + } + + @JsonProperty(JSON_PROPERTY_FULL_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFullName(@jakarta.annotation.Nonnull PersonalIdentificationFullName fullName) { + this.fullName = fullName; + } + + public PersonalIdentification dateOfBirth(@jakarta.annotation.Nonnull LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** + * Get dateOfBirth + * + * @return dateOfBirth + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LocalDate getDateOfBirth() { + return dateOfBirth; + } + + @JsonProperty(JSON_PROPERTY_DATE_OF_BIRTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDateOfBirth(@jakarta.annotation.Nonnull LocalDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + public PersonalIdentification postalAddress( + @jakarta.annotation.Nonnull PostalAddress postalAddress) { + this.postalAddress = postalAddress; + return this; + } + + /** + * Get postalAddress + * + * @return postalAddress + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_POSTAL_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PostalAddress getPostalAddress() { + return postalAddress; + } + + @JsonProperty(JSON_PROPERTY_POSTAL_ADDRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPostalAddress(@jakarta.annotation.Nonnull PostalAddress postalAddress) { + this.postalAddress = postalAddress; + } + + /** Return true if this PersonalIdentification object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PersonalIdentification personalIdentification = (PersonalIdentification) o; + return Objects.equals(this.externalReferenceId, personalIdentification.externalReferenceId) + && Objects.equals(this.entityType, personalIdentification.entityType) + && Objects.equals( + this.participantRelationshipType, + personalIdentification.participantRelationshipType) + && Objects.equals(this.fullName, personalIdentification.fullName) + && Objects.equals(this.dateOfBirth, personalIdentification.dateOfBirth) + && Objects.equals(this.postalAddress, personalIdentification.postalAddress); + } + + @Override + public int hashCode() { + return Objects.hash( + externalReferenceId, + entityType, + participantRelationshipType, + fullName, + dateOfBirth, + postalAddress); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PersonalIdentification {\n"); + sb.append(" externalReferenceId: ") + .append(toIndentedString(externalReferenceId)) + .append("\n"); + sb.append(" entityType: ").append(toIndentedString(entityType)).append("\n"); + sb.append(" participantRelationshipType: ") + .append(toIndentedString(participantRelationshipType)) + .append("\n"); + sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" dateOfBirth: ").append(toIndentedString(dateOfBirth)).append("\n"); + sb.append(" postalAddress: ").append(toIndentedString(postalAddress)).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 `externalReferenceId` to the URL query string + if (getExternalReferenceId() != null) { + joiner.add( + String.format( + "%sexternalReferenceId%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getExternalReferenceId())))); + } + + // add `entityType` to the URL query string + if (getEntityType() != null) { + joiner.add( + String.format( + "%sentityType%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getEntityType())))); + } + + // add `participantRelationshipType` to the URL query string + if (getParticipantRelationshipType() != null) { + joiner.add( + String.format( + "%sparticipantRelationshipType%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getParticipantRelationshipType())))); + } + + // add `fullName` to the URL query string + if (getFullName() != null) { + joiner.add(getFullName().toUrlQueryString(prefix + "fullName" + suffix)); + } + + // add `dateOfBirth` to the URL query string + if (getDateOfBirth() != null) { + joiner.add( + String.format( + "%sdateOfBirth%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getDateOfBirth())))); + } + + // add `postalAddress` to the URL query string + if (getPostalAddress() != null) { + joiner.add(getPostalAddress().toUrlQueryString(prefix + "postalAddress" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/PersonalIdentificationFullName.java b/src/main/java/com/fireblocks/sdk/model/PersonalIdentificationFullName.java new file mode 100644 index 00000000..1a06d8c3 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/PersonalIdentificationFullName.java @@ -0,0 +1,190 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** PersonalIdentificationFullName */ +@JsonPropertyOrder({ + PersonalIdentificationFullName.JSON_PROPERTY_FIRST_NAME, + PersonalIdentificationFullName.JSON_PROPERTY_LAST_NAME +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class PersonalIdentificationFullName { + public static final String JSON_PROPERTY_FIRST_NAME = "firstName"; + @jakarta.annotation.Nonnull private String firstName; + + public static final String JSON_PROPERTY_LAST_NAME = "lastName"; + @jakarta.annotation.Nonnull private String lastName; + + public PersonalIdentificationFullName() {} + + @JsonCreator + public PersonalIdentificationFullName( + @JsonProperty(value = JSON_PROPERTY_FIRST_NAME, required = true) String firstName, + @JsonProperty(value = JSON_PROPERTY_LAST_NAME, required = true) String lastName) { + this.firstName = firstName; + this.lastName = lastName; + } + + public PersonalIdentificationFullName firstName(@jakarta.annotation.Nonnull String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Get firstName + * + * @return firstName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_FIRST_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getFirstName() { + return firstName; + } + + @JsonProperty(JSON_PROPERTY_FIRST_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFirstName(@jakarta.annotation.Nonnull String firstName) { + this.firstName = firstName; + } + + public PersonalIdentificationFullName lastName(@jakarta.annotation.Nonnull String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Get lastName + * + * @return lastName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_LAST_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLastName() { + return lastName; + } + + @JsonProperty(JSON_PROPERTY_LAST_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLastName(@jakarta.annotation.Nonnull String lastName) { + this.lastName = lastName; + } + + /** Return true if this PersonalIdentification_fullName object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PersonalIdentificationFullName personalIdentificationFullName = + (PersonalIdentificationFullName) o; + return Objects.equals(this.firstName, personalIdentificationFullName.firstName) + && Objects.equals(this.lastName, personalIdentificationFullName.lastName); + } + + @Override + public int hashCode() { + return Objects.hash(firstName, lastName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PersonalIdentificationFullName {\n"); + sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); + sb.append(" lastName: ").append(toIndentedString(lastName)).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 `firstName` to the URL query string + if (getFirstName() != null) { + joiner.add( + String.format( + "%sfirstName%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getFirstName())))); + } + + // add `lastName` to the URL query string + if (getLastName() != null) { + joiner.add( + String.format( + "%slastName%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getLastName())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/PlatformAccount.java b/src/main/java/com/fireblocks/sdk/model/PlatformAccount.java new file mode 100644 index 00000000..e9306b94 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/PlatformAccount.java @@ -0,0 +1,222 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** PlatformAccount */ +@JsonPropertyOrder({PlatformAccount.JSON_PROPERTY_TYPE, PlatformAccount.JSON_PROPERTY_ACCOUNT_ID}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class PlatformAccount { + /** Gets or Sets type */ + public enum TypeEnum { + VAULT_ACCOUNT(String.valueOf("VAULT_ACCOUNT")), + + CONNECTED_ACCOUNT(String.valueOf("CONNECTED_ACCOUNT")), + + FIAT_ACCOUNT(String.valueOf("FIAT_ACCOUNT")); + + 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_ACCOUNT_ID = "accountId"; + @jakarta.annotation.Nonnull private String accountId; + + public PlatformAccount() {} + + @JsonCreator + public PlatformAccount( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_ID, required = true) String accountId) { + this.type = type; + this.accountId = accountId; + } + + public PlatformAccount 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 PlatformAccount accountId(@jakarta.annotation.Nonnull String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Get accountId + * + * @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 PlatformAccount object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlatformAccount platformAccount = (PlatformAccount) o; + return Objects.equals(this.type, platformAccount.type) + && Objects.equals(this.accountId, platformAccount.accountId); + } + + @Override + public int hashCode() { + return Objects.hash(type, accountId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PlatformAccount {\n"); + sb.append(" type: ").append(toIndentedString(type)).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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // 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/PostOrderSettlement.java b/src/main/java/com/fireblocks/sdk/model/PostOrderSettlement.java new file mode 100644 index 00000000..66c6b552 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/PostOrderSettlement.java @@ -0,0 +1,178 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** PostOrderSettlement */ +@JsonPropertyOrder({PostOrderSettlement.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class PostOrderSettlement { + /** Gets or Sets type */ + public enum TypeEnum { + POST_ORDER(String.valueOf("POST_ORDER")); + + 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 PostOrderSettlement() {} + + @JsonCreator + public PostOrderSettlement( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type) { + this.type = type; + } + + public PostOrderSettlement 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; + } + + /** Return true if this PostOrderSettlement object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostOrderSettlement postOrderSettlement = (PostOrderSettlement) o; + return Objects.equals(this.type, postOrderSettlement.type); + } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PostOrderSettlement {\n"); + sb.append(" type: ").append(toIndentedString(type)).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())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/PostalAddress.java b/src/main/java/com/fireblocks/sdk/model/PostalAddress.java new file mode 100644 index 00000000..1d362f7a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/PostalAddress.java @@ -0,0 +1,396 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** PostalAddress */ +@JsonPropertyOrder({ + PostalAddress.JSON_PROPERTY_STREET_NAME, + PostalAddress.JSON_PROPERTY_BUILDING_NUMBER, + PostalAddress.JSON_PROPERTY_POSTAL_CODE, + PostalAddress.JSON_PROPERTY_CITY, + PostalAddress.JSON_PROPERTY_SUBDIVISION, + PostalAddress.JSON_PROPERTY_DISTRICT, + PostalAddress.JSON_PROPERTY_COUNTRY +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class PostalAddress { + public static final String JSON_PROPERTY_STREET_NAME = "streetName"; + @jakarta.annotation.Nonnull private String streetName; + + public static final String JSON_PROPERTY_BUILDING_NUMBER = "buildingNumber"; + @jakarta.annotation.Nonnull private String buildingNumber; + + public static final String JSON_PROPERTY_POSTAL_CODE = "postalCode"; + @jakarta.annotation.Nonnull private String postalCode; + + public static final String JSON_PROPERTY_CITY = "city"; + @jakarta.annotation.Nonnull private String city; + + public static final String JSON_PROPERTY_SUBDIVISION = "subdivision"; + @jakarta.annotation.Nonnull private String subdivision; + + public static final String JSON_PROPERTY_DISTRICT = "district"; + @jakarta.annotation.Nonnull private String district; + + public static final String JSON_PROPERTY_COUNTRY = "country"; + @jakarta.annotation.Nonnull private String country; + + public PostalAddress() {} + + @JsonCreator + public PostalAddress( + @JsonProperty(value = JSON_PROPERTY_STREET_NAME, required = true) String streetName, + @JsonProperty(value = JSON_PROPERTY_BUILDING_NUMBER, required = true) + String buildingNumber, + @JsonProperty(value = JSON_PROPERTY_POSTAL_CODE, required = true) String postalCode, + @JsonProperty(value = JSON_PROPERTY_CITY, required = true) String city, + @JsonProperty(value = JSON_PROPERTY_SUBDIVISION, required = true) String subdivision, + @JsonProperty(value = JSON_PROPERTY_DISTRICT, required = true) String district, + @JsonProperty(value = JSON_PROPERTY_COUNTRY, required = true) String country) { + this.streetName = streetName; + this.buildingNumber = buildingNumber; + this.postalCode = postalCode; + this.city = city; + this.subdivision = subdivision; + this.district = district; + this.country = country; + } + + public PostalAddress streetName(@jakarta.annotation.Nonnull String streetName) { + this.streetName = streetName; + return this; + } + + /** + * Get streetName + * + * @return streetName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_STREET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStreetName() { + return streetName; + } + + @JsonProperty(JSON_PROPERTY_STREET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setStreetName(@jakarta.annotation.Nonnull String streetName) { + this.streetName = streetName; + } + + public PostalAddress buildingNumber(@jakarta.annotation.Nonnull String buildingNumber) { + this.buildingNumber = buildingNumber; + return this; + } + + /** + * Get buildingNumber + * + * @return buildingNumber + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BUILDING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBuildingNumber() { + return buildingNumber; + } + + @JsonProperty(JSON_PROPERTY_BUILDING_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBuildingNumber(@jakarta.annotation.Nonnull String buildingNumber) { + this.buildingNumber = buildingNumber; + } + + public PostalAddress postalCode(@jakarta.annotation.Nonnull String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * Get postalCode + * + * @return postalCode + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPostalCode() { + return postalCode; + } + + @JsonProperty(JSON_PROPERTY_POSTAL_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPostalCode(@jakarta.annotation.Nonnull String postalCode) { + this.postalCode = postalCode; + } + + public PostalAddress city(@jakarta.annotation.Nonnull String city) { + this.city = city; + return this; + } + + /** + * Get city + * + * @return city + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCity() { + return city; + } + + @JsonProperty(JSON_PROPERTY_CITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCity(@jakarta.annotation.Nonnull String city) { + this.city = city; + } + + public PostalAddress subdivision(@jakarta.annotation.Nonnull String subdivision) { + this.subdivision = subdivision; + return this; + } + + /** + * Get subdivision + * + * @return subdivision + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SUBDIVISION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSubdivision() { + return subdivision; + } + + @JsonProperty(JSON_PROPERTY_SUBDIVISION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSubdivision(@jakarta.annotation.Nonnull String subdivision) { + this.subdivision = subdivision; + } + + public PostalAddress district(@jakarta.annotation.Nonnull String district) { + this.district = district; + return this; + } + + /** + * Get district + * + * @return district + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DISTRICT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDistrict() { + return district; + } + + @JsonProperty(JSON_PROPERTY_DISTRICT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDistrict(@jakarta.annotation.Nonnull String district) { + this.district = district; + } + + public PostalAddress country(@jakarta.annotation.Nonnull String country) { + this.country = country; + return this; + } + + /** + * Get country + * + * @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; + } + + /** Return true if this PostalAddress object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostalAddress postalAddress = (PostalAddress) o; + return Objects.equals(this.streetName, postalAddress.streetName) + && Objects.equals(this.buildingNumber, postalAddress.buildingNumber) + && Objects.equals(this.postalCode, postalAddress.postalCode) + && Objects.equals(this.city, postalAddress.city) + && Objects.equals(this.subdivision, postalAddress.subdivision) + && Objects.equals(this.district, postalAddress.district) + && Objects.equals(this.country, postalAddress.country); + } + + @Override + public int hashCode() { + return Objects.hash( + streetName, buildingNumber, postalCode, city, subdivision, district, country); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PostalAddress {\n"); + sb.append(" streetName: ").append(toIndentedString(streetName)).append("\n"); + sb.append(" buildingNumber: ").append(toIndentedString(buildingNumber)).append("\n"); + sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" subdivision: ").append(toIndentedString(subdivision)).append("\n"); + sb.append(" district: ").append(toIndentedString(district)).append("\n"); + sb.append(" country: ").append(toIndentedString(country)).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 `streetName` to the URL query string + if (getStreetName() != null) { + joiner.add( + String.format( + "%sstreetName%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getStreetName())))); + } + + // add `buildingNumber` to the URL query string + if (getBuildingNumber() != null) { + joiner.add( + String.format( + "%sbuildingNumber%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBuildingNumber())))); + } + + // add `postalCode` to the URL query string + if (getPostalCode() != null) { + joiner.add( + String.format( + "%spostalCode%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getPostalCode())))); + } + + // add `city` to the URL query string + if (getCity() != null) { + joiner.add( + String.format( + "%scity%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCity())))); + } + + // add `subdivision` to the URL query string + if (getSubdivision() != null) { + joiner.add( + String.format( + "%ssubdivision%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSubdivision())))); + } + + // add `district` to the URL query string + if (getDistrict() != null) { + joiner.add( + String.format( + "%sdistrict%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getDistrict())))); + } + + // add `country` to the URL query string + if (getCountry() != null) { + joiner.add( + String.format( + "%scountry%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCountry())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/PrefundedSettlement.java b/src/main/java/com/fireblocks/sdk/model/PrefundedSettlement.java new file mode 100644 index 00000000..ce2d2b9e --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/PrefundedSettlement.java @@ -0,0 +1,223 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.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; + +/** PrefundedSettlement */ +@JsonPropertyOrder({ + PrefundedSettlement.JSON_PROPERTY_TYPE, + PrefundedSettlement.JSON_PROPERTY_DESTINATION_ACCOUNT +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class PrefundedSettlement { + /** Gets or Sets type */ + public enum TypeEnum { + PREFUNDED(String.valueOf("PREFUNDED")); + + 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_DESTINATION_ACCOUNT = "destinationAccount"; + @jakarta.annotation.Nonnull private AccountReference destinationAccount; + + public PrefundedSettlement() {} + + @JsonCreator + public PrefundedSettlement( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_DESTINATION_ACCOUNT, required = true) + AccountReference destinationAccount) { + this.type = type; + this.destinationAccount = destinationAccount; + } + + public PrefundedSettlement 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 PrefundedSettlement destinationAccount( + @jakarta.annotation.Nonnull AccountReference destinationAccount) { + this.destinationAccount = destinationAccount; + return this; + } + + /** + * Get destinationAccount + * + * @return destinationAccount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_DESTINATION_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AccountReference getDestinationAccount() { + return destinationAccount; + } + + @JsonProperty(JSON_PROPERTY_DESTINATION_ACCOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setDestinationAccount( + @jakarta.annotation.Nonnull AccountReference destinationAccount) { + this.destinationAccount = destinationAccount; + } + + /** Return true if this PrefundedSettlement object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PrefundedSettlement prefundedSettlement = (PrefundedSettlement) o; + return Objects.equals(this.type, prefundedSettlement.type) + && Objects.equals(this.destinationAccount, prefundedSettlement.destinationAccount); + } + + @Override + public int hashCode() { + return Objects.hash(type, destinationAccount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PrefundedSettlement {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" destinationAccount: ") + .append(toIndentedString(destinationAccount)) + .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 `destinationAccount` to the URL query string + if (getDestinationAccount() != null) { + joiner.add( + getDestinationAccount() + .toUrlQueryString(prefix + "destinationAccount" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/ProviderAdditionalData.java b/src/main/java/com/fireblocks/sdk/model/ProviderID.java similarity index 65% rename from src/main/java/com/fireblocks/sdk/model/ProviderAdditionalData.java rename to src/main/java/com/fireblocks/sdk/model/ProviderID.java index 49b11681..edc34da1 100644 --- a/src/main/java/com/fireblocks/sdk/model/ProviderAdditionalData.java +++ b/src/main/java/com/fireblocks/sdk/model/ProviderID.java @@ -21,47 +21,47 @@ import java.util.Objects; import java.util.StringJoiner; -/** Provider specific additional data */ -@JsonPropertyOrder({ProviderAdditionalData.JSON_PROPERTY_PRICE_IMPACT}) +/** ProviderID */ +@JsonPropertyOrder({ProviderID.JSON_PROPERTY_PROVIDER_ID}) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") -public class ProviderAdditionalData { - public static final String JSON_PROPERTY_PRICE_IMPACT = "priceImpact"; - @jakarta.annotation.Nonnull private String priceImpact; +public class ProviderID { + public static final String JSON_PROPERTY_PROVIDER_ID = "providerId"; + @jakarta.annotation.Nonnull private String providerId; - public ProviderAdditionalData() {} + public ProviderID() {} @JsonCreator - public ProviderAdditionalData( - @JsonProperty(value = JSON_PROPERTY_PRICE_IMPACT, required = true) String priceImpact) { - this.priceImpact = priceImpact; + public ProviderID( + @JsonProperty(value = JSON_PROPERTY_PROVIDER_ID, required = true) String providerId) { + this.providerId = providerId; } - public ProviderAdditionalData priceImpact(@jakarta.annotation.Nonnull String priceImpact) { - this.priceImpact = priceImpact; + public ProviderID providerId(@jakarta.annotation.Nonnull String providerId) { + this.providerId = providerId; return this; } /** - * Get priceImpact + * The ID of the provider associated with the account. * - * @return priceImpact + * @return providerId */ @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_PRICE_IMPACT) + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getPriceImpact() { - return priceImpact; + public String getProviderId() { + return providerId; } - @JsonProperty(JSON_PROPERTY_PRICE_IMPACT) + @JsonProperty(JSON_PROPERTY_PROVIDER_ID) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setPriceImpact(@jakarta.annotation.Nonnull String priceImpact) { - this.priceImpact = priceImpact; + public void setProviderId(@jakarta.annotation.Nonnull String providerId) { + this.providerId = providerId; } - /** Return true if this ProviderAdditionalData object is equal to o. */ + /** Return true if this ProviderID object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -70,20 +70,20 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ProviderAdditionalData providerAdditionalData = (ProviderAdditionalData) o; - return Objects.equals(this.priceImpact, providerAdditionalData.priceImpact); + ProviderID providerID = (ProviderID) o; + return Objects.equals(this.providerId, providerID.providerId); } @Override public int hashCode() { - return Objects.hash(priceImpact); + return Objects.hash(providerId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ProviderAdditionalData {\n"); - sb.append(" priceImpact: ").append(toIndentedString(priceImpact)).append("\n"); + sb.append("class ProviderID {\n"); + sb.append(" providerId: ").append(toIndentedString(providerId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -131,14 +131,14 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - // add `priceImpact` to the URL query string - if (getPriceImpact() != null) { + // add `providerId` to the URL query string + if (getProviderId() != null) { joiner.add( String.format( - "%spriceImpact%s=%s", + "%sproviderId%s=%s", prefix, suffix, - ApiClient.urlEncode(ApiClient.valueToString(getPriceImpact())))); + ApiClient.urlEncode(ApiClient.valueToString(getProviderId())))); } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/SwapOperationsPaginatedResponse.java b/src/main/java/com/fireblocks/sdk/model/ProvidersListResponse.java similarity index 67% rename from src/main/java/com/fireblocks/sdk/model/SwapOperationsPaginatedResponse.java rename to src/main/java/com/fireblocks/sdk/model/ProvidersListResponse.java index e3cd04ee..33c9f7b0 100644 --- a/src/main/java/com/fireblocks/sdk/model/SwapOperationsPaginatedResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/ProvidersListResponse.java @@ -23,36 +23,41 @@ import java.util.Objects; import java.util.StringJoiner; -/** SwapOperationsPaginatedResponse */ +/** ProvidersListResponse */ @JsonPropertyOrder({ - SwapOperationsPaginatedResponse.JSON_PROPERTY_DATA, - SwapOperationsPaginatedResponse.JSON_PROPERTY_NEXT + ProvidersListResponse.JSON_PROPERTY_DATA, + ProvidersListResponse.JSON_PROPERTY_TOTAL, + ProvidersListResponse.JSON_PROPERTY_NEXT }) @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") -public class SwapOperationsPaginatedResponse { +public class ProvidersListResponse { public static final String JSON_PROPERTY_DATA = "data"; - @jakarta.annotation.Nonnull private List data = new ArrayList<>(); + @jakarta.annotation.Nonnull private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOTAL = "total"; + @jakarta.annotation.Nonnull private Integer total; public static final String JSON_PROPERTY_NEXT = "next"; @jakarta.annotation.Nullable private String next; - public SwapOperationsPaginatedResponse() {} + public ProvidersListResponse() {} @JsonCreator - public SwapOperationsPaginatedResponse( - @JsonProperty(value = JSON_PROPERTY_DATA, required = true) List data) { + public ProvidersListResponse( + @JsonProperty(value = JSON_PROPERTY_DATA, required = true) List data, + @JsonProperty(value = JSON_PROPERTY_TOTAL, required = true) Integer total) { this.data = data; + this.total = total; } - public SwapOperationsPaginatedResponse data( - @jakarta.annotation.Nonnull List data) { + public ProvidersListResponse data(@jakarta.annotation.Nonnull List data) { this.data = data; return this; } - public SwapOperationsPaginatedResponse addDataItem(SwapOperation dataItem) { + public ProvidersListResponse addDataItem(TradingProvider dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -61,31 +66,53 @@ public SwapOperationsPaginatedResponse addDataItem(SwapOperation dataItem) { } /** - * The data of the current page + * List of available providers * * @return data */ @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { + public List getData() { return data; } @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setData(@jakarta.annotation.Nonnull List data) { + public void setData(@jakarta.annotation.Nonnull List data) { this.data = data; } - public SwapOperationsPaginatedResponse next(@jakarta.annotation.Nullable String next) { + public ProvidersListResponse total(@jakarta.annotation.Nonnull Integer total) { + this.total = total; + return this; + } + + /** + * Total number of providers matching the query. + * + * @return total + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getTotal() { + return total; + } + + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setTotal(@jakarta.annotation.Nonnull Integer total) { + this.total = total; + } + + public ProvidersListResponse next(@jakarta.annotation.Nullable String next) { this.next = next; return this; } /** - * The cursor to fetch the next page of results, if absent or null, there are no additional - * results. + * A cursor for the next page of results, if available. * * @return next */ @@ -102,7 +129,7 @@ public void setNext(@jakarta.annotation.Nullable String next) { this.next = next; } - /** Return true if this SwapOperationsPaginatedResponse object is equal to o. */ + /** Return true if this ProvidersListResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -111,22 +138,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - SwapOperationsPaginatedResponse swapOperationsPaginatedResponse = - (SwapOperationsPaginatedResponse) o; - return Objects.equals(this.data, swapOperationsPaginatedResponse.data) - && Objects.equals(this.next, swapOperationsPaginatedResponse.next); + ProvidersListResponse providersListResponse = (ProvidersListResponse) o; + return Objects.equals(this.data, providersListResponse.data) + && Objects.equals(this.total, providersListResponse.total) + && Objects.equals(this.next, providersListResponse.next); } @Override public int hashCode() { - return Objects.hash(data, next); + return Objects.hash(data, total, next); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class SwapOperationsPaginatedResponse {\n"); + sb.append("class ProvidersListResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); sb.append(" next: ").append(toIndentedString(next)).append("\n"); sb.append("}"); return sb.toString(); @@ -198,6 +226,16 @@ public String toUrlQueryString(String prefix) { } } + // add `total` to the URL query string + if (getTotal() != null) { + joiner.add( + String.format( + "%stotal%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getTotal())))); + } + // add `next` to the URL query string if (getNext() != null) { joiner.add( diff --git a/src/main/java/com/fireblocks/sdk/model/Quote.java b/src/main/java/com/fireblocks/sdk/model/Quote.java new file mode 100644 index 00000000..a0eecd18 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/Quote.java @@ -0,0 +1,777 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import com.fireblocks.sdk.JSON; +import java.math.BigDecimal; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.StringJoiner; + +/** Quote */ +@JsonPropertyOrder({ + Quote.JSON_PROPERTY_VIA, + Quote.JSON_PROPERTY_ID, + Quote.JSON_PROPERTY_TYPE, + Quote.JSON_PROPERTY_QUOTE_ASSET_ID, + Quote.JSON_PROPERTY_BASE_ASSET_ID, + Quote.JSON_PROPERTY_BASE_AMOUNT, + Quote.JSON_PROPERTY_QUOTE_AMOUNT, + Quote.JSON_PROPERTY_PRICE_IMPACT, + Quote.JSON_PROPERTY_QUOTE_MIN_AMOUNT, + Quote.JSON_PROPERTY_EXECUTION_STEPS, + Quote.JSON_PROPERTY_GENERAL_FEES, + Quote.JSON_PROPERTY_SIDE, + Quote.JSON_PROPERTY_EXPIRES_AT +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +@JsonIgnoreProperties( + value = "type", // ignore manually set type, it will be automatically generated by Jackson + // during serialization + allowSetters = true // allows the type to be set during deserialization + ) +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "type", + visible = true) +public class Quote { + public static final String JSON_PROPERTY_VIA = "via"; + @jakarta.annotation.Nonnull private AccessType via; + + public static final String JSON_PROPERTY_ID = "id"; + @jakarta.annotation.Nonnull private String id; + + /** Indicates this is an indicative quote */ + public enum TypeEnum { + INDICATIVE(String.valueOf("INDICATIVE")); + + 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_QUOTE_ASSET_ID = "quoteAssetId"; + @jakarta.annotation.Nonnull private String quoteAssetId; + + public static final String JSON_PROPERTY_BASE_ASSET_ID = "baseAssetId"; + @jakarta.annotation.Nonnull private String baseAssetId; + + public static final String JSON_PROPERTY_BASE_AMOUNT = "baseAmount"; + @jakarta.annotation.Nonnull private String baseAmount; + + public static final String JSON_PROPERTY_QUOTE_AMOUNT = "quoteAmount"; + @jakarta.annotation.Nonnull private String quoteAmount; + + public static final String JSON_PROPERTY_PRICE_IMPACT = "priceImpact"; + @jakarta.annotation.Nullable private BigDecimal priceImpact; + + public static final String JSON_PROPERTY_QUOTE_MIN_AMOUNT = "quoteMinAmount"; + @jakarta.annotation.Nullable private String quoteMinAmount; + + public static final String JSON_PROPERTY_EXECUTION_STEPS = "executionSteps"; + + @jakarta.annotation.Nullable + private List executionSteps = new ArrayList<>(); + + public static final String JSON_PROPERTY_GENERAL_FEES = "generalFees"; + @jakarta.annotation.Nullable private List generalFees = new ArrayList<>(); + + /** Side of the order */ + public enum SideEnum { + BUY(String.valueOf("BUY")), + + SELL(String.valueOf("SELL")); + + private String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIDE = "side"; + @jakarta.annotation.Nonnull private SideEnum side; + + public static final String JSON_PROPERTY_EXPIRES_AT = "expiresAt"; + @jakarta.annotation.Nonnull private OffsetDateTime expiresAt; + + public Quote() {} + + @JsonCreator + public Quote( + @JsonProperty(value = JSON_PROPERTY_VIA, required = true) AccessType via, + @JsonProperty(value = JSON_PROPERTY_ID, required = true) String id, + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_QUOTE_ASSET_ID, required = true) + String quoteAssetId, + @JsonProperty(value = JSON_PROPERTY_BASE_ASSET_ID, required = true) String baseAssetId, + @JsonProperty(value = JSON_PROPERTY_BASE_AMOUNT, required = true) String baseAmount, + @JsonProperty(value = JSON_PROPERTY_QUOTE_AMOUNT, required = true) String quoteAmount, + @JsonProperty(value = JSON_PROPERTY_SIDE, required = true) SideEnum side, + @JsonProperty(value = JSON_PROPERTY_EXPIRES_AT, required = true) + OffsetDateTime expiresAt) { + this.via = via; + this.id = id; + this.type = type; + this.quoteAssetId = quoteAssetId; + this.baseAssetId = baseAssetId; + this.baseAmount = baseAmount; + this.quoteAmount = quoteAmount; + this.side = side; + this.expiresAt = expiresAt; + } + + public Quote via(@jakarta.annotation.Nonnull AccessType via) { + this.via = via; + return this; + } + + /** + * Get via + * + * @return via + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VIA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AccessType getVia() { + return via; + } + + @JsonProperty(JSON_PROPERTY_VIA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setVia(@jakarta.annotation.Nonnull AccessType via) { + this.via = via; + } + + public Quote id(@jakarta.annotation.Nonnull String id) { + this.id = id; + return this; + } + + /** + * Get id + * + * @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 Quote type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Indicates this is an indicative quote + * + * @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 Quote quoteAssetId(@jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + return this; + } + + /** + * Get quoteAssetId + * + * @return quoteAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteAssetId() { + return quoteAssetId; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteAssetId(@jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + } + + public Quote baseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * Get baseAssetId + * + * @return baseAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + } + + public Quote baseAmount(@jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + return this; + } + + /** + * Get baseAmount + * + * @return baseAmount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAmount() { + return baseAmount; + } + + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAmount(@jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + } + + public Quote quoteAmount(@jakarta.annotation.Nonnull String quoteAmount) { + this.quoteAmount = quoteAmount; + return this; + } + + /** + * Get quoteAmount + * + * @return quoteAmount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteAmount() { + return quoteAmount; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteAmount(@jakarta.annotation.Nonnull String quoteAmount) { + this.quoteAmount = quoteAmount; + } + + public Quote priceImpact(@jakarta.annotation.Nullable BigDecimal priceImpact) { + this.priceImpact = priceImpact; + return this; + } + + /** + * Get priceImpact + * + * @return priceImpact + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRICE_IMPACT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getPriceImpact() { + return priceImpact; + } + + @JsonProperty(JSON_PROPERTY_PRICE_IMPACT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPriceImpact(@jakarta.annotation.Nullable BigDecimal priceImpact) { + this.priceImpact = priceImpact; + } + + public Quote quoteMinAmount(@jakarta.annotation.Nullable String quoteMinAmount) { + this.quoteMinAmount = quoteMinAmount; + return this; + } + + /** + * Get quoteMinAmount + * + * @return quoteMinAmount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUOTE_MIN_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getQuoteMinAmount() { + return quoteMinAmount; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_MIN_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setQuoteMinAmount(@jakarta.annotation.Nullable String quoteMinAmount) { + this.quoteMinAmount = quoteMinAmount; + } + + public Quote executionSteps( + @jakarta.annotation.Nullable List executionSteps) { + this.executionSteps = executionSteps; + return this; + } + + public Quote addExecutionStepsItem(ExecutionStepDetails executionStepsItem) { + if (this.executionSteps == null) { + this.executionSteps = new ArrayList<>(); + } + this.executionSteps.add(executionStepsItem); + return this; + } + + /** + * Get executionSteps + * + * @return executionSteps + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXECUTION_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getExecutionSteps() { + return executionSteps; + } + + @JsonProperty(JSON_PROPERTY_EXECUTION_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExecutionSteps( + @jakarta.annotation.Nullable List executionSteps) { + this.executionSteps = executionSteps; + } + + public Quote generalFees(@jakarta.annotation.Nullable List generalFees) { + this.generalFees = generalFees; + return this; + } + + public Quote addGeneralFeesItem(Fee generalFeesItem) { + if (this.generalFees == null) { + this.generalFees = new ArrayList<>(); + } + this.generalFees.add(generalFeesItem); + return this; + } + + /** + * Get generalFees + * + * @return generalFees + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GENERAL_FEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getGeneralFees() { + return generalFees; + } + + @JsonProperty(JSON_PROPERTY_GENERAL_FEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGeneralFees(@jakarta.annotation.Nullable List generalFees) { + this.generalFees = generalFees; + } + + public Quote side(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + return this; + } + + /** + * Side of the order + * + * @return side + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SideEnum getSide() { + return side; + } + + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSide(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + } + + public Quote expiresAt(@jakarta.annotation.Nonnull OffsetDateTime expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * ISO 8601 timestamp of the expiration time of the quote. + * + * @return expiresAt + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getExpiresAt() { + return expiresAt; + } + + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setExpiresAt(@jakarta.annotation.Nonnull OffsetDateTime expiresAt) { + this.expiresAt = expiresAt; + } + + /** Return true if this Quote object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Quote quote = (Quote) o; + return Objects.equals(this.via, quote.via) + && Objects.equals(this.id, quote.id) + && Objects.equals(this.type, quote.type) + && Objects.equals(this.quoteAssetId, quote.quoteAssetId) + && Objects.equals(this.baseAssetId, quote.baseAssetId) + && Objects.equals(this.baseAmount, quote.baseAmount) + && Objects.equals(this.quoteAmount, quote.quoteAmount) + && Objects.equals(this.priceImpact, quote.priceImpact) + && Objects.equals(this.quoteMinAmount, quote.quoteMinAmount) + && Objects.equals(this.executionSteps, quote.executionSteps) + && Objects.equals(this.generalFees, quote.generalFees) + && Objects.equals(this.side, quote.side) + && Objects.equals(this.expiresAt, quote.expiresAt); + } + + @Override + public int hashCode() { + return Objects.hash( + via, + id, + type, + quoteAssetId, + baseAssetId, + baseAmount, + quoteAmount, + priceImpact, + quoteMinAmount, + executionSteps, + generalFees, + side, + expiresAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Quote {\n"); + sb.append(" via: ").append(toIndentedString(via)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" quoteAssetId: ").append(toIndentedString(quoteAssetId)).append("\n"); + sb.append(" baseAssetId: ").append(toIndentedString(baseAssetId)).append("\n"); + sb.append(" baseAmount: ").append(toIndentedString(baseAmount)).append("\n"); + sb.append(" quoteAmount: ").append(toIndentedString(quoteAmount)).append("\n"); + sb.append(" priceImpact: ").append(toIndentedString(priceImpact)).append("\n"); + sb.append(" quoteMinAmount: ").append(toIndentedString(quoteMinAmount)).append("\n"); + sb.append(" executionSteps: ").append(toIndentedString(executionSteps)).append("\n"); + sb.append(" generalFees: ").append(toIndentedString(generalFees)).append("\n"); + sb.append(" side: ").append(toIndentedString(side)).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 `via` to the URL query string + if (getVia() != null) { + joiner.add(getVia().toUrlQueryString(prefix + "via" + suffix)); + } + + // add `id` to the URL query string + if (getId() != null) { + joiner.add( + String.format( + "%sid%s=%s", + prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getId())))); + } + + // add `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `quoteAssetId` to the URL query string + if (getQuoteAssetId() != null) { + joiner.add( + String.format( + "%squoteAssetId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getQuoteAssetId())))); + } + + // add `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBaseAssetId())))); + } + + // add `baseAmount` to the URL query string + if (getBaseAmount() != null) { + joiner.add( + String.format( + "%sbaseAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBaseAmount())))); + } + + // add `quoteAmount` to the URL query string + if (getQuoteAmount() != null) { + joiner.add( + String.format( + "%squoteAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getQuoteAmount())))); + } + + // add `priceImpact` to the URL query string + if (getPriceImpact() != null) { + joiner.add( + String.format( + "%spriceImpact%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getPriceImpact())))); + } + + // add `quoteMinAmount` to the URL query string + if (getQuoteMinAmount() != null) { + joiner.add( + String.format( + "%squoteMinAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getQuoteMinAmount())))); + } + + // add `executionSteps` to the URL query string + if (getExecutionSteps() != null) { + for (int i = 0; i < getExecutionSteps().size(); i++) { + if (getExecutionSteps().get(i) != null) { + joiner.add( + getExecutionSteps() + .get(i) + .toUrlQueryString( + String.format( + "%sexecutionSteps%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `generalFees` to the URL query string + if (getGeneralFees() != null) { + for (int i = 0; i < getGeneralFees().size(); i++) { + if (getGeneralFees().get(i) != null) { + joiner.add( + getGeneralFees() + .get(i) + .toUrlQueryString( + String.format( + "%sgeneralFees%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + // add `side` to the URL query string + if (getSide() != null) { + joiner.add( + String.format( + "%sside%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSide())))); + } + + // 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(); + } + + static { + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("Quote", Quote.class); + JSON.registerDiscriminator(Quote.class, "type", mappings); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/QuoteExecutionRequestDetails.java b/src/main/java/com/fireblocks/sdk/model/QuoteExecutionRequestDetails.java new file mode 100644 index 00000000..3c08b1fe --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/QuoteExecutionRequestDetails.java @@ -0,0 +1,222 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** QuoteExecutionRequestDetails */ +@JsonPropertyOrder({ + QuoteExecutionRequestDetails.JSON_PROPERTY_TYPE, + QuoteExecutionRequestDetails.JSON_PROPERTY_QUOTE_ID +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class QuoteExecutionRequestDetails { + /** Order type for quote orders */ + public enum TypeEnum { + QUOTE(String.valueOf("QUOTE")); + + 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_QUOTE_ID = "quoteId"; + @jakarta.annotation.Nonnull private String quoteId; + + public QuoteExecutionRequestDetails() {} + + @JsonCreator + public QuoteExecutionRequestDetails( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_QUOTE_ID, required = true) String quoteId) { + this.type = type; + this.quoteId = quoteId; + } + + public QuoteExecutionRequestDetails type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Order type for quote orders + * + * @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 QuoteExecutionRequestDetails quoteId(@jakarta.annotation.Nonnull String quoteId) { + this.quoteId = quoteId; + return this; + } + + /** + * Quote ID for quote orders + * + * @return quoteId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteId() { + return quoteId; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteId(@jakarta.annotation.Nonnull String quoteId) { + this.quoteId = quoteId; + } + + /** Return true if this QuoteExecutionRequestDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteExecutionRequestDetails quoteExecutionRequestDetails = + (QuoteExecutionRequestDetails) o; + return Objects.equals(this.type, quoteExecutionRequestDetails.type) + && Objects.equals(this.quoteId, quoteExecutionRequestDetails.quoteId); + } + + @Override + public int hashCode() { + return Objects.hash(type, quoteId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteExecutionRequestDetails {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" quoteId: ").append(toIndentedString(quoteId)).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 `quoteId` to the URL query string + if (getQuoteId() != null) { + joiner.add( + String.format( + "%squoteId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getQuoteId())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/QuoteExecutionResponseDetails.java b/src/main/java/com/fireblocks/sdk/model/QuoteExecutionResponseDetails.java new file mode 100644 index 00000000..a6b0fc13 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/QuoteExecutionResponseDetails.java @@ -0,0 +1,553 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** QuoteExecutionResponseDetails */ +@JsonPropertyOrder({ + QuoteExecutionResponseDetails.JSON_PROPERTY_SIDE, + QuoteExecutionResponseDetails.JSON_PROPERTY_BASE_AMOUNT, + QuoteExecutionResponseDetails.JSON_PROPERTY_BASE_ASSET_ID, + QuoteExecutionResponseDetails.JSON_PROPERTY_BASE_ASSET_RAIL, + QuoteExecutionResponseDetails.JSON_PROPERTY_QUOTE_ASSET_ID, + QuoteExecutionResponseDetails.JSON_PROPERTY_QUOTE_ASSET_RAIL, + QuoteExecutionResponseDetails.JSON_PROPERTY_TYPE, + QuoteExecutionResponseDetails.JSON_PROPERTY_QUOTE_ID, + QuoteExecutionResponseDetails.JSON_PROPERTY_QUOTE_AMOUNT +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class QuoteExecutionResponseDetails { + /** Side of the order */ + public enum SideEnum { + BUY(String.valueOf("BUY")), + + SELL(String.valueOf("SELL")); + + private String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIDE = "side"; + @jakarta.annotation.Nonnull private SideEnum side = SideEnum.BUY; + + public static final String JSON_PROPERTY_BASE_AMOUNT = "baseAmount"; + @jakarta.annotation.Nonnull private String baseAmount; + + 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; + + /** Order type for quote orders */ + public enum TypeEnum { + QUOTE(String.valueOf("QUOTE")); + + 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_QUOTE_ID = "quoteId"; + @jakarta.annotation.Nonnull private String quoteId; + + public static final String JSON_PROPERTY_QUOTE_AMOUNT = "quoteAmount"; + @jakarta.annotation.Nonnull private String quoteAmount; + + public QuoteExecutionResponseDetails() {} + + @JsonCreator + public QuoteExecutionResponseDetails( + @JsonProperty(value = JSON_PROPERTY_SIDE, required = true) SideEnum side, + @JsonProperty(value = JSON_PROPERTY_BASE_AMOUNT, required = true) String baseAmount, + @JsonProperty(value = JSON_PROPERTY_BASE_ASSET_ID, required = true) String baseAssetId, + @JsonProperty(value = JSON_PROPERTY_QUOTE_ASSET_ID, required = true) + String quoteAssetId, + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_QUOTE_ID, required = true) String quoteId, + @JsonProperty(value = JSON_PROPERTY_QUOTE_AMOUNT, required = true) String quoteAmount) { + this.side = side; + this.baseAmount = baseAmount; + this.baseAssetId = baseAssetId; + this.quoteAssetId = quoteAssetId; + this.type = type; + this.quoteId = quoteId; + this.quoteAmount = quoteAmount; + } + + public QuoteExecutionResponseDetails side(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + return this; + } + + /** + * Side of the order + * + * @return side + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SideEnum getSide() { + return side; + } + + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSide(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + } + + public QuoteExecutionResponseDetails baseAmount(@jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + return this; + } + + /** + * Amount to convert + * + * @return baseAmount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAmount() { + return baseAmount; + } + + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAmount(@jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + } + + public QuoteExecutionResponseDetails baseAssetId( + @jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * Source asset identifier + * + * @return baseAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + } + + public QuoteExecutionResponseDetails 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 QuoteExecutionResponseDetails quoteAssetId( + @jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + return this; + } + + /** + * Target asset identifier + * + * @return quoteAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteAssetId() { + return quoteAssetId; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteAssetId(@jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + } + + public QuoteExecutionResponseDetails 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 QuoteExecutionResponseDetails type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Order type for quote orders + * + * @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 QuoteExecutionResponseDetails quoteId(@jakarta.annotation.Nonnull String quoteId) { + this.quoteId = quoteId; + return this; + } + + /** + * Quote ID for quote orders + * + * @return quoteId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteId() { + return quoteId; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteId(@jakarta.annotation.Nonnull String quoteId) { + this.quoteId = quoteId; + } + + public QuoteExecutionResponseDetails quoteAmount( + @jakarta.annotation.Nonnull String quoteAmount) { + this.quoteAmount = quoteAmount; + return this; + } + + /** + * Quote amount for quote orders + * + * @return quoteAmount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteAmount() { + return quoteAmount; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteAmount(@jakarta.annotation.Nonnull String quoteAmount) { + this.quoteAmount = quoteAmount; + } + + /** Return true if this QuoteExecutionResponseDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteExecutionResponseDetails quoteExecutionResponseDetails = + (QuoteExecutionResponseDetails) o; + return Objects.equals(this.side, quoteExecutionResponseDetails.side) + && Objects.equals(this.baseAmount, quoteExecutionResponseDetails.baseAmount) + && Objects.equals(this.baseAssetId, quoteExecutionResponseDetails.baseAssetId) + && Objects.equals(this.baseAssetRail, quoteExecutionResponseDetails.baseAssetRail) + && Objects.equals(this.quoteAssetId, quoteExecutionResponseDetails.quoteAssetId) + && Objects.equals(this.quoteAssetRail, quoteExecutionResponseDetails.quoteAssetRail) + && Objects.equals(this.type, quoteExecutionResponseDetails.type) + && Objects.equals(this.quoteId, quoteExecutionResponseDetails.quoteId) + && Objects.equals(this.quoteAmount, quoteExecutionResponseDetails.quoteAmount); + } + + @Override + public int hashCode() { + return Objects.hash( + side, + baseAmount, + baseAssetId, + baseAssetRail, + quoteAssetId, + quoteAssetRail, + type, + quoteId, + quoteAmount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteExecutionResponseDetails {\n"); + sb.append(" side: ").append(toIndentedString(side)).append("\n"); + sb.append(" baseAmount: ").append(toIndentedString(baseAmount)).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(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" quoteId: ").append(toIndentedString(quoteId)).append("\n"); + sb.append(" quoteAmount: ").append(toIndentedString(quoteAmount)).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 `side` to the URL query string + if (getSide() != null) { + joiner.add( + String.format( + "%sside%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSide())))); + } + + // add `baseAmount` to the URL query string + if (getBaseAmount() != null) { + joiner.add( + String.format( + "%sbaseAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBaseAmount())))); + } + + // add `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + 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( + String.format( + "%squoteAssetId%s=%s", + prefix, + suffix, + 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 `type` to the URL query string + if (getType() != null) { + joiner.add( + String.format( + "%stype%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getType())))); + } + + // add `quoteId` to the URL query string + if (getQuoteId() != null) { + joiner.add( + String.format( + "%squoteId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getQuoteId())))); + } + + // add `quoteAmount` to the URL query string + if (getQuoteAmount() != null) { + joiner.add( + String.format( + "%squoteAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getQuoteAmount())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteRequestDetails.java b/src/main/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteRequestDetails.java new file mode 100644 index 00000000..17377f6e --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteRequestDetails.java @@ -0,0 +1,263 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.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; + +/** QuoteExecutionWithRequoteRequestDetails */ +@JsonPropertyOrder({ + QuoteExecutionWithRequoteRequestDetails.JSON_PROPERTY_TYPE, + QuoteExecutionWithRequoteRequestDetails.JSON_PROPERTY_QUOTE_ID, + QuoteExecutionWithRequoteRequestDetails.JSON_PROPERTY_RE_QUOTE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class QuoteExecutionWithRequoteRequestDetails { + /** Order type for quote orders */ + public enum TypeEnum { + QUOTE(String.valueOf("QUOTE")); + + 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_QUOTE_ID = "quoteId"; + @jakarta.annotation.Nonnull private String quoteId; + + public static final String JSON_PROPERTY_RE_QUOTE = "reQuote"; + + @jakarta.annotation.Nullable + private QuoteExecutionWithRequoteRequestDetailsAllOfReQuote reQuote; + + public QuoteExecutionWithRequoteRequestDetails() {} + + @JsonCreator + public QuoteExecutionWithRequoteRequestDetails( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_QUOTE_ID, required = true) String quoteId) { + this.type = type; + this.quoteId = quoteId; + } + + public QuoteExecutionWithRequoteRequestDetails type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Order type for quote orders + * + * @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 QuoteExecutionWithRequoteRequestDetails quoteId( + @jakarta.annotation.Nonnull String quoteId) { + this.quoteId = quoteId; + return this; + } + + /** + * Quote ID for quote orders + * + * @return quoteId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteId() { + return quoteId; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteId(@jakarta.annotation.Nonnull String quoteId) { + this.quoteId = quoteId; + } + + public QuoteExecutionWithRequoteRequestDetails reQuote( + @jakarta.annotation.Nullable + QuoteExecutionWithRequoteRequestDetailsAllOfReQuote reQuote) { + this.reQuote = reQuote; + return this; + } + + /** + * Get reQuote + * + * @return reQuote + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RE_QUOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public QuoteExecutionWithRequoteRequestDetailsAllOfReQuote getReQuote() { + return reQuote; + } + + @JsonProperty(JSON_PROPERTY_RE_QUOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReQuote( + @jakarta.annotation.Nullable + QuoteExecutionWithRequoteRequestDetailsAllOfReQuote reQuote) { + this.reQuote = reQuote; + } + + /** Return true if this QuoteExecutionWithRequoteRequestDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteExecutionWithRequoteRequestDetails quoteExecutionWithRequoteRequestDetails = + (QuoteExecutionWithRequoteRequestDetails) o; + return Objects.equals(this.type, quoteExecutionWithRequoteRequestDetails.type) + && Objects.equals(this.quoteId, quoteExecutionWithRequoteRequestDetails.quoteId) + && Objects.equals(this.reQuote, quoteExecutionWithRequoteRequestDetails.reQuote); + } + + @Override + public int hashCode() { + return Objects.hash(type, quoteId, reQuote); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteExecutionWithRequoteRequestDetails {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" quoteId: ").append(toIndentedString(quoteId)).append("\n"); + sb.append(" reQuote: ").append(toIndentedString(reQuote)).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 `quoteId` to the URL query string + if (getQuoteId() != null) { + joiner.add( + String.format( + "%squoteId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getQuoteId())))); + } + + // add `reQuote` to the URL query string + if (getReQuote() != null) { + joiner.add(getReQuote().toUrlQueryString(prefix + "reQuote" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteRequestDetailsAllOfReQuote.java b/src/main/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteRequestDetailsAllOfReQuote.java new file mode 100644 index 00000000..b1ad2bdb --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteRequestDetailsAllOfReQuote.java @@ -0,0 +1,366 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.fireblocks.sdk.JSON; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.StringJoiner; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +@JsonDeserialize( + using = + QuoteExecutionWithRequoteRequestDetailsAllOfReQuote + .QuoteExecutionWithRequoteRequestDetailsAllOfReQuoteDeserializer.class) +@JsonSerialize( + using = + QuoteExecutionWithRequoteRequestDetailsAllOfReQuote + .QuoteExecutionWithRequoteRequestDetailsAllOfReQuoteSerializer.class) +public class QuoteExecutionWithRequoteRequestDetailsAllOfReQuote extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(QuoteExecutionWithRequoteRequestDetailsAllOfReQuote.class.getName()); + + public static class QuoteExecutionWithRequoteRequestDetailsAllOfReQuoteSerializer + extends StdSerializer { + public QuoteExecutionWithRequoteRequestDetailsAllOfReQuoteSerializer( + Class t) { + super(t); + } + + public QuoteExecutionWithRequoteRequestDetailsAllOfReQuoteSerializer() { + this(null); + } + + @Override + public void serialize( + QuoteExecutionWithRequoteRequestDetailsAllOfReQuote value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class QuoteExecutionWithRequoteRequestDetailsAllOfReQuoteDeserializer + extends StdDeserializer { + public QuoteExecutionWithRequoteRequestDetailsAllOfReQuoteDeserializer() { + this(QuoteExecutionWithRequoteRequestDetailsAllOfReQuote.class); + } + + public QuoteExecutionWithRequoteRequestDetailsAllOfReQuoteDeserializer(Class vc) { + super(vc); + } + + @Override + public QuoteExecutionWithRequoteRequestDetailsAllOfReQuote deserialize( + JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize MarketRequoteRequestDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (MarketRequoteRequestDetails.class.equals(Integer.class) + || MarketRequoteRequestDetails.class.equals(Long.class) + || MarketRequoteRequestDetails.class.equals(Float.class) + || MarketRequoteRequestDetails.class.equals(Double.class) + || MarketRequoteRequestDetails.class.equals(Boolean.class) + || MarketRequoteRequestDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((MarketRequoteRequestDetails.class.equals(Integer.class) + || MarketRequoteRequestDetails.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((MarketRequoteRequestDetails.class.equals(Float.class) + || MarketRequoteRequestDetails.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (MarketRequoteRequestDetails.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (MarketRequoteRequestDetails.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(MarketRequoteRequestDetails.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 'MarketRequoteRequestDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'MarketRequoteRequestDetails'", + e); + } + + // deserialize RetryRequoteRequestDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (RetryRequoteRequestDetails.class.equals(Integer.class) + || RetryRequoteRequestDetails.class.equals(Long.class) + || RetryRequoteRequestDetails.class.equals(Float.class) + || RetryRequoteRequestDetails.class.equals(Double.class) + || RetryRequoteRequestDetails.class.equals(Boolean.class) + || RetryRequoteRequestDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((RetryRequoteRequestDetails.class.equals(Integer.class) + || RetryRequoteRequestDetails.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((RetryRequoteRequestDetails.class.equals(Float.class) + || RetryRequoteRequestDetails.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (RetryRequoteRequestDetails.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (RetryRequoteRequestDetails.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(RetryRequoteRequestDetails.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 'RetryRequoteRequestDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'RetryRequoteRequestDetails'", + e); + } + + if (match == 1) { + QuoteExecutionWithRequoteRequestDetailsAllOfReQuote ret = + new QuoteExecutionWithRequoteRequestDetailsAllOfReQuote(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for" + + " QuoteExecutionWithRequoteRequestDetailsAllOfReQuote: %d classes" + + " match result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public QuoteExecutionWithRequoteRequestDetailsAllOfReQuote getNullValue( + DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), + "QuoteExecutionWithRequoteRequestDetailsAllOfReQuote cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public QuoteExecutionWithRequoteRequestDetailsAllOfReQuote() { + super("oneOf", Boolean.FALSE); + } + + public QuoteExecutionWithRequoteRequestDetailsAllOfReQuote(MarketRequoteRequestDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public QuoteExecutionWithRequoteRequestDetailsAllOfReQuote(RetryRequoteRequestDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("MarketRequoteRequestDetails", MarketRequoteRequestDetails.class); + schemas.put("RetryRequoteRequestDetails", RetryRequoteRequestDetails.class); + JSON.registerDescendants( + QuoteExecutionWithRequoteRequestDetailsAllOfReQuote.class, + Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("MARKET", MarketRequoteRequestDetails.class); + mappings.put("RETRY", RetryRequoteRequestDetails.class); + mappings.put("MarketRequoteRequestDetails", MarketRequoteRequestDetails.class); + mappings.put("RetryRequoteRequestDetails", RetryRequoteRequestDetails.class); + mappings.put( + "QuoteExecutionWithRequoteRequestDetails_allOf_reQuote", + QuoteExecutionWithRequoteRequestDetailsAllOfReQuote.class); + JSON.registerDiscriminator( + QuoteExecutionWithRequoteRequestDetailsAllOfReQuote.class, "type", mappings); + } + + @Override + public Map> getSchemas() { + return QuoteExecutionWithRequoteRequestDetailsAllOfReQuote.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: MarketRequoteRequestDetails, RetryRequoteRequestDetails + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be + * a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf( + MarketRequoteRequestDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + RetryRequoteRequestDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be MarketRequoteRequestDetails," + + " RetryRequoteRequestDetails"); + } + + /** + * Get the actual instance, which can be the following: MarketRequoteRequestDetails, + * RetryRequoteRequestDetails + * + * @return The actual instance (MarketRequoteRequestDetails, RetryRequoteRequestDetails) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `MarketRequoteRequestDetails`. If the actual instance is not + * `MarketRequoteRequestDetails`, the ClassCastException will be thrown. + * + * @return The actual instance of `MarketRequoteRequestDetails` + * @throws ClassCastException if the instance is not `MarketRequoteRequestDetails` + */ + public MarketRequoteRequestDetails getMarketRequoteRequestDetails() throws ClassCastException { + return (MarketRequoteRequestDetails) super.getActualInstance(); + } + + /** + * Get the actual instance of `RetryRequoteRequestDetails`. If the actual instance is not + * `RetryRequoteRequestDetails`, the ClassCastException will be thrown. + * + * @return The actual instance of `RetryRequoteRequestDetails` + * @throws ClassCastException if the instance is not `RetryRequoteRequestDetails` + */ + public RetryRequoteRequestDetails getRetryRequoteRequestDetails() throws ClassCastException { + return (RetryRequoteRequestDetails) super.getActualInstance(); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof MarketRequoteRequestDetails) { + if (getActualInstance() != null) { + joiner.add( + ((MarketRequoteRequestDetails) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof RetryRequoteRequestDetails) { + if (getActualInstance() != null) { + joiner.add( + ((RetryRequoteRequestDetails) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteResponseDetails.java b/src/main/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteResponseDetails.java new file mode 100644 index 00000000..b2482751 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteResponseDetails.java @@ -0,0 +1,605 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** QuoteExecutionWithRequoteResponseDetails */ +@JsonPropertyOrder({ + QuoteExecutionWithRequoteResponseDetails.JSON_PROPERTY_TYPE, + QuoteExecutionWithRequoteResponseDetails.JSON_PROPERTY_QUOTE_ID, + QuoteExecutionWithRequoteResponseDetails.JSON_PROPERTY_QUOTE_AMOUNT, + QuoteExecutionWithRequoteResponseDetails.JSON_PROPERTY_SIDE, + QuoteExecutionWithRequoteResponseDetails.JSON_PROPERTY_BASE_AMOUNT, + QuoteExecutionWithRequoteResponseDetails.JSON_PROPERTY_BASE_ASSET_ID, + QuoteExecutionWithRequoteResponseDetails.JSON_PROPERTY_BASE_ASSET_RAIL, + QuoteExecutionWithRequoteResponseDetails.JSON_PROPERTY_QUOTE_ASSET_ID, + QuoteExecutionWithRequoteResponseDetails.JSON_PROPERTY_QUOTE_ASSET_RAIL, + QuoteExecutionWithRequoteResponseDetails.JSON_PROPERTY_RE_QUOTE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class QuoteExecutionWithRequoteResponseDetails { + /** Order type for quote orders */ + public enum TypeEnum { + QUOTE(String.valueOf("QUOTE")); + + 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_QUOTE_ID = "quoteId"; + @jakarta.annotation.Nonnull private String quoteId; + + public static final String JSON_PROPERTY_QUOTE_AMOUNT = "quoteAmount"; + @jakarta.annotation.Nonnull private String quoteAmount; + + /** Side of the order */ + public enum SideEnum { + BUY(String.valueOf("BUY")), + + SELL(String.valueOf("SELL")); + + private String value; + + SideEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SideEnum fromValue(String value) { + for (SideEnum b : SideEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_SIDE = "side"; + @jakarta.annotation.Nonnull private SideEnum side = SideEnum.BUY; + + public static final String JSON_PROPERTY_BASE_AMOUNT = "baseAmount"; + @jakarta.annotation.Nonnull private String baseAmount; + + 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_RE_QUOTE = "reQuote"; + + @jakarta.annotation.Nullable + private QuoteExecutionWithRequoteResponseDetailsAllOfReQuote reQuote; + + public QuoteExecutionWithRequoteResponseDetails() {} + + @JsonCreator + public QuoteExecutionWithRequoteResponseDetails( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_QUOTE_ID, required = true) String quoteId, + @JsonProperty(value = JSON_PROPERTY_QUOTE_AMOUNT, required = true) String quoteAmount, + @JsonProperty(value = JSON_PROPERTY_SIDE, required = true) SideEnum side, + @JsonProperty(value = JSON_PROPERTY_BASE_AMOUNT, required = true) String baseAmount, + @JsonProperty(value = JSON_PROPERTY_BASE_ASSET_ID, required = true) String baseAssetId, + @JsonProperty(value = JSON_PROPERTY_QUOTE_ASSET_ID, required = true) + String quoteAssetId) { + this.type = type; + this.quoteId = quoteId; + this.quoteAmount = quoteAmount; + this.side = side; + this.baseAmount = baseAmount; + this.baseAssetId = baseAssetId; + this.quoteAssetId = quoteAssetId; + } + + public QuoteExecutionWithRequoteResponseDetails type( + @jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Order type for quote orders + * + * @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 QuoteExecutionWithRequoteResponseDetails quoteId( + @jakarta.annotation.Nonnull String quoteId) { + this.quoteId = quoteId; + return this; + } + + /** + * Quote ID for quote orders + * + * @return quoteId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteId() { + return quoteId; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteId(@jakarta.annotation.Nonnull String quoteId) { + this.quoteId = quoteId; + } + + public QuoteExecutionWithRequoteResponseDetails quoteAmount( + @jakarta.annotation.Nonnull String quoteAmount) { + this.quoteAmount = quoteAmount; + return this; + } + + /** + * Quote amount for quote orders + * + * @return quoteAmount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteAmount() { + return quoteAmount; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteAmount(@jakarta.annotation.Nonnull String quoteAmount) { + this.quoteAmount = quoteAmount; + } + + public QuoteExecutionWithRequoteResponseDetails side( + @jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + return this; + } + + /** + * Side of the order + * + * @return side + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SideEnum getSide() { + return side; + } + + @JsonProperty(JSON_PROPERTY_SIDE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSide(@jakarta.annotation.Nonnull SideEnum side) { + this.side = side; + } + + public QuoteExecutionWithRequoteResponseDetails baseAmount( + @jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + return this; + } + + /** + * Amount to convert + * + * @return baseAmount + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAmount() { + return baseAmount; + } + + @JsonProperty(JSON_PROPERTY_BASE_AMOUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAmount(@jakarta.annotation.Nonnull String baseAmount) { + this.baseAmount = baseAmount; + } + + public QuoteExecutionWithRequoteResponseDetails baseAssetId( + @jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + return this; + } + + /** + * Source asset identifier + * + * @return baseAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBaseAssetId() { + return baseAssetId; + } + + @JsonProperty(JSON_PROPERTY_BASE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBaseAssetId(@jakarta.annotation.Nonnull String baseAssetId) { + this.baseAssetId = baseAssetId; + } + + public QuoteExecutionWithRequoteResponseDetails 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 QuoteExecutionWithRequoteResponseDetails quoteAssetId( + @jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + return this; + } + + /** + * Target asset identifier + * + * @return quoteAssetId + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuoteAssetId() { + return quoteAssetId; + } + + @JsonProperty(JSON_PROPERTY_QUOTE_ASSET_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setQuoteAssetId(@jakarta.annotation.Nonnull String quoteAssetId) { + this.quoteAssetId = quoteAssetId; + } + + public QuoteExecutionWithRequoteResponseDetails 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 QuoteExecutionWithRequoteResponseDetails reQuote( + @jakarta.annotation.Nullable + QuoteExecutionWithRequoteResponseDetailsAllOfReQuote reQuote) { + this.reQuote = reQuote; + return this; + } + + /** + * Get reQuote + * + * @return reQuote + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RE_QUOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public QuoteExecutionWithRequoteResponseDetailsAllOfReQuote getReQuote() { + return reQuote; + } + + @JsonProperty(JSON_PROPERTY_RE_QUOTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setReQuote( + @jakarta.annotation.Nullable + QuoteExecutionWithRequoteResponseDetailsAllOfReQuote reQuote) { + this.reQuote = reQuote; + } + + /** Return true if this QuoteExecutionWithRequoteResponseDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuoteExecutionWithRequoteResponseDetails quoteExecutionWithRequoteResponseDetails = + (QuoteExecutionWithRequoteResponseDetails) o; + return Objects.equals(this.type, quoteExecutionWithRequoteResponseDetails.type) + && Objects.equals(this.quoteId, quoteExecutionWithRequoteResponseDetails.quoteId) + && Objects.equals( + this.quoteAmount, quoteExecutionWithRequoteResponseDetails.quoteAmount) + && Objects.equals(this.side, quoteExecutionWithRequoteResponseDetails.side) + && Objects.equals( + this.baseAmount, quoteExecutionWithRequoteResponseDetails.baseAmount) + && Objects.equals( + this.baseAssetId, quoteExecutionWithRequoteResponseDetails.baseAssetId) + && Objects.equals( + this.baseAssetRail, quoteExecutionWithRequoteResponseDetails.baseAssetRail) + && Objects.equals( + this.quoteAssetId, quoteExecutionWithRequoteResponseDetails.quoteAssetId) + && Objects.equals( + this.quoteAssetRail, + quoteExecutionWithRequoteResponseDetails.quoteAssetRail) + && Objects.equals(this.reQuote, quoteExecutionWithRequoteResponseDetails.reQuote); + } + + @Override + public int hashCode() { + return Objects.hash( + type, + quoteId, + quoteAmount, + side, + baseAmount, + baseAssetId, + baseAssetRail, + quoteAssetId, + quoteAssetRail, + reQuote); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuoteExecutionWithRequoteResponseDetails {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" quoteId: ").append(toIndentedString(quoteId)).append("\n"); + sb.append(" quoteAmount: ").append(toIndentedString(quoteAmount)).append("\n"); + sb.append(" side: ").append(toIndentedString(side)).append("\n"); + sb.append(" baseAmount: ").append(toIndentedString(baseAmount)).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(" reQuote: ").append(toIndentedString(reQuote)).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 `quoteId` to the URL query string + if (getQuoteId() != null) { + joiner.add( + String.format( + "%squoteId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getQuoteId())))); + } + + // add `quoteAmount` to the URL query string + if (getQuoteAmount() != null) { + joiner.add( + String.format( + "%squoteAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getQuoteAmount())))); + } + + // add `side` to the URL query string + if (getSide() != null) { + joiner.add( + String.format( + "%sside%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSide())))); + } + + // add `baseAmount` to the URL query string + if (getBaseAmount() != null) { + joiner.add( + String.format( + "%sbaseAmount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBaseAmount())))); + } + + // add `baseAssetId` to the URL query string + if (getBaseAssetId() != null) { + joiner.add( + String.format( + "%sbaseAssetId%s=%s", + prefix, + suffix, + 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( + String.format( + "%squoteAssetId%s=%s", + prefix, + suffix, + 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 `reQuote` to the URL query string + if (getReQuote() != null) { + joiner.add(getReQuote().toUrlQueryString(prefix + "reQuote" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteResponseDetailsAllOfReQuote.java b/src/main/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteResponseDetailsAllOfReQuote.java new file mode 100644 index 00000000..6119aa6e --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteResponseDetailsAllOfReQuote.java @@ -0,0 +1,366 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.fireblocks.sdk.JSON; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.StringJoiner; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +@JsonDeserialize( + using = + QuoteExecutionWithRequoteResponseDetailsAllOfReQuote + .QuoteExecutionWithRequoteResponseDetailsAllOfReQuoteDeserializer.class) +@JsonSerialize( + using = + QuoteExecutionWithRequoteResponseDetailsAllOfReQuote + .QuoteExecutionWithRequoteResponseDetailsAllOfReQuoteSerializer.class) +public class QuoteExecutionWithRequoteResponseDetailsAllOfReQuote extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(QuoteExecutionWithRequoteResponseDetailsAllOfReQuote.class.getName()); + + public static class QuoteExecutionWithRequoteResponseDetailsAllOfReQuoteSerializer + extends StdSerializer { + public QuoteExecutionWithRequoteResponseDetailsAllOfReQuoteSerializer( + Class t) { + super(t); + } + + public QuoteExecutionWithRequoteResponseDetailsAllOfReQuoteSerializer() { + this(null); + } + + @Override + public void serialize( + QuoteExecutionWithRequoteResponseDetailsAllOfReQuote value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class QuoteExecutionWithRequoteResponseDetailsAllOfReQuoteDeserializer + extends StdDeserializer { + public QuoteExecutionWithRequoteResponseDetailsAllOfReQuoteDeserializer() { + this(QuoteExecutionWithRequoteResponseDetailsAllOfReQuote.class); + } + + public QuoteExecutionWithRequoteResponseDetailsAllOfReQuoteDeserializer(Class vc) { + super(vc); + } + + @Override + public QuoteExecutionWithRequoteResponseDetailsAllOfReQuote deserialize( + JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize MarketRequoteRequestDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (MarketRequoteRequestDetails.class.equals(Integer.class) + || MarketRequoteRequestDetails.class.equals(Long.class) + || MarketRequoteRequestDetails.class.equals(Float.class) + || MarketRequoteRequestDetails.class.equals(Double.class) + || MarketRequoteRequestDetails.class.equals(Boolean.class) + || MarketRequoteRequestDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((MarketRequoteRequestDetails.class.equals(Integer.class) + || MarketRequoteRequestDetails.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((MarketRequoteRequestDetails.class.equals(Float.class) + || MarketRequoteRequestDetails.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (MarketRequoteRequestDetails.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (MarketRequoteRequestDetails.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(MarketRequoteRequestDetails.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 'MarketRequoteRequestDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'MarketRequoteRequestDetails'", + e); + } + + // deserialize RetryRequoteRequestDetails + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (RetryRequoteRequestDetails.class.equals(Integer.class) + || RetryRequoteRequestDetails.class.equals(Long.class) + || RetryRequoteRequestDetails.class.equals(Float.class) + || RetryRequoteRequestDetails.class.equals(Double.class) + || RetryRequoteRequestDetails.class.equals(Boolean.class) + || RetryRequoteRequestDetails.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((RetryRequoteRequestDetails.class.equals(Integer.class) + || RetryRequoteRequestDetails.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((RetryRequoteRequestDetails.class.equals(Float.class) + || RetryRequoteRequestDetails.class.equals( + Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (RetryRequoteRequestDetails.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (RetryRequoteRequestDetails.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()) + .readValueAs(RetryRequoteRequestDetails.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 'RetryRequoteRequestDetails'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'RetryRequoteRequestDetails'", + e); + } + + if (match == 1) { + QuoteExecutionWithRequoteResponseDetailsAllOfReQuote ret = + new QuoteExecutionWithRequoteResponseDetailsAllOfReQuote(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for" + + " QuoteExecutionWithRequoteResponseDetailsAllOfReQuote: %d" + + " classes match result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public QuoteExecutionWithRequoteResponseDetailsAllOfReQuote getNullValue( + DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), + "QuoteExecutionWithRequoteResponseDetailsAllOfReQuote cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public QuoteExecutionWithRequoteResponseDetailsAllOfReQuote() { + super("oneOf", Boolean.FALSE); + } + + public QuoteExecutionWithRequoteResponseDetailsAllOfReQuote(MarketRequoteRequestDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public QuoteExecutionWithRequoteResponseDetailsAllOfReQuote(RetryRequoteRequestDetails o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("MarketRequoteRequestDetails", MarketRequoteRequestDetails.class); + schemas.put("RetryRequoteRequestDetails", RetryRequoteRequestDetails.class); + JSON.registerDescendants( + QuoteExecutionWithRequoteResponseDetailsAllOfReQuote.class, + Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("MARKET", MarketRequoteRequestDetails.class); + mappings.put("RETRY", RetryRequoteRequestDetails.class); + mappings.put("MarketRequoteRequestDetails", MarketRequoteRequestDetails.class); + mappings.put("RetryRequoteRequestDetails", RetryRequoteRequestDetails.class); + mappings.put( + "QuoteExecutionWithRequoteResponseDetails_allOf_reQuote", + QuoteExecutionWithRequoteResponseDetailsAllOfReQuote.class); + JSON.registerDiscriminator( + QuoteExecutionWithRequoteResponseDetailsAllOfReQuote.class, "type", mappings); + } + + @Override + public Map> getSchemas() { + return QuoteExecutionWithRequoteResponseDetailsAllOfReQuote.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: MarketRequoteRequestDetails, RetryRequoteRequestDetails + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be + * a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf( + MarketRequoteRequestDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf( + RetryRequoteRequestDetails.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be MarketRequoteRequestDetails," + + " RetryRequoteRequestDetails"); + } + + /** + * Get the actual instance, which can be the following: MarketRequoteRequestDetails, + * RetryRequoteRequestDetails + * + * @return The actual instance (MarketRequoteRequestDetails, RetryRequoteRequestDetails) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `MarketRequoteRequestDetails`. If the actual instance is not + * `MarketRequoteRequestDetails`, the ClassCastException will be thrown. + * + * @return The actual instance of `MarketRequoteRequestDetails` + * @throws ClassCastException if the instance is not `MarketRequoteRequestDetails` + */ + public MarketRequoteRequestDetails getMarketRequoteRequestDetails() throws ClassCastException { + return (MarketRequoteRequestDetails) super.getActualInstance(); + } + + /** + * Get the actual instance of `RetryRequoteRequestDetails`. If the actual instance is not + * `RetryRequoteRequestDetails`, the ClassCastException will be thrown. + * + * @return The actual instance of `RetryRequoteRequestDetails` + * @throws ClassCastException if the instance is not `RetryRequoteRequestDetails` + */ + public RetryRequoteRequestDetails getRetryRequoteRequestDetails() throws ClassCastException { + return (RetryRequoteRequestDetails) super.getActualInstance(); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof MarketRequoteRequestDetails) { + if (getActualInstance() != null) { + joiner.add( + ((MarketRequoteRequestDetails) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof RetryRequoteRequestDetails) { + if (getActualInstance() != null) { + joiner.add( + ((RetryRequoteRequestDetails) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/QuoteFee.java b/src/main/java/com/fireblocks/sdk/model/QuoteFee.java deleted file mode 100644 index a1ec657d..00000000 --- a/src/main/java/com/fireblocks/sdk/model/QuoteFee.java +++ /dev/null @@ -1,371 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.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.math.BigDecimal; -import java.util.Objects; -import java.util.StringJoiner; - -/** QuoteFee */ -@JsonPropertyOrder({ - QuoteFee.JSON_PROPERTY_NETWORK_EXECUTION_FEE, - QuoteFee.JSON_PROPERTY_NETWORK_FEE_ASSET_ID, - QuoteFee.JSON_PROPERTY_PROVIDER_FEE, - QuoteFee.JSON_PROPERTY_PROVIDER_FEE_ASSET_ID, - QuoteFee.JSON_PROPERTY_PROVIDER_FEE_RATE, - QuoteFee.JSON_PROPERTY_NETWORK_APPROVE_FEE -}) -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.14.0") -public class QuoteFee { - public static final String JSON_PROPERTY_NETWORK_EXECUTION_FEE = "networkExecutionFee"; - @jakarta.annotation.Nonnull private String networkExecutionFee; - - public static final String JSON_PROPERTY_NETWORK_FEE_ASSET_ID = "networkFeeAssetId"; - @jakarta.annotation.Nonnull private String networkFeeAssetId; - - public static final String JSON_PROPERTY_PROVIDER_FEE = "providerFee"; - @jakarta.annotation.Nonnull private String providerFee; - - public static final String JSON_PROPERTY_PROVIDER_FEE_ASSET_ID = "providerFeeAssetId"; - @jakarta.annotation.Nonnull private String providerFeeAssetId; - - public static final String JSON_PROPERTY_PROVIDER_FEE_RATE = "providerFeeRate"; - @jakarta.annotation.Nonnull private BigDecimal providerFeeRate; - - public static final String JSON_PROPERTY_NETWORK_APPROVE_FEE = "networkApproveFee"; - @jakarta.annotation.Nullable private String networkApproveFee; - - public QuoteFee() {} - - @JsonCreator - public QuoteFee( - @JsonProperty(value = JSON_PROPERTY_NETWORK_EXECUTION_FEE, required = true) - String networkExecutionFee, - @JsonProperty(value = JSON_PROPERTY_NETWORK_FEE_ASSET_ID, required = true) - String networkFeeAssetId, - @JsonProperty(value = JSON_PROPERTY_PROVIDER_FEE, required = true) String providerFee, - @JsonProperty(value = JSON_PROPERTY_PROVIDER_FEE_ASSET_ID, required = true) - String providerFeeAssetId, - @JsonProperty(value = JSON_PROPERTY_PROVIDER_FEE_RATE, required = true) - BigDecimal providerFeeRate) { - this.networkExecutionFee = networkExecutionFee; - this.networkFeeAssetId = networkFeeAssetId; - this.providerFee = providerFee; - this.providerFeeAssetId = providerFeeAssetId; - this.providerFeeRate = providerFeeRate; - } - - public QuoteFee networkExecutionFee(@jakarta.annotation.Nonnull String networkExecutionFee) { - this.networkExecutionFee = networkExecutionFee; - return this; - } - - /** - * The gas fee in the asset unit. - * - * @return networkExecutionFee - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NETWORK_EXECUTION_FEE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getNetworkExecutionFee() { - return networkExecutionFee; - } - - @JsonProperty(JSON_PROPERTY_NETWORK_EXECUTION_FEE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNetworkExecutionFee(@jakarta.annotation.Nonnull String networkExecutionFee) { - this.networkExecutionFee = networkExecutionFee; - } - - public QuoteFee networkFeeAssetId(@jakarta.annotation.Nonnull String networkFeeAssetId) { - this.networkFeeAssetId = networkFeeAssetId; - return this; - } - - /** - * The network fee in Fireblocks asset representation - * - * @return networkFeeAssetId - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NETWORK_FEE_ASSET_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getNetworkFeeAssetId() { - return networkFeeAssetId; - } - - @JsonProperty(JSON_PROPERTY_NETWORK_FEE_ASSET_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNetworkFeeAssetId(@jakarta.annotation.Nonnull String networkFeeAssetId) { - this.networkFeeAssetId = networkFeeAssetId; - } - - public QuoteFee providerFee(@jakarta.annotation.Nonnull String providerFee) { - this.providerFee = providerFee; - return this; - } - - /** - * The provider fee in the asset unit. - * - * @return providerFee - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_PROVIDER_FEE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getProviderFee() { - return providerFee; - } - - @JsonProperty(JSON_PROPERTY_PROVIDER_FEE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setProviderFee(@jakarta.annotation.Nonnull String providerFee) { - this.providerFee = providerFee; - } - - public QuoteFee providerFeeAssetId(@jakarta.annotation.Nonnull String providerFeeAssetId) { - this.providerFeeAssetId = providerFeeAssetId; - return this; - } - - /** - * The provider fee in Fireblocks asset representation - * - * @return providerFeeAssetId - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_PROVIDER_FEE_ASSET_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getProviderFeeAssetId() { - return providerFeeAssetId; - } - - @JsonProperty(JSON_PROPERTY_PROVIDER_FEE_ASSET_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setProviderFeeAssetId(@jakarta.annotation.Nonnull String providerFeeAssetId) { - this.providerFeeAssetId = providerFeeAssetId; - } - - public QuoteFee providerFeeRate(@jakarta.annotation.Nonnull BigDecimal providerFeeRate) { - this.providerFeeRate = providerFeeRate; - return this; - } - - /** - * Percentages of the provider fee out of the gross amount - * - * @return providerFeeRate - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_PROVIDER_FEE_RATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BigDecimal getProviderFeeRate() { - return providerFeeRate; - } - - @JsonProperty(JSON_PROPERTY_PROVIDER_FEE_RATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setProviderFeeRate(@jakarta.annotation.Nonnull BigDecimal providerFeeRate) { - this.providerFeeRate = providerFeeRate; - } - - public QuoteFee networkApproveFee(@jakarta.annotation.Nullable String networkApproveFee) { - this.networkApproveFee = networkApproveFee; - return this; - } - - /** - * The gas fee in the asset unit. - * - * @return networkApproveFee - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NETWORK_APPROVE_FEE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNetworkApproveFee() { - return networkApproveFee; - } - - @JsonProperty(JSON_PROPERTY_NETWORK_APPROVE_FEE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setNetworkApproveFee(@jakarta.annotation.Nullable String networkApproveFee) { - this.networkApproveFee = networkApproveFee; - } - - /** Return true if this QuoteFee object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - QuoteFee quoteFee = (QuoteFee) o; - return Objects.equals(this.networkExecutionFee, quoteFee.networkExecutionFee) - && Objects.equals(this.networkFeeAssetId, quoteFee.networkFeeAssetId) - && Objects.equals(this.providerFee, quoteFee.providerFee) - && Objects.equals(this.providerFeeAssetId, quoteFee.providerFeeAssetId) - && Objects.equals(this.providerFeeRate, quoteFee.providerFeeRate) - && Objects.equals(this.networkApproveFee, quoteFee.networkApproveFee); - } - - @Override - public int hashCode() { - return Objects.hash( - networkExecutionFee, - networkFeeAssetId, - providerFee, - providerFeeAssetId, - providerFeeRate, - networkApproveFee); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class QuoteFee {\n"); - sb.append(" networkExecutionFee: ") - .append(toIndentedString(networkExecutionFee)) - .append("\n"); - sb.append(" networkFeeAssetId: ") - .append(toIndentedString(networkFeeAssetId)) - .append("\n"); - sb.append(" providerFee: ").append(toIndentedString(providerFee)).append("\n"); - sb.append(" providerFeeAssetId: ") - .append(toIndentedString(providerFeeAssetId)) - .append("\n"); - sb.append(" providerFeeRate: ").append(toIndentedString(providerFeeRate)).append("\n"); - sb.append(" networkApproveFee: ") - .append(toIndentedString(networkApproveFee)) - .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 `networkExecutionFee` to the URL query string - if (getNetworkExecutionFee() != null) { - joiner.add( - String.format( - "%snetworkExecutionFee%s=%s", - prefix, - suffix, - ApiClient.urlEncode( - ApiClient.valueToString(getNetworkExecutionFee())))); - } - - // add `networkFeeAssetId` to the URL query string - if (getNetworkFeeAssetId() != null) { - joiner.add( - String.format( - "%snetworkFeeAssetId%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getNetworkFeeAssetId())))); - } - - // add `providerFee` to the URL query string - if (getProviderFee() != null) { - joiner.add( - String.format( - "%sproviderFee%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getProviderFee())))); - } - - // add `providerFeeAssetId` to the URL query string - if (getProviderFeeAssetId() != null) { - joiner.add( - String.format( - "%sproviderFeeAssetId%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getProviderFeeAssetId())))); - } - - // add `providerFeeRate` to the URL query string - if (getProviderFeeRate() != null) { - joiner.add( - String.format( - "%sproviderFeeRate%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getProviderFeeRate())))); - } - - // add `networkApproveFee` to the URL query string - if (getNetworkApproveFee() != null) { - joiner.add( - String.format( - "%snetworkApproveFee%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getNetworkApproveFee())))); - } - - return joiner.toString(); - } -} diff --git a/src/main/java/com/fireblocks/sdk/model/QuoteRequest.java b/src/main/java/com/fireblocks/sdk/model/QuoteRequest.java deleted file mode 100644 index a4abb6df..00000000 --- a/src/main/java/com/fireblocks/sdk/model/QuoteRequest.java +++ /dev/null @@ -1,360 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.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.math.BigDecimal; -import java.util.Objects; -import java.util.StringJoiner; - -/** QuoteRequest */ -@JsonPropertyOrder({ - QuoteRequest.JSON_PROPERTY_ACCOUNT_ID, - QuoteRequest.JSON_PROPERTY_INPUT_AMOUNT, - QuoteRequest.JSON_PROPERTY_INPUT_ASSET, - QuoteRequest.JSON_PROPERTY_OUTPUT_ASSET, - QuoteRequest.JSON_PROPERTY_SLIPPAGE_TOLERANCE, - QuoteRequest.JSON_PROPERTY_PROTOCOL -}) -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.14.0") -public class QuoteRequest { - public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; - @jakarta.annotation.Nullable private String accountId; - - public static final String JSON_PROPERTY_INPUT_AMOUNT = "inputAmount"; - @jakarta.annotation.Nonnull private String inputAmount; - - public static final String JSON_PROPERTY_INPUT_ASSET = "inputAsset"; - @jakarta.annotation.Nonnull private String inputAsset; - - public static final String JSON_PROPERTY_OUTPUT_ASSET = "outputAsset"; - @jakarta.annotation.Nonnull private String outputAsset; - - public static final String JSON_PROPERTY_SLIPPAGE_TOLERANCE = "slippageTolerance"; - @jakarta.annotation.Nonnull private BigDecimal slippageTolerance; - - public static final String JSON_PROPERTY_PROTOCOL = "protocol"; - @jakarta.annotation.Nonnull private SwapProviderProtocolsEnum protocol; - - public QuoteRequest() {} - - @JsonCreator - public QuoteRequest( - @JsonProperty(value = JSON_PROPERTY_INPUT_AMOUNT, required = true) String inputAmount, - @JsonProperty(value = JSON_PROPERTY_INPUT_ASSET, required = true) String inputAsset, - @JsonProperty(value = JSON_PROPERTY_OUTPUT_ASSET, required = true) String outputAsset, - @JsonProperty(value = JSON_PROPERTY_SLIPPAGE_TOLERANCE, required = true) - BigDecimal slippageTolerance, - @JsonProperty(value = JSON_PROPERTY_PROTOCOL, required = true) - SwapProviderProtocolsEnum protocol) { - this.inputAmount = inputAmount; - this.inputAsset = inputAsset; - this.outputAsset = outputAsset; - this.slippageTolerance = slippageTolerance; - this.protocol = protocol; - } - - public QuoteRequest accountId(@jakarta.annotation.Nullable String accountId) { - this.accountId = accountId; - return this; - } - - /** - * The id of the vault account or account id - * - * @return accountId - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAccountId() { - return accountId; - } - - @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAccountId(@jakarta.annotation.Nullable String accountId) { - this.accountId = accountId; - } - - public QuoteRequest inputAmount(@jakarta.annotation.Nonnull String inputAmount) { - this.inputAmount = inputAmount; - return this; - } - - /** - * The amount of tokens the swapper will provide, positive number, can be a decimal. - * - * @return inputAmount - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_INPUT_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getInputAmount() { - return inputAmount; - } - - @JsonProperty(JSON_PROPERTY_INPUT_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setInputAmount(@jakarta.annotation.Nonnull String inputAmount) { - this.inputAmount = inputAmount; - } - - public QuoteRequest inputAsset(@jakarta.annotation.Nonnull String inputAsset) { - this.inputAsset = inputAsset; - return this; - } - - /** - * The id of the asset the swapper will provide - * - * @return inputAsset - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_INPUT_ASSET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getInputAsset() { - return inputAsset; - } - - @JsonProperty(JSON_PROPERTY_INPUT_ASSET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setInputAsset(@jakarta.annotation.Nonnull String inputAsset) { - this.inputAsset = inputAsset; - } - - public QuoteRequest outputAsset(@jakarta.annotation.Nonnull String outputAsset) { - this.outputAsset = outputAsset; - return this; - } - - /** - * The id of the asset the swapper will receive - * - * @return outputAsset - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_OUTPUT_ASSET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getOutputAsset() { - return outputAsset; - } - - @JsonProperty(JSON_PROPERTY_OUTPUT_ASSET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOutputAsset(@jakarta.annotation.Nonnull String outputAsset) { - this.outputAsset = outputAsset; - } - - public QuoteRequest slippageTolerance( - @jakarta.annotation.Nonnull BigDecimal slippageTolerance) { - this.slippageTolerance = slippageTolerance; - return this; - } - - /** - * The slippage tolerance is a percentage. The slippage tolerance is the maximum amount the - * price can change between the time the transaction is submitted and the time it is executed - * minimum: 0 maximum: 100 - * - * @return slippageTolerance - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SLIPPAGE_TOLERANCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BigDecimal getSlippageTolerance() { - return slippageTolerance; - } - - @JsonProperty(JSON_PROPERTY_SLIPPAGE_TOLERANCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSlippageTolerance(@jakarta.annotation.Nonnull BigDecimal slippageTolerance) { - this.slippageTolerance = slippageTolerance; - } - - public QuoteRequest protocol(@jakarta.annotation.Nonnull SwapProviderProtocolsEnum protocol) { - this.protocol = protocol; - return this; - } - - /** - * Get protocol - * - * @return protocol - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_PROTOCOL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SwapProviderProtocolsEnum getProtocol() { - return protocol; - } - - @JsonProperty(JSON_PROPERTY_PROTOCOL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setProtocol(@jakarta.annotation.Nonnull SwapProviderProtocolsEnum protocol) { - this.protocol = protocol; - } - - /** Return true if this QuoteRequest object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - QuoteRequest quoteRequest = (QuoteRequest) o; - return Objects.equals(this.accountId, quoteRequest.accountId) - && Objects.equals(this.inputAmount, quoteRequest.inputAmount) - && Objects.equals(this.inputAsset, quoteRequest.inputAsset) - && Objects.equals(this.outputAsset, quoteRequest.outputAsset) - && Objects.equals(this.slippageTolerance, quoteRequest.slippageTolerance) - && Objects.equals(this.protocol, quoteRequest.protocol); - } - - @Override - public int hashCode() { - return Objects.hash( - accountId, inputAmount, inputAsset, outputAsset, slippageTolerance, protocol); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class QuoteRequest {\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" inputAmount: ").append(toIndentedString(inputAmount)).append("\n"); - sb.append(" inputAsset: ").append(toIndentedString(inputAsset)).append("\n"); - sb.append(" outputAsset: ").append(toIndentedString(outputAsset)).append("\n"); - sb.append(" slippageTolerance: ") - .append(toIndentedString(slippageTolerance)) - .append("\n"); - sb.append(" protocol: ").append(toIndentedString(protocol)).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 `accountId` to the URL query string - if (getAccountId() != null) { - joiner.add( - String.format( - "%saccountId%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getAccountId())))); - } - - // add `inputAmount` to the URL query string - if (getInputAmount() != null) { - joiner.add( - String.format( - "%sinputAmount%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getInputAmount())))); - } - - // add `inputAsset` to the URL query string - if (getInputAsset() != null) { - joiner.add( - String.format( - "%sinputAsset%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getInputAsset())))); - } - - // add `outputAsset` to the URL query string - if (getOutputAsset() != null) { - joiner.add( - String.format( - "%soutputAsset%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getOutputAsset())))); - } - - // add `slippageTolerance` to the URL query string - if (getSlippageTolerance() != null) { - joiner.add( - String.format( - "%sslippageTolerance%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getSlippageTolerance())))); - } - - // add `protocol` to the URL query string - if (getProtocol() != null) { - joiner.add( - String.format( - "%sprotocol%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getProtocol())))); - } - - return joiner.toString(); - } -} diff --git a/src/main/java/com/fireblocks/sdk/model/QuotesResponse.java b/src/main/java/com/fireblocks/sdk/model/QuotesResponse.java new file mode 100644 index 00000000..a926ef3c --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/QuotesResponse.java @@ -0,0 +1,161 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.StringJoiner; + +/** QuotesResponse */ +@JsonPropertyOrder({QuotesResponse.JSON_PROPERTY_QUOTES}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class QuotesResponse { + public static final String JSON_PROPERTY_QUOTES = "quotes"; + @jakarta.annotation.Nullable private List quotes = new ArrayList<>(); + + public QuotesResponse() {} + + public QuotesResponse quotes(@jakarta.annotation.Nullable List quotes) { + this.quotes = quotes; + return this; + } + + public QuotesResponse addQuotesItem(Quote quotesItem) { + if (this.quotes == null) { + this.quotes = new ArrayList<>(); + } + this.quotes.add(quotesItem); + return this; + } + + /** + * Get quotes + * + * @return quotes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getQuotes() { + return quotes; + } + + @JsonProperty(JSON_PROPERTY_QUOTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setQuotes(@jakarta.annotation.Nullable List quotes) { + this.quotes = quotes; + } + + /** Return true if this QuotesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QuotesResponse quotesResponse = (QuotesResponse) o; + return Objects.equals(this.quotes, quotesResponse.quotes); + } + + @Override + public int hashCode() { + return Objects.hash(quotes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QuotesResponse {\n"); + sb.append(" quotes: ").append(toIndentedString(quotes)).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 `quotes` to the URL query string + if (getQuotes() != null) { + for (int i = 0; i < getQuotes().size(); i++) { + if (getQuotes().get(i) != null) { + joiner.add( + getQuotes() + .get(i) + .toUrlQueryString( + String.format( + "%squotes%s%s", + prefix, + suffix, + "".equals(suffix) + ? "" + : String.format( + "%s%d%s", + containerPrefix, + i, + containerSuffix)))); + } + } + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/RetryRequoteRequestDetails.java b/src/main/java/com/fireblocks/sdk/model/RetryRequoteRequestDetails.java new file mode 100644 index 00000000..4aa87b35 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/RetryRequoteRequestDetails.java @@ -0,0 +1,268 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.math.BigDecimal; +import java.util.Objects; +import java.util.StringJoiner; + +/** RetryRequoteRequestDetails */ +@JsonPropertyOrder({ + RetryRequoteRequestDetails.JSON_PROPERTY_TYPE, + RetryRequoteRequestDetails.JSON_PROPERTY_COUNT, + RetryRequoteRequestDetails.JSON_PROPERTY_SLIPPAGE_BPS +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class RetryRequoteRequestDetails { + /** + * Indicates that the order should be re-quoted if the original quote is expired, trying to + * match the original quote. + */ + public enum TypeEnum { + RETRY(String.valueOf("RETRY")); + + 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_COUNT = "count"; + @jakarta.annotation.Nonnull private BigDecimal count; + + public static final String JSON_PROPERTY_SLIPPAGE_BPS = "slippageBps"; + @jakarta.annotation.Nullable private BigDecimal slippageBps = new BigDecimal("1"); + + public RetryRequoteRequestDetails() {} + + @JsonCreator + public RetryRequoteRequestDetails( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_COUNT, required = true) BigDecimal count) { + this.type = type; + this.count = count; + } + + public RetryRequoteRequestDetails type(@jakarta.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Indicates that the order should be re-quoted if the original quote is expired, trying to + * match the original quote. + * + * @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 RetryRequoteRequestDetails count(@jakarta.annotation.Nonnull BigDecimal count) { + this.count = count; + return this; + } + + /** + * If quote is expired, how many times to re-generate new quotes to try having the order + * executed as in the original quote. minimum: 1 maximum: 10 + * + * @return count + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public BigDecimal getCount() { + return count; + } + + @JsonProperty(JSON_PROPERTY_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCount(@jakarta.annotation.Nonnull BigDecimal count) { + this.count = count; + } + + public RetryRequoteRequestDetails slippageBps( + @jakarta.annotation.Nullable BigDecimal slippageBps) { + this.slippageBps = slippageBps; + return this; + } + + /** + * Slippage tolerance in basis points (bps) for quote orders - 1 is 0.01% and 10000 is 100% + * minimum: 1 maximum: 10000 + * + * @return slippageBps + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLIPPAGE_BPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getSlippageBps() { + return slippageBps; + } + + @JsonProperty(JSON_PROPERTY_SLIPPAGE_BPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSlippageBps(@jakarta.annotation.Nullable BigDecimal slippageBps) { + this.slippageBps = slippageBps; + } + + /** Return true if this RetryRequoteRequestDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RetryRequoteRequestDetails retryRequoteRequestDetails = (RetryRequoteRequestDetails) o; + return Objects.equals(this.type, retryRequoteRequestDetails.type) + && Objects.equals(this.count, retryRequoteRequestDetails.count) + && Objects.equals(this.slippageBps, retryRequoteRequestDetails.slippageBps); + } + + @Override + public int hashCode() { + return Objects.hash(type, count, slippageBps); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RetryRequoteRequestDetails {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" slippageBps: ").append(toIndentedString(slippageBps)).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 `count` to the URL query string + if (getCount() != null) { + joiner.add( + String.format( + "%scount%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getCount())))); + } + + // add `slippageBps` to the URL query string + if (getSlippageBps() != null) { + joiner.add( + String.format( + "%sslippageBps%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSlippageBps())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/Settlement.java b/src/main/java/com/fireblocks/sdk/model/Settlement.java new file mode 100644 index 00000000..7f80870c --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/Settlement.java @@ -0,0 +1,402 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.fireblocks.sdk.JSON; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.StringJoiner; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +@JsonDeserialize(using = Settlement.SettlementDeserializer.class) +@JsonSerialize(using = Settlement.SettlementSerializer.class) +public class Settlement extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(Settlement.class.getName()); + + public static class SettlementSerializer extends StdSerializer { + public SettlementSerializer(Class t) { + super(t); + } + + public SettlementSerializer() { + this(null); + } + + @Override + public void serialize(Settlement value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class SettlementDeserializer extends StdDeserializer { + public SettlementDeserializer() { + this(Settlement.class); + } + + public SettlementDeserializer(Class vc) { + super(vc); + } + + @Override + public Settlement deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize DVPSettlement + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (DVPSettlement.class.equals(Integer.class) + || DVPSettlement.class.equals(Long.class) + || DVPSettlement.class.equals(Float.class) + || DVPSettlement.class.equals(Double.class) + || DVPSettlement.class.equals(Boolean.class) + || DVPSettlement.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((DVPSettlement.class.equals(Integer.class) + || DVPSettlement.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((DVPSettlement.class.equals(Float.class) + || DVPSettlement.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (DVPSettlement.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (DVPSettlement.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(DVPSettlement.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 'DVPSettlement'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'DVPSettlement'", e); + } + + // deserialize PostOrderSettlement + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PostOrderSettlement.class.equals(Integer.class) + || PostOrderSettlement.class.equals(Long.class) + || PostOrderSettlement.class.equals(Float.class) + || PostOrderSettlement.class.equals(Double.class) + || PostOrderSettlement.class.equals(Boolean.class) + || PostOrderSettlement.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((PostOrderSettlement.class.equals(Integer.class) + || PostOrderSettlement.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((PostOrderSettlement.class.equals(Float.class) + || PostOrderSettlement.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (PostOrderSettlement.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (PostOrderSettlement.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(PostOrderSettlement.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 'PostOrderSettlement'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PostOrderSettlement'", e); + } + + // deserialize PrefundedSettlement + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PrefundedSettlement.class.equals(Integer.class) + || PrefundedSettlement.class.equals(Long.class) + || PrefundedSettlement.class.equals(Float.class) + || PrefundedSettlement.class.equals(Double.class) + || PrefundedSettlement.class.equals(Boolean.class) + || PrefundedSettlement.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((PrefundedSettlement.class.equals(Integer.class) + || PrefundedSettlement.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((PrefundedSettlement.class.equals(Float.class) + || PrefundedSettlement.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (PrefundedSettlement.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (PrefundedSettlement.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(PrefundedSettlement.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 'PrefundedSettlement'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PrefundedSettlement'", e); + } + + if (match == 1) { + Settlement ret = new Settlement(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for Settlement: %d classes match result," + + " expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public Settlement getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "Settlement cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public Settlement() { + super("oneOf", Boolean.FALSE); + } + + public Settlement(DVPSettlement o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public Settlement(PostOrderSettlement o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public Settlement(PrefundedSettlement o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("DVPSettlement", DVPSettlement.class); + schemas.put("PostOrderSettlement", PostOrderSettlement.class); + schemas.put("PrefundedSettlement", PrefundedSettlement.class); + JSON.registerDescendants(Settlement.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("DVP", DVPSettlement.class); + mappings.put("POST_ORDER", PostOrderSettlement.class); + mappings.put("PREFUNDED", PrefundedSettlement.class); + mappings.put("DVPSettlement", DVPSettlement.class); + mappings.put("PostOrderSettlement", PostOrderSettlement.class); + mappings.put("PrefundedSettlement", PrefundedSettlement.class); + mappings.put("Settlement", Settlement.class); + JSON.registerDiscriminator(Settlement.class, "type", mappings); + } + + @Override + public Map> getSchemas() { + return Settlement.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: DVPSettlement, PostOrderSettlement, PrefundedSettlement + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be + * a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(DVPSettlement.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PostOrderSettlement.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PrefundedSettlement.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be DVPSettlement, PostOrderSettlement," + + " PrefundedSettlement"); + } + + /** + * Get the actual instance, which can be the following: DVPSettlement, PostOrderSettlement, + * PrefundedSettlement + * + * @return The actual instance (DVPSettlement, PostOrderSettlement, PrefundedSettlement) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `DVPSettlement`. If the actual instance is not `DVPSettlement`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `DVPSettlement` + * @throws ClassCastException if the instance is not `DVPSettlement` + */ + public DVPSettlement getDVPSettlement() throws ClassCastException { + return (DVPSettlement) super.getActualInstance(); + } + + /** + * Get the actual instance of `PostOrderSettlement`. If the actual instance is not + * `PostOrderSettlement`, the ClassCastException will be thrown. + * + * @return The actual instance of `PostOrderSettlement` + * @throws ClassCastException if the instance is not `PostOrderSettlement` + */ + public PostOrderSettlement getPostOrderSettlement() throws ClassCastException { + return (PostOrderSettlement) super.getActualInstance(); + } + + /** + * Get the actual instance of `PrefundedSettlement`. If the actual instance is not + * `PrefundedSettlement`, the ClassCastException will be thrown. + * + * @return The actual instance of `PrefundedSettlement` + * @throws ClassCastException if the instance is not `PrefundedSettlement` + */ + public PrefundedSettlement getPrefundedSettlement() throws ClassCastException { + return (PrefundedSettlement) super.getActualInstance(); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof PrefundedSettlement) { + if (getActualInstance() != null) { + joiner.add( + ((PrefundedSettlement) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof DVPSettlement) { + if (getActualInstance() != null) { + joiner.add( + ((DVPSettlement) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof PostOrderSettlement) { + if (getActualInstance() != null) { + joiner.add( + ((PostOrderSettlement) getActualInstance()) + .toUrlQueryString(prefix + "one_of_2" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SettlementSourceAccount.java b/src/main/java/com/fireblocks/sdk/model/SettlementSourceAccount.java new file mode 100644 index 00000000..b2af7539 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/SettlementSourceAccount.java @@ -0,0 +1,332 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.fireblocks.sdk.JSON; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.StringJoiner; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +@JsonDeserialize(using = SettlementSourceAccount.SettlementSourceAccountDeserializer.class) +@JsonSerialize(using = SettlementSourceAccount.SettlementSourceAccountSerializer.class) +public class SettlementSourceAccount extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(SettlementSourceAccount.class.getName()); + + public static class SettlementSourceAccountSerializer + extends StdSerializer { + public SettlementSourceAccountSerializer(Class t) { + super(t); + } + + public SettlementSourceAccountSerializer() { + this(null); + } + + @Override + public void serialize( + SettlementSourceAccount value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class SettlementSourceAccountDeserializer + extends StdDeserializer { + public SettlementSourceAccountDeserializer() { + this(SettlementSourceAccount.class); + } + + public SettlementSourceAccountDeserializer(Class vc) { + super(vc); + } + + @Override + public SettlementSourceAccount deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize ExternalAccount + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ExternalAccount.class.equals(Integer.class) + || ExternalAccount.class.equals(Long.class) + || ExternalAccount.class.equals(Float.class) + || ExternalAccount.class.equals(Double.class) + || ExternalAccount.class.equals(Boolean.class) + || ExternalAccount.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ExternalAccount.class.equals(Integer.class) + || ExternalAccount.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ExternalAccount.class.equals(Float.class) + || ExternalAccount.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (ExternalAccount.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ExternalAccount.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(ExternalAccount.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 'ExternalAccount'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ExternalAccount'", e); + } + + // deserialize PlatformAccount + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PlatformAccount.class.equals(Integer.class) + || PlatformAccount.class.equals(Long.class) + || PlatformAccount.class.equals(Float.class) + || PlatformAccount.class.equals(Double.class) + || PlatformAccount.class.equals(Boolean.class) + || PlatformAccount.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((PlatformAccount.class.equals(Integer.class) + || PlatformAccount.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((PlatformAccount.class.equals(Float.class) + || PlatformAccount.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (PlatformAccount.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (PlatformAccount.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(PlatformAccount.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 'PlatformAccount'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PlatformAccount'", e); + } + + if (match == 1) { + SettlementSourceAccount ret = new SettlementSourceAccount(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for SettlementSourceAccount: %d classes match" + + " result, expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public SettlementSourceAccount getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "SettlementSourceAccount cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public SettlementSourceAccount() { + super("oneOf", Boolean.FALSE); + } + + public SettlementSourceAccount(ExternalAccount o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public SettlementSourceAccount(PlatformAccount o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("ExternalAccount", ExternalAccount.class); + schemas.put("PlatformAccount", PlatformAccount.class); + JSON.registerDescendants( + SettlementSourceAccount.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("CONNECTED_ACCOUNT", PlatformAccount.class); + mappings.put("EXTERNAL", ExternalAccount.class); + mappings.put("FIAT_ACCOUNT", PlatformAccount.class); + mappings.put("VAULT_ACCOUNT", PlatformAccount.class); + mappings.put("ExternalAccount", ExternalAccount.class); + mappings.put("PlatformAccount", PlatformAccount.class); + mappings.put("SettlementSourceAccount", SettlementSourceAccount.class); + JSON.registerDiscriminator(SettlementSourceAccount.class, "type", mappings); + } + + @Override + public Map> getSchemas() { + return SettlementSourceAccount.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: ExternalAccount, PlatformAccount + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be + * a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(ExternalAccount.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(PlatformAccount.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be ExternalAccount, PlatformAccount"); + } + + /** + * Get the actual instance, which can be the following: ExternalAccount, PlatformAccount + * + * @return The actual instance (ExternalAccount, PlatformAccount) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `ExternalAccount`. If the actual instance is not + * `ExternalAccount`, the ClassCastException will be thrown. + * + * @return The actual instance of `ExternalAccount` + * @throws ClassCastException if the instance is not `ExternalAccount` + */ + public ExternalAccount getExternalAccount() throws ClassCastException { + return (ExternalAccount) super.getActualInstance(); + } + + /** + * Get the actual instance of `PlatformAccount`. If the actual instance is not + * `PlatformAccount`, the ClassCastException will be thrown. + * + * @return The actual instance of `PlatformAccount` + * @throws ClassCastException if the instance is not `PlatformAccount` + */ + public PlatformAccount getPlatformAccount() throws ClassCastException { + return (PlatformAccount) super.getActualInstance(); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof PlatformAccount) { + if (getActualInstance() != null) { + joiner.add( + ((PlatformAccount) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof ExternalAccount) { + if (getActualInstance() != null) { + joiner.add( + ((ExternalAccount) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/SwapOperation.java b/src/main/java/com/fireblocks/sdk/model/SwapOperation.java deleted file mode 100644 index b56dd66a..00000000 --- a/src/main/java/com/fireblocks/sdk/model/SwapOperation.java +++ /dev/null @@ -1,951 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.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.math.BigDecimal; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import java.util.StringJoiner; -import java.util.UUID; - -/** SwapOperation */ -@JsonPropertyOrder({ - SwapOperation.JSON_PROPERTY_ID, - SwapOperation.JSON_PROPERTY_ACCOUNT_ID, - SwapOperation.JSON_PROPERTY_PROVIDER_ID, - SwapOperation.JSON_PROPERTY_CATEGORY, - SwapOperation.JSON_PROPERTY_PROTOCOL, - SwapOperation.JSON_PROPERTY_STATUS, - SwapOperation.JSON_PROPERTY_INPUT_AMOUNT, - SwapOperation.JSON_PROPERTY_INPUT_ASSET, - SwapOperation.JSON_PROPERTY_SLIPPAGE_TOLERANCE, - SwapOperation.JSON_PROPERTY_OUTPUT_MIN_AMOUNT, - SwapOperation.JSON_PROPERTY_OUTPUT_MAX_AMOUNT, - SwapOperation.JSON_PROPERTY_OUTPUT_ASSET, - SwapOperation.JSON_PROPERTY_OUTPUT_FINAL_AMOUNT, - SwapOperation.JSON_PROPERTY_REQUIRED_ACTIONS, - SwapOperation.JSON_PROPERTY_ERROR, - SwapOperation.JSON_PROPERTY_CREATED_AT, - SwapOperation.JSON_PROPERTY_UPDATED_AT, - SwapOperation.JSON_PROPERTY_CREATED_BY -}) -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.14.0") -public class SwapOperation { - public static final String JSON_PROPERTY_ID = "id"; - @jakarta.annotation.Nonnull private String id; - - public static final String JSON_PROPERTY_ACCOUNT_ID = "accountId"; - @jakarta.annotation.Nonnull private String accountId; - - public static final String JSON_PROPERTY_PROVIDER_ID = "providerId"; - @jakarta.annotation.Nonnull private UUID providerId; - - public static final String JSON_PROPERTY_CATEGORY = "category"; - @jakarta.annotation.Nonnull private ProviderCategoryEnum category; - - public static final String JSON_PROPERTY_PROTOCOL = "protocol"; - @jakarta.annotation.Nonnull private SwapProviderProtocolsEnum protocol; - - /** - * **CREATED** – The swap request has been created but not yet started. **PENDING_USER_ACTION** - * – Awaiting a user action (e.g. signature or approval). **PENDING_PROVIDER_ACTION** – Awaiting - * the provider to process the request. **PROCESSING** – The swap is actively being executed - * on‐chain. **COMPLETED** – The swap has finished successfully. **CANCELED** – The swap was - * cancelled by user or provider before completion. **FAILED** – The swap attempted but - * encountered an error. - */ - public enum StatusEnum { - CREATED(String.valueOf("CREATED")), - - TRANSACTION_IN_PROGRESS(String.valueOf("TRANSACTION_IN_PROGRESS")), - - PENDING_PROVIDER_ACTION(String.valueOf("PENDING_PROVIDER_ACTION")), - - COMPLETED(String.valueOf("COMPLETED")), - - CANCELED(String.valueOf("CANCELED")), - - FAILED(String.valueOf("FAILED")); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_STATUS = "status"; - @jakarta.annotation.Nonnull private StatusEnum status; - - public static final String JSON_PROPERTY_INPUT_AMOUNT = "inputAmount"; - @jakarta.annotation.Nonnull private String inputAmount; - - public static final String JSON_PROPERTY_INPUT_ASSET = "inputAsset"; - @jakarta.annotation.Nonnull private String inputAsset; - - public static final String JSON_PROPERTY_SLIPPAGE_TOLERANCE = "slippageTolerance"; - @jakarta.annotation.Nonnull private BigDecimal slippageTolerance; - - public static final String JSON_PROPERTY_OUTPUT_MIN_AMOUNT = "outputMinAmount"; - @jakarta.annotation.Nonnull private String outputMinAmount; - - public static final String JSON_PROPERTY_OUTPUT_MAX_AMOUNT = "outputMaxAmount"; - @jakarta.annotation.Nonnull private String outputMaxAmount; - - public static final String JSON_PROPERTY_OUTPUT_ASSET = "outputAsset"; - @jakarta.annotation.Nonnull private String outputAsset; - - public static final String JSON_PROPERTY_OUTPUT_FINAL_AMOUNT = "outputFinalAmount"; - @jakarta.annotation.Nullable private String outputFinalAmount; - - public static final String JSON_PROPERTY_REQUIRED_ACTIONS = "requiredActions"; - - @jakarta.annotation.Nonnull - private List requiredActions = new ArrayList<>(); - - public static final String JSON_PROPERTY_ERROR = "error"; - @jakarta.annotation.Nullable private SwapFlowError error; - - public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; - @jakarta.annotation.Nonnull private OffsetDateTime createdAt; - - public static final String JSON_PROPERTY_UPDATED_AT = "updatedAt"; - @jakarta.annotation.Nonnull private OffsetDateTime updatedAt; - - public static final String JSON_PROPERTY_CREATED_BY = "createdBy"; - @jakarta.annotation.Nonnull private UUID createdBy; - - public SwapOperation() {} - - @JsonCreator - public SwapOperation( - @JsonProperty(value = JSON_PROPERTY_ID, required = true) String id, - @JsonProperty(value = JSON_PROPERTY_ACCOUNT_ID, required = true) String accountId, - @JsonProperty(value = JSON_PROPERTY_PROVIDER_ID, required = true) UUID providerId, - @JsonProperty(value = JSON_PROPERTY_CATEGORY, required = true) - ProviderCategoryEnum category, - @JsonProperty(value = JSON_PROPERTY_PROTOCOL, required = true) - SwapProviderProtocolsEnum protocol, - @JsonProperty(value = JSON_PROPERTY_STATUS, required = true) StatusEnum status, - @JsonProperty(value = JSON_PROPERTY_INPUT_AMOUNT, required = true) String inputAmount, - @JsonProperty(value = JSON_PROPERTY_INPUT_ASSET, required = true) String inputAsset, - @JsonProperty(value = JSON_PROPERTY_SLIPPAGE_TOLERANCE, required = true) - BigDecimal slippageTolerance, - @JsonProperty(value = JSON_PROPERTY_OUTPUT_MIN_AMOUNT, required = true) - String outputMinAmount, - @JsonProperty(value = JSON_PROPERTY_OUTPUT_MAX_AMOUNT, required = true) - String outputMaxAmount, - @JsonProperty(value = JSON_PROPERTY_OUTPUT_ASSET, required = true) String outputAsset, - @JsonProperty(value = JSON_PROPERTY_REQUIRED_ACTIONS, required = true) - List requiredActions, - @JsonProperty(value = JSON_PROPERTY_CREATED_AT, required = true) - OffsetDateTime createdAt, - @JsonProperty(value = JSON_PROPERTY_UPDATED_AT, required = true) - OffsetDateTime updatedAt, - @JsonProperty(value = JSON_PROPERTY_CREATED_BY, required = true) UUID createdBy) { - this.id = id; - this.accountId = accountId; - this.providerId = providerId; - this.category = category; - this.protocol = protocol; - this.status = status; - this.inputAmount = inputAmount; - this.inputAsset = inputAsset; - this.slippageTolerance = slippageTolerance; - this.outputMinAmount = outputMinAmount; - this.outputMaxAmount = outputMaxAmount; - this.outputAsset = outputAsset; - this.requiredActions = requiredActions; - this.createdAt = createdAt; - this.updatedAt = updatedAt; - this.createdBy = createdBy; - } - - public SwapOperation id(@jakarta.annotation.Nonnull String id) { - this.id = id; - return this; - } - - /** - * The id of the swap operation - * - * @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 SwapOperation accountId(@jakarta.annotation.Nonnull String accountId) { - this.accountId = accountId; - return this; - } - - /** - * The id of the vault account or account id - * - * @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; - } - - public SwapOperation providerId(@jakarta.annotation.Nonnull UUID providerId) { - this.providerId = providerId; - return this; - } - - /** - * The uuid that identifies the provider - * - * @return providerId - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_PROVIDER_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getProviderId() { - return providerId; - } - - @JsonProperty(JSON_PROPERTY_PROVIDER_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setProviderId(@jakarta.annotation.Nonnull UUID providerId) { - this.providerId = providerId; - } - - public SwapOperation category(@jakarta.annotation.Nonnull ProviderCategoryEnum category) { - this.category = category; - return this; - } - - /** - * Get category - * - * @return category - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CATEGORY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ProviderCategoryEnum getCategory() { - return category; - } - - @JsonProperty(JSON_PROPERTY_CATEGORY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCategory(@jakarta.annotation.Nonnull ProviderCategoryEnum category) { - this.category = category; - } - - public SwapOperation protocol(@jakarta.annotation.Nonnull SwapProviderProtocolsEnum protocol) { - this.protocol = protocol; - return this; - } - - /** - * Get protocol - * - * @return protocol - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_PROTOCOL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SwapProviderProtocolsEnum getProtocol() { - return protocol; - } - - @JsonProperty(JSON_PROPERTY_PROTOCOL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setProtocol(@jakarta.annotation.Nonnull SwapProviderProtocolsEnum protocol) { - this.protocol = protocol; - } - - public SwapOperation status(@jakarta.annotation.Nonnull StatusEnum status) { - this.status = status; - return this; - } - - /** - * **CREATED** – The swap request has been created but not yet started. **PENDING_USER_ACTION** - * – Awaiting a user action (e.g. signature or approval). **PENDING_PROVIDER_ACTION** – Awaiting - * the provider to process the request. **PROCESSING** – The swap is actively being executed - * on‐chain. **COMPLETED** – The swap has finished successfully. **CANCELED** – The swap was - * cancelled by user or provider before completion. **FAILED** – The swap attempted but - * encountered an error. - * - * @return status - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public StatusEnum getStatus() { - return status; - } - - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setStatus(@jakarta.annotation.Nonnull StatusEnum status) { - this.status = status; - } - - public SwapOperation inputAmount(@jakarta.annotation.Nonnull String inputAmount) { - this.inputAmount = inputAmount; - return this; - } - - /** - * The amount of tokens the swapper will provide - * - * @return inputAmount - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_INPUT_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getInputAmount() { - return inputAmount; - } - - @JsonProperty(JSON_PROPERTY_INPUT_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setInputAmount(@jakarta.annotation.Nonnull String inputAmount) { - this.inputAmount = inputAmount; - } - - public SwapOperation inputAsset(@jakarta.annotation.Nonnull String inputAsset) { - this.inputAsset = inputAsset; - return this; - } - - /** - * The id of the asset the swapper will provide - * - * @return inputAsset - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_INPUT_ASSET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getInputAsset() { - return inputAsset; - } - - @JsonProperty(JSON_PROPERTY_INPUT_ASSET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setInputAsset(@jakarta.annotation.Nonnull String inputAsset) { - this.inputAsset = inputAsset; - } - - public SwapOperation slippageTolerance( - @jakarta.annotation.Nonnull BigDecimal slippageTolerance) { - this.slippageTolerance = slippageTolerance; - return this; - } - - /** - * The slippage tolerance is a percentage. The slippage tolerance is the maximum amount the - * price can change between the time the transaction is submitted and the time it is executed - * - * @return slippageTolerance - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SLIPPAGE_TOLERANCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BigDecimal getSlippageTolerance() { - return slippageTolerance; - } - - @JsonProperty(JSON_PROPERTY_SLIPPAGE_TOLERANCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSlippageTolerance(@jakarta.annotation.Nonnull BigDecimal slippageTolerance) { - this.slippageTolerance = slippageTolerance; - } - - public SwapOperation outputMinAmount(@jakarta.annotation.Nonnull String outputMinAmount) { - this.outputMinAmount = outputMinAmount; - return this; - } - - /** - * The minimum amount of tokens the swapper will receive - * - * @return outputMinAmount - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_OUTPUT_MIN_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getOutputMinAmount() { - return outputMinAmount; - } - - @JsonProperty(JSON_PROPERTY_OUTPUT_MIN_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOutputMinAmount(@jakarta.annotation.Nonnull String outputMinAmount) { - this.outputMinAmount = outputMinAmount; - } - - public SwapOperation outputMaxAmount(@jakarta.annotation.Nonnull String outputMaxAmount) { - this.outputMaxAmount = outputMaxAmount; - return this; - } - - /** - * Maximum amount of tokens that the swapper will receive - * - * @return outputMaxAmount - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_OUTPUT_MAX_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getOutputMaxAmount() { - return outputMaxAmount; - } - - @JsonProperty(JSON_PROPERTY_OUTPUT_MAX_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOutputMaxAmount(@jakarta.annotation.Nonnull String outputMaxAmount) { - this.outputMaxAmount = outputMaxAmount; - } - - public SwapOperation outputAsset(@jakarta.annotation.Nonnull String outputAsset) { - this.outputAsset = outputAsset; - return this; - } - - /** - * The id of the asset the swapper will receive - * - * @return outputAsset - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_OUTPUT_ASSET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getOutputAsset() { - return outputAsset; - } - - @JsonProperty(JSON_PROPERTY_OUTPUT_ASSET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOutputAsset(@jakarta.annotation.Nonnull String outputAsset) { - this.outputAsset = outputAsset; - } - - public SwapOperation outputFinalAmount(@jakarta.annotation.Nullable String outputFinalAmount) { - this.outputFinalAmount = outputFinalAmount; - return this; - } - - /** - * Final amount of tokens that the swapper will receive - * - * @return outputFinalAmount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OUTPUT_FINAL_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getOutputFinalAmount() { - return outputFinalAmount; - } - - @JsonProperty(JSON_PROPERTY_OUTPUT_FINAL_AMOUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOutputFinalAmount(@jakarta.annotation.Nullable String outputFinalAmount) { - this.outputFinalAmount = outputFinalAmount; - } - - public SwapOperation requiredActions( - @jakarta.annotation.Nonnull List requiredActions) { - this.requiredActions = requiredActions; - return this; - } - - public SwapOperation addRequiredActionsItem(SwapRequiredAction requiredActionsItem) { - if (this.requiredActions == null) { - this.requiredActions = new ArrayList<>(); - } - this.requiredActions.add(requiredActionsItem); - return this; - } - - /** - * The required actions for the swap, including the type of action, the status of the action, - * and the transaction id - * - * @return requiredActions - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_REQUIRED_ACTIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getRequiredActions() { - return requiredActions; - } - - @JsonProperty(JSON_PROPERTY_REQUIRED_ACTIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequiredActions( - @jakarta.annotation.Nonnull List requiredActions) { - this.requiredActions = requiredActions; - } - - public SwapOperation error(@jakarta.annotation.Nullable SwapFlowError error) { - this.error = error; - return this; - } - - /** - * Get error - * - * @return error - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERROR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public SwapFlowError getError() { - return error; - } - - @JsonProperty(JSON_PROPERTY_ERROR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setError(@jakarta.annotation.Nullable SwapFlowError error) { - this.error = error; - } - - public SwapOperation createdAt(@jakarta.annotation.Nonnull OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - /** - * The creation time of the swap operation (ISO Date time). - * - * @return createdAt - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCreatedAt(@jakarta.annotation.Nonnull OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - public SwapOperation updatedAt(@jakarta.annotation.Nonnull OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - /** - * The last update time of the swap operation (ISO Date time). - * - * @return updatedAt - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_UPDATED_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - @JsonProperty(JSON_PROPERTY_UPDATED_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setUpdatedAt(@jakarta.annotation.Nonnull OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - public SwapOperation createdBy(@jakarta.annotation.Nonnull UUID createdBy) { - this.createdBy = createdBy; - return this; - } - - /** - * Fireblocks user id that issued the swap - * - * @return createdBy - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CREATED_BY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getCreatedBy() { - return createdBy; - } - - @JsonProperty(JSON_PROPERTY_CREATED_BY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCreatedBy(@jakarta.annotation.Nonnull UUID createdBy) { - this.createdBy = createdBy; - } - - /** Return true if this SwapOperation object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SwapOperation swapOperation = (SwapOperation) o; - return Objects.equals(this.id, swapOperation.id) - && Objects.equals(this.accountId, swapOperation.accountId) - && Objects.equals(this.providerId, swapOperation.providerId) - && Objects.equals(this.category, swapOperation.category) - && Objects.equals(this.protocol, swapOperation.protocol) - && Objects.equals(this.status, swapOperation.status) - && Objects.equals(this.inputAmount, swapOperation.inputAmount) - && Objects.equals(this.inputAsset, swapOperation.inputAsset) - && Objects.equals(this.slippageTolerance, swapOperation.slippageTolerance) - && Objects.equals(this.outputMinAmount, swapOperation.outputMinAmount) - && Objects.equals(this.outputMaxAmount, swapOperation.outputMaxAmount) - && Objects.equals(this.outputAsset, swapOperation.outputAsset) - && Objects.equals(this.outputFinalAmount, swapOperation.outputFinalAmount) - && Objects.equals(this.requiredActions, swapOperation.requiredActions) - && Objects.equals(this.error, swapOperation.error) - && Objects.equals(this.createdAt, swapOperation.createdAt) - && Objects.equals(this.updatedAt, swapOperation.updatedAt) - && Objects.equals(this.createdBy, swapOperation.createdBy); - } - - @Override - public int hashCode() { - return Objects.hash( - id, - accountId, - providerId, - category, - protocol, - status, - inputAmount, - inputAsset, - slippageTolerance, - outputMinAmount, - outputMaxAmount, - outputAsset, - outputFinalAmount, - requiredActions, - error, - createdAt, - updatedAt, - createdBy); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SwapOperation {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); - sb.append(" providerId: ").append(toIndentedString(providerId)).append("\n"); - sb.append(" category: ").append(toIndentedString(category)).append("\n"); - sb.append(" protocol: ").append(toIndentedString(protocol)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" inputAmount: ").append(toIndentedString(inputAmount)).append("\n"); - sb.append(" inputAsset: ").append(toIndentedString(inputAsset)).append("\n"); - sb.append(" slippageTolerance: ") - .append(toIndentedString(slippageTolerance)) - .append("\n"); - sb.append(" outputMinAmount: ").append(toIndentedString(outputMinAmount)).append("\n"); - sb.append(" outputMaxAmount: ").append(toIndentedString(outputMaxAmount)).append("\n"); - sb.append(" outputAsset: ").append(toIndentedString(outputAsset)).append("\n"); - sb.append(" outputFinalAmount: ") - .append(toIndentedString(outputFinalAmount)) - .append("\n"); - sb.append(" requiredActions: ").append(toIndentedString(requiredActions)).append("\n"); - sb.append(" error: ").append(toIndentedString(error)).append("\n"); - sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); - sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" createdBy: ").append(toIndentedString(createdBy)).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 `accountId` to the URL query string - if (getAccountId() != null) { - joiner.add( - String.format( - "%saccountId%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getAccountId())))); - } - - // add `providerId` to the URL query string - if (getProviderId() != null) { - joiner.add( - String.format( - "%sproviderId%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getProviderId())))); - } - - // add `category` to the URL query string - if (getCategory() != null) { - joiner.add( - String.format( - "%scategory%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getCategory())))); - } - - // add `protocol` to the URL query string - if (getProtocol() != null) { - joiner.add( - String.format( - "%sprotocol%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getProtocol())))); - } - - // add `status` to the URL query string - if (getStatus() != null) { - joiner.add( - String.format( - "%sstatus%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getStatus())))); - } - - // add `inputAmount` to the URL query string - if (getInputAmount() != null) { - joiner.add( - String.format( - "%sinputAmount%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getInputAmount())))); - } - - // add `inputAsset` to the URL query string - if (getInputAsset() != null) { - joiner.add( - String.format( - "%sinputAsset%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getInputAsset())))); - } - - // add `slippageTolerance` to the URL query string - if (getSlippageTolerance() != null) { - joiner.add( - String.format( - "%sslippageTolerance%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getSlippageTolerance())))); - } - - // add `outputMinAmount` to the URL query string - if (getOutputMinAmount() != null) { - joiner.add( - String.format( - "%soutputMinAmount%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getOutputMinAmount())))); - } - - // add `outputMaxAmount` to the URL query string - if (getOutputMaxAmount() != null) { - joiner.add( - String.format( - "%soutputMaxAmount%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getOutputMaxAmount())))); - } - - // add `outputAsset` to the URL query string - if (getOutputAsset() != null) { - joiner.add( - String.format( - "%soutputAsset%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getOutputAsset())))); - } - - // add `outputFinalAmount` to the URL query string - if (getOutputFinalAmount() != null) { - joiner.add( - String.format( - "%soutputFinalAmount%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getOutputFinalAmount())))); - } - - // add `requiredActions` to the URL query string - if (getRequiredActions() != null) { - for (int i = 0; i < getRequiredActions().size(); i++) { - if (getRequiredActions().get(i) != null) { - joiner.add( - getRequiredActions() - .get(i) - .toUrlQueryString( - String.format( - "%srequiredActions%s%s", - prefix, - suffix, - "".equals(suffix) - ? "" - : String.format( - "%s%d%s", - containerPrefix, - i, - containerSuffix)))); - } - } - } - - // add `error` to the URL query string - if (getError() != null) { - joiner.add(getError().toUrlQueryString(prefix + "error" + suffix)); - } - - // add `createdAt` to the URL query string - if (getCreatedAt() != null) { - joiner.add( - String.format( - "%screatedAt%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); - } - - // add `updatedAt` to the URL query string - if (getUpdatedAt() != null) { - joiner.add( - String.format( - "%supdatedAt%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getUpdatedAt())))); - } - - // add `createdBy` to the URL query string - if (getCreatedBy() != null) { - joiner.add( - String.format( - "%screatedBy%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getCreatedBy())))); - } - - return joiner.toString(); - } -} diff --git a/src/main/java/com/fireblocks/sdk/model/SwapProvider.java b/src/main/java/com/fireblocks/sdk/model/SwapProvider.java deleted file mode 100644 index e1144ae9..00000000 --- a/src/main/java/com/fireblocks/sdk/model/SwapProvider.java +++ /dev/null @@ -1,440 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.model; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fireblocks.sdk.ApiClient; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import java.util.StringJoiner; -import java.util.UUID; - -/** SwapProvider */ -@JsonPropertyOrder({ - SwapProvider.JSON_PROPERTY_ID, - SwapProvider.JSON_PROPERTY_NAME, - SwapProvider.JSON_PROPERTY_PROTOCOLS, - SwapProvider.JSON_PROPERTY_CATEGORY, - SwapProvider.JSON_PROPERTY_IS_TERMS_APPROVAL_REQUIRED, - SwapProvider.JSON_PROPERTY_TERMS_OF_SERVICE_URL, - SwapProvider.JSON_PROPERTY_IS_TERMS_OF_SERVICE_APPROVED -}) -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.14.0") -public class SwapProvider { - public static final String JSON_PROPERTY_ID = "id"; - @jakarta.annotation.Nonnull private UUID id; - - public static final String JSON_PROPERTY_NAME = "name"; - @jakarta.annotation.Nonnull private String name; - - public static final String JSON_PROPERTY_PROTOCOLS = "protocols"; - - @jakarta.annotation.Nonnull - private List protocols = new ArrayList<>(); - - public static final String JSON_PROPERTY_CATEGORY = "category"; - @jakarta.annotation.Nonnull private ProviderCategoryEnum category; - - public static final String JSON_PROPERTY_IS_TERMS_APPROVAL_REQUIRED = "isTermsApprovalRequired"; - @jakarta.annotation.Nonnull private Boolean isTermsApprovalRequired; - - public static final String JSON_PROPERTY_TERMS_OF_SERVICE_URL = "termsOfServiceUrl"; - @jakarta.annotation.Nullable private String termsOfServiceUrl; - - public static final String JSON_PROPERTY_IS_TERMS_OF_SERVICE_APPROVED = - "isTermsOfServiceApproved"; - @jakarta.annotation.Nullable private Boolean isTermsOfServiceApproved; - - public SwapProvider() {} - - @JsonCreator - public SwapProvider( - @JsonProperty(value = JSON_PROPERTY_ID, required = true) UUID id, - @JsonProperty(value = JSON_PROPERTY_NAME, required = true) String name, - @JsonProperty(value = JSON_PROPERTY_PROTOCOLS, required = true) - List protocols, - @JsonProperty(value = JSON_PROPERTY_CATEGORY, required = true) - ProviderCategoryEnum category, - @JsonProperty(value = JSON_PROPERTY_IS_TERMS_APPROVAL_REQUIRED, required = true) - Boolean isTermsApprovalRequired) { - this.id = id; - this.name = name; - this.protocols = protocols; - this.category = category; - this.isTermsApprovalRequired = isTermsApprovalRequired; - } - - public SwapProvider id(@jakarta.annotation.Nonnull UUID id) { - this.id = id; - return this; - } - - /** - * The uuid that identifies the provider - * - * @return id - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getId() { - return id; - } - - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setId(@jakarta.annotation.Nonnull UUID id) { - this.id = id; - } - - public SwapProvider name(@jakarta.annotation.Nonnull String name) { - this.name = name; - return this; - } - - /** - * Name of the provider - * - * @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; - } - - public SwapProvider protocols( - @jakarta.annotation.Nonnull List protocols) { - this.protocols = protocols; - return this; - } - - public SwapProvider addProtocolsItem(SwapProviderProtocolsEnum protocolsItem) { - if (this.protocols == null) { - this.protocols = new ArrayList<>(); - } - this.protocols.add(protocolsItem); - return this; - } - - /** - * List of supported protocols. Protocols are specific per provider - * - * @return protocols - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_PROTOCOLS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getProtocols() { - return protocols; - } - - @JsonProperty(JSON_PROPERTY_PROTOCOLS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setProtocols( - @jakarta.annotation.Nonnull List protocols) { - this.protocols = protocols; - } - - public SwapProvider category(@jakarta.annotation.Nonnull ProviderCategoryEnum category) { - this.category = category; - return this; - } - - /** - * Get category - * - * @return category - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CATEGORY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ProviderCategoryEnum getCategory() { - return category; - } - - @JsonProperty(JSON_PROPERTY_CATEGORY) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setCategory(@jakarta.annotation.Nonnull ProviderCategoryEnum category) { - this.category = category; - } - - public SwapProvider isTermsApprovalRequired( - @jakarta.annotation.Nonnull Boolean isTermsApprovalRequired) { - this.isTermsApprovalRequired = isTermsApprovalRequired; - return this; - } - - /** - * Indicates whether the terms of service are required for the provider. if `true`, - * the user must approve the terms of service before using the provider. otherwise, - * `termsOfServiceUrl` and `isTermsOfServiceApproved` are not shown under - * the provider data. - * - * @return isTermsApprovalRequired - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_IS_TERMS_APPROVAL_REQUIRED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Boolean getIsTermsApprovalRequired() { - return isTermsApprovalRequired; - } - - @JsonProperty(JSON_PROPERTY_IS_TERMS_APPROVAL_REQUIRED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setIsTermsApprovalRequired( - @jakarta.annotation.Nonnull Boolean isTermsApprovalRequired) { - this.isTermsApprovalRequired = isTermsApprovalRequired; - } - - public SwapProvider termsOfServiceUrl(@jakarta.annotation.Nullable String termsOfServiceUrl) { - this.termsOfServiceUrl = termsOfServiceUrl; - return this; - } - - /** - * URL to the terms of service - * - * @return termsOfServiceUrl - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TERMS_OF_SERVICE_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getTermsOfServiceUrl() { - return termsOfServiceUrl; - } - - @JsonProperty(JSON_PROPERTY_TERMS_OF_SERVICE_URL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setTermsOfServiceUrl(@jakarta.annotation.Nullable String termsOfServiceUrl) { - this.termsOfServiceUrl = termsOfServiceUrl; - } - - public SwapProvider isTermsOfServiceApproved( - @jakarta.annotation.Nullable Boolean isTermsOfServiceApproved) { - this.isTermsOfServiceApproved = isTermsOfServiceApproved; - return this; - } - - /** - * Indicates whether the terms of service are approved by the user - * - * @return isTermsOfServiceApproved - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_TERMS_OF_SERVICE_APPROVED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsTermsOfServiceApproved() { - return isTermsOfServiceApproved; - } - - @JsonProperty(JSON_PROPERTY_IS_TERMS_OF_SERVICE_APPROVED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIsTermsOfServiceApproved( - @jakarta.annotation.Nullable Boolean isTermsOfServiceApproved) { - this.isTermsOfServiceApproved = isTermsOfServiceApproved; - } - - /** Return true if this SwapProvider object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SwapProvider swapProvider = (SwapProvider) o; - return Objects.equals(this.id, swapProvider.id) - && Objects.equals(this.name, swapProvider.name) - && Objects.equals(this.protocols, swapProvider.protocols) - && Objects.equals(this.category, swapProvider.category) - && Objects.equals( - this.isTermsApprovalRequired, swapProvider.isTermsApprovalRequired) - && Objects.equals(this.termsOfServiceUrl, swapProvider.termsOfServiceUrl) - && Objects.equals( - this.isTermsOfServiceApproved, swapProvider.isTermsOfServiceApproved); - } - - @Override - public int hashCode() { - return Objects.hash( - id, - name, - protocols, - category, - isTermsApprovalRequired, - termsOfServiceUrl, - isTermsOfServiceApproved); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SwapProvider {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" protocols: ").append(toIndentedString(protocols)).append("\n"); - sb.append(" category: ").append(toIndentedString(category)).append("\n"); - sb.append(" isTermsApprovalRequired: ") - .append(toIndentedString(isTermsApprovalRequired)) - .append("\n"); - sb.append(" termsOfServiceUrl: ") - .append(toIndentedString(termsOfServiceUrl)) - .append("\n"); - sb.append(" isTermsOfServiceApproved: ") - .append(toIndentedString(isTermsOfServiceApproved)) - .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())))); - } - - // add `protocols` to the URL query string - if (getProtocols() != null) { - for (int i = 0; i < getProtocols().size(); i++) { - if (getProtocols().get(i) != null) { - joiner.add( - String.format( - "%sprotocols%s%s=%s", - prefix, - suffix, - "".equals(suffix) - ? "" - : String.format( - "%s%d%s", containerPrefix, i, containerSuffix), - ApiClient.urlEncode( - ApiClient.valueToString(getProtocols().get(i))))); - } - } - } - - // add `category` to the URL query string - if (getCategory() != null) { - joiner.add( - String.format( - "%scategory%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getCategory())))); - } - - // add `isTermsApprovalRequired` to the URL query string - if (getIsTermsApprovalRequired() != null) { - joiner.add( - String.format( - "%sisTermsApprovalRequired%s=%s", - prefix, - suffix, - ApiClient.urlEncode( - ApiClient.valueToString(getIsTermsApprovalRequired())))); - } - - // add `termsOfServiceUrl` to the URL query string - if (getTermsOfServiceUrl() != null) { - joiner.add( - String.format( - "%stermsOfServiceUrl%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getTermsOfServiceUrl())))); - } - - // add `isTermsOfServiceApproved` to the URL query string - if (getIsTermsOfServiceApproved() != null) { - joiner.add( - String.format( - "%sisTermsOfServiceApproved%s=%s", - prefix, - suffix, - ApiClient.urlEncode( - ApiClient.valueToString(getIsTermsOfServiceApproved())))); - } - - return joiner.toString(); - } -} diff --git a/src/main/java/com/fireblocks/sdk/model/TimeInForce.java b/src/main/java/com/fireblocks/sdk/model/TimeInForce.java new file mode 100644 index 00000000..66dffef1 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TimeInForce.java @@ -0,0 +1,62 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Time in force for limit orders */ +public enum TimeInForce { + FOK("FOK"); + + private String value; + + TimeInForce(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TimeInForce fromValue(String value) { + for (TimeInForce b : TimeInForce.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/TradingErrorResponse.java b/src/main/java/com/fireblocks/sdk/model/TradingErrorResponse.java new file mode 100644 index 00000000..4a93a22a --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TradingErrorResponse.java @@ -0,0 +1,141 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; +import java.util.StringJoiner; + +/** TradingErrorResponse */ +@JsonPropertyOrder({TradingErrorResponse.JSON_PROPERTY_ERROR}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class TradingErrorResponse { + public static final String JSON_PROPERTY_ERROR = "error"; + @jakarta.annotation.Nonnull private TradingErrorResponseError error; + + public TradingErrorResponse() {} + + @JsonCreator + public TradingErrorResponse( + @JsonProperty(value = JSON_PROPERTY_ERROR, required = true) + TradingErrorResponseError error) { + this.error = error; + } + + public TradingErrorResponse error(@jakarta.annotation.Nonnull TradingErrorResponseError error) { + this.error = error; + return this; + } + + /** + * Get error + * + * @return error + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TradingErrorResponseError getError() { + return error; + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setError(@jakarta.annotation.Nonnull TradingErrorResponseError error) { + this.error = error; + } + + /** Return true if this TradingErrorResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TradingErrorResponse tradingErrorResponse = (TradingErrorResponse) o; + return Objects.equals(this.error, tradingErrorResponse.error); + } + + @Override + public int hashCode() { + return Objects.hash(error); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TradingErrorResponse {\n"); + sb.append(" error: ").append(toIndentedString(error)).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 `error` to the URL query string + if (getError() != null) { + joiner.add(getError().toUrlQueryString(prefix + "error" + suffix)); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/TradingErrorResponseError.java b/src/main/java/com/fireblocks/sdk/model/TradingErrorResponseError.java new file mode 100644 index 00000000..1dbe5072 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TradingErrorResponseError.java @@ -0,0 +1,272 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** TradingErrorResponseError */ +@JsonPropertyOrder({ + TradingErrorResponseError.JSON_PROPERTY_TYPE, + TradingErrorResponseError.JSON_PROPERTY_MESSAGE, + TradingErrorResponseError.JSON_PROPERTY_ERROR_CODE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class TradingErrorResponseError { + /** Gets or Sets type */ + public enum TypeEnum { + INTERNAL(String.valueOf("INTERNAL")), + + AUTHENTICATION(String.valueOf("AUTHENTICATION")), + + AUTHORIZATION(String.valueOf("AUTHORIZATION")), + + VALIDATION(String.valueOf("VALIDATION")), + + NOT_FOUND(String.valueOf("NOT_FOUND")), + + UNPROCESSABLE_ENTITY(String.valueOf("UNPROCESSABLE_ENTITY")), + + FORBIDDEN(String.valueOf("FORBIDDEN")); + + 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_MESSAGE = "message"; + @jakarta.annotation.Nonnull private String message; + + public static final String JSON_PROPERTY_ERROR_CODE = "errorCode"; + @jakarta.annotation.Nullable private ErrorCodes errorCode; + + public TradingErrorResponseError() {} + + @JsonCreator + public TradingErrorResponseError( + @JsonProperty(value = JSON_PROPERTY_TYPE, required = true) TypeEnum type, + @JsonProperty(value = JSON_PROPERTY_MESSAGE, required = true) String message) { + this.type = type; + this.message = message; + } + + public TradingErrorResponseError 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 TradingErrorResponseError message(@jakarta.annotation.Nonnull String message) { + this.message = message; + return this; + } + + /** + * Get message + * + * @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; + } + + public TradingErrorResponseError errorCode(@jakarta.annotation.Nullable ErrorCodes errorCode) { + this.errorCode = errorCode; + return this; + } + + /** + * Get errorCode + * + * @return errorCode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ErrorCodes getErrorCode() { + return errorCode; + } + + @JsonProperty(JSON_PROPERTY_ERROR_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setErrorCode(@jakarta.annotation.Nullable ErrorCodes errorCode) { + this.errorCode = errorCode; + } + + /** Return true if this TradingErrorResponse_error object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TradingErrorResponseError tradingErrorResponseError = (TradingErrorResponseError) o; + return Objects.equals(this.type, tradingErrorResponseError.type) + && Objects.equals(this.message, tradingErrorResponseError.message) + && Objects.equals(this.errorCode, tradingErrorResponseError.errorCode); + } + + @Override + public int hashCode() { + return Objects.hash(type, message, errorCode); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TradingErrorResponseError {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" errorCode: ").append(toIndentedString(errorCode)).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 `message` to the URL query string + if (getMessage() != null) { + joiner.add( + String.format( + "%smessage%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getMessage())))); + } + + // add `errorCode` to the URL query string + if (getErrorCode() != null) { + joiner.add( + String.format( + "%serrorCode%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getErrorCode())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/QuoteResponse.java b/src/main/java/com/fireblocks/sdk/model/TradingProvider.java similarity index 57% rename from src/main/java/com/fireblocks/sdk/model/QuoteResponse.java rename to src/main/java/com/fireblocks/sdk/model/TradingProvider.java index 7a8343e7..b6b1ea64 100644 --- a/src/main/java/com/fireblocks/sdk/model/QuoteResponse.java +++ b/src/main/java/com/fireblocks/sdk/model/TradingProvider.java @@ -39,209 +39,214 @@ @jakarta.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") -@JsonDeserialize(using = QuoteResponse.QuoteResponseDeserializer.class) -@JsonSerialize(using = QuoteResponse.QuoteResponseSerializer.class) -public class QuoteResponse extends AbstractOpenApiSchema { - private static final Logger log = Logger.getLogger(QuoteResponse.class.getName()); +@JsonDeserialize(using = TradingProvider.TradingProviderDeserializer.class) +@JsonSerialize(using = TradingProvider.TradingProviderSerializer.class) +public class TradingProvider extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(TradingProvider.class.getName()); - public static class QuoteResponseSerializer extends StdSerializer { - public QuoteResponseSerializer(Class t) { + public static class TradingProviderSerializer extends StdSerializer { + public TradingProviderSerializer(Class t) { super(t); } - public QuoteResponseSerializer() { + public TradingProviderSerializer() { this(null); } @Override - public void serialize(QuoteResponse value, JsonGenerator jgen, SerializerProvider provider) + public void serialize( + TradingProvider value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { jgen.writeObject(value.getActualInstance()); } } - public static class QuoteResponseDeserializer extends StdDeserializer { - public QuoteResponseDeserializer() { - this(QuoteResponse.class); + public static class TradingProviderDeserializer extends StdDeserializer { + public TradingProviderDeserializer() { + this(TradingProvider.class); } - public QuoteResponseDeserializer(Class vc) { + public TradingProviderDeserializer(Class vc) { super(vc); } @Override - public QuoteResponse deserialize(JsonParser jp, DeserializationContext ctxt) + public TradingProvider deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { JsonNode tree = jp.readValueAsTree(); Object deserialized = null; boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); int match = 0; JsonToken token = tree.traverse(jp.getCodec()).nextToken(); - // deserialize NonWalletQuoteResponse + // deserialize AccountBasedAccessProvider try { boolean attemptParsing = true; // ensure that we respect type coercion as set on the client ObjectMapper - if (NonWalletQuoteResponse.class.equals(Integer.class) - || NonWalletQuoteResponse.class.equals(Long.class) - || NonWalletQuoteResponse.class.equals(Float.class) - || NonWalletQuoteResponse.class.equals(Double.class) - || NonWalletQuoteResponse.class.equals(Boolean.class) - || NonWalletQuoteResponse.class.equals(String.class)) { + if (AccountBasedAccessProvider.class.equals(Integer.class) + || AccountBasedAccessProvider.class.equals(Long.class) + || AccountBasedAccessProvider.class.equals(Float.class) + || AccountBasedAccessProvider.class.equals(Double.class) + || AccountBasedAccessProvider.class.equals(Boolean.class) + || AccountBasedAccessProvider.class.equals(String.class)) { attemptParsing = typeCoercion; if (!attemptParsing) { attemptParsing |= - ((NonWalletQuoteResponse.class.equals(Integer.class) - || NonWalletQuoteResponse.class.equals(Long.class)) + ((AccountBasedAccessProvider.class.equals(Integer.class) + || AccountBasedAccessProvider.class.equals( + Long.class)) && token == JsonToken.VALUE_NUMBER_INT); attemptParsing |= - ((NonWalletQuoteResponse.class.equals(Float.class) - || NonWalletQuoteResponse.class.equals( + ((AccountBasedAccessProvider.class.equals(Float.class) + || AccountBasedAccessProvider.class.equals( Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); attemptParsing |= - (NonWalletQuoteResponse.class.equals(Boolean.class) + (AccountBasedAccessProvider.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); attemptParsing |= - (NonWalletQuoteResponse.class.equals(String.class) + (AccountBasedAccessProvider.class.equals(String.class) && token == JsonToken.VALUE_STRING); } } if (attemptParsing) { deserialized = - tree.traverse(jp.getCodec()).readValueAs(NonWalletQuoteResponse.class); + tree.traverse(jp.getCodec()) + .readValueAs(AccountBasedAccessProvider.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 'NonWalletQuoteResponse'"); + log.log(Level.FINER, "Input data matches schema 'AccountBasedAccessProvider'"); } } catch (Exception e) { // deserialization failed, continue log.log( Level.FINER, - "Input data does not match schema 'NonWalletQuoteResponse'", + "Input data does not match schema 'AccountBasedAccessProvider'", e); } - // deserialize WalletQuoteResponse + // deserialize DirectAccessProvider try { boolean attemptParsing = true; // ensure that we respect type coercion as set on the client ObjectMapper - if (WalletQuoteResponse.class.equals(Integer.class) - || WalletQuoteResponse.class.equals(Long.class) - || WalletQuoteResponse.class.equals(Float.class) - || WalletQuoteResponse.class.equals(Double.class) - || WalletQuoteResponse.class.equals(Boolean.class) - || WalletQuoteResponse.class.equals(String.class)) { + if (DirectAccessProvider.class.equals(Integer.class) + || DirectAccessProvider.class.equals(Long.class) + || DirectAccessProvider.class.equals(Float.class) + || DirectAccessProvider.class.equals(Double.class) + || DirectAccessProvider.class.equals(Boolean.class) + || DirectAccessProvider.class.equals(String.class)) { attemptParsing = typeCoercion; if (!attemptParsing) { attemptParsing |= - ((WalletQuoteResponse.class.equals(Integer.class) - || WalletQuoteResponse.class.equals(Long.class)) + ((DirectAccessProvider.class.equals(Integer.class) + || DirectAccessProvider.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); attemptParsing |= - ((WalletQuoteResponse.class.equals(Float.class) - || WalletQuoteResponse.class.equals(Double.class)) + ((DirectAccessProvider.class.equals(Float.class) + || DirectAccessProvider.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); attemptParsing |= - (WalletQuoteResponse.class.equals(Boolean.class) + (DirectAccessProvider.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); attemptParsing |= - (WalletQuoteResponse.class.equals(String.class) + (DirectAccessProvider.class.equals(String.class) && token == JsonToken.VALUE_STRING); } } if (attemptParsing) { deserialized = - tree.traverse(jp.getCodec()).readValueAs(WalletQuoteResponse.class); + tree.traverse(jp.getCodec()).readValueAs(DirectAccessProvider.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 'WalletQuoteResponse'"); + log.log(Level.FINER, "Input data matches schema 'DirectAccessProvider'"); } } catch (Exception e) { // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'WalletQuoteResponse'", e); + log.log(Level.FINER, "Input data does not match schema 'DirectAccessProvider'", e); } if (match == 1) { - QuoteResponse ret = new QuoteResponse(); + TradingProvider ret = new TradingProvider(); ret.setActualInstance(deserialized); return ret; } throw new IOException( String.format( - "Failed deserialization for QuoteResponse: %d classes match result," + "Failed deserialization for TradingProvider: %d classes match result," + " expected 1", match)); } /** Handle deserialization of the 'null' value. */ @Override - public QuoteResponse getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException(ctxt.getParser(), "QuoteResponse cannot be null"); + public TradingProvider getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "TradingProvider cannot be null"); } } // store a list of schema names defined in oneOf public static final Map> schemas = new HashMap<>(); - public QuoteResponse() { + public TradingProvider() { super("oneOf", Boolean.FALSE); } - public QuoteResponse(NonWalletQuoteResponse o) { + public TradingProvider(AccountBasedAccessProvider o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } - public QuoteResponse(WalletQuoteResponse o) { + public TradingProvider(DirectAccessProvider o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } static { - schemas.put("NonWalletQuoteResponse", NonWalletQuoteResponse.class); - schemas.put("WalletQuoteResponse", WalletQuoteResponse.class); - JSON.registerDescendants(QuoteResponse.class, Collections.unmodifiableMap(schemas)); + schemas.put("AccountBasedAccessProvider", AccountBasedAccessProvider.class); + schemas.put("DirectAccessProvider", DirectAccessProvider.class); + JSON.registerDescendants(TradingProvider.class, Collections.unmodifiableMap(schemas)); } @Override public Map> getSchemas() { - return QuoteResponse.schemas; + return TradingProvider.schemas; } /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: NonWalletQuoteResponse, WalletQuoteResponse + * against the oneOf child schemas: AccountBasedAccessProvider, DirectAccessProvider * *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be * a composed schema (allOf, anyOf, oneOf). */ @Override public void setActualInstance(Object instance) { - if (JSON.isInstanceOf(NonWalletQuoteResponse.class, instance, new HashSet>())) { + if (JSON.isInstanceOf( + AccountBasedAccessProvider.class, instance, new HashSet>())) { super.setActualInstance(instance); return; } - if (JSON.isInstanceOf(WalletQuoteResponse.class, instance, new HashSet>())) { + if (JSON.isInstanceOf(DirectAccessProvider.class, instance, new HashSet>())) { super.setActualInstance(instance); return; } throw new RuntimeException( - "Invalid instance type. Must be NonWalletQuoteResponse, WalletQuoteResponse"); + "Invalid instance type. Must be AccountBasedAccessProvider, DirectAccessProvider"); } /** - * Get the actual instance, which can be the following: NonWalletQuoteResponse, - * WalletQuoteResponse + * Get the actual instance, which can be the following: AccountBasedAccessProvider, + * DirectAccessProvider * - * @return The actual instance (NonWalletQuoteResponse, WalletQuoteResponse) + * @return The actual instance (AccountBasedAccessProvider, DirectAccessProvider) */ @Override public Object getActualInstance() { @@ -249,25 +254,25 @@ public Object getActualInstance() { } /** - * Get the actual instance of `NonWalletQuoteResponse`. If the actual instance is not - * `NonWalletQuoteResponse`, the ClassCastException will be thrown. + * Get the actual instance of `AccountBasedAccessProvider`. If the actual instance is not + * `AccountBasedAccessProvider`, the ClassCastException will be thrown. * - * @return The actual instance of `NonWalletQuoteResponse` - * @throws ClassCastException if the instance is not `NonWalletQuoteResponse` + * @return The actual instance of `AccountBasedAccessProvider` + * @throws ClassCastException if the instance is not `AccountBasedAccessProvider` */ - public NonWalletQuoteResponse getNonWalletQuoteResponse() throws ClassCastException { - return (NonWalletQuoteResponse) super.getActualInstance(); + public AccountBasedAccessProvider getAccountBasedAccessProvider() throws ClassCastException { + return (AccountBasedAccessProvider) super.getActualInstance(); } /** - * Get the actual instance of `WalletQuoteResponse`. If the actual instance is not - * `WalletQuoteResponse`, the ClassCastException will be thrown. + * Get the actual instance of `DirectAccessProvider`. If the actual instance is not + * `DirectAccessProvider`, the ClassCastException will be thrown. * - * @return The actual instance of `WalletQuoteResponse` - * @throws ClassCastException if the instance is not `WalletQuoteResponse` + * @return The actual instance of `DirectAccessProvider` + * @throws ClassCastException if the instance is not `DirectAccessProvider` */ - public WalletQuoteResponse getWalletQuoteResponse() throws ClassCastException { - return (WalletQuoteResponse) super.getActualInstance(); + public DirectAccessProvider getDirectAccessProvider() throws ClassCastException { + return (DirectAccessProvider) super.getActualInstance(); } /** @@ -302,18 +307,18 @@ public String toUrlQueryString(String prefix) { StringJoiner joiner = new StringJoiner("&"); - if (getActualInstance() instanceof WalletQuoteResponse) { + if (getActualInstance() instanceof AccountBasedAccessProvider) { if (getActualInstance() != null) { joiner.add( - ((WalletQuoteResponse) getActualInstance()) + ((AccountBasedAccessProvider) getActualInstance()) .toUrlQueryString(prefix + "one_of_0" + suffix)); } return joiner.toString(); } - if (getActualInstance() instanceof NonWalletQuoteResponse) { + if (getActualInstance() instanceof DirectAccessProvider) { if (getActualInstance() != null) { joiner.add( - ((NonWalletQuoteResponse) getActualInstance()) + ((DirectAccessProvider) getActualInstance()) .toUrlQueryString(prefix + "one_of_1" + suffix)); } return joiner.toString(); diff --git a/src/main/java/com/fireblocks/sdk/model/TransferRail.java b/src/main/java/com/fireblocks/sdk/model/TransferRail.java new file mode 100644 index 00000000..ba10db78 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TransferRail.java @@ -0,0 +1,94 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Transfer rail: * **BLOCKCHAIN** - Transfer over the public blockchain * **INTERNAL** - Internal + * transfer within the same account (e.g. sub-accounts or same api key) * **PEER** - Peer transfer + * within the same provider network * **SWIFT** - International wire transfer * **IBAN** - + * International Bank Account Number transfer * **US_WIRE** - Domestic wire transfer within the + * United States (e.g. FedWire) * **ACH** - Automated Clearing House transfer, typically takes + * 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) + */ +public enum TransferRail { + BLOCKCHAIN("BLOCKCHAIN"), + + INTERNAL("INTERNAL"), + + PEER("PEER"), + + SWIFT("SWIFT"), + + IBAN("IBAN"), + + US_WIRE("US_WIRE"), + + ACH("ACH"), + + SEPA("SEPA"), + + SPEI("SPEI"), + + PIX("PIX"), + + LOCAL_BANK_TRANSFER_AFRICA("LOCAL_BANK_TRANSFER_AFRICA"), + + MOBILE_MONEY("MOBILE_MONEY"); + + private String value; + + TransferRail(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TransferRail fromValue(String value) { + for (TransferRail b : TransferRail.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/TransferReceipt.java b/src/main/java/com/fireblocks/sdk/model/TransferReceipt.java new file mode 100644 index 00000000..52daf3d9 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/TransferReceipt.java @@ -0,0 +1,327 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.fireblocks.sdk.JSON; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.StringJoiner; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +@JsonDeserialize(using = TransferReceipt.TransferReceiptDeserializer.class) +@JsonSerialize(using = TransferReceipt.TransferReceiptSerializer.class) +public class TransferReceipt extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(TransferReceipt.class.getName()); + + public static class TransferReceiptSerializer extends StdSerializer { + public TransferReceiptSerializer(Class t) { + super(t); + } + + public TransferReceiptSerializer() { + this(null); + } + + @Override + public void serialize( + TransferReceipt value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class TransferReceiptDeserializer extends StdDeserializer { + public TransferReceiptDeserializer() { + this(TransferReceipt.class); + } + + public TransferReceiptDeserializer(Class vc) { + super(vc); + } + + @Override + public TransferReceipt deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize BlockchainTransfer + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (BlockchainTransfer.class.equals(Integer.class) + || BlockchainTransfer.class.equals(Long.class) + || BlockchainTransfer.class.equals(Float.class) + || BlockchainTransfer.class.equals(Double.class) + || BlockchainTransfer.class.equals(Boolean.class) + || BlockchainTransfer.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((BlockchainTransfer.class.equals(Integer.class) + || BlockchainTransfer.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((BlockchainTransfer.class.equals(Float.class) + || BlockchainTransfer.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (BlockchainTransfer.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (BlockchainTransfer.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(BlockchainTransfer.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 'BlockchainTransfer'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'BlockchainTransfer'", e); + } + + // deserialize FiatTransfer + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (FiatTransfer.class.equals(Integer.class) + || FiatTransfer.class.equals(Long.class) + || FiatTransfer.class.equals(Float.class) + || FiatTransfer.class.equals(Double.class) + || FiatTransfer.class.equals(Boolean.class) + || FiatTransfer.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((FiatTransfer.class.equals(Integer.class) + || FiatTransfer.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((FiatTransfer.class.equals(Float.class) + || FiatTransfer.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (FiatTransfer.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (FiatTransfer.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(FiatTransfer.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 'FiatTransfer'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'FiatTransfer'", e); + } + + if (match == 1) { + TransferReceipt ret = new TransferReceipt(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException( + String.format( + "Failed deserialization for TransferReceipt: %d classes match result," + + " expected 1", + match)); + } + + /** Handle deserialization of the 'null' value. */ + @Override + public TransferReceipt getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "TransferReceipt cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap<>(); + + public TransferReceipt() { + super("oneOf", Boolean.FALSE); + } + + public TransferReceipt(BlockchainTransfer o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public TransferReceipt(FiatTransfer o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("BlockchainTransfer", BlockchainTransfer.class); + schemas.put("FiatTransfer", FiatTransfer.class); + JSON.registerDescendants(TransferReceipt.class, Collections.unmodifiableMap(schemas)); + // Initialize and register the discriminator mappings. + Map> mappings = new HashMap>(); + mappings.put("BLOCKCHAIN", BlockchainTransfer.class); + mappings.put("FIAT", FiatTransfer.class); + mappings.put("BlockchainTransfer", BlockchainTransfer.class); + mappings.put("FiatTransfer", FiatTransfer.class); + mappings.put("TransferReceipt", TransferReceipt.class); + JSON.registerDiscriminator(TransferReceipt.class, "type", mappings); + } + + @Override + public Map> getSchemas() { + return TransferReceipt.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: BlockchainTransfer, FiatTransfer + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be + * a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(BlockchainTransfer.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(FiatTransfer.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be BlockchainTransfer, FiatTransfer"); + } + + /** + * Get the actual instance, which can be the following: BlockchainTransfer, FiatTransfer + * + * @return The actual instance (BlockchainTransfer, FiatTransfer) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `BlockchainTransfer`. If the actual instance is not + * `BlockchainTransfer`, the ClassCastException will be thrown. + * + * @return The actual instance of `BlockchainTransfer` + * @throws ClassCastException if the instance is not `BlockchainTransfer` + */ + public BlockchainTransfer getBlockchainTransfer() throws ClassCastException { + return (BlockchainTransfer) super.getActualInstance(); + } + + /** + * Get the actual instance of `FiatTransfer`. If the actual instance is not `FiatTransfer`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `FiatTransfer` + * @throws ClassCastException if the instance is not `FiatTransfer` + */ + public FiatTransfer getFiatTransfer() throws ClassCastException { + return (FiatTransfer) super.getActualInstance(); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + if (getActualInstance() instanceof BlockchainTransfer) { + if (getActualInstance() != null) { + joiner.add( + ((BlockchainTransfer) getActualInstance()) + .toUrlQueryString(prefix + "one_of_0" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof FiatTransfer) { + if (getActualInstance() != null) { + joiner.add( + ((FiatTransfer) getActualInstance()) + .toUrlQueryString(prefix + "one_of_1" + suffix)); + } + return joiner.toString(); + } + return null; + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/WalletQuoteResponse.java b/src/main/java/com/fireblocks/sdk/model/WalletQuoteResponse.java deleted file mode 100644 index 773573db..00000000 --- a/src/main/java/com/fireblocks/sdk/model/WalletQuoteResponse.java +++ /dev/null @@ -1,643 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.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.math.BigDecimal; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import java.util.StringJoiner; -import java.util.UUID; - -/** Return a quote with id that can be used for swap operation. */ -@JsonPropertyOrder({ - WalletQuoteResponse.JSON_PROPERTY_PROTOCOL, - WalletQuoteResponse.JSON_PROPERTY_INPUT_AMOUNT, - WalletQuoteResponse.JSON_PROPERTY_INPUT_ASSET, - WalletQuoteResponse.JSON_PROPERTY_SLIPPAGE_TOLERANCE, - WalletQuoteResponse.JSON_PROPERTY_OUTPUT_MIN_AMOUNT, - WalletQuoteResponse.JSON_PROPERTY_OUTPUT_MAX_AMOUNT, - WalletQuoteResponse.JSON_PROPERTY_OUTPUT_ASSET, - WalletQuoteResponse.JSON_PROPERTY_ADDITIONAL_DATA, - WalletQuoteResponse.JSON_PROPERTY_PROVIDER_QUOTE_ID, - WalletQuoteResponse.JSON_PROPERTY_EXPIRED_AT, - WalletQuoteResponse.JSON_PROPERTY_REQUIRED_ACTIONS, - WalletQuoteResponse.JSON_PROPERTY_ESTIMATED_FEES -}) -@jakarta.annotation.Generated( - value = "org.openapitools.codegen.languages.JavaClientCodegen", - comments = "Generator version: 7.14.0") -public class WalletQuoteResponse { - public static final String JSON_PROPERTY_PROTOCOL = "protocol"; - @jakarta.annotation.Nonnull private SwapProviderProtocolsEnum protocol; - - public static final String JSON_PROPERTY_INPUT_AMOUNT = "inputAmount"; - @jakarta.annotation.Nonnull private String inputAmount; - - public static final String JSON_PROPERTY_INPUT_ASSET = "inputAsset"; - @jakarta.annotation.Nonnull private String inputAsset; - - public static final String JSON_PROPERTY_SLIPPAGE_TOLERANCE = "slippageTolerance"; - @jakarta.annotation.Nonnull private BigDecimal slippageTolerance; - - public static final String JSON_PROPERTY_OUTPUT_MIN_AMOUNT = "outputMinAmount"; - @jakarta.annotation.Nonnull private String outputMinAmount; - - public static final String JSON_PROPERTY_OUTPUT_MAX_AMOUNT = "outputMaxAmount"; - @jakarta.annotation.Nonnull private String outputMaxAmount; - - public static final String JSON_PROPERTY_OUTPUT_ASSET = "outputAsset"; - @jakarta.annotation.Nonnull private String outputAsset; - - public static final String JSON_PROPERTY_ADDITIONAL_DATA = "additionalData"; - @jakarta.annotation.Nonnull private ProviderAdditionalData additionalData; - - public static final String JSON_PROPERTY_PROVIDER_QUOTE_ID = "providerQuoteId"; - @jakarta.annotation.Nonnull private UUID providerQuoteId; - - public static final String JSON_PROPERTY_EXPIRED_AT = "expiredAt"; - @jakarta.annotation.Nonnull private OffsetDateTime expiredAt; - - public static final String JSON_PROPERTY_REQUIRED_ACTIONS = "requiredActions"; - - @jakarta.annotation.Nonnull - private List requiredActions = new ArrayList<>(); - - public static final String JSON_PROPERTY_ESTIMATED_FEES = "estimatedFees"; - @jakarta.annotation.Nonnull private QuoteFee estimatedFees; - - public WalletQuoteResponse() {} - - @JsonCreator - public WalletQuoteResponse( - @JsonProperty(value = JSON_PROPERTY_PROTOCOL, required = true) - SwapProviderProtocolsEnum protocol, - @JsonProperty(value = JSON_PROPERTY_INPUT_AMOUNT, required = true) String inputAmount, - @JsonProperty(value = JSON_PROPERTY_INPUT_ASSET, required = true) String inputAsset, - @JsonProperty(value = JSON_PROPERTY_SLIPPAGE_TOLERANCE, required = true) - BigDecimal slippageTolerance, - @JsonProperty(value = JSON_PROPERTY_OUTPUT_MIN_AMOUNT, required = true) - String outputMinAmount, - @JsonProperty(value = JSON_PROPERTY_OUTPUT_MAX_AMOUNT, required = true) - String outputMaxAmount, - @JsonProperty(value = JSON_PROPERTY_OUTPUT_ASSET, required = true) String outputAsset, - @JsonProperty(value = JSON_PROPERTY_ADDITIONAL_DATA, required = true) - ProviderAdditionalData additionalData, - @JsonProperty(value = JSON_PROPERTY_PROVIDER_QUOTE_ID, required = true) - UUID providerQuoteId, - @JsonProperty(value = JSON_PROPERTY_EXPIRED_AT, required = true) - OffsetDateTime expiredAt, - @JsonProperty(value = JSON_PROPERTY_REQUIRED_ACTIONS, required = true) - List requiredActions, - @JsonProperty(value = JSON_PROPERTY_ESTIMATED_FEES, required = true) - QuoteFee estimatedFees) { - this.protocol = protocol; - this.inputAmount = inputAmount; - this.inputAsset = inputAsset; - this.slippageTolerance = slippageTolerance; - this.outputMinAmount = outputMinAmount; - this.outputMaxAmount = outputMaxAmount; - this.outputAsset = outputAsset; - this.additionalData = additionalData; - this.providerQuoteId = providerQuoteId; - this.expiredAt = expiredAt; - this.requiredActions = requiredActions; - this.estimatedFees = estimatedFees; - } - - public WalletQuoteResponse protocol( - @jakarta.annotation.Nonnull SwapProviderProtocolsEnum protocol) { - this.protocol = protocol; - return this; - } - - /** - * Get protocol - * - * @return protocol - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_PROTOCOL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public SwapProviderProtocolsEnum getProtocol() { - return protocol; - } - - @JsonProperty(JSON_PROPERTY_PROTOCOL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setProtocol(@jakarta.annotation.Nonnull SwapProviderProtocolsEnum protocol) { - this.protocol = protocol; - } - - public WalletQuoteResponse inputAmount(@jakarta.annotation.Nonnull String inputAmount) { - this.inputAmount = inputAmount; - return this; - } - - /** - * The amount of tokens the swapper will provide - * - * @return inputAmount - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_INPUT_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getInputAmount() { - return inputAmount; - } - - @JsonProperty(JSON_PROPERTY_INPUT_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setInputAmount(@jakarta.annotation.Nonnull String inputAmount) { - this.inputAmount = inputAmount; - } - - public WalletQuoteResponse inputAsset(@jakarta.annotation.Nonnull String inputAsset) { - this.inputAsset = inputAsset; - return this; - } - - /** - * The id of the asset the swapper will provide - * - * @return inputAsset - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_INPUT_ASSET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getInputAsset() { - return inputAsset; - } - - @JsonProperty(JSON_PROPERTY_INPUT_ASSET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setInputAsset(@jakarta.annotation.Nonnull String inputAsset) { - this.inputAsset = inputAsset; - } - - public WalletQuoteResponse slippageTolerance( - @jakarta.annotation.Nonnull BigDecimal slippageTolerance) { - this.slippageTolerance = slippageTolerance; - return this; - } - - /** - * The slippage tolerance is a percentage. The slippage tolerance is the maximum amount the - * price can change between the time the transaction is submitted and the time it is executed - * - * @return slippageTolerance - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_SLIPPAGE_TOLERANCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public BigDecimal getSlippageTolerance() { - return slippageTolerance; - } - - @JsonProperty(JSON_PROPERTY_SLIPPAGE_TOLERANCE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setSlippageTolerance(@jakarta.annotation.Nonnull BigDecimal slippageTolerance) { - this.slippageTolerance = slippageTolerance; - } - - public WalletQuoteResponse outputMinAmount(@jakarta.annotation.Nonnull String outputMinAmount) { - this.outputMinAmount = outputMinAmount; - return this; - } - - /** - * The minimum amount of tokens the swapper will receive - * - * @return outputMinAmount - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_OUTPUT_MIN_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getOutputMinAmount() { - return outputMinAmount; - } - - @JsonProperty(JSON_PROPERTY_OUTPUT_MIN_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOutputMinAmount(@jakarta.annotation.Nonnull String outputMinAmount) { - this.outputMinAmount = outputMinAmount; - } - - public WalletQuoteResponse outputMaxAmount(@jakarta.annotation.Nonnull String outputMaxAmount) { - this.outputMaxAmount = outputMaxAmount; - return this; - } - - /** - * Maximum amount of tokens that the swapper will receive - * - * @return outputMaxAmount - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_OUTPUT_MAX_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getOutputMaxAmount() { - return outputMaxAmount; - } - - @JsonProperty(JSON_PROPERTY_OUTPUT_MAX_AMOUNT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOutputMaxAmount(@jakarta.annotation.Nonnull String outputMaxAmount) { - this.outputMaxAmount = outputMaxAmount; - } - - public WalletQuoteResponse outputAsset(@jakarta.annotation.Nonnull String outputAsset) { - this.outputAsset = outputAsset; - return this; - } - - /** - * The id of the asset the swapper will receive - * - * @return outputAsset - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_OUTPUT_ASSET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getOutputAsset() { - return outputAsset; - } - - @JsonProperty(JSON_PROPERTY_OUTPUT_ASSET) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setOutputAsset(@jakarta.annotation.Nonnull String outputAsset) { - this.outputAsset = outputAsset; - } - - public WalletQuoteResponse additionalData( - @jakarta.annotation.Nonnull ProviderAdditionalData additionalData) { - this.additionalData = additionalData; - return this; - } - - /** - * Get additionalData - * - * @return additionalData - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ADDITIONAL_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public ProviderAdditionalData getAdditionalData() { - return additionalData; - } - - @JsonProperty(JSON_PROPERTY_ADDITIONAL_DATA) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setAdditionalData( - @jakarta.annotation.Nonnull ProviderAdditionalData additionalData) { - this.additionalData = additionalData; - } - - public WalletQuoteResponse providerQuoteId(@jakarta.annotation.Nonnull UUID providerQuoteId) { - this.providerQuoteId = providerQuoteId; - return this; - } - - /** - * An identifier that uniquely identifies the received quote - * - * @return providerQuoteId - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_PROVIDER_QUOTE_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public UUID getProviderQuoteId() { - return providerQuoteId; - } - - @JsonProperty(JSON_PROPERTY_PROVIDER_QUOTE_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setProviderQuoteId(@jakarta.annotation.Nonnull UUID providerQuoteId) { - this.providerQuoteId = providerQuoteId; - } - - public WalletQuoteResponse expiredAt(@jakarta.annotation.Nonnull OffsetDateTime expiredAt) { - this.expiredAt = expiredAt; - return this; - } - - /** - * When was the received `providerQuoteId` is expired (ISO Date time). - * - * @return expiredAt - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_EXPIRED_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public OffsetDateTime getExpiredAt() { - return expiredAt; - } - - @JsonProperty(JSON_PROPERTY_EXPIRED_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setExpiredAt(@jakarta.annotation.Nonnull OffsetDateTime expiredAt) { - this.expiredAt = expiredAt; - } - - public WalletQuoteResponse requiredActions( - @jakarta.annotation.Nonnull List requiredActions) { - this.requiredActions = requiredActions; - return this; - } - - public WalletQuoteResponse addRequiredActionsItem(SwapRequiredActionsEnum requiredActionsItem) { - if (this.requiredActions == null) { - this.requiredActions = new ArrayList<>(); - } - this.requiredActions.add(requiredActionsItem); - return this; - } - - /** - * The required actions for completing a swap operation - * - * @return requiredActions - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_REQUIRED_ACTIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getRequiredActions() { - return requiredActions; - } - - @JsonProperty(JSON_PROPERTY_REQUIRED_ACTIONS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequiredActions( - @jakarta.annotation.Nonnull List requiredActions) { - this.requiredActions = requiredActions; - } - - public WalletQuoteResponse estimatedFees(@jakarta.annotation.Nonnull QuoteFee estimatedFees) { - this.estimatedFees = estimatedFees; - return this; - } - - /** - * Get estimatedFees - * - * @return estimatedFees - */ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ESTIMATED_FEES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public QuoteFee getEstimatedFees() { - return estimatedFees; - } - - @JsonProperty(JSON_PROPERTY_ESTIMATED_FEES) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEstimatedFees(@jakarta.annotation.Nonnull QuoteFee estimatedFees) { - this.estimatedFees = estimatedFees; - } - - /** Return true if this WalletQuoteResponse object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WalletQuoteResponse walletQuoteResponse = (WalletQuoteResponse) o; - return Objects.equals(this.protocol, walletQuoteResponse.protocol) - && Objects.equals(this.inputAmount, walletQuoteResponse.inputAmount) - && Objects.equals(this.inputAsset, walletQuoteResponse.inputAsset) - && Objects.equals(this.slippageTolerance, walletQuoteResponse.slippageTolerance) - && Objects.equals(this.outputMinAmount, walletQuoteResponse.outputMinAmount) - && Objects.equals(this.outputMaxAmount, walletQuoteResponse.outputMaxAmount) - && Objects.equals(this.outputAsset, walletQuoteResponse.outputAsset) - && Objects.equals(this.additionalData, walletQuoteResponse.additionalData) - && Objects.equals(this.providerQuoteId, walletQuoteResponse.providerQuoteId) - && Objects.equals(this.expiredAt, walletQuoteResponse.expiredAt) - && Objects.equals(this.requiredActions, walletQuoteResponse.requiredActions) - && Objects.equals(this.estimatedFees, walletQuoteResponse.estimatedFees); - } - - @Override - public int hashCode() { - return Objects.hash( - protocol, - inputAmount, - inputAsset, - slippageTolerance, - outputMinAmount, - outputMaxAmount, - outputAsset, - additionalData, - providerQuoteId, - expiredAt, - requiredActions, - estimatedFees); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class WalletQuoteResponse {\n"); - sb.append(" protocol: ").append(toIndentedString(protocol)).append("\n"); - sb.append(" inputAmount: ").append(toIndentedString(inputAmount)).append("\n"); - sb.append(" inputAsset: ").append(toIndentedString(inputAsset)).append("\n"); - sb.append(" slippageTolerance: ") - .append(toIndentedString(slippageTolerance)) - .append("\n"); - sb.append(" outputMinAmount: ").append(toIndentedString(outputMinAmount)).append("\n"); - sb.append(" outputMaxAmount: ").append(toIndentedString(outputMaxAmount)).append("\n"); - sb.append(" outputAsset: ").append(toIndentedString(outputAsset)).append("\n"); - sb.append(" additionalData: ").append(toIndentedString(additionalData)).append("\n"); - sb.append(" providerQuoteId: ").append(toIndentedString(providerQuoteId)).append("\n"); - sb.append(" expiredAt: ").append(toIndentedString(expiredAt)).append("\n"); - sb.append(" requiredActions: ").append(toIndentedString(requiredActions)).append("\n"); - sb.append(" estimatedFees: ").append(toIndentedString(estimatedFees)).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 `protocol` to the URL query string - if (getProtocol() != null) { - joiner.add( - String.format( - "%sprotocol%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getProtocol())))); - } - - // add `inputAmount` to the URL query string - if (getInputAmount() != null) { - joiner.add( - String.format( - "%sinputAmount%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getInputAmount())))); - } - - // add `inputAsset` to the URL query string - if (getInputAsset() != null) { - joiner.add( - String.format( - "%sinputAsset%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getInputAsset())))); - } - - // add `slippageTolerance` to the URL query string - if (getSlippageTolerance() != null) { - joiner.add( - String.format( - "%sslippageTolerance%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getSlippageTolerance())))); - } - - // add `outputMinAmount` to the URL query string - if (getOutputMinAmount() != null) { - joiner.add( - String.format( - "%soutputMinAmount%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getOutputMinAmount())))); - } - - // add `outputMaxAmount` to the URL query string - if (getOutputMaxAmount() != null) { - joiner.add( - String.format( - "%soutputMaxAmount%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getOutputMaxAmount())))); - } - - // add `outputAsset` to the URL query string - if (getOutputAsset() != null) { - joiner.add( - String.format( - "%soutputAsset%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getOutputAsset())))); - } - - // add `additionalData` to the URL query string - if (getAdditionalData() != null) { - joiner.add(getAdditionalData().toUrlQueryString(prefix + "additionalData" + suffix)); - } - - // add `providerQuoteId` to the URL query string - if (getProviderQuoteId() != null) { - joiner.add( - String.format( - "%sproviderQuoteId%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getProviderQuoteId())))); - } - - // add `expiredAt` to the URL query string - if (getExpiredAt() != null) { - joiner.add( - String.format( - "%sexpiredAt%s=%s", - prefix, - suffix, - ApiClient.urlEncode(ApiClient.valueToString(getExpiredAt())))); - } - - // add `requiredActions` to the URL query string - if (getRequiredActions() != null) { - for (int i = 0; i < getRequiredActions().size(); i++) { - if (getRequiredActions().get(i) != null) { - joiner.add( - String.format( - "%srequiredActions%s%s=%s", - prefix, - suffix, - "".equals(suffix) - ? "" - : String.format( - "%s%d%s", containerPrefix, i, containerSuffix), - ApiClient.urlEncode( - ApiClient.valueToString(getRequiredActions().get(i))))); - } - } - } - - // add `estimatedFees` to the URL query string - if (getEstimatedFees() != null) { - joiner.add(getEstimatedFees().toUrlQueryString(prefix + "estimatedFees" + suffix)); - } - - return joiner.toString(); - } -} diff --git a/src/test/java/com/fireblocks/sdk/FireblocksTest.java b/src/test/java/com/fireblocks/sdk/FireblocksTest.java index b322b0a7..59aac5da 100644 --- a/src/test/java/com/fireblocks/sdk/FireblocksTest.java +++ b/src/test/java/com/fireblocks/sdk/FireblocksTest.java @@ -405,6 +405,14 @@ public void testGetComplianceScreeningConfigurationApi() { complianceScreeningConfiguration, fireblocks.complianceScreeningConfiguration()); } + @Test + public void testGetConnectedAccountsBetaApi() { + setupFireblocks(true, null, null); + ConnectedAccountsBetaApi connectedAccountsBeta = fireblocks.connectedAccountsBeta(); + Assert.assertNotNull(connectedAccountsBeta); + Assert.assertSame(connectedAccountsBeta, fireblocks.connectedAccountsBeta()); + } + @Test public void testGetConsoleUserApi() { setupFireblocks(true, null, null); @@ -605,14 +613,6 @@ public void testGetStakingApi() { Assert.assertSame(staking, fireblocks.staking()); } - @Test - public void testGetSwapBetaApi() { - setupFireblocks(true, null, null); - SwapBetaApi swapBeta = fireblocks.swapBeta(); - Assert.assertNotNull(swapBeta); - Assert.assertSame(swapBeta, fireblocks.swapBeta()); - } - @Test public void testGetTagsApi() { setupFireblocks(true, null, null); @@ -629,6 +629,14 @@ public void testGetTokenizationApi() { Assert.assertSame(tokenization, fireblocks.tokenization()); } + @Test + public void testGetTradingBetaApi() { + setupFireblocks(true, null, null); + TradingBetaApi tradingBeta = fireblocks.tradingBeta(); + Assert.assertNotNull(tradingBeta); + Assert.assertSame(tradingBeta, fireblocks.tradingBeta()); + } + @Test public void testGetTransactionsApi() { setupFireblocks(true, null, null); diff --git a/src/test/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApiTest.java new file mode 100644 index 00000000..26793481 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/api/ConnectedAccountsBetaApiTest.java @@ -0,0 +1,116 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.ConnectedAccountBalancesResponse; +import com.fireblocks.sdk.model.ConnectedAccountRateResponse; +import com.fireblocks.sdk.model.ConnectedAccountTradingPairsResponse; +import com.fireblocks.sdk.model.ConnectedAccountsResponse; +import com.fireblocks.sdk.model.ConnectedSingleAccountResponse; +import java.util.concurrent.CompletableFuture; +import org.junit.Ignore; +import org.junit.Test; + +/** API tests for ConnectedAccountsBetaApi */ +@Ignore +public class ConnectedAccountsBetaApiTest { + + private final ConnectedAccountsBetaApi api = new ConnectedAccountsBetaApi(); + + /** + * Get connected account + * + *

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

Retrieve current asset balances for a specific connected account as a flat list (one row + * per assetId, balanceType) </br> **Note**: - This endpoint is currently in beta and + * might be subject to changes. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getConnectedAccountBalancesTest() throws ApiException { + String accountId = null; + Integer pageSize = null; + String pageCursor = null; + CompletableFuture> response = + api.getConnectedAccountBalances(accountId, pageSize, pageCursor); + } + + /** + * Get exchange rates for an account + * + *

Retrieve current exchange rates for converting between specific assets in a connected + * account. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getConnectedAccountRatesTest() throws ApiException { + String accountId = null; + String baseAssetId = null; + String quoteAssetId = null; + CompletableFuture> response = + api.getConnectedAccountRates(accountId, baseAssetId, quoteAssetId); + } + + /** + * Get supported trading pairs for an account + * + *

Retrieve all asset trading pairs supported by a specific connected account, including the + * pair type (quote, market, onOffRamp). + * + * @throws ApiException if the Api call fails + */ + @Test + public void getConnectedAccountTradingPairsTest() throws ApiException { + String accountId = null; + Integer pageSize = null; + String pageCursor = null; + CompletableFuture> response = + api.getConnectedAccountTradingPairs(accountId, pageSize, pageCursor); + } + + /** + * Get connected accounts + * + *

Returns all connected accounts </br> **Note**: - This endpoint is currently in beta + * and might be subject to changes. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getConnectedAccountsTest() throws ApiException { + Boolean mainAccounts = null; + Integer pageSize = null; + String pageCursor = null; + CompletableFuture> response = + api.getConnectedAccounts(mainAccounts, pageSize, pageCursor); + } +} diff --git a/src/test/java/com/fireblocks/sdk/api/SwapBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/SwapBetaApiTest.java deleted file mode 100644 index 355e6a5d..00000000 --- a/src/test/java/com/fireblocks/sdk/api/SwapBetaApiTest.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.api; - - -import com.fireblocks.sdk.ApiException; -import com.fireblocks.sdk.ApiResponse; -import com.fireblocks.sdk.model.QuoteRequest; -import com.fireblocks.sdk.model.QuoteResponse; -import com.fireblocks.sdk.model.SwapOperation; -import com.fireblocks.sdk.model.SwapOperationRequest; -import com.fireblocks.sdk.model.SwapOperationsPaginatedResponse; -import com.fireblocks.sdk.model.SwapProvider; -import com.fireblocks.sdk.model.SwapProvidersPaginatedResponse; -import java.math.BigDecimal; -import java.util.UUID; -import java.util.concurrent.CompletableFuture; -import org.junit.Ignore; -import org.junit.Test; - -/** API tests for SwapBetaApi */ -@Ignore -public class SwapBetaApiTest { - - private final SwapBetaApi api = new SwapBetaApi(); - - /** - * Approve terms of service - * - *

Approve the terms of service for a swap provider. Some providers require this approval - * before performing a swap action for the first time. Note: These endpoints are currently in - * beta and might be subject to changes. If you want to participate and learn more about the - * Fireblocks Swap, please contact your Fireblocks Customer Success Manager or send an email - * to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. - * - * @throws ApiException if the Api call fails - */ - @Test - public void approveTermsOfServiceTest() throws ApiException { - UUID providerId = null; - String idempotencyKey = null; - CompletableFuture> response = - api.approveTermsOfService(providerId, idempotencyKey); - } - - /** - * Create a quote - * - *

Create a quote from specific swap provider. Note: These endpoints are currently in beta - * and might be subject to changes. If you want to participate and learn more about the - * Fireblocks Swap, please contact your Fireblocks Customer Success Manager or send an email - * to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, - * Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createQuoteTest() throws ApiException { - QuoteRequest quoteRequest = null; - UUID providerId = null; - String idempotencyKey = null; - CompletableFuture> response = - api.createQuote(quoteRequest, providerId, idempotencyKey); - } - - /** - * Create swap operation - * - *

Create swap operation based on a provided quote Id Note: These endpoints are currently in - * beta and might be subject to changes. If you want to participate and learn more about the - * Fireblocks Swap, please contact your Fireblocks Customer Success Manager or send an email - * to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. - * - * @throws ApiException if the Api call fails - */ - @Test - public void createSwapOperationTest() throws ApiException { - SwapOperationRequest swapOperationRequest = null; - String idempotencyKey = null; - CompletableFuture> response = - api.createSwapOperation(swapOperationRequest, idempotencyKey); - } - - /** - * Get operation details - * - *

Get swap operation Details by ID. Note:These endpoints are currently in beta and might be - * subject to changes. If you want to participate and learn more about the Fireblocks Swap, - * please contact your Fireblocks Customer Success Manager or send an email - * to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, - * Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getSwapOperationByIdTest() throws ApiException { - String operationId = null; - CompletableFuture> response = - api.getSwapOperationById(operationId); - } - - /** - * Get Operations list - * - *

Return a list of swap operations for the specific workspace The operations are sorted by - * creation date in descending order, meaning the most recent operation appears first. - * Note:These endpoints are currently in beta and might be subject to changes. If you want to - * participate and learn more about the Fireblocks TAP, please contact your Fireblocks Customer - * Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, - * Non-Signing Admin, Signer, Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getSwapOperationsTest() throws ApiException { - String pageCursor = null; - BigDecimal pageSize = null; - CompletableFuture> response = - api.getSwapOperations(pageCursor, pageSize); - } - - /** - * Get Providers List - * - *

Return a list of all supported swap providers. Note: These endpoints are currently in beta - * and might be subject to changes. If you want to participate and learn more about the - * Fireblocks Swap, please contact your Fireblocks Customer Success Manager or send an email - * to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, - * Approver, Editor, Viewer. - * - * @throws ApiException if the Api call fails - */ - @Test - public void getSwapProvidersTest() throws ApiException { - String pageCursor = null; - BigDecimal pageSize = null; - CompletableFuture> response = - api.getSwapProviders(pageCursor, pageSize); - } -} diff --git a/src/test/java/com/fireblocks/sdk/api/TradingBetaApiTest.java b/src/test/java/com/fireblocks/sdk/api/TradingBetaApiTest.java new file mode 100644 index 00000000..22bf0486 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/api/TradingBetaApiTest.java @@ -0,0 +1,144 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.api; + + +import com.fireblocks.sdk.ApiException; +import com.fireblocks.sdk.ApiResponse; +import com.fireblocks.sdk.model.CreateOrderRequest; +import com.fireblocks.sdk.model.CreateQuote; +import com.fireblocks.sdk.model.GetOrdersResponse; +import com.fireblocks.sdk.model.OrderDetails; +import com.fireblocks.sdk.model.OrderStatus; +import com.fireblocks.sdk.model.ProvidersListResponse; +import com.fireblocks.sdk.model.QuotesResponse; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import org.junit.Ignore; +import org.junit.Test; + +/** API tests for TradingBetaApi */ +@Ignore +public class TradingBetaApiTest { + + private final TradingBetaApi api = new TradingBetaApi(); + + /** + * Create an order + * + *

Create an order to buy or sell an asset. If no source is given, an external source will be + * use. Note: These endpoints are currently in beta and might be subject to changes. If you want + * to participate and learn more about the Fireblocks Trading, please contact your Fireblocks + * Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint Permission: Owner, + * Admin, Non-Signing Admin, Signer, Editor. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createOrderTest() throws ApiException { + CreateOrderRequest createOrderRequest = null; + String idempotencyKey = null; + CompletableFuture> response = + api.createOrder(createOrderRequest, idempotencyKey); + } + + /** + * Create a quote + * + *

Generate a time-limited quote for asset conversion, providing exchange rate and amount + * calculations. Note: These endpoints are currently in beta and might be subject to changes. If + * you want to participate and learn more about the Fireblocks Trading, please contact your + * Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint + * Permission: Owner, Admin, Non-Signing Admin, Signer, Editor. + * + * @throws ApiException if the Api call fails + */ + @Test + public void createQuoteTest() throws ApiException { + CreateQuote createQuote = null; + String idempotencyKey = null; + CompletableFuture> response = + api.createQuote(createQuote, idempotencyKey); + } + + /** + * Get order details + * + *

Retrieve detailed information about a specific order by its ID. Note:These endpoints are + * currently in beta and might be subject to changes. If you want to participate and learn more + * about the Fireblocks Trading, please contact your Fireblocks Customer Success Manager or send + * an email to CSM@fireblocks.com. Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, + * Approver, Editor, Viewer. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOrderTest() throws ApiException { + String orderId = null; + CompletableFuture> response = api.getOrder(orderId); + } + + /** + * Get orders + * + *

Retrieve a paginated list of orders with optional filtering by account, provider, status, + * and time range. Note:These endpoints are currently in beta and might be subject to changes. + * If you want to participate and learn more about the Fireblocks Trading, please contact your + * Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint + * Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getOrdersTest() throws ApiException { + Integer pageSize = null; + String pageCursor = null; + String order = null; + List accountId = null; + List providerId = null; + List statuses = null; + Integer startTime = null; + Integer endTime = null; + String assetConversionType = null; + CompletableFuture> response = + api.getOrders( + pageSize, + pageCursor, + order, + accountId, + providerId, + statuses, + startTime, + endTime, + assetConversionType); + } + + /** + * Get providers + * + *

Retrieve a list of all available external providers supporting trading activities through + * the platform. Note: These endpoints are currently in beta and might be subject to changes. If + * you want to participate and learn more about the Fireblocks Trading, please contact your + * Fireblocks Customer Success Manager or send an email to CSM@fireblocks.com. Endpoint + * Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor, Viewer. + * + * @throws ApiException if the Api call fails + */ + @Test + public void getTradingProvidersTest() throws ApiException { + Integer pageSize = null; + String pageCursor = null; + CompletableFuture> response = + api.getTradingProviders(pageSize, pageCursor); + } +} diff --git a/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java b/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java index 0c956179..79dc4b89 100644 --- a/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java +++ b/src/test/java/com/fireblocks/sdk/api/WebhooksV2ApiTest.java @@ -184,7 +184,7 @@ public void getWebhooksTest() throws ApiException { * Resend failed notifications * *

Resend all failed notifications for a webhook in the last 24 hours Endpoint Permission: - * Owner, Admin, Non-Signing Admin. + * Owner, Admin, Non-Signing Admin, Editor, Signer. * * @throws ApiException if the Api call fails */ @@ -201,7 +201,8 @@ public void resendFailedNotificationsTest() throws ApiException { /** * Resend notification by id * - *

Resend notification by ID Endpoint Permission: Owner, Admin, Non-Signing Admin. + *

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

Resend notifications by resource Id Endpoint Permission: Owner, Admin, Non-Signing Admin. + *

Resend notifications by resource Id Endpoint Permission: Owner, Admin, Non-Signing Admin, + * Editor, Signer. * * @throws ApiException if the Api call fails */ diff --git a/src/test/java/com/fireblocks/sdk/model/AccessTypeTest.java b/src/test/java/com/fireblocks/sdk/model/AccessTypeTest.java new file mode 100644 index 00000000..5ff5aa18 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AccessTypeTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for AccessType */ +class AccessTypeTest { + private final AccessType model = new AccessType(); + + /** Model tests for AccessType */ + @Test + void testAccessType() { + // TODO: test AccessType + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'providerId' */ + @Test + void providerIdTest() { + // TODO: test providerId + } + + /** Test the property 'accountId' */ + @Test + void accountIdTest() { + // TODO: test accountId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AccountAccessTest.java b/src/test/java/com/fireblocks/sdk/model/AccountAccessTest.java new file mode 100644 index 00000000..6372354b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AccountAccessTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for AccountAccess */ +class AccountAccessTest { + private final AccountAccess model = new AccountAccess(); + + /** Model tests for AccountAccess */ + @Test + void testAccountAccess() { + // TODO: test AccountAccess + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'providerId' */ + @Test + void providerIdTest() { + // TODO: test providerId + } + + /** Test the property 'accountId' */ + @Test + void accountIdTest() { + // TODO: test accountId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SwapFlowErrorTest.java b/src/test/java/com/fireblocks/sdk/model/AccountBaseTest.java similarity index 55% rename from src/test/java/com/fireblocks/sdk/model/SwapFlowErrorTest.java rename to src/test/java/com/fireblocks/sdk/model/AccountBaseTest.java index 3fbab124..70e79e84 100644 --- a/src/test/java/com/fireblocks/sdk/model/SwapFlowErrorTest.java +++ b/src/test/java/com/fireblocks/sdk/model/AccountBaseTest.java @@ -15,25 +15,25 @@ import org.junit.jupiter.api.Test; -/** Model tests for SwapFlowError */ -class SwapFlowErrorTest { - private final SwapFlowError model = new SwapFlowError(); +/** Model tests for AccountBase */ +class AccountBaseTest { + private final AccountBase model = new AccountBase(); - /** Model tests for SwapFlowError */ + /** Model tests for AccountBase */ @Test - void testSwapFlowError() { - // TODO: test SwapFlowError + void testAccountBase() { + // TODO: test AccountBase } - /** Test the property 'code' */ + /** Test the property 'id' */ @Test - void codeTest() { - // TODO: test code + void idTest() { + // TODO: test id } - /** Test the property 'message' */ + /** Test the property 'name' */ @Test - void messageTest() { - // TODO: test message + void nameTest() { + // TODO: test name } } diff --git a/src/test/java/com/fireblocks/sdk/model/AccountBasedAccessProviderTest.java b/src/test/java/com/fireblocks/sdk/model/AccountBasedAccessProviderTest.java new file mode 100644 index 00000000..bffd130f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AccountBasedAccessProviderTest.java @@ -0,0 +1,69 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for AccountBasedAccessProvider */ +class AccountBasedAccessProviderTest { + private final AccountBasedAccessProvider model = new AccountBasedAccessProvider(); + + /** Model tests for AccountBasedAccessProvider */ + @Test + void testAccountBasedAccessProvider() { + // TODO: test AccountBasedAccessProvider + } + + /** Test the property 'id' */ + @Test + void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + void nameTest() { + // TODO: test name + } + + /** Test the property 'logo' */ + @Test + void logoTest() { + // TODO: test logo + } + + /** Test the property 'accountBased' */ + @Test + void accountBasedTest() { + // TODO: test accountBased + } + + /** Test the property 'manifest' */ + @Test + void manifestTest() { + // TODO: test manifest + } + + /** Test the property 'connected' */ + @Test + void connectedTest() { + // TODO: test connected + } + + /** Test the property 'accounts' */ + @Test + void accountsTest() { + // TODO: test accounts + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AccountHolderDetailsTest.java b/src/test/java/com/fireblocks/sdk/model/AccountHolderDetailsTest.java new file mode 100644 index 00000000..9d2266e9 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AccountHolderDetailsTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for AccountHolderDetails */ +class AccountHolderDetailsTest { + private final AccountHolderDetails model = new AccountHolderDetails(); + + /** Model tests for AccountHolderDetails */ + @Test + void testAccountHolderDetails() { + // TODO: test AccountHolderDetails + } + + /** Test the property 'name' */ + @Test + void nameTest() { + // TODO: test name + } + + /** Test the property 'city' */ + @Test + void cityTest() { + // TODO: test city + } + + /** Test the property 'country' */ + @Test + void countryTest() { + // TODO: test country + } + + /** Test the property 'subdivision' */ + @Test + void subdivisionTest() { + // TODO: test subdivision + } + + /** Test the property 'address' */ + @Test + void addressTest() { + // TODO: test address + } + + /** Test the property 'postalCode' */ + @Test + void postalCodeTest() { + // TODO: test postalCode + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AccountProviderIDTest.java b/src/test/java/com/fireblocks/sdk/model/AccountProviderIDTest.java new file mode 100644 index 00000000..ba206877 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AccountProviderIDTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for AccountProviderID */ +class AccountProviderIDTest { + private final AccountProviderID model = new AccountProviderID(); + + /** Model tests for AccountProviderID */ + @Test + void testAccountProviderID() { + // TODO: test AccountProviderID + } + + /** Test the property 'providerId' */ + @Test + void providerIdTest() { + // TODO: test providerId + } + + /** Test the property 'accountId' */ + @Test + void accountIdTest() { + // TODO: test accountId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AccountReferenceTest.java b/src/test/java/com/fireblocks/sdk/model/AccountReferenceTest.java new file mode 100644 index 00000000..b4256e4c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/AccountReferenceTest.java @@ -0,0 +1,51 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for AccountReference */ +class AccountReferenceTest { + private final AccountReference model = new AccountReference(); + + /** Model tests for AccountReference */ + @Test + void testAccountReference() { + // TODO: test AccountReference + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'accountId' */ + @Test + void accountIdTest() { + // TODO: test accountId + } + + /** Test the property 'address' */ + @Test + void addressTest() { + // TODO: test address + } + + /** Test the property 'tag' */ + @Test + void tagTest() { + // TODO: test tag + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AssetDetailsMetadataTest.java b/src/test/java/com/fireblocks/sdk/model/AssetDetailsMetadataTest.java index 14bc7270..b26fa5b0 100644 --- a/src/test/java/com/fireblocks/sdk/model/AssetDetailsMetadataTest.java +++ b/src/test/java/com/fireblocks/sdk/model/AssetDetailsMetadataTest.java @@ -66,4 +66,10 @@ void mediaTest() { void noteTest() { // TODO: test note } + + /** Test the property 'features' */ + @Test + void featuresTest() { + // TODO: test features + } } diff --git a/src/test/java/com/fireblocks/sdk/model/ProviderCategoryEnumTest.java b/src/test/java/com/fireblocks/sdk/model/AssetFeatureTest.java similarity index 69% rename from src/test/java/com/fireblocks/sdk/model/ProviderCategoryEnumTest.java rename to src/test/java/com/fireblocks/sdk/model/AssetFeatureTest.java index 3506fd4f..57c9d27f 100644 --- a/src/test/java/com/fireblocks/sdk/model/ProviderCategoryEnumTest.java +++ b/src/test/java/com/fireblocks/sdk/model/AssetFeatureTest.java @@ -15,11 +15,11 @@ import org.junit.jupiter.api.Test; -/** Model tests for ProviderCategoryEnum */ -class ProviderCategoryEnumTest { - /** Model tests for ProviderCategoryEnum */ +/** Model tests for AssetFeature */ +class AssetFeatureTest { + /** Model tests for AssetFeature */ @Test - void testProviderCategoryEnum() { - // TODO: test ProviderCategoryEnum + void testAssetFeature() { + // TODO: test AssetFeature } } diff --git a/src/test/java/com/fireblocks/sdk/model/BaseProviderTest.java b/src/test/java/com/fireblocks/sdk/model/BaseProviderTest.java new file mode 100644 index 00000000..edb7ef98 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/BaseProviderTest.java @@ -0,0 +1,51 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for BaseProvider */ +class BaseProviderTest { + private final BaseProvider model = new BaseProvider(); + + /** Model tests for BaseProvider */ + @Test + void testBaseProvider() { + // TODO: test BaseProvider + } + + /** Test the property 'id' */ + @Test + void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + void nameTest() { + // TODO: test name + } + + /** Test the property 'logo' */ + @Test + void logoTest() { + // TODO: test logo + } + + /** Test the property 'accountBased' */ + @Test + void accountBasedTest() { + // TODO: test accountBased + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/BlockchainTransferTest.java b/src/test/java/com/fireblocks/sdk/model/BlockchainTransferTest.java new file mode 100644 index 00000000..cb97ff29 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/BlockchainTransferTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for BlockchainTransfer */ +class BlockchainTransferTest { + private final BlockchainTransfer model = new BlockchainTransfer(); + + /** Model tests for BlockchainTransfer */ + @Test + void testBlockchainTransfer() { + // TODO: test BlockchainTransfer + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'txHash' */ + @Test + void txHashTest() { + // TODO: test txHash + } + + /** Test the property 'amount' */ + @Test + void amountTest() { + // TODO: test amount + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ProviderAdditionalDataTest.java b/src/test/java/com/fireblocks/sdk/model/BpsFeeTest.java similarity index 55% rename from src/test/java/com/fireblocks/sdk/model/ProviderAdditionalDataTest.java rename to src/test/java/com/fireblocks/sdk/model/BpsFeeTest.java index 183a248d..04aa525b 100644 --- a/src/test/java/com/fireblocks/sdk/model/ProviderAdditionalDataTest.java +++ b/src/test/java/com/fireblocks/sdk/model/BpsFeeTest.java @@ -15,19 +15,25 @@ import org.junit.jupiter.api.Test; -/** Model tests for ProviderAdditionalData */ -class ProviderAdditionalDataTest { - private final ProviderAdditionalData model = new ProviderAdditionalData(); +/** Model tests for BpsFee */ +class BpsFeeTest { + private final BpsFee model = new BpsFee(); - /** Model tests for ProviderAdditionalData */ + /** Model tests for BpsFee */ @Test - void testProviderAdditionalData() { - // TODO: test ProviderAdditionalData + void testBpsFee() { + // TODO: test BpsFee } - /** Test the property 'priceImpact' */ + /** Test the property 'amountType' */ @Test - void priceImpactTest() { - // TODO: test priceImpact + void amountTypeTest() { + // TODO: test amountType + } + + /** Test the property 'amount' */ + @Test + void amountTest() { + // TODO: test amount } } diff --git a/src/test/java/com/fireblocks/sdk/model/BusinessIdentificationTest.java b/src/test/java/com/fireblocks/sdk/model/BusinessIdentificationTest.java new file mode 100644 index 00000000..dfc3671f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/BusinessIdentificationTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for BusinessIdentification */ +class BusinessIdentificationTest { + private final BusinessIdentification model = new BusinessIdentification(); + + /** Model tests for BusinessIdentification */ + @Test + void testBusinessIdentification() { + // TODO: test BusinessIdentification + } + + /** Test the property 'externalReferenceId' */ + @Test + void externalReferenceIdTest() { + // TODO: test externalReferenceId + } + + /** Test the property 'entityType' */ + @Test + void entityTypeTest() { + // TODO: test entityType + } + + /** Test the property 'participantRelationshipType' */ + @Test + void participantRelationshipTypeTest() { + // TODO: test participantRelationshipType + } + + /** Test the property 'businessName' */ + @Test + void businessNameTest() { + // TODO: test businessName + } + + /** Test the property 'registrationNumber' */ + @Test + void registrationNumberTest() { + // TODO: test registrationNumber + } + + /** Test the property 'postalAddress' */ + @Test + void postalAddressTest() { + // TODO: test postalAddress + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SwapRequiredActionsEnumTest.java b/src/test/java/com/fireblocks/sdk/model/CapabilityTest.java similarity index 68% rename from src/test/java/com/fireblocks/sdk/model/SwapRequiredActionsEnumTest.java rename to src/test/java/com/fireblocks/sdk/model/CapabilityTest.java index e851d49c..f2ed2fac 100644 --- a/src/test/java/com/fireblocks/sdk/model/SwapRequiredActionsEnumTest.java +++ b/src/test/java/com/fireblocks/sdk/model/CapabilityTest.java @@ -15,11 +15,11 @@ import org.junit.jupiter.api.Test; -/** Model tests for SwapRequiredActionsEnum */ -class SwapRequiredActionsEnumTest { - /** Model tests for SwapRequiredActionsEnum */ +/** Model tests for Capability */ +class CapabilityTest { + /** Model tests for Capability */ @Test - void testSwapRequiredActionsEnum() { - // TODO: test SwapRequiredActionsEnum + void testCapability() { + // TODO: test Capability } } diff --git a/src/test/java/com/fireblocks/sdk/model/CommittedQuoteTypeTest.java b/src/test/java/com/fireblocks/sdk/model/CommittedQuoteTypeTest.java new file mode 100644 index 00000000..223baaff --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CommittedQuoteTypeTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for CommittedQuoteType */ +class CommittedQuoteTypeTest { + private final CommittedQuoteType model = new CommittedQuoteType(); + + /** Model tests for CommittedQuoteType */ + @Test + void testCommittedQuoteType() { + // TODO: test CommittedQuoteType + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'expiresAt' */ + @Test + void expiresAtTest() { + // TODO: test expiresAt + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConnectedAccountApprovalStatusTest.java b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountApprovalStatusTest.java new file mode 100644 index 00000000..8971dacb --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountApprovalStatusTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ConnectedAccountApprovalStatus */ +class ConnectedAccountApprovalStatusTest { + /** Model tests for ConnectedAccountApprovalStatus */ + @Test + void testConnectedAccountApprovalStatus() { + // TODO: test ConnectedAccountApprovalStatus + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SwapProviderProtocolsEnumTest.java b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountAssetTypeTest.java similarity index 67% rename from src/test/java/com/fireblocks/sdk/model/SwapProviderProtocolsEnumTest.java rename to src/test/java/com/fireblocks/sdk/model/ConnectedAccountAssetTypeTest.java index 3b6c8826..e0070c59 100644 --- a/src/test/java/com/fireblocks/sdk/model/SwapProviderProtocolsEnumTest.java +++ b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountAssetTypeTest.java @@ -15,11 +15,11 @@ import org.junit.jupiter.api.Test; -/** Model tests for SwapProviderProtocolsEnum */ -class SwapProviderProtocolsEnumTest { - /** Model tests for SwapProviderProtocolsEnum */ +/** Model tests for ConnectedAccountAssetType */ +class ConnectedAccountAssetTypeTest { + /** Model tests for ConnectedAccountAssetType */ @Test - void testSwapProviderProtocolsEnum() { - // TODO: test SwapProviderProtocolsEnum + void testConnectedAccountAssetType() { + // TODO: test ConnectedAccountAssetType } } diff --git a/src/test/java/com/fireblocks/sdk/model/ConnectedAccountBalancesResponseTest.java b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountBalancesResponseTest.java new file mode 100644 index 00000000..704c1a42 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountBalancesResponseTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ConnectedAccountBalancesResponse */ +class ConnectedAccountBalancesResponseTest { + private final ConnectedAccountBalancesResponse model = new ConnectedAccountBalancesResponse(); + + /** Model tests for ConnectedAccountBalancesResponse */ + @Test + void testConnectedAccountBalancesResponse() { + // TODO: test ConnectedAccountBalancesResponse + } + + /** Test the property 'data' */ + @Test + void dataTest() { + // TODO: test data + } + + /** Test the property 'total' */ + @Test + void totalTest() { + // TODO: test total + } + + /** Test the property 'next' */ + @Test + void nextTest() { + // TODO: test next + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConnectedAccountBalancesTest.java b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountBalancesTest.java new file mode 100644 index 00000000..94157d71 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountBalancesTest.java @@ -0,0 +1,69 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ConnectedAccountBalances */ +class ConnectedAccountBalancesTest { + private final ConnectedAccountBalances model = new ConnectedAccountBalances(); + + /** Model tests for ConnectedAccountBalances */ + @Test + void testConnectedAccountBalances() { + // TODO: test ConnectedAccountBalances + } + + /** Test the property 'assetId' */ + @Test + void assetIdTest() { + // TODO: test assetId + } + + /** Test the property 'availableAmount' */ + @Test + void availableAmountTest() { + // TODO: test availableAmount + } + + /** Test the property 'totalAmount' */ + @Test + void totalAmountTest() { + // TODO: test totalAmount + } + + /** Test the property 'lockedAmount' */ + @Test + void lockedAmountTest() { + // TODO: test lockedAmount + } + + /** Test the property 'creditAmount' */ + @Test + void creditAmountTest() { + // TODO: test creditAmount + } + + /** Test the property 'balanceType' */ + @Test + void balanceTypeTest() { + // TODO: test balanceType + } + + /** Test the property 'balanceName' */ + @Test + void balanceNameTest() { + // TODO: test balanceName + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConnectedAccountCapabilityTest.java b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountCapabilityTest.java new file mode 100644 index 00000000..116079d6 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountCapabilityTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ConnectedAccountCapability */ +class ConnectedAccountCapabilityTest { + /** Model tests for ConnectedAccountCapability */ + @Test + void testConnectedAccountCapability() { + // TODO: test ConnectedAccountCapability + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConnectedAccountManifestTest.java b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountManifestTest.java new file mode 100644 index 00000000..48901529 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountManifestTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ConnectedAccountManifest */ +class ConnectedAccountManifestTest { + private final ConnectedAccountManifest model = new ConnectedAccountManifest(); + + /** Model tests for ConnectedAccountManifest */ + @Test + void testConnectedAccountManifest() { + // TODO: test ConnectedAccountManifest + } + + /** Test the property 'assetTypes' */ + @Test + void assetTypesTest() { + // TODO: test assetTypes + } + + /** Test the property 'capabilities' */ + @Test + void capabilitiesTest() { + // TODO: test capabilities + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConnectedAccountRateResponseTest.java b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountRateResponseTest.java new file mode 100644 index 00000000..66cee00d --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountRateResponseTest.java @@ -0,0 +1,51 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ConnectedAccountRateResponse */ +class ConnectedAccountRateResponseTest { + private final ConnectedAccountRateResponse model = new ConnectedAccountRateResponse(); + + /** Model tests for ConnectedAccountRateResponse */ + @Test + void testConnectedAccountRateResponse() { + // TODO: test ConnectedAccountRateResponse + } + + /** Test the property 'accountId' */ + @Test + void accountIdTest() { + // TODO: test accountId + } + + /** Test the property 'baseAssetId' */ + @Test + void baseAssetIdTest() { + // TODO: test baseAssetId + } + + /** Test the property 'quoteAssetId' */ + @Test + void quoteAssetIdTest() { + // TODO: test quoteAssetId + } + + /** Test the property 'rate' */ + @Test + void rateTest() { + // TODO: test rate + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConnectedAccountTest.java b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountTest.java new file mode 100644 index 00000000..9d84bb12 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountTest.java @@ -0,0 +1,69 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ConnectedAccount */ +class ConnectedAccountTest { + private final ConnectedAccount model = new ConnectedAccount(); + + /** Model tests for ConnectedAccount */ + @Test + void testConnectedAccount() { + // TODO: test ConnectedAccount + } + + /** Test the property 'id' */ + @Test + void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + void nameTest() { + // TODO: test name + } + + /** Test the property 'providerId' */ + @Test + void providerIdTest() { + // TODO: test providerId + } + + /** Test the property 'status' */ + @Test + void statusTest() { + // TODO: test status + } + + /** Test the property 'totalBalance' */ + @Test + void totalBalanceTest() { + // TODO: test totalBalance + } + + /** Test the property 'manifest' */ + @Test + void manifestTest() { + // TODO: test manifest + } + + /** Test the property 'parentId' */ + @Test + void parentIdTest() { + // TODO: test parentId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConnectedAccountTotalBalanceTest.java b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountTotalBalanceTest.java new file mode 100644 index 00000000..3c25ab4e --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountTotalBalanceTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ConnectedAccountTotalBalance */ +class ConnectedAccountTotalBalanceTest { + private final ConnectedAccountTotalBalance model = new ConnectedAccountTotalBalance(); + + /** Model tests for ConnectedAccountTotalBalance */ + @Test + void testConnectedAccountTotalBalance() { + // TODO: test ConnectedAccountTotalBalance + } + + /** Test the property 'amount' */ + @Test + void amountTest() { + // TODO: test amount + } + + /** Test the property 'denominatedAssetId' */ + @Test + void denominatedAssetIdTest() { + // TODO: test denominatedAssetId + } + + /** Test the property 'hasFullAssetCoverage' */ + @Test + void hasFullAssetCoverageTest() { + // TODO: test hasFullAssetCoverage + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConnectedAccountTradingPairSupportedTypeTest.java b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountTradingPairSupportedTypeTest.java new file mode 100644 index 00000000..4aebcfbd --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountTradingPairSupportedTypeTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ConnectedAccountTradingPairSupportedType */ +class ConnectedAccountTradingPairSupportedTypeTest { + /** Model tests for ConnectedAccountTradingPairSupportedType */ + @Test + void testConnectedAccountTradingPairSupportedType() { + // TODO: test ConnectedAccountTradingPairSupportedType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConnectedAccountTradingPairTest.java b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountTradingPairTest.java new file mode 100644 index 00000000..e3e75612 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountTradingPairTest.java @@ -0,0 +1,51 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ConnectedAccountTradingPair */ +class ConnectedAccountTradingPairTest { + private final ConnectedAccountTradingPair model = new ConnectedAccountTradingPair(); + + /** Model tests for ConnectedAccountTradingPair */ + @Test + void testConnectedAccountTradingPair() { + // TODO: test ConnectedAccountTradingPair + } + + /** Test the property 'id' */ + @Test + void idTest() { + // TODO: test id + } + + /** Test the property 'baseAssetId' */ + @Test + void baseAssetIdTest() { + // TODO: test baseAssetId + } + + /** Test the property 'quoteAssetId' */ + @Test + void quoteAssetIdTest() { + // TODO: test quoteAssetId + } + + /** Test the property 'supportedTypes' */ + @Test + void supportedTypesTest() { + // TODO: test supportedTypes + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConnectedAccountTradingPairsResponseTest.java b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountTradingPairsResponseTest.java new file mode 100644 index 00000000..eae5f738 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountTradingPairsResponseTest.java @@ -0,0 +1,46 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ConnectedAccountTradingPairsResponse */ +class ConnectedAccountTradingPairsResponseTest { + private final ConnectedAccountTradingPairsResponse model = + new ConnectedAccountTradingPairsResponse(); + + /** Model tests for ConnectedAccountTradingPairsResponse */ + @Test + void testConnectedAccountTradingPairsResponse() { + // TODO: test ConnectedAccountTradingPairsResponse + } + + /** Test the property 'data' */ + @Test + void dataTest() { + // TODO: test data + } + + /** Test the property 'total' */ + @Test + void totalTest() { + // TODO: test total + } + + /** Test the property 'next' */ + @Test + void nextTest() { + // TODO: test next + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConnectedAccountsResponseTest.java b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountsResponseTest.java new file mode 100644 index 00000000..864eb1a8 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConnectedAccountsResponseTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ConnectedAccountsResponse */ +class ConnectedAccountsResponseTest { + private final ConnectedAccountsResponse model = new ConnectedAccountsResponse(); + + /** Model tests for ConnectedAccountsResponse */ + @Test + void testConnectedAccountsResponse() { + // TODO: test ConnectedAccountsResponse + } + + /** Test the property 'data' */ + @Test + void dataTest() { + // TODO: test data + } + + /** Test the property 'total' */ + @Test + void totalTest() { + // TODO: test total + } + + /** Test the property 'next' */ + @Test + void nextTest() { + // TODO: test next + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConnectedSingleAccountResponseTest.java b/src/test/java/com/fireblocks/sdk/model/ConnectedSingleAccountResponseTest.java new file mode 100644 index 00000000..f87a69fa --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConnectedSingleAccountResponseTest.java @@ -0,0 +1,75 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ConnectedSingleAccountResponse */ +class ConnectedSingleAccountResponseTest { + private final ConnectedSingleAccountResponse model = new ConnectedSingleAccountResponse(); + + /** Model tests for ConnectedSingleAccountResponse */ + @Test + void testConnectedSingleAccountResponse() { + // TODO: test ConnectedSingleAccountResponse + } + + /** Test the property 'id' */ + @Test + void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + void nameTest() { + // TODO: test name + } + + /** Test the property 'providerId' */ + @Test + void providerIdTest() { + // TODO: test providerId + } + + /** Test the property 'status' */ + @Test + void statusTest() { + // TODO: test status + } + + /** Test the property 'totalBalance' */ + @Test + void totalBalanceTest() { + // TODO: test totalBalance + } + + /** Test the property 'manifest' */ + @Test + void manifestTest() { + // TODO: test manifest + } + + /** Test the property 'parentId' */ + @Test + void parentIdTest() { + // TODO: test parentId + } + + /** Test the property 'subAccountsIds' */ + @Test + void subAccountsIdsTest() { + // TODO: test subAccountsIds + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ConnectedSingleAccountTest.java b/src/test/java/com/fireblocks/sdk/model/ConnectedSingleAccountTest.java new file mode 100644 index 00000000..86f2c672 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ConnectedSingleAccountTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ConnectedSingleAccount */ +class ConnectedSingleAccountTest { + private final ConnectedSingleAccount model = new ConnectedSingleAccount(); + + /** Model tests for ConnectedSingleAccount */ + @Test + void testConnectedSingleAccount() { + // TODO: test ConnectedSingleAccount + } + + /** Test the property 'subAccountsIds' */ + @Test + void subAccountsIdsTest() { + // TODO: test subAccountsIds + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateOrderRequestTest.java b/src/test/java/com/fireblocks/sdk/model/CreateOrderRequestTest.java new file mode 100644 index 00000000..09e19fb8 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateOrderRequestTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateOrderRequest */ +class CreateOrderRequestTest { + private final CreateOrderRequest model = new CreateOrderRequest(); + + /** Model tests for CreateOrderRequest */ + @Test + void testCreateOrderRequest() { + // TODO: test CreateOrderRequest + } + + /** Test the property 'via' */ + @Test + void viaTest() { + // TODO: test via + } + + /** Test the property 'executionRequestDetails' */ + @Test + void executionRequestDetailsTest() { + // TODO: test executionRequestDetails + } + + /** Test the property 'settlement' */ + @Test + void settlementTest() { + // TODO: test settlement + } + + /** Test the property 'participantsIdentification' */ + @Test + void participantsIdentificationTest() { + // TODO: test participantsIdentification + } + + /** Test the property 'customerInternalReferenceId' */ + @Test + void customerInternalReferenceIdTest() { + // TODO: test customerInternalReferenceId + } + + /** Test the property 'note' */ + @Test + void noteTest() { + // TODO: test note + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateQuoteScopeInnerTest.java b/src/test/java/com/fireblocks/sdk/model/CreateQuoteScopeInnerTest.java new file mode 100644 index 00000000..e50a0fd5 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateQuoteScopeInnerTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateQuoteScopeInner */ +class CreateQuoteScopeInnerTest { + private final CreateQuoteScopeInner model = new CreateQuoteScopeInner(); + + /** Model tests for CreateQuoteScopeInner */ + @Test + void testCreateQuoteScopeInner() { + // TODO: test CreateQuoteScopeInner + } + + /** Test the property 'providerId' */ + @Test + void providerIdTest() { + // TODO: test providerId + } + + /** Test the property 'accountId' */ + @Test + void accountIdTest() { + // TODO: test accountId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/CreateQuoteTest.java b/src/test/java/com/fireblocks/sdk/model/CreateQuoteTest.java new file mode 100644 index 00000000..da769735 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CreateQuoteTest.java @@ -0,0 +1,81 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for CreateQuote */ +class CreateQuoteTest { + private final CreateQuote model = new CreateQuote(); + + /** Model tests for CreateQuote */ + @Test + void testCreateQuote() { + // TODO: test CreateQuote + } + + /** Test the property 'scope' */ + @Test + void scopeTest() { + // TODO: test scope + } + + /** Test the property 'baseAssetId' */ + @Test + 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() { + // TODO: test baseAmount + } + + /** Test the property 'slippageBps' */ + @Test + void slippageBpsTest() { + // TODO: test slippageBps + } + + /** Test the property 'settlement' */ + @Test + void settlementTest() { + // TODO: test settlement + } + + /** Test the property 'side' */ + @Test + void sideTest() { + // TODO: test side + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/DVPSettlementTest.java b/src/test/java/com/fireblocks/sdk/model/DVPSettlementTest.java new file mode 100644 index 00000000..1c08b02c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DVPSettlementTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for DVPSettlement */ +class DVPSettlementTest { + private final DVPSettlement model = new DVPSettlement(); + + /** Model tests for DVPSettlement */ + @Test + void testDVPSettlement() { + // TODO: test DVPSettlement + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'sourceAccount' */ + @Test + void sourceAccountTest() { + // TODO: test sourceAccount + } + + /** Test the property 'destinationAccount' */ + @Test + void destinationAccountTest() { + // TODO: test destinationAccount + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SwapProviderTest.java b/src/test/java/com/fireblocks/sdk/model/DirectAccessProviderTest.java similarity index 55% rename from src/test/java/com/fireblocks/sdk/model/SwapProviderTest.java rename to src/test/java/com/fireblocks/sdk/model/DirectAccessProviderTest.java index 0f86f77c..70b13f30 100644 --- a/src/test/java/com/fireblocks/sdk/model/SwapProviderTest.java +++ b/src/test/java/com/fireblocks/sdk/model/DirectAccessProviderTest.java @@ -15,14 +15,14 @@ import org.junit.jupiter.api.Test; -/** Model tests for SwapProvider */ -class SwapProviderTest { - private final SwapProvider model = new SwapProvider(); +/** Model tests for DirectAccessProvider */ +class DirectAccessProviderTest { + private final DirectAccessProvider model = new DirectAccessProvider(); - /** Model tests for SwapProvider */ + /** Model tests for DirectAccessProvider */ @Test - void testSwapProvider() { - // TODO: test SwapProvider + void testDirectAccessProvider() { + // TODO: test DirectAccessProvider } /** Test the property 'id' */ @@ -37,33 +37,33 @@ void nameTest() { // TODO: test name } - /** Test the property 'protocols' */ + /** Test the property 'logo' */ @Test - void protocolsTest() { - // TODO: test protocols + void logoTest() { + // TODO: test logo } - /** Test the property 'category' */ + /** Test the property 'accountBased' */ @Test - void categoryTest() { - // TODO: test category + void accountBasedTest() { + // TODO: test accountBased } - /** Test the property 'isTermsApprovalRequired' */ + /** Test the property 'approved' */ @Test - void isTermsApprovalRequiredTest() { - // TODO: test isTermsApprovalRequired + void approvedTest() { + // TODO: test approved } - /** Test the property 'termsOfServiceUrl' */ + /** Test the property 'hasTermsOfService' */ @Test - void termsOfServiceUrlTest() { - // TODO: test termsOfServiceUrl + void hasTermsOfServiceTest() { + // TODO: test hasTermsOfService } - /** Test the property 'isTermsOfServiceApproved' */ + /** Test the property 'termsOfServiceUrl' */ @Test - void isTermsOfServiceApprovedTest() { - // TODO: test isTermsOfServiceApproved + void termsOfServiceUrlTest() { + // TODO: test termsOfServiceUrl } } diff --git a/src/test/java/com/fireblocks/sdk/model/DirectAccessTest.java b/src/test/java/com/fireblocks/sdk/model/DirectAccessTest.java new file mode 100644 index 00000000..dd8d07a3 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/DirectAccessTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for DirectAccess */ +class DirectAccessTest { + private final DirectAccess model = new DirectAccess(); + + /** Model tests for DirectAccess */ + @Test + void testDirectAccess() { + // TODO: test DirectAccess + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'providerId' */ + @Test + void providerIdTest() { + // TODO: test providerId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ErrorCodesTest.java b/src/test/java/com/fireblocks/sdk/model/ErrorCodesTest.java new file mode 100644 index 00000000..860776c5 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ErrorCodesTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ErrorCodes */ +class ErrorCodesTest { + /** Model tests for ErrorCodes */ + @Test + void testErrorCodes() { + // TODO: test ErrorCodes + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ExchangeAssetTest.java b/src/test/java/com/fireblocks/sdk/model/ExchangeAssetTest.java index 98346fed..885fd1e7 100644 --- a/src/test/java/com/fireblocks/sdk/model/ExchangeAssetTest.java +++ b/src/test/java/com/fireblocks/sdk/model/ExchangeAssetTest.java @@ -60,4 +60,28 @@ void availableTest() { void creditTest() { // TODO: test credit } + + /** Test the property 'assetId' */ + @Test + void assetIdTest() { + // TODO: test assetId + } + + /** Test the property 'providerSymbol' */ + @Test + void providerSymbolTest() { + // TODO: test providerSymbol + } + + /** Test the property 'assetSymbol' */ + @Test + void assetSymbolTest() { + // TODO: test assetSymbol + } + + /** Test the property 'assetLegacyId' */ + @Test + void assetLegacyIdTest() { + // TODO: test assetLegacyId + } } diff --git a/src/test/java/com/fireblocks/sdk/model/ExecutionRequestBaseDetailsTest.java b/src/test/java/com/fireblocks/sdk/model/ExecutionRequestBaseDetailsTest.java new file mode 100644 index 00000000..4f96dff4 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ExecutionRequestBaseDetailsTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ExecutionRequestBaseDetails */ +class ExecutionRequestBaseDetailsTest { + private final ExecutionRequestBaseDetails model = new ExecutionRequestBaseDetails(); + + /** Model tests for ExecutionRequestBaseDetails */ + @Test + void testExecutionRequestBaseDetails() { + // TODO: test ExecutionRequestBaseDetails + } + + /** Test the property 'side' */ + @Test + void sideTest() { + // TODO: test side + } + + /** Test the property 'baseAmount' */ + @Test + void baseAmountTest() { + // TODO: test baseAmount + } + + /** Test the property 'baseAssetId' */ + @Test + 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 + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ExecutionRequestDetailsTest.java b/src/test/java/com/fireblocks/sdk/model/ExecutionRequestDetailsTest.java new file mode 100644 index 00000000..7af9dad1 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ExecutionRequestDetailsTest.java @@ -0,0 +1,93 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ExecutionRequestDetails */ +class ExecutionRequestDetailsTest { + private final ExecutionRequestDetails model = new ExecutionRequestDetails(); + + /** Model tests for ExecutionRequestDetails */ + @Test + void testExecutionRequestDetails() { + // TODO: test ExecutionRequestDetails + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'timeInForce' */ + @Test + void timeInForceTest() { + // TODO: test timeInForce + } + + /** Test the property 'limitPrice' */ + @Test + void limitPriceTest() { + // TODO: test limitPrice + } + + /** Test the property 'side' */ + @Test + void sideTest() { + // TODO: test side + } + + /** Test the property 'baseAmount' */ + @Test + void baseAmountTest() { + // TODO: test baseAmount + } + + /** Test the property 'baseAssetId' */ + @Test + 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 'quoteId' */ + @Test + void quoteIdTest() { + // TODO: test quoteId + } + + /** Test the property 'reQuote' */ + @Test + void reQuoteTest() { + // TODO: test reQuote + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ExecutionResponseBaseDetailsTest.java b/src/test/java/com/fireblocks/sdk/model/ExecutionResponseBaseDetailsTest.java new file mode 100644 index 00000000..ead10f95 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ExecutionResponseBaseDetailsTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ExecutionResponseBaseDetails */ +class ExecutionResponseBaseDetailsTest { + private final ExecutionResponseBaseDetails model = new ExecutionResponseBaseDetails(); + + /** Model tests for ExecutionResponseBaseDetails */ + @Test + void testExecutionResponseBaseDetails() { + // TODO: test ExecutionResponseBaseDetails + } + + /** Test the property 'side' */ + @Test + void sideTest() { + // TODO: test side + } + + /** Test the property 'baseAmount' */ + @Test + void baseAmountTest() { + // TODO: test baseAmount + } + + /** Test the property 'baseAssetId' */ + @Test + 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 + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ExecutionResponseDetailsTest.java b/src/test/java/com/fireblocks/sdk/model/ExecutionResponseDetailsTest.java new file mode 100644 index 00000000..9d5c2952 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ExecutionResponseDetailsTest.java @@ -0,0 +1,99 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ExecutionResponseDetails */ +class ExecutionResponseDetailsTest { + private final ExecutionResponseDetails model = new ExecutionResponseDetails(); + + /** Model tests for ExecutionResponseDetails */ + @Test + void testExecutionResponseDetails() { + // TODO: test ExecutionResponseDetails + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'timeInForce' */ + @Test + void timeInForceTest() { + // TODO: test timeInForce + } + + /** Test the property 'limitPrice' */ + @Test + void limitPriceTest() { + // TODO: test limitPrice + } + + /** Test the property 'side' */ + @Test + void sideTest() { + // TODO: test side + } + + /** Test the property 'baseAmount' */ + @Test + void baseAmountTest() { + // TODO: test baseAmount + } + + /** Test the property 'baseAssetId' */ + @Test + 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 'quoteId' */ + @Test + void quoteIdTest() { + // TODO: test quoteId + } + + /** Test the property 'quoteAmount' */ + @Test + void quoteAmountTest() { + // TODO: test quoteAmount + } + + /** Test the property 'reQuote' */ + @Test + void reQuoteTest() { + // TODO: test reQuote + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ExecutionStepDetailsTest.java b/src/test/java/com/fireblocks/sdk/model/ExecutionStepDetailsTest.java new file mode 100644 index 00000000..4a9a79db --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ExecutionStepDetailsTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ExecutionStepDetails */ +class ExecutionStepDetailsTest { + private final ExecutionStepDetails model = new ExecutionStepDetails(); + + /** Model tests for ExecutionStepDetails */ + @Test + void testExecutionStepDetails() { + // TODO: test ExecutionStepDetails + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'fee' */ + @Test + void feeTest() { + // TODO: test fee + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ExecutionStepErrorTest.java b/src/test/java/com/fireblocks/sdk/model/ExecutionStepErrorTest.java new file mode 100644 index 00000000..0505cbfc --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ExecutionStepErrorTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ExecutionStepError */ +class ExecutionStepErrorTest { + /** Model tests for ExecutionStepError */ + @Test + void testExecutionStepError() { + // TODO: test ExecutionStepError + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ExecutionStepStatusEnumTest.java b/src/test/java/com/fireblocks/sdk/model/ExecutionStepStatusEnumTest.java new file mode 100644 index 00000000..4421a606 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ExecutionStepStatusEnumTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ExecutionStepStatusEnum */ +class ExecutionStepStatusEnumTest { + /** Model tests for ExecutionStepStatusEnum */ + @Test + void testExecutionStepStatusEnum() { + // TODO: test ExecutionStepStatusEnum + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SwapRequiredActionTest.java b/src/test/java/com/fireblocks/sdk/model/ExecutionStepTest.java similarity index 59% rename from src/test/java/com/fireblocks/sdk/model/SwapRequiredActionTest.java rename to src/test/java/com/fireblocks/sdk/model/ExecutionStepTest.java index f7aaaf42..6374a8a9 100644 --- a/src/test/java/com/fireblocks/sdk/model/SwapRequiredActionTest.java +++ b/src/test/java/com/fireblocks/sdk/model/ExecutionStepTest.java @@ -15,14 +15,14 @@ import org.junit.jupiter.api.Test; -/** Model tests for SwapRequiredAction */ -class SwapRequiredActionTest { - private final SwapRequiredAction model = new SwapRequiredAction(); +/** Model tests for ExecutionStep */ +class ExecutionStepTest { + private final ExecutionStep model = new ExecutionStep(); - /** Model tests for SwapRequiredAction */ + /** Model tests for ExecutionStep */ @Test - void testSwapRequiredAction() { - // TODO: test SwapRequiredAction + void testExecutionStep() { + // TODO: test ExecutionStep } /** Test the property 'type' */ @@ -37,9 +37,27 @@ void statusTest() { // TODO: test status } + /** Test the property 'fee' */ + @Test + void feeTest() { + // TODO: test fee + } + /** Test the property 'txId' */ @Test void txIdTest() { // TODO: test txId } + + /** Test the property 'txHash' */ + @Test + void txHashTest() { + // TODO: test txHash + } + + /** Test the property 'error' */ + @Test + void errorTest() { + // TODO: test error + } } diff --git a/src/test/java/com/fireblocks/sdk/model/ExecutionStepTypeTest.java b/src/test/java/com/fireblocks/sdk/model/ExecutionStepTypeTest.java new file mode 100644 index 00000000..83464076 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ExecutionStepTypeTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ExecutionStepType */ +class ExecutionStepTypeTest { + /** Model tests for ExecutionStepType */ + @Test + void testExecutionStepType() { + // TODO: test ExecutionStepType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ExternalAccountTest.java b/src/test/java/com/fireblocks/sdk/model/ExternalAccountTest.java new file mode 100644 index 00000000..f011ee64 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ExternalAccountTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ExternalAccount */ +class ExternalAccountTest { + private final ExternalAccount model = new ExternalAccount(); + + /** Model tests for ExternalAccount */ + @Test + void testExternalAccount() { + // TODO: test ExternalAccount + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/FeeTest.java b/src/test/java/com/fireblocks/sdk/model/FeeTest.java new file mode 100644 index 00000000..b39d5108 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/FeeTest.java @@ -0,0 +1,51 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for Fee */ +class FeeTest { + private final Fee model = new Fee(); + + /** Model tests for Fee */ + @Test + void testFee() { + // TODO: test Fee + } + + /** Test the property 'feeType' */ + @Test + void feeTypeTest() { + // TODO: test feeType + } + + /** Test the property 'assetId' */ + @Test + void assetIdTest() { + // TODO: test assetId + } + + /** Test the property 'amountType' */ + @Test + void amountTypeTest() { + // TODO: test amountType + } + + /** Test the property 'amount' */ + @Test + void amountTest() { + // TODO: test amount + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/FiatTransferTest.java b/src/test/java/com/fireblocks/sdk/model/FiatTransferTest.java new file mode 100644 index 00000000..d5c350e3 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/FiatTransferTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for FiatTransfer */ +class FiatTransferTest { + private final FiatTransfer model = new FiatTransfer(); + + /** Model tests for FiatTransfer */ + @Test + void testFiatTransfer() { + // TODO: test FiatTransfer + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'amount' */ + @Test + void amountTest() { + // TODO: test amount + } + + /** Test the property 'referenceId' */ + @Test + void referenceIdTest() { + // TODO: test referenceId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/FixedFeeTest.java b/src/test/java/com/fireblocks/sdk/model/FixedFeeTest.java new file mode 100644 index 00000000..d9070066 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/FixedFeeTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for FixedFee */ +class FixedFeeTest { + private final FixedFee model = new FixedFee(); + + /** Model tests for FixedFee */ + @Test + void testFixedFee() { + // TODO: test FixedFee + } + + /** Test the property 'amountType' */ + @Test + void amountTypeTest() { + // TODO: test amountType + } + + /** Test the property 'amount' */ + @Test + void amountTest() { + // TODO: test amount + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SwapProvidersPaginatedResponseTest.java b/src/test/java/com/fireblocks/sdk/model/GetOrdersResponseTest.java similarity index 65% rename from src/test/java/com/fireblocks/sdk/model/SwapProvidersPaginatedResponseTest.java rename to src/test/java/com/fireblocks/sdk/model/GetOrdersResponseTest.java index e89d0b72..fda17848 100644 --- a/src/test/java/com/fireblocks/sdk/model/SwapProvidersPaginatedResponseTest.java +++ b/src/test/java/com/fireblocks/sdk/model/GetOrdersResponseTest.java @@ -15,14 +15,14 @@ import org.junit.jupiter.api.Test; -/** Model tests for SwapProvidersPaginatedResponse */ -class SwapProvidersPaginatedResponseTest { - private final SwapProvidersPaginatedResponse model = new SwapProvidersPaginatedResponse(); +/** Model tests for GetOrdersResponse */ +class GetOrdersResponseTest { + private final GetOrdersResponse model = new GetOrdersResponse(); - /** Model tests for SwapProvidersPaginatedResponse */ + /** Model tests for GetOrdersResponse */ @Test - void testSwapProvidersPaginatedResponse() { - // TODO: test SwapProvidersPaginatedResponse + void testGetOrdersResponse() { + // TODO: test GetOrdersResponse } /** Test the property 'data' */ @@ -31,6 +31,12 @@ void dataTest() { // TODO: test data } + /** Test the property 'total' */ + @Test + void totalTest() { + // TODO: test total + } + /** Test the property 'next' */ @Test void nextTest() { diff --git a/src/test/java/com/fireblocks/sdk/model/IdentificationTest.java b/src/test/java/com/fireblocks/sdk/model/IdentificationTest.java new file mode 100644 index 00000000..badb09aa --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/IdentificationTest.java @@ -0,0 +1,75 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for Identification */ +class IdentificationTest { + private final Identification model = new Identification(); + + /** Model tests for Identification */ + @Test + void testIdentification() { + // TODO: test Identification + } + + /** Test the property 'externalReferenceId' */ + @Test + void externalReferenceIdTest() { + // TODO: test externalReferenceId + } + + /** Test the property 'entityType' */ + @Test + void entityTypeTest() { + // TODO: test entityType + } + + /** Test the property 'participantRelationshipType' */ + @Test + void participantRelationshipTypeTest() { + // TODO: test participantRelationshipType + } + + /** Test the property 'fullName' */ + @Test + void fullNameTest() { + // TODO: test fullName + } + + /** Test the property 'dateOfBirth' */ + @Test + void dateOfBirthTest() { + // TODO: test dateOfBirth + } + + /** Test the property 'postalAddress' */ + @Test + void postalAddressTest() { + // TODO: test postalAddress + } + + /** Test the property 'businessName' */ + @Test + void businessNameTest() { + // TODO: test businessName + } + + /** Test the property 'registrationNumber' */ + @Test + void registrationNumberTest() { + // TODO: test registrationNumber + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/IndicativeQuoteTypeTest.java b/src/test/java/com/fireblocks/sdk/model/IndicativeQuoteTypeTest.java new file mode 100644 index 00000000..85aee33a --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/IndicativeQuoteTypeTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for IndicativeQuoteType */ +class IndicativeQuoteTypeTest { + private final IndicativeQuoteType model = new IndicativeQuoteType(); + + /** Model tests for IndicativeQuoteType */ + @Test + void testIndicativeQuoteType() { + // TODO: test IndicativeQuoteType + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/InternalReferenceTest.java b/src/test/java/com/fireblocks/sdk/model/InternalReferenceTest.java new file mode 100644 index 00000000..8e3c985a --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/InternalReferenceTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for InternalReference */ +class InternalReferenceTest { + private final InternalReference model = new InternalReference(); + + /** Model tests for InternalReference */ + @Test + void testInternalReference() { + // TODO: test InternalReference + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'accountId' */ + @Test + void accountIdTest() { + // TODO: test accountId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/LimitExecutionRequestDetailsTest.java b/src/test/java/com/fireblocks/sdk/model/LimitExecutionRequestDetailsTest.java new file mode 100644 index 00000000..718fb749 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/LimitExecutionRequestDetailsTest.java @@ -0,0 +1,81 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for LimitExecutionRequestDetails */ +class LimitExecutionRequestDetailsTest { + private final LimitExecutionRequestDetails model = new LimitExecutionRequestDetails(); + + /** Model tests for LimitExecutionRequestDetails */ + @Test + void testLimitExecutionRequestDetails() { + // TODO: test LimitExecutionRequestDetails + } + + /** Test the property 'side' */ + @Test + void sideTest() { + // TODO: test side + } + + /** Test the property 'baseAmount' */ + @Test + void baseAmountTest() { + // TODO: test baseAmount + } + + /** Test the property 'baseAssetId' */ + @Test + 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 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'timeInForce' */ + @Test + void timeInForceTest() { + // TODO: test timeInForce + } + + /** Test the property 'limitPrice' */ + @Test + void limitPriceTest() { + // TODO: test limitPrice + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/LimitExecutionResponseDetailsTest.java b/src/test/java/com/fireblocks/sdk/model/LimitExecutionResponseDetailsTest.java new file mode 100644 index 00000000..fec55f1d --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/LimitExecutionResponseDetailsTest.java @@ -0,0 +1,81 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for LimitExecutionResponseDetails */ +class LimitExecutionResponseDetailsTest { + private final LimitExecutionResponseDetails model = new LimitExecutionResponseDetails(); + + /** Model tests for LimitExecutionResponseDetails */ + @Test + void testLimitExecutionResponseDetails() { + // TODO: test LimitExecutionResponseDetails + } + + /** Test the property 'side' */ + @Test + void sideTest() { + // TODO: test side + } + + /** Test the property 'baseAmount' */ + @Test + void baseAmountTest() { + // TODO: test baseAmount + } + + /** Test the property 'baseAssetId' */ + @Test + 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 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'timeInForce' */ + @Test + void timeInForceTest() { + // TODO: test timeInForce + } + + /** Test the property 'limitPrice' */ + @Test + void limitPriceTest() { + // TODO: test limitPrice + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ManifestTest.java b/src/test/java/com/fireblocks/sdk/model/ManifestTest.java new file mode 100644 index 00000000..831d6004 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ManifestTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for Manifest */ +class ManifestTest { + private final Manifest model = new Manifest(); + + /** Model tests for Manifest */ + @Test + void testManifest() { + // TODO: test Manifest + } + + /** Test the property 'assetTypes' */ + @Test + void assetTypesTest() { + // TODO: test assetTypes + } + + /** Test the property 'capabilities' */ + @Test + void capabilitiesTest() { + // TODO: test capabilities + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/MarketExecutionRequestDetailsTest.java b/src/test/java/com/fireblocks/sdk/model/MarketExecutionRequestDetailsTest.java new file mode 100644 index 00000000..4d81d69b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/MarketExecutionRequestDetailsTest.java @@ -0,0 +1,69 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for MarketExecutionRequestDetails */ +class MarketExecutionRequestDetailsTest { + private final MarketExecutionRequestDetails model = new MarketExecutionRequestDetails(); + + /** Model tests for MarketExecutionRequestDetails */ + @Test + void testMarketExecutionRequestDetails() { + // TODO: test MarketExecutionRequestDetails + } + + /** Test the property 'side' */ + @Test + void sideTest() { + // TODO: test side + } + + /** Test the property 'baseAmount' */ + @Test + void baseAmountTest() { + // TODO: test baseAmount + } + + /** Test the property 'baseAssetId' */ + @Test + 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 'type' */ + @Test + void typeTest() { + // TODO: test type + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/MarketExecutionResponseDetailsTest.java b/src/test/java/com/fireblocks/sdk/model/MarketExecutionResponseDetailsTest.java new file mode 100644 index 00000000..a2e337d0 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/MarketExecutionResponseDetailsTest.java @@ -0,0 +1,69 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for MarketExecutionResponseDetails */ +class MarketExecutionResponseDetailsTest { + private final MarketExecutionResponseDetails model = new MarketExecutionResponseDetails(); + + /** Model tests for MarketExecutionResponseDetails */ + @Test + void testMarketExecutionResponseDetails() { + // TODO: test MarketExecutionResponseDetails + } + + /** Test the property 'side' */ + @Test + void sideTest() { + // TODO: test side + } + + /** Test the property 'baseAmount' */ + @Test + void baseAmountTest() { + // TODO: test baseAmount + } + + /** Test the property 'baseAssetId' */ + @Test + 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 'type' */ + @Test + void typeTest() { + // TODO: test type + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/MarketRequoteRequestDetailsTest.java b/src/test/java/com/fireblocks/sdk/model/MarketRequoteRequestDetailsTest.java new file mode 100644 index 00000000..776c3f6f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/MarketRequoteRequestDetailsTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for MarketRequoteRequestDetails */ +class MarketRequoteRequestDetailsTest { + private final MarketRequoteRequestDetails model = new MarketRequoteRequestDetails(); + + /** Model tests for MarketRequoteRequestDetails */ + @Test + void testMarketRequoteRequestDetails() { + // TODO: test MarketRequoteRequestDetails + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/NonWalletQuoteFeeTest.java b/src/test/java/com/fireblocks/sdk/model/NonWalletQuoteFeeTest.java deleted file mode 100644 index e5cc1773..00000000 --- a/src/test/java/com/fireblocks/sdk/model/NonWalletQuoteFeeTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.model; - - -import org.junit.jupiter.api.Test; - -/** Model tests for NonWalletQuoteFee */ -class NonWalletQuoteFeeTest { - private final NonWalletQuoteFee model = new NonWalletQuoteFee(); - - /** Model tests for NonWalletQuoteFee */ - @Test - void testNonWalletQuoteFee() { - // TODO: test NonWalletQuoteFee - } - - /** Test the property 'networkExecutionFee' */ - @Test - void networkExecutionFeeTest() { - // TODO: test networkExecutionFee - } - - /** Test the property 'networkFeeAssetId' */ - @Test - void networkFeeAssetIdTest() { - // TODO: test networkFeeAssetId - } - - /** Test the property 'providerFee' */ - @Test - void providerFeeTest() { - // TODO: test providerFee - } - - /** Test the property 'providerFeeAssetId' */ - @Test - void providerFeeAssetIdTest() { - // TODO: test providerFeeAssetId - } - - /** Test the property 'providerFeeRate' */ - @Test - void providerFeeRateTest() { - // TODO: test providerFeeRate - } -} diff --git a/src/test/java/com/fireblocks/sdk/model/NonWalletQuoteResponseTest.java b/src/test/java/com/fireblocks/sdk/model/NonWalletQuoteResponseTest.java deleted file mode 100644 index 4ac9bcd3..00000000 --- a/src/test/java/com/fireblocks/sdk/model/NonWalletQuoteResponseTest.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.model; - - -import org.junit.jupiter.api.Test; - -/** Model tests for NonWalletQuoteResponse */ -class NonWalletQuoteResponseTest { - private final NonWalletQuoteResponse model = new NonWalletQuoteResponse(); - - /** Model tests for NonWalletQuoteResponse */ - @Test - void testNonWalletQuoteResponse() { - // TODO: test NonWalletQuoteResponse - } - - /** Test the property 'protocol' */ - @Test - void protocolTest() { - // TODO: test protocol - } - - /** Test the property 'inputAmount' */ - @Test - void inputAmountTest() { - // TODO: test inputAmount - } - - /** Test the property 'inputAsset' */ - @Test - void inputAssetTest() { - // TODO: test inputAsset - } - - /** Test the property 'slippageTolerance' */ - @Test - void slippageToleranceTest() { - // TODO: test slippageTolerance - } - - /** Test the property 'outputMinAmount' */ - @Test - void outputMinAmountTest() { - // TODO: test outputMinAmount - } - - /** Test the property 'outputMaxAmount' */ - @Test - void outputMaxAmountTest() { - // TODO: test outputMaxAmount - } - - /** Test the property 'outputAsset' */ - @Test - void outputAssetTest() { - // TODO: test outputAsset - } - - /** Test the property 'additionalData' */ - @Test - void additionalDataTest() { - // TODO: test additionalData - } - - /** Test the property 'estimatedFees' */ - @Test - void estimatedFeesTest() { - // TODO: test estimatedFees - } -} diff --git a/src/test/java/com/fireblocks/sdk/model/OneTimeAddressReferenceTest.java b/src/test/java/com/fireblocks/sdk/model/OneTimeAddressReferenceTest.java new file mode 100644 index 00000000..74f79ebf --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/OneTimeAddressReferenceTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for OneTimeAddressReference */ +class OneTimeAddressReferenceTest { + private final OneTimeAddressReference model = new OneTimeAddressReference(); + + /** Model tests for OneTimeAddressReference */ + @Test + void testOneTimeAddressReference() { + // TODO: test OneTimeAddressReference + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'address' */ + @Test + void addressTest() { + // TODO: test address + } + + /** Test the property 'tag' */ + @Test + void tagTest() { + // TODO: test tag + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/OrderDetailsTest.java b/src/test/java/com/fireblocks/sdk/model/OrderDetailsTest.java new file mode 100644 index 00000000..824904d7 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/OrderDetailsTest.java @@ -0,0 +1,123 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for OrderDetails */ +class OrderDetailsTest { + private final OrderDetails model = new OrderDetails(); + + /** Model tests for OrderDetails */ + @Test + void testOrderDetails() { + // TODO: test OrderDetails + } + + /** Test the property 'id' */ + @Test + void idTest() { + // TODO: test id + } + + /** Test the property 'via' */ + @Test + void viaTest() { + // TODO: test via + } + + /** Test the property 'status' */ + @Test + void statusTest() { + // TODO: test status + } + + /** Test the property 'createdAt' */ + @Test + void createdAtTest() { + // TODO: test createdAt + } + + /** Test the property 'updatedAt' */ + @Test + void updatedAtTest() { + // TODO: test updatedAt + } + + /** Test the property 'receipt' */ + @Test + void receiptTest() { + // TODO: test receipt + } + + /** Test the property 'generalFees' */ + @Test + void generalFeesTest() { + // TODO: test generalFees + } + + /** Test the property 'executionSteps' */ + @Test + void executionStepsTest() { + // TODO: test executionSteps + } + + /** Test the property 'executionResponseDetails' */ + @Test + void executionResponseDetailsTest() { + // TODO: test executionResponseDetails + } + + /** Test the property 'settlement' */ + @Test + void settlementTest() { + // TODO: test settlement + } + + /** Test the property 'participantsIdentification' */ + @Test + void participantsIdentificationTest() { + // TODO: test participantsIdentification + } + + /** Test the property 'paymentInstructions' */ + @Test + void paymentInstructionsTest() { + // TODO: test paymentInstructions + } + + /** Test the property 'createdBy' */ + @Test + void createdByTest() { + // TODO: test createdBy + } + + /** Test the property 'customerInternalReferenceId' */ + @Test + void customerInternalReferenceIdTest() { + // TODO: test customerInternalReferenceId + } + + /** Test the property 'note' */ + @Test + void noteTest() { + // TODO: test note + } + + /** Test the property 'expiresAt' */ + @Test + void expiresAtTest() { + // TODO: test expiresAt + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/OrderStatusTest.java b/src/test/java/com/fireblocks/sdk/model/OrderStatusTest.java new file mode 100644 index 00000000..db974d42 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/OrderStatusTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for OrderStatus */ +class OrderStatusTest { + /** Model tests for OrderStatus */ + @Test + void testOrderStatus() { + // TODO: test OrderStatus + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/OrderSummaryTest.java b/src/test/java/com/fireblocks/sdk/model/OrderSummaryTest.java new file mode 100644 index 00000000..24b8b7c8 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/OrderSummaryTest.java @@ -0,0 +1,93 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for OrderSummary */ +class OrderSummaryTest { + private final OrderSummary model = new OrderSummary(); + + /** Model tests for OrderSummary */ + @Test + void testOrderSummary() { + // TODO: test OrderSummary + } + + /** Test the property 'id' */ + @Test + void idTest() { + // TODO: test id + } + + /** Test the property 'via' */ + @Test + void viaTest() { + // TODO: test via + } + + /** Test the property 'side' */ + @Test + void sideTest() { + // TODO: test side + } + + /** Test the property 'baseAmount' */ + @Test + void baseAmountTest() { + // TODO: test baseAmount + } + + /** Test the property 'quoteAmount' */ + @Test + void quoteAmountTest() { + // TODO: test quoteAmount + } + + /** Test the property 'baseAssetId' */ + @Test + void baseAssetIdTest() { + // TODO: test baseAssetId + } + + /** Test the property 'quoteAssetId' */ + @Test + void quoteAssetIdTest() { + // TODO: test quoteAssetId + } + + /** Test the property 'status' */ + @Test + void statusTest() { + // TODO: test status + } + + /** Test the property 'destination' */ + @Test + void destinationTest() { + // TODO: test destination + } + + /** Test the property 'source' */ + @Test + void sourceTest() { + // TODO: test source + } + + /** Test the property 'createdAt' */ + @Test + void createdAtTest() { + // TODO: test createdAt + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ParticipantRelationshipTypeTest.java b/src/test/java/com/fireblocks/sdk/model/ParticipantRelationshipTypeTest.java new file mode 100644 index 00000000..ae2c4727 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ParticipantRelationshipTypeTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ParticipantRelationshipType */ +class ParticipantRelationshipTypeTest { + /** Model tests for ParticipantRelationshipType */ + @Test + void testParticipantRelationshipType() { + // TODO: test ParticipantRelationshipType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ParticipantsIdentificationTest.java b/src/test/java/com/fireblocks/sdk/model/ParticipantsIdentificationTest.java new file mode 100644 index 00000000..34eec533 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ParticipantsIdentificationTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ParticipantsIdentification */ +class ParticipantsIdentificationTest { + private final ParticipantsIdentification model = new ParticipantsIdentification(); + + /** Model tests for ParticipantsIdentification */ + @Test + void testParticipantsIdentification() { + // TODO: test ParticipantsIdentification + } + + /** Test the property 'originator' */ + @Test + void originatorTest() { + // TODO: test originator + } + + /** Test the property 'beneficiary' */ + @Test + void beneficiaryTest() { + // TODO: test beneficiary + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/PaymentInstructionsTest.java b/src/test/java/com/fireblocks/sdk/model/PaymentInstructionsTest.java new file mode 100644 index 00000000..a04139e4 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/PaymentInstructionsTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for PaymentInstructions */ +class PaymentInstructionsTest { + private final PaymentInstructions model = new PaymentInstructions(); + + /** Model tests for PaymentInstructions */ + @Test + void testPaymentInstructions() { + // TODO: test PaymentInstructions + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'address' */ + @Test + void addressTest() { + // TODO: test address + } + + /** Test the property 'referenceId' */ + @Test + void referenceIdTest() { + // TODO: test referenceId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/PeerTypeTest.java b/src/test/java/com/fireblocks/sdk/model/PeerTypeTest.java new file mode 100644 index 00000000..6615dcaf --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/PeerTypeTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for PeerType */ +class PeerTypeTest { + /** Model tests for PeerType */ + @Test + void testPeerType() { + // TODO: test PeerType + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/PersonalIdentificationFullNameTest.java b/src/test/java/com/fireblocks/sdk/model/PersonalIdentificationFullNameTest.java new file mode 100644 index 00000000..51fead83 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/PersonalIdentificationFullNameTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for PersonalIdentificationFullName */ +class PersonalIdentificationFullNameTest { + private final PersonalIdentificationFullName model = new PersonalIdentificationFullName(); + + /** Model tests for PersonalIdentificationFullName */ + @Test + void testPersonalIdentificationFullName() { + // TODO: test PersonalIdentificationFullName + } + + /** Test the property 'firstName' */ + @Test + void firstNameTest() { + // TODO: test firstName + } + + /** Test the property 'lastName' */ + @Test + void lastNameTest() { + // TODO: test lastName + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/PersonalIdentificationTest.java b/src/test/java/com/fireblocks/sdk/model/PersonalIdentificationTest.java new file mode 100644 index 00000000..c36ebae5 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/PersonalIdentificationTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for PersonalIdentification */ +class PersonalIdentificationTest { + private final PersonalIdentification model = new PersonalIdentification(); + + /** Model tests for PersonalIdentification */ + @Test + void testPersonalIdentification() { + // TODO: test PersonalIdentification + } + + /** Test the property 'externalReferenceId' */ + @Test + void externalReferenceIdTest() { + // TODO: test externalReferenceId + } + + /** Test the property 'entityType' */ + @Test + void entityTypeTest() { + // TODO: test entityType + } + + /** Test the property 'participantRelationshipType' */ + @Test + void participantRelationshipTypeTest() { + // TODO: test participantRelationshipType + } + + /** Test the property 'fullName' */ + @Test + void fullNameTest() { + // TODO: test fullName + } + + /** Test the property 'dateOfBirth' */ + @Test + void dateOfBirthTest() { + // TODO: test dateOfBirth + } + + /** Test the property 'postalAddress' */ + @Test + void postalAddressTest() { + // TODO: test postalAddress + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/PlatformAccountTest.java b/src/test/java/com/fireblocks/sdk/model/PlatformAccountTest.java new file mode 100644 index 00000000..7c8dbbd6 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/PlatformAccountTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for PlatformAccount */ +class PlatformAccountTest { + private final PlatformAccount model = new PlatformAccount(); + + /** Model tests for PlatformAccount */ + @Test + void testPlatformAccount() { + // TODO: test PlatformAccount + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'accountId' */ + @Test + void accountIdTest() { + // TODO: test accountId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/PostOrderSettlementTest.java b/src/test/java/com/fireblocks/sdk/model/PostOrderSettlementTest.java new file mode 100644 index 00000000..026a117b --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/PostOrderSettlementTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for PostOrderSettlement */ +class PostOrderSettlementTest { + private final PostOrderSettlement model = new PostOrderSettlement(); + + /** Model tests for PostOrderSettlement */ + @Test + void testPostOrderSettlement() { + // TODO: test PostOrderSettlement + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/PostalAddressTest.java b/src/test/java/com/fireblocks/sdk/model/PostalAddressTest.java new file mode 100644 index 00000000..a0941991 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/PostalAddressTest.java @@ -0,0 +1,69 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for PostalAddress */ +class PostalAddressTest { + private final PostalAddress model = new PostalAddress(); + + /** Model tests for PostalAddress */ + @Test + void testPostalAddress() { + // TODO: test PostalAddress + } + + /** Test the property 'streetName' */ + @Test + void streetNameTest() { + // TODO: test streetName + } + + /** Test the property 'buildingNumber' */ + @Test + void buildingNumberTest() { + // TODO: test buildingNumber + } + + /** Test the property 'postalCode' */ + @Test + void postalCodeTest() { + // TODO: test postalCode + } + + /** Test the property 'city' */ + @Test + void cityTest() { + // TODO: test city + } + + /** Test the property 'subdivision' */ + @Test + void subdivisionTest() { + // TODO: test subdivision + } + + /** Test the property 'district' */ + @Test + void districtTest() { + // TODO: test district + } + + /** Test the property 'country' */ + @Test + void countryTest() { + // TODO: test country + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/PrefundedSettlementTest.java b/src/test/java/com/fireblocks/sdk/model/PrefundedSettlementTest.java new file mode 100644 index 00000000..e99c670f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/PrefundedSettlementTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for PrefundedSettlement */ +class PrefundedSettlementTest { + private final PrefundedSettlement model = new PrefundedSettlement(); + + /** Model tests for PrefundedSettlement */ + @Test + void testPrefundedSettlement() { + // TODO: test PrefundedSettlement + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'destinationAccount' */ + @Test + void destinationAccountTest() { + // TODO: test destinationAccount + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/ProviderIDTest.java b/src/test/java/com/fireblocks/sdk/model/ProviderIDTest.java new file mode 100644 index 00000000..a93d47d2 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/ProviderIDTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for ProviderID */ +class ProviderIDTest { + private final ProviderID model = new ProviderID(); + + /** Model tests for ProviderID */ + @Test + void testProviderID() { + // TODO: test ProviderID + } + + /** Test the property 'providerId' */ + @Test + void providerIdTest() { + // TODO: test providerId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SwapOperationsPaginatedResponseTest.java b/src/test/java/com/fireblocks/sdk/model/ProvidersListResponseTest.java similarity index 63% rename from src/test/java/com/fireblocks/sdk/model/SwapOperationsPaginatedResponseTest.java rename to src/test/java/com/fireblocks/sdk/model/ProvidersListResponseTest.java index fe0af80b..de5119ab 100644 --- a/src/test/java/com/fireblocks/sdk/model/SwapOperationsPaginatedResponseTest.java +++ b/src/test/java/com/fireblocks/sdk/model/ProvidersListResponseTest.java @@ -15,14 +15,14 @@ import org.junit.jupiter.api.Test; -/** Model tests for SwapOperationsPaginatedResponse */ -class SwapOperationsPaginatedResponseTest { - private final SwapOperationsPaginatedResponse model = new SwapOperationsPaginatedResponse(); +/** Model tests for ProvidersListResponse */ +class ProvidersListResponseTest { + private final ProvidersListResponse model = new ProvidersListResponse(); - /** Model tests for SwapOperationsPaginatedResponse */ + /** Model tests for ProvidersListResponse */ @Test - void testSwapOperationsPaginatedResponse() { - // TODO: test SwapOperationsPaginatedResponse + void testProvidersListResponse() { + // TODO: test ProvidersListResponse } /** Test the property 'data' */ @@ -31,6 +31,12 @@ void dataTest() { // TODO: test data } + /** Test the property 'total' */ + @Test + void totalTest() { + // TODO: test total + } + /** Test the property 'next' */ @Test void nextTest() { diff --git a/src/test/java/com/fireblocks/sdk/model/QuoteExecutionRequestDetailsTest.java b/src/test/java/com/fireblocks/sdk/model/QuoteExecutionRequestDetailsTest.java new file mode 100644 index 00000000..4590987a --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/QuoteExecutionRequestDetailsTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for QuoteExecutionRequestDetails */ +class QuoteExecutionRequestDetailsTest { + private final QuoteExecutionRequestDetails model = new QuoteExecutionRequestDetails(); + + /** Model tests for QuoteExecutionRequestDetails */ + @Test + void testQuoteExecutionRequestDetails() { + // TODO: test QuoteExecutionRequestDetails + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'quoteId' */ + @Test + void quoteIdTest() { + // TODO: test quoteId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/QuoteExecutionResponseDetailsTest.java b/src/test/java/com/fireblocks/sdk/model/QuoteExecutionResponseDetailsTest.java new file mode 100644 index 00000000..731367c4 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/QuoteExecutionResponseDetailsTest.java @@ -0,0 +1,81 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for QuoteExecutionResponseDetails */ +class QuoteExecutionResponseDetailsTest { + private final QuoteExecutionResponseDetails model = new QuoteExecutionResponseDetails(); + + /** Model tests for QuoteExecutionResponseDetails */ + @Test + void testQuoteExecutionResponseDetails() { + // TODO: test QuoteExecutionResponseDetails + } + + /** Test the property 'side' */ + @Test + void sideTest() { + // TODO: test side + } + + /** Test the property 'baseAmount' */ + @Test + void baseAmountTest() { + // TODO: test baseAmount + } + + /** Test the property 'baseAssetId' */ + @Test + 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 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'quoteId' */ + @Test + void quoteIdTest() { + // TODO: test quoteId + } + + /** Test the property 'quoteAmount' */ + @Test + void quoteAmountTest() { + // TODO: test quoteAmount + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteRequestDetailsAllOfReQuoteTest.java b/src/test/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteRequestDetailsAllOfReQuoteTest.java new file mode 100644 index 00000000..072eb706 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteRequestDetailsAllOfReQuoteTest.java @@ -0,0 +1,46 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for QuoteExecutionWithRequoteRequestDetailsAllOfReQuote */ +class QuoteExecutionWithRequoteRequestDetailsAllOfReQuoteTest { + private final QuoteExecutionWithRequoteRequestDetailsAllOfReQuote model = + new QuoteExecutionWithRequoteRequestDetailsAllOfReQuote(); + + /** Model tests for QuoteExecutionWithRequoteRequestDetailsAllOfReQuote */ + @Test + void testQuoteExecutionWithRequoteRequestDetailsAllOfReQuote() { + // TODO: test QuoteExecutionWithRequoteRequestDetailsAllOfReQuote + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'count' */ + @Test + void countTest() { + // TODO: test count + } + + /** Test the property 'slippageBps' */ + @Test + void slippageBpsTest() { + // TODO: test slippageBps + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteRequestDetailsTest.java b/src/test/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteRequestDetailsTest.java new file mode 100644 index 00000000..8153e016 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteRequestDetailsTest.java @@ -0,0 +1,46 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for QuoteExecutionWithRequoteRequestDetails */ +class QuoteExecutionWithRequoteRequestDetailsTest { + private final QuoteExecutionWithRequoteRequestDetails model = + new QuoteExecutionWithRequoteRequestDetails(); + + /** Model tests for QuoteExecutionWithRequoteRequestDetails */ + @Test + void testQuoteExecutionWithRequoteRequestDetails() { + // TODO: test QuoteExecutionWithRequoteRequestDetails + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'quoteId' */ + @Test + void quoteIdTest() { + // TODO: test quoteId + } + + /** Test the property 'reQuote' */ + @Test + void reQuoteTest() { + // TODO: test reQuote + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteResponseDetailsAllOfReQuoteTest.java b/src/test/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteResponseDetailsAllOfReQuoteTest.java new file mode 100644 index 00000000..ac97ec66 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteResponseDetailsAllOfReQuoteTest.java @@ -0,0 +1,46 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for QuoteExecutionWithRequoteResponseDetailsAllOfReQuote */ +class QuoteExecutionWithRequoteResponseDetailsAllOfReQuoteTest { + private final QuoteExecutionWithRequoteResponseDetailsAllOfReQuote model = + new QuoteExecutionWithRequoteResponseDetailsAllOfReQuote(); + + /** Model tests for QuoteExecutionWithRequoteResponseDetailsAllOfReQuote */ + @Test + void testQuoteExecutionWithRequoteResponseDetailsAllOfReQuote() { + // TODO: test QuoteExecutionWithRequoteResponseDetailsAllOfReQuote + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'count' */ + @Test + void countTest() { + // TODO: test count + } + + /** Test the property 'slippageBps' */ + @Test + void slippageBpsTest() { + // TODO: test slippageBps + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteResponseDetailsTest.java b/src/test/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteResponseDetailsTest.java new file mode 100644 index 00000000..f8fb1eb9 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/QuoteExecutionWithRequoteResponseDetailsTest.java @@ -0,0 +1,88 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for QuoteExecutionWithRequoteResponseDetails */ +class QuoteExecutionWithRequoteResponseDetailsTest { + private final QuoteExecutionWithRequoteResponseDetails model = + new QuoteExecutionWithRequoteResponseDetails(); + + /** Model tests for QuoteExecutionWithRequoteResponseDetails */ + @Test + void testQuoteExecutionWithRequoteResponseDetails() { + // TODO: test QuoteExecutionWithRequoteResponseDetails + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'quoteId' */ + @Test + void quoteIdTest() { + // TODO: test quoteId + } + + /** Test the property 'quoteAmount' */ + @Test + void quoteAmountTest() { + // TODO: test quoteAmount + } + + /** Test the property 'side' */ + @Test + void sideTest() { + // TODO: test side + } + + /** Test the property 'baseAmount' */ + @Test + void baseAmountTest() { + // TODO: test baseAmount + } + + /** Test the property 'baseAssetId' */ + @Test + 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 'reQuote' */ + @Test + void reQuoteTest() { + // TODO: test reQuote + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/QuoteFeeTest.java b/src/test/java/com/fireblocks/sdk/model/QuoteFeeTest.java deleted file mode 100644 index 76520666..00000000 --- a/src/test/java/com/fireblocks/sdk/model/QuoteFeeTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.model; - - -import org.junit.jupiter.api.Test; - -/** Model tests for QuoteFee */ -class QuoteFeeTest { - private final QuoteFee model = new QuoteFee(); - - /** Model tests for QuoteFee */ - @Test - void testQuoteFee() { - // TODO: test QuoteFee - } - - /** Test the property 'networkExecutionFee' */ - @Test - void networkExecutionFeeTest() { - // TODO: test networkExecutionFee - } - - /** Test the property 'networkFeeAssetId' */ - @Test - void networkFeeAssetIdTest() { - // TODO: test networkFeeAssetId - } - - /** Test the property 'providerFee' */ - @Test - void providerFeeTest() { - // TODO: test providerFee - } - - /** Test the property 'providerFeeAssetId' */ - @Test - void providerFeeAssetIdTest() { - // TODO: test providerFeeAssetId - } - - /** Test the property 'providerFeeRate' */ - @Test - void providerFeeRateTest() { - // TODO: test providerFeeRate - } - - /** Test the property 'networkApproveFee' */ - @Test - void networkApproveFeeTest() { - // TODO: test networkApproveFee - } -} diff --git a/src/test/java/com/fireblocks/sdk/model/QuoteRequestTest.java b/src/test/java/com/fireblocks/sdk/model/QuoteRequestTest.java deleted file mode 100644 index 6420687b..00000000 --- a/src/test/java/com/fireblocks/sdk/model/QuoteRequestTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.model; - - -import org.junit.jupiter.api.Test; - -/** Model tests for QuoteRequest */ -class QuoteRequestTest { - private final QuoteRequest model = new QuoteRequest(); - - /** Model tests for QuoteRequest */ - @Test - void testQuoteRequest() { - // TODO: test QuoteRequest - } - - /** Test the property 'accountId' */ - @Test - void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'inputAmount' */ - @Test - void inputAmountTest() { - // TODO: test inputAmount - } - - /** Test the property 'inputAsset' */ - @Test - void inputAssetTest() { - // TODO: test inputAsset - } - - /** Test the property 'outputAsset' */ - @Test - void outputAssetTest() { - // TODO: test outputAsset - } - - /** Test the property 'slippageTolerance' */ - @Test - void slippageToleranceTest() { - // TODO: test slippageTolerance - } - - /** Test the property 'protocol' */ - @Test - void protocolTest() { - // TODO: test protocol - } -} diff --git a/src/test/java/com/fireblocks/sdk/model/QuoteResponseTest.java b/src/test/java/com/fireblocks/sdk/model/QuoteResponseTest.java deleted file mode 100644 index 1c7c2778..00000000 --- a/src/test/java/com/fireblocks/sdk/model/QuoteResponseTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.model; - - -import org.junit.jupiter.api.Test; - -/** Model tests for QuoteResponse */ -class QuoteResponseTest { - private final QuoteResponse model = new QuoteResponse(); - - /** Model tests for QuoteResponse */ - @Test - void testQuoteResponse() { - // TODO: test QuoteResponse - } - - /** Test the property 'protocol' */ - @Test - void protocolTest() { - // TODO: test protocol - } - - /** Test the property 'inputAmount' */ - @Test - void inputAmountTest() { - // TODO: test inputAmount - } - - /** Test the property 'inputAsset' */ - @Test - void inputAssetTest() { - // TODO: test inputAsset - } - - /** Test the property 'slippageTolerance' */ - @Test - void slippageToleranceTest() { - // TODO: test slippageTolerance - } - - /** Test the property 'outputMinAmount' */ - @Test - void outputMinAmountTest() { - // TODO: test outputMinAmount - } - - /** Test the property 'outputMaxAmount' */ - @Test - void outputMaxAmountTest() { - // TODO: test outputMaxAmount - } - - /** Test the property 'outputAsset' */ - @Test - void outputAssetTest() { - // TODO: test outputAsset - } - - /** Test the property 'additionalData' */ - @Test - void additionalDataTest() { - // TODO: test additionalData - } - - /** Test the property 'providerQuoteId' */ - @Test - void providerQuoteIdTest() { - // TODO: test providerQuoteId - } - - /** Test the property 'expiredAt' */ - @Test - void expiredAtTest() { - // TODO: test expiredAt - } - - /** Test the property 'requiredActions' */ - @Test - void requiredActionsTest() { - // TODO: test requiredActions - } - - /** Test the property 'estimatedFees' */ - @Test - void estimatedFeesTest() { - // TODO: test estimatedFees - } -} diff --git a/src/test/java/com/fireblocks/sdk/model/QuoteTest.java b/src/test/java/com/fireblocks/sdk/model/QuoteTest.java new file mode 100644 index 00000000..e6e219f0 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/QuoteTest.java @@ -0,0 +1,105 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for Quote */ +class QuoteTest { + private final Quote model = new Quote(); + + /** Model tests for Quote */ + @Test + void testQuote() { + // TODO: test Quote + } + + /** Test the property 'via' */ + @Test + void viaTest() { + // TODO: test via + } + + /** Test the property 'id' */ + @Test + void idTest() { + // TODO: test id + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'quoteAssetId' */ + @Test + void quoteAssetIdTest() { + // TODO: test quoteAssetId + } + + /** Test the property 'baseAssetId' */ + @Test + void baseAssetIdTest() { + // TODO: test baseAssetId + } + + /** Test the property 'baseAmount' */ + @Test + void baseAmountTest() { + // TODO: test baseAmount + } + + /** Test the property 'quoteAmount' */ + @Test + void quoteAmountTest() { + // TODO: test quoteAmount + } + + /** Test the property 'priceImpact' */ + @Test + void priceImpactTest() { + // TODO: test priceImpact + } + + /** Test the property 'quoteMinAmount' */ + @Test + void quoteMinAmountTest() { + // TODO: test quoteMinAmount + } + + /** Test the property 'executionSteps' */ + @Test + void executionStepsTest() { + // TODO: test executionSteps + } + + /** Test the property 'generalFees' */ + @Test + void generalFeesTest() { + // TODO: test generalFees + } + + /** Test the property 'side' */ + @Test + void sideTest() { + // TODO: test side + } + + /** Test the property 'expiresAt' */ + @Test + void expiresAtTest() { + // TODO: test expiresAt + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/QuotesResponseTest.java b/src/test/java/com/fireblocks/sdk/model/QuotesResponseTest.java new file mode 100644 index 00000000..0c1acfd2 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/QuotesResponseTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for QuotesResponse */ +class QuotesResponseTest { + private final QuotesResponse model = new QuotesResponse(); + + /** Model tests for QuotesResponse */ + @Test + void testQuotesResponse() { + // TODO: test QuotesResponse + } + + /** Test the property 'quotes' */ + @Test + void quotesTest() { + // TODO: test quotes + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/RetryRequoteRequestDetailsTest.java b/src/test/java/com/fireblocks/sdk/model/RetryRequoteRequestDetailsTest.java new file mode 100644 index 00000000..5cce4223 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/RetryRequoteRequestDetailsTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for RetryRequoteRequestDetails */ +class RetryRequoteRequestDetailsTest { + private final RetryRequoteRequestDetails model = new RetryRequoteRequestDetails(); + + /** Model tests for RetryRequoteRequestDetails */ + @Test + void testRetryRequoteRequestDetails() { + // TODO: test RetryRequoteRequestDetails + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'count' */ + @Test + void countTest() { + // TODO: test count + } + + /** Test the property 'slippageBps' */ + @Test + void slippageBpsTest() { + // TODO: test slippageBps + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SettlementSourceAccountTest.java b/src/test/java/com/fireblocks/sdk/model/SettlementSourceAccountTest.java new file mode 100644 index 00000000..42abef0a --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SettlementSourceAccountTest.java @@ -0,0 +1,39 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for SettlementSourceAccount */ +class SettlementSourceAccountTest { + private final SettlementSourceAccount model = new SettlementSourceAccount(); + + /** Model tests for SettlementSourceAccount */ + @Test + void testSettlementSourceAccount() { + // TODO: test SettlementSourceAccount + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'accountId' */ + @Test + void accountIdTest() { + // TODO: test accountId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SettlementTest.java b/src/test/java/com/fireblocks/sdk/model/SettlementTest.java new file mode 100644 index 00000000..f2ac6bcf --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/SettlementTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for Settlement */ +class SettlementTest { + private final Settlement model = new Settlement(); + + /** Model tests for Settlement */ + @Test + void testSettlement() { + // TODO: test Settlement + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'destinationAccount' */ + @Test + void destinationAccountTest() { + // TODO: test destinationAccount + } + + /** Test the property 'sourceAccount' */ + @Test + void sourceAccountTest() { + // TODO: test sourceAccount + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/SwapOperationRequestTest.java b/src/test/java/com/fireblocks/sdk/model/SwapOperationRequestTest.java deleted file mode 100644 index 2c15a1b0..00000000 --- a/src/test/java/com/fireblocks/sdk/model/SwapOperationRequestTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.model; - - -import org.junit.jupiter.api.Test; - -/** Model tests for SwapOperationRequest */ -class SwapOperationRequestTest { - private final SwapOperationRequest model = new SwapOperationRequest(); - - /** Model tests for SwapOperationRequest */ - @Test - void testSwapOperationRequest() { - // TODO: test SwapOperationRequest - } - - /** Test the property 'providerQuoteId' */ - @Test - void providerQuoteIdTest() { - // TODO: test providerQuoteId - } - - /** Test the property 'feeLevel' */ - @Test - void feeLevelTest() { - // TODO: test feeLevel - } - - /** Test the property 'txNote' */ - @Test - void txNoteTest() { - // TODO: test txNote - } -} diff --git a/src/test/java/com/fireblocks/sdk/model/SwapOperationTest.java b/src/test/java/com/fireblocks/sdk/model/SwapOperationTest.java deleted file mode 100644 index a4e7a78b..00000000 --- a/src/test/java/com/fireblocks/sdk/model/SwapOperationTest.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.model; - - -import org.junit.jupiter.api.Test; - -/** Model tests for SwapOperation */ -class SwapOperationTest { - private final SwapOperation model = new SwapOperation(); - - /** Model tests for SwapOperation */ - @Test - void testSwapOperation() { - // TODO: test SwapOperation - } - - /** Test the property 'id' */ - @Test - void idTest() { - // TODO: test id - } - - /** Test the property 'accountId' */ - @Test - void accountIdTest() { - // TODO: test accountId - } - - /** Test the property 'providerId' */ - @Test - void providerIdTest() { - // TODO: test providerId - } - - /** Test the property 'category' */ - @Test - void categoryTest() { - // TODO: test category - } - - /** Test the property 'protocol' */ - @Test - void protocolTest() { - // TODO: test protocol - } - - /** Test the property 'status' */ - @Test - void statusTest() { - // TODO: test status - } - - /** Test the property 'inputAmount' */ - @Test - void inputAmountTest() { - // TODO: test inputAmount - } - - /** Test the property 'inputAsset' */ - @Test - void inputAssetTest() { - // TODO: test inputAsset - } - - /** Test the property 'slippageTolerance' */ - @Test - void slippageToleranceTest() { - // TODO: test slippageTolerance - } - - /** Test the property 'outputMinAmount' */ - @Test - void outputMinAmountTest() { - // TODO: test outputMinAmount - } - - /** Test the property 'outputMaxAmount' */ - @Test - void outputMaxAmountTest() { - // TODO: test outputMaxAmount - } - - /** Test the property 'outputAsset' */ - @Test - void outputAssetTest() { - // TODO: test outputAsset - } - - /** Test the property 'outputFinalAmount' */ - @Test - void outputFinalAmountTest() { - // TODO: test outputFinalAmount - } - - /** Test the property 'requiredActions' */ - @Test - void requiredActionsTest() { - // TODO: test requiredActions - } - - /** Test the property 'error' */ - @Test - void errorTest() { - // TODO: test error - } - - /** Test the property 'createdAt' */ - @Test - void createdAtTest() { - // TODO: test createdAt - } - - /** Test the property 'updatedAt' */ - @Test - void updatedAtTest() { - // TODO: test updatedAt - } - - /** Test the property 'createdBy' */ - @Test - void createdByTest() { - // TODO: test createdBy - } -} diff --git a/src/test/java/com/fireblocks/sdk/model/TimeInForceTest.java b/src/test/java/com/fireblocks/sdk/model/TimeInForceTest.java new file mode 100644 index 00000000..69537f56 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TimeInForceTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for TimeInForce */ +class TimeInForceTest { + /** Model tests for TimeInForce */ + @Test + void testTimeInForce() { + // TODO: test TimeInForce + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TradingErrorResponseErrorTest.java b/src/test/java/com/fireblocks/sdk/model/TradingErrorResponseErrorTest.java new file mode 100644 index 00000000..cc51d1e2 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TradingErrorResponseErrorTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for TradingErrorResponseError */ +class TradingErrorResponseErrorTest { + private final TradingErrorResponseError model = new TradingErrorResponseError(); + + /** Model tests for TradingErrorResponseError */ + @Test + void testTradingErrorResponseError() { + // TODO: test TradingErrorResponseError + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'message' */ + @Test + void messageTest() { + // TODO: test message + } + + /** Test the property 'errorCode' */ + @Test + void errorCodeTest() { + // TODO: test errorCode + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TradingErrorResponseTest.java b/src/test/java/com/fireblocks/sdk/model/TradingErrorResponseTest.java new file mode 100644 index 00000000..9cfcb8e6 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TradingErrorResponseTest.java @@ -0,0 +1,33 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for TradingErrorResponse */ +class TradingErrorResponseTest { + private final TradingErrorResponse model = new TradingErrorResponse(); + + /** Model tests for TradingErrorResponse */ + @Test + void testTradingErrorResponse() { + // TODO: test TradingErrorResponse + } + + /** Test the property 'error' */ + @Test + void errorTest() { + // TODO: test error + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TradingProviderTest.java b/src/test/java/com/fireblocks/sdk/model/TradingProviderTest.java new file mode 100644 index 00000000..fe037406 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TradingProviderTest.java @@ -0,0 +1,87 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for TradingProvider */ +class TradingProviderTest { + private final TradingProvider model = new TradingProvider(); + + /** Model tests for TradingProvider */ + @Test + void testTradingProvider() { + // TODO: test TradingProvider + } + + /** Test the property 'id' */ + @Test + void idTest() { + // TODO: test id + } + + /** Test the property 'name' */ + @Test + void nameTest() { + // TODO: test name + } + + /** Test the property 'logo' */ + @Test + void logoTest() { + // TODO: test logo + } + + /** Test the property 'accountBased' */ + @Test + void accountBasedTest() { + // TODO: test accountBased + } + + /** Test the property 'manifest' */ + @Test + void manifestTest() { + // TODO: test manifest + } + + /** Test the property 'connected' */ + @Test + void connectedTest() { + // TODO: test connected + } + + /** Test the property 'accounts' */ + @Test + void accountsTest() { + // TODO: test accounts + } + + /** Test the property 'approved' */ + @Test + void approvedTest() { + // TODO: test approved + } + + /** Test the property 'hasTermsOfService' */ + @Test + void hasTermsOfServiceTest() { + // TODO: test hasTermsOfService + } + + /** Test the property 'termsOfServiceUrl' */ + @Test + void termsOfServiceUrlTest() { + // TODO: test termsOfServiceUrl + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransferRailTest.java b/src/test/java/com/fireblocks/sdk/model/TransferRailTest.java new file mode 100644 index 00000000..4e903a0c --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TransferRailTest.java @@ -0,0 +1,25 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for TransferRail */ +class TransferRailTest { + /** Model tests for TransferRail */ + @Test + void testTransferRail() { + // TODO: test TransferRail + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/TransferReceiptTest.java b/src/test/java/com/fireblocks/sdk/model/TransferReceiptTest.java new file mode 100644 index 00000000..9f633ebc --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/TransferReceiptTest.java @@ -0,0 +1,51 @@ +/* + * Fireblocks API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: support@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for TransferReceipt */ +class TransferReceiptTest { + private final TransferReceipt model = new TransferReceipt(); + + /** Model tests for TransferReceipt */ + @Test + void testTransferReceipt() { + // TODO: test TransferReceipt + } + + /** Test the property 'type' */ + @Test + void typeTest() { + // TODO: test type + } + + /** Test the property 'txHash' */ + @Test + void txHashTest() { + // TODO: test txHash + } + + /** Test the property 'amount' */ + @Test + void amountTest() { + // TODO: test amount + } + + /** Test the property 'referenceId' */ + @Test + void referenceIdTest() { + // TODO: test referenceId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/WalletQuoteResponseTest.java b/src/test/java/com/fireblocks/sdk/model/WalletQuoteResponseTest.java deleted file mode 100644 index 74e9df20..00000000 --- a/src/test/java/com/fireblocks/sdk/model/WalletQuoteResponseTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Fireblocks API - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.6.2 - * Contact: support@fireblocks.com - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -package com.fireblocks.sdk.model; - - -import org.junit.jupiter.api.Test; - -/** Model tests for WalletQuoteResponse */ -class WalletQuoteResponseTest { - private final WalletQuoteResponse model = new WalletQuoteResponse(); - - /** Model tests for WalletQuoteResponse */ - @Test - void testWalletQuoteResponse() { - // TODO: test WalletQuoteResponse - } - - /** Test the property 'protocol' */ - @Test - void protocolTest() { - // TODO: test protocol - } - - /** Test the property 'inputAmount' */ - @Test - void inputAmountTest() { - // TODO: test inputAmount - } - - /** Test the property 'inputAsset' */ - @Test - void inputAssetTest() { - // TODO: test inputAsset - } - - /** Test the property 'slippageTolerance' */ - @Test - void slippageToleranceTest() { - // TODO: test slippageTolerance - } - - /** Test the property 'outputMinAmount' */ - @Test - void outputMinAmountTest() { - // TODO: test outputMinAmount - } - - /** Test the property 'outputMaxAmount' */ - @Test - void outputMaxAmountTest() { - // TODO: test outputMaxAmount - } - - /** Test the property 'outputAsset' */ - @Test - void outputAssetTest() { - // TODO: test outputAsset - } - - /** Test the property 'additionalData' */ - @Test - void additionalDataTest() { - // TODO: test additionalData - } - - /** Test the property 'providerQuoteId' */ - @Test - void providerQuoteIdTest() { - // TODO: test providerQuoteId - } - - /** Test the property 'expiredAt' */ - @Test - void expiredAtTest() { - // TODO: test expiredAt - } - - /** Test the property 'requiredActions' */ - @Test - void requiredActionsTest() { - // TODO: test requiredActions - } - - /** Test the property 'estimatedFees' */ - @Test - void estimatedFeesTest() { - // TODO: test estimatedFees - } -}