diff --git a/.github/workflows/publish-release-on-pr-merge.yml b/.github/workflows/publish-release-on-pr-merge.yml index 337ca9bd..abaad125 100644 --- a/.github/workflows/publish-release-on-pr-merge.yml +++ b/.github/workflows/publish-release-on-pr-merge.yml @@ -1,4 +1,4 @@ -name: Publish Release on PR Merge +name: Publish GitHub Release on PR Merge on: pull_request: @@ -19,7 +19,11 @@ jobs: - name: Check for existing release id: existing env: + # The gh commands below read both of these from the environment: GH_TOKEN for auth, + # GH_REPO for which repo to act on. GH_REPO is required because this job has no + # checkout, so gh has no git remote to infer it from, and gh ignores GITHUB_REPOSITORY. GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} PR_NUMBER: ${{ github.event.pull_request.number }} run: | marker="" @@ -45,6 +49,7 @@ jobs: if: steps.existing.outputs.skip == 'false' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} PR_TITLE: ${{ github.event.pull_request.title }} run: | LAST_TAG=$(gh release list --limit 1 --json tagName -q '.[0].tagName') @@ -79,6 +84,7 @@ jobs: if: steps.existing.outputs.skip == 'false' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} PR_NUMBER: ${{ github.event.pull_request.number }} PR_BODY: ${{ github.event.pull_request.body }} MERGE_SHA: ${{ github.event.pull_request.merge_commit_sha }} diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index ab0e20ce..a3c1361a 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -187,6 +187,7 @@ docs/ChapsDestination.md docs/ChapsPaymentInfo.md docs/CipsAddress.md docs/CipsDestination.md +docs/CipsPaymentInfo.md docs/ClaimRewardsRequest.md docs/CollectionBurnRequestDto.md docs/CollectionBurnResponseDto.md @@ -462,8 +463,10 @@ docs/FixedFee.md docs/FlowDirection.md docs/FpsHkAddress.md docs/FpsHkDestination.md +docs/FpsHkPaymentInfo.md docs/FpsUkAddress.md docs/FpsUkDestination.md +docs/FpsUkPaymentInfo.md docs/FreezeTransactionResponse.md docs/FunctionDoc.md docs/Funds.md @@ -525,6 +528,7 @@ docs/InitiatorConfig.md docs/InitiatorConfigPattern.md docs/InstaPayAddress.md docs/InstaPayDestination.md +docs/InstaPayPaymentInfo.md docs/InstructionAmount.md docs/InteracAddress.md docs/InteracDestination.md @@ -610,6 +614,7 @@ docs/MpcKey.md docs/MultichainDeploymentMetadata.md docs/NequiAddress.md docs/NequiDestination.md +docs/NequiPaymentInfo.md docs/NetworkChannel.md docs/NetworkConnection.md docs/NetworkConnectionResponse.md @@ -697,6 +702,7 @@ docs/PersonalIdentificationFullName.md docs/PersonalIdentificationType.md docs/PesonetAddress.md docs/PesonetDestination.md +docs/PesonetPaymentInfo.md docs/PixAddress.md docs/PixDestination.md docs/PixPaymentInfo.md @@ -1493,6 +1499,7 @@ src/main/java/com/fireblocks/sdk/model/ChapsDestination.java src/main/java/com/fireblocks/sdk/model/ChapsPaymentInfo.java src/main/java/com/fireblocks/sdk/model/CipsAddress.java src/main/java/com/fireblocks/sdk/model/CipsDestination.java +src/main/java/com/fireblocks/sdk/model/CipsPaymentInfo.java src/main/java/com/fireblocks/sdk/model/ClaimRewardsRequest.java src/main/java/com/fireblocks/sdk/model/CollectionBurnRequestDto.java src/main/java/com/fireblocks/sdk/model/CollectionBurnResponseDto.java @@ -1754,8 +1761,10 @@ src/main/java/com/fireblocks/sdk/model/FixedFee.java src/main/java/com/fireblocks/sdk/model/FlowDirection.java src/main/java/com/fireblocks/sdk/model/FpsHkAddress.java src/main/java/com/fireblocks/sdk/model/FpsHkDestination.java +src/main/java/com/fireblocks/sdk/model/FpsHkPaymentInfo.java src/main/java/com/fireblocks/sdk/model/FpsUkAddress.java src/main/java/com/fireblocks/sdk/model/FpsUkDestination.java +src/main/java/com/fireblocks/sdk/model/FpsUkPaymentInfo.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 @@ -1815,6 +1824,7 @@ 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/InstaPayAddress.java src/main/java/com/fireblocks/sdk/model/InstaPayDestination.java +src/main/java/com/fireblocks/sdk/model/InstaPayPaymentInfo.java src/main/java/com/fireblocks/sdk/model/InstructionAmount.java src/main/java/com/fireblocks/sdk/model/InteracAddress.java src/main/java/com/fireblocks/sdk/model/InteracDestination.java @@ -1897,6 +1907,7 @@ src/main/java/com/fireblocks/sdk/model/MpcKey.java src/main/java/com/fireblocks/sdk/model/MultichainDeploymentMetadata.java src/main/java/com/fireblocks/sdk/model/NequiAddress.java src/main/java/com/fireblocks/sdk/model/NequiDestination.java +src/main/java/com/fireblocks/sdk/model/NequiPaymentInfo.java src/main/java/com/fireblocks/sdk/model/NetworkChannel.java src/main/java/com/fireblocks/sdk/model/NetworkConnection.java src/main/java/com/fireblocks/sdk/model/NetworkConnectionResponse.java @@ -1978,6 +1989,7 @@ src/main/java/com/fireblocks/sdk/model/PersonalIdentificationFullName.java src/main/java/com/fireblocks/sdk/model/PersonalIdentificationType.java src/main/java/com/fireblocks/sdk/model/PesonetAddress.java src/main/java/com/fireblocks/sdk/model/PesonetDestination.java +src/main/java/com/fireblocks/sdk/model/PesonetPaymentInfo.java src/main/java/com/fireblocks/sdk/model/PixAddress.java src/main/java/com/fireblocks/sdk/model/PixDestination.java src/main/java/com/fireblocks/sdk/model/PixPaymentInfo.java @@ -2729,6 +2741,7 @@ src/test/java/com/fireblocks/sdk/model/ChapsDestinationTest.java src/test/java/com/fireblocks/sdk/model/ChapsPaymentInfoTest.java src/test/java/com/fireblocks/sdk/model/CipsAddressTest.java src/test/java/com/fireblocks/sdk/model/CipsDestinationTest.java +src/test/java/com/fireblocks/sdk/model/CipsPaymentInfoTest.java src/test/java/com/fireblocks/sdk/model/ClaimRewardsRequestTest.java src/test/java/com/fireblocks/sdk/model/CollectionBurnRequestDtoTest.java src/test/java/com/fireblocks/sdk/model/CollectionBurnResponseDtoTest.java @@ -2990,8 +3003,10 @@ src/test/java/com/fireblocks/sdk/model/FixedFeeTest.java src/test/java/com/fireblocks/sdk/model/FlowDirectionTest.java src/test/java/com/fireblocks/sdk/model/FpsHkAddressTest.java src/test/java/com/fireblocks/sdk/model/FpsHkDestinationTest.java +src/test/java/com/fireblocks/sdk/model/FpsHkPaymentInfoTest.java src/test/java/com/fireblocks/sdk/model/FpsUkAddressTest.java src/test/java/com/fireblocks/sdk/model/FpsUkDestinationTest.java +src/test/java/com/fireblocks/sdk/model/FpsUkPaymentInfoTest.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 @@ -3051,6 +3066,7 @@ 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/InstaPayAddressTest.java src/test/java/com/fireblocks/sdk/model/InstaPayDestinationTest.java +src/test/java/com/fireblocks/sdk/model/InstaPayPaymentInfoTest.java src/test/java/com/fireblocks/sdk/model/InstructionAmountTest.java src/test/java/com/fireblocks/sdk/model/InteracAddressTest.java src/test/java/com/fireblocks/sdk/model/InteracDestinationTest.java @@ -3133,6 +3149,7 @@ src/test/java/com/fireblocks/sdk/model/MpcKeyTest.java src/test/java/com/fireblocks/sdk/model/MultichainDeploymentMetadataTest.java src/test/java/com/fireblocks/sdk/model/NequiAddressTest.java src/test/java/com/fireblocks/sdk/model/NequiDestinationTest.java +src/test/java/com/fireblocks/sdk/model/NequiPaymentInfoTest.java src/test/java/com/fireblocks/sdk/model/NetworkChannelTest.java src/test/java/com/fireblocks/sdk/model/NetworkConnectionResponseTest.java src/test/java/com/fireblocks/sdk/model/NetworkConnectionRoutingPolicyValueTest.java @@ -3214,6 +3231,7 @@ src/test/java/com/fireblocks/sdk/model/PersonalIdentificationTest.java src/test/java/com/fireblocks/sdk/model/PersonalIdentificationTypeTest.java src/test/java/com/fireblocks/sdk/model/PesonetAddressTest.java src/test/java/com/fireblocks/sdk/model/PesonetDestinationTest.java +src/test/java/com/fireblocks/sdk/model/PesonetPaymentInfoTest.java src/test/java/com/fireblocks/sdk/model/PixAddressTest.java src/test/java/com/fireblocks/sdk/model/PixDestinationTest.java src/test/java/com/fireblocks/sdk/model/PixPaymentInfoTest.java diff --git a/README.md b/README.md index 6efe3745..f35d420b 100644 --- a/README.md +++ b/README.md @@ -771,6 +771,7 @@ Class | Method | HTTP request | Description - [ChapsPaymentInfo](docs/ChapsPaymentInfo.md) - [CipsAddress](docs/CipsAddress.md) - [CipsDestination](docs/CipsDestination.md) + - [CipsPaymentInfo](docs/CipsPaymentInfo.md) - [ClaimRewardsRequest](docs/ClaimRewardsRequest.md) - [CollectionBurnRequestDto](docs/CollectionBurnRequestDto.md) - [CollectionBurnResponseDto](docs/CollectionBurnResponseDto.md) @@ -1032,8 +1033,10 @@ Class | Method | HTTP request | Description - [FlowDirection](docs/FlowDirection.md) - [FpsHkAddress](docs/FpsHkAddress.md) - [FpsHkDestination](docs/FpsHkDestination.md) + - [FpsHkPaymentInfo](docs/FpsHkPaymentInfo.md) - [FpsUkAddress](docs/FpsUkAddress.md) - [FpsUkDestination](docs/FpsUkDestination.md) + - [FpsUkPaymentInfo](docs/FpsUkPaymentInfo.md) - [FreezeTransactionResponse](docs/FreezeTransactionResponse.md) - [FunctionDoc](docs/FunctionDoc.md) - [Funds](docs/Funds.md) @@ -1093,6 +1096,7 @@ Class | Method | HTTP request | Description - [InitiatorConfigPattern](docs/InitiatorConfigPattern.md) - [InstaPayAddress](docs/InstaPayAddress.md) - [InstaPayDestination](docs/InstaPayDestination.md) + - [InstaPayPaymentInfo](docs/InstaPayPaymentInfo.md) - [InstructionAmount](docs/InstructionAmount.md) - [InteracAddress](docs/InteracAddress.md) - [InteracDestination](docs/InteracDestination.md) @@ -1175,6 +1179,7 @@ Class | Method | HTTP request | Description - [MultichainDeploymentMetadata](docs/MultichainDeploymentMetadata.md) - [NequiAddress](docs/NequiAddress.md) - [NequiDestination](docs/NequiDestination.md) + - [NequiPaymentInfo](docs/NequiPaymentInfo.md) - [NetworkChannel](docs/NetworkChannel.md) - [NetworkConnection](docs/NetworkConnection.md) - [NetworkConnectionResponse](docs/NetworkConnectionResponse.md) @@ -1256,6 +1261,7 @@ Class | Method | HTTP request | Description - [PersonalIdentificationType](docs/PersonalIdentificationType.md) - [PesonetAddress](docs/PesonetAddress.md) - [PesonetDestination](docs/PesonetDestination.md) + - [PesonetPaymentInfo](docs/PesonetPaymentInfo.md) - [PixAddress](docs/PixAddress.md) - [PixDestination](docs/PixDestination.md) - [PixPaymentInfo](docs/PixPaymentInfo.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index a85a9d20..d9a94a87 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -43190,6 +43190,253 @@ components: - rail - sortCode type: object + CipsPaymentInfo: + description: CIPS payment information for Cross-Border Interbank Payment System + transfers (CNY) + properties: + rail: + description: The payment rail type for CIPS transfers + enum: + - CIPS + example: CIPS + type: string + addressingSystem: + description: The addressing system used for CIPS transfers + enum: + - CIPS + example: CIPS + type: string + accountHolderGivenName: + description: The given name (first name) of the account holder + example: Wei + type: string + accountHolderSurname: + description: The surname (last name) of the account holder + example: Zhang + type: string + bankName: + description: Name of the recipient's bank + example: Bank of China + type: string + bankCountry: + description: ISO 3166-1 alpha-2 country code of the bank + example: CN + type: string + swiftCode: + description: SWIFT/BIC code of the recipient bank + example: BKCHCNBJ + type: string + accountNumber: + description: Recipient bank account number + example: "6217000010000000000" + type: string + referenceId: + description: Optional payment reference + example: INV-2024-0001 + type: string + required: + - accountHolderGivenName + - accountNumber + - addressingSystem + - bankCountry + - bankName + - rail + - swiftCode + type: object + NequiPaymentInfo: + description: NEQUI payment information for Colombian mobile payment transfers + (COP) + properties: + rail: + description: The payment rail type for NEQUI transfers + enum: + - NEQUI + example: NEQUI + type: string + addressingSystem: + description: The addressing system used for NEQUI transfers + enum: + - NEQUI + example: NEQUI + type: string + phone: + description: Recipient phone number in E.164 format + example: "+573001234567" + type: string + required: + - addressingSystem + - phone + - rail + type: object + FpsUkPaymentInfo: + description: FPS UK payment information for UK Faster Payments transfers (GBP) + properties: + rail: + description: The payment rail type for UK Faster Payments transfers + enum: + - FPS_UK + example: FPS_UK + type: string + addressingSystem: + description: The addressing system used for UK Faster Payments transfers + enum: + - FPS_UK + example: FPS_UK + type: string + accountHolderGivenName: + description: The given name (first name) of the account holder + example: James + type: string + accountHolderSurname: + description: The surname (last name) of the account holder + example: Wilson + type: string + accountNumber: + description: UK bank account number + example: "12345678" + type: string + sortCode: + description: UK sort code (format XX-XX-XX) + example: 12-34-56 + type: string + bankAccountCountry: + description: ISO 3166-1 alpha-2 country code of the bank account + example: GB + type: string + required: + - accountHolderGivenName + - accountHolderSurname + - accountNumber + - addressingSystem + - rail + - sortCode + type: object + FpsHkPaymentInfo: + description: FPS HK payment information for Hong Kong Faster Payment System + transfers (HKD) + properties: + rail: + description: The payment rail type for Hong Kong FPS transfers + enum: + - FPS_HK + example: FPS_HK + type: string + addressingSystem: + description: The addressing system used for Hong Kong FPS transfers + enum: + - FPS_HK + example: FPS_HK + type: string + recipientLegalName: + description: Full legal name of the recipient + example: Chan Tai Man + type: string + accountNumber: + description: Recipient bank account number + example: "1234567890" + type: string + bankCode: + description: Hong Kong bank code + example: "003" + type: string + phone: + description: Recipient phone number in E.164 format + example: "+85291234567" + type: string + email: + description: Recipient email address + example: chan.taiman@email.com + format: email + type: string + fpsId: + description: Hong Kong FPS identifier + example: "163912345" + type: string + required: + - addressingSystem + - rail + type: object + InstaPayPaymentInfo: + description: InstaPay payment information for Philippine instant payment transfers + (PHP) + properties: + rail: + description: The payment rail type for InstaPay transfers + enum: + - INSTA_PAY + example: INSTA_PAY + type: string + addressingSystem: + description: The addressing system used for InstaPay transfers + enum: + - INSTA_PAY + example: INSTA_PAY + type: string + accountHolderGivenName: + description: The given name (first name) of the account holder + example: Juan + type: string + accountHolderSurname: + description: The surname (last name) of the account holder + example: Dela Cruz + type: string + accountNumber: + description: Recipient bank account or wallet number + example: "001234567890" + type: string + bankName: + description: "Name of the recipient's bank or wallet (e.g. BDO, BPI, GCash,\ + \ Maya)" + example: BDO Unibank + type: string + required: + - accountHolderGivenName + - accountHolderSurname + - accountNumber + - addressingSystem + - bankName + - rail + type: object + PesonetPaymentInfo: + description: PesoNet payment information for Philippine batch payment transfers + (PHP) + properties: + rail: + description: The payment rail type for PesoNet transfers + enum: + - PESONET + example: PESONET + type: string + addressingSystem: + description: The addressing system used for PesoNet transfers + enum: + - PESONET + example: PESONET + type: string + accountHolderGivenName: + description: The given name (first name) of the account holder + example: Maria + type: string + accountHolderSurname: + description: The surname (last name) of the account holder + example: Santos + type: string + accountNumber: + description: Recipient bank account number + example: "001234567890" + type: string + bankName: + description: Name of the recipient's bank + example: BPI + type: string + required: + - accountHolderGivenName + - accountHolderSurname + - accountNumber + - addressingSystem + - bankName + - rail + type: object AdditionalInfoRequest: description: External wallet request with additional payment information for various payment rails @@ -87562,6 +87809,12 @@ components: - $ref: "#/components/schemas/InteracPaymentInfo" - $ref: "#/components/schemas/PayidPaymentInfo" - $ref: "#/components/schemas/ChapsPaymentInfo" + - $ref: "#/components/schemas/CipsPaymentInfo" + - $ref: "#/components/schemas/NequiPaymentInfo" + - $ref: "#/components/schemas/FpsUkPaymentInfo" + - $ref: "#/components/schemas/FpsHkPaymentInfo" + - $ref: "#/components/schemas/InstaPayPaymentInfo" + - $ref: "#/components/schemas/PesonetPaymentInfo" type: object AssetMedia_attributes: description: Media attributes diff --git a/docs/AdditionalInfoRequestAdditionalInfo.md b/docs/AdditionalInfoRequestAdditionalInfo.md index ac02899e..516346ce 100644 --- a/docs/AdditionalInfoRequestAdditionalInfo.md +++ b/docs/AdditionalInfoRequestAdditionalInfo.md @@ -8,11 +8,17 @@ Additional payment information based on the payment rail type * [AbaPaymentInfo](AbaPaymentInfo.md) * [AchPaymentInfo](AchPaymentInfo.md) * [ChapsPaymentInfo](ChapsPaymentInfo.md) +* [CipsPaymentInfo](CipsPaymentInfo.md) +* [FpsHkPaymentInfo](FpsHkPaymentInfo.md) +* [FpsUkPaymentInfo](FpsUkPaymentInfo.md) * [IbanPaymentInfo](IbanPaymentInfo.md) +* [InstaPayPaymentInfo](InstaPayPaymentInfo.md) * [InteracPaymentInfo](InteracPaymentInfo.md) * [LbtPaymentInfo](LbtPaymentInfo.md) * [MomoPaymentInfo](MomoPaymentInfo.md) +* [NequiPaymentInfo](NequiPaymentInfo.md) * [PayidPaymentInfo](PayidPaymentInfo.md) +* [PesonetPaymentInfo](PesonetPaymentInfo.md) * [PixPaymentInfo](PixPaymentInfo.md) * [SepaPaymentInfo](SepaPaymentInfo.md) * [SpeiAdvancedPaymentInfo](SpeiAdvancedPaymentInfo.md) @@ -26,11 +32,17 @@ import com.fireblocks.sdk.model.AdditionalInfoRequestAdditionalInfo; import com.fireblocks.sdk.model.AbaPaymentInfo; import com.fireblocks.sdk.model.AchPaymentInfo; import com.fireblocks.sdk.model.ChapsPaymentInfo; +import com.fireblocks.sdk.model.CipsPaymentInfo; +import com.fireblocks.sdk.model.FpsHkPaymentInfo; +import com.fireblocks.sdk.model.FpsUkPaymentInfo; import com.fireblocks.sdk.model.IbanPaymentInfo; +import com.fireblocks.sdk.model.InstaPayPaymentInfo; import com.fireblocks.sdk.model.InteracPaymentInfo; import com.fireblocks.sdk.model.LbtPaymentInfo; import com.fireblocks.sdk.model.MomoPaymentInfo; +import com.fireblocks.sdk.model.NequiPaymentInfo; import com.fireblocks.sdk.model.PayidPaymentInfo; +import com.fireblocks.sdk.model.PesonetPaymentInfo; import com.fireblocks.sdk.model.PixPaymentInfo; import com.fireblocks.sdk.model.SepaPaymentInfo; import com.fireblocks.sdk.model.SpeiAdvancedPaymentInfo; @@ -62,6 +74,27 @@ public class Example { // to get back the ChapsPaymentInfo set earlier ChapsPaymentInfo testChapsPaymentInfo = (ChapsPaymentInfo) exampleAdditionalInfoRequestAdditionalInfo.getActualInstance(); + // create a new CipsPaymentInfo + CipsPaymentInfo exampleCipsPaymentInfo = new CipsPaymentInfo(); + // set AdditionalInfoRequestAdditionalInfo to CipsPaymentInfo + exampleAdditionalInfoRequestAdditionalInfo.setActualInstance(exampleCipsPaymentInfo); + // to get back the CipsPaymentInfo set earlier + CipsPaymentInfo testCipsPaymentInfo = (CipsPaymentInfo) exampleAdditionalInfoRequestAdditionalInfo.getActualInstance(); + + // create a new FpsHkPaymentInfo + FpsHkPaymentInfo exampleFpsHkPaymentInfo = new FpsHkPaymentInfo(); + // set AdditionalInfoRequestAdditionalInfo to FpsHkPaymentInfo + exampleAdditionalInfoRequestAdditionalInfo.setActualInstance(exampleFpsHkPaymentInfo); + // to get back the FpsHkPaymentInfo set earlier + FpsHkPaymentInfo testFpsHkPaymentInfo = (FpsHkPaymentInfo) exampleAdditionalInfoRequestAdditionalInfo.getActualInstance(); + + // create a new FpsUkPaymentInfo + FpsUkPaymentInfo exampleFpsUkPaymentInfo = new FpsUkPaymentInfo(); + // set AdditionalInfoRequestAdditionalInfo to FpsUkPaymentInfo + exampleAdditionalInfoRequestAdditionalInfo.setActualInstance(exampleFpsUkPaymentInfo); + // to get back the FpsUkPaymentInfo set earlier + FpsUkPaymentInfo testFpsUkPaymentInfo = (FpsUkPaymentInfo) exampleAdditionalInfoRequestAdditionalInfo.getActualInstance(); + // create a new IbanPaymentInfo IbanPaymentInfo exampleIbanPaymentInfo = new IbanPaymentInfo(); // set AdditionalInfoRequestAdditionalInfo to IbanPaymentInfo @@ -69,6 +102,13 @@ public class Example { // to get back the IbanPaymentInfo set earlier IbanPaymentInfo testIbanPaymentInfo = (IbanPaymentInfo) exampleAdditionalInfoRequestAdditionalInfo.getActualInstance(); + // create a new InstaPayPaymentInfo + InstaPayPaymentInfo exampleInstaPayPaymentInfo = new InstaPayPaymentInfo(); + // set AdditionalInfoRequestAdditionalInfo to InstaPayPaymentInfo + exampleAdditionalInfoRequestAdditionalInfo.setActualInstance(exampleInstaPayPaymentInfo); + // to get back the InstaPayPaymentInfo set earlier + InstaPayPaymentInfo testInstaPayPaymentInfo = (InstaPayPaymentInfo) exampleAdditionalInfoRequestAdditionalInfo.getActualInstance(); + // create a new InteracPaymentInfo InteracPaymentInfo exampleInteracPaymentInfo = new InteracPaymentInfo(); // set AdditionalInfoRequestAdditionalInfo to InteracPaymentInfo @@ -90,6 +130,13 @@ public class Example { // to get back the MomoPaymentInfo set earlier MomoPaymentInfo testMomoPaymentInfo = (MomoPaymentInfo) exampleAdditionalInfoRequestAdditionalInfo.getActualInstance(); + // create a new NequiPaymentInfo + NequiPaymentInfo exampleNequiPaymentInfo = new NequiPaymentInfo(); + // set AdditionalInfoRequestAdditionalInfo to NequiPaymentInfo + exampleAdditionalInfoRequestAdditionalInfo.setActualInstance(exampleNequiPaymentInfo); + // to get back the NequiPaymentInfo set earlier + NequiPaymentInfo testNequiPaymentInfo = (NequiPaymentInfo) exampleAdditionalInfoRequestAdditionalInfo.getActualInstance(); + // create a new PayidPaymentInfo PayidPaymentInfo examplePayidPaymentInfo = new PayidPaymentInfo(); // set AdditionalInfoRequestAdditionalInfo to PayidPaymentInfo @@ -97,6 +144,13 @@ public class Example { // to get back the PayidPaymentInfo set earlier PayidPaymentInfo testPayidPaymentInfo = (PayidPaymentInfo) exampleAdditionalInfoRequestAdditionalInfo.getActualInstance(); + // create a new PesonetPaymentInfo + PesonetPaymentInfo examplePesonetPaymentInfo = new PesonetPaymentInfo(); + // set AdditionalInfoRequestAdditionalInfo to PesonetPaymentInfo + exampleAdditionalInfoRequestAdditionalInfo.setActualInstance(examplePesonetPaymentInfo); + // to get back the PesonetPaymentInfo set earlier + PesonetPaymentInfo testPesonetPaymentInfo = (PesonetPaymentInfo) exampleAdditionalInfoRequestAdditionalInfo.getActualInstance(); + // create a new PixPaymentInfo PixPaymentInfo examplePixPaymentInfo = new PixPaymentInfo(); // set AdditionalInfoRequestAdditionalInfo to PixPaymentInfo diff --git a/docs/CipsPaymentInfo.md b/docs/CipsPaymentInfo.md new file mode 100644 index 00000000..da6e7454 --- /dev/null +++ b/docs/CipsPaymentInfo.md @@ -0,0 +1,38 @@ + + +# CipsPaymentInfo + +CIPS payment information for Cross-Border Interbank Payment System transfers (CNY) + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rail** | [**RailEnum**](#RailEnum) | The payment rail type for CIPS transfers | | +|**addressingSystem** | [**AddressingSystemEnum**](#AddressingSystemEnum) | The addressing system used for CIPS transfers | | +|**accountHolderGivenName** | **String** | The given name (first name) of the account holder | | +|**accountHolderSurname** | **String** | The surname (last name) of the account holder | [optional] | +|**bankName** | **String** | Name of the recipient's bank | | +|**bankCountry** | **String** | ISO 3166-1 alpha-2 country code of the bank | | +|**swiftCode** | **String** | SWIFT/BIC code of the recipient bank | | +|**accountNumber** | **String** | Recipient bank account number | | +|**referenceId** | **String** | Optional payment reference | [optional] | + + + +## Enum: RailEnum + +| Name | Value | +|---- | -----| +| CIPS | "CIPS" | + + + +## Enum: AddressingSystemEnum + +| Name | Value | +|---- | -----| +| CIPS | "CIPS" | + + + diff --git a/docs/FpsHkPaymentInfo.md b/docs/FpsHkPaymentInfo.md new file mode 100644 index 00000000..e3cf63c9 --- /dev/null +++ b/docs/FpsHkPaymentInfo.md @@ -0,0 +1,37 @@ + + +# FpsHkPaymentInfo + +FPS HK payment information for Hong Kong Faster Payment System transfers (HKD) + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rail** | [**RailEnum**](#RailEnum) | The payment rail type for Hong Kong FPS transfers | | +|**addressingSystem** | [**AddressingSystemEnum**](#AddressingSystemEnum) | The addressing system used for Hong Kong FPS transfers | | +|**recipientLegalName** | **String** | Full legal name of the recipient | [optional] | +|**accountNumber** | **String** | Recipient bank account number | [optional] | +|**bankCode** | **String** | Hong Kong bank code | [optional] | +|**phone** | **String** | Recipient phone number in E.164 format | [optional] | +|**email** | **String** | Recipient email address | [optional] | +|**fpsId** | **String** | Hong Kong FPS identifier | [optional] | + + + +## Enum: RailEnum + +| Name | Value | +|---- | -----| +| FPS_HK | "FPS_HK" | + + + +## Enum: AddressingSystemEnum + +| Name | Value | +|---- | -----| +| FPS_HK | "FPS_HK" | + + + diff --git a/docs/FpsUkPaymentInfo.md b/docs/FpsUkPaymentInfo.md new file mode 100644 index 00000000..2652b1d1 --- /dev/null +++ b/docs/FpsUkPaymentInfo.md @@ -0,0 +1,36 @@ + + +# FpsUkPaymentInfo + +FPS UK payment information for UK Faster Payments transfers (GBP) + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rail** | [**RailEnum**](#RailEnum) | The payment rail type for UK Faster Payments transfers | | +|**addressingSystem** | [**AddressingSystemEnum**](#AddressingSystemEnum) | The addressing system used for UK Faster Payments transfers | | +|**accountHolderGivenName** | **String** | The given name (first name) of the account holder | | +|**accountHolderSurname** | **String** | The surname (last name) of the account holder | | +|**accountNumber** | **String** | UK bank account number | | +|**sortCode** | **String** | UK sort code (format XX-XX-XX) | | +|**bankAccountCountry** | **String** | ISO 3166-1 alpha-2 country code of the bank account | [optional] | + + + +## Enum: RailEnum + +| Name | Value | +|---- | -----| +| FPS_UK | "FPS_UK" | + + + +## Enum: AddressingSystemEnum + +| Name | Value | +|---- | -----| +| FPS_UK | "FPS_UK" | + + + diff --git a/docs/InstaPayPaymentInfo.md b/docs/InstaPayPaymentInfo.md new file mode 100644 index 00000000..78aa249c --- /dev/null +++ b/docs/InstaPayPaymentInfo.md @@ -0,0 +1,35 @@ + + +# InstaPayPaymentInfo + +InstaPay payment information for Philippine instant payment transfers (PHP) + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rail** | [**RailEnum**](#RailEnum) | The payment rail type for InstaPay transfers | | +|**addressingSystem** | [**AddressingSystemEnum**](#AddressingSystemEnum) | The addressing system used for InstaPay transfers | | +|**accountHolderGivenName** | **String** | The given name (first name) of the account holder | | +|**accountHolderSurname** | **String** | The surname (last name) of the account holder | | +|**accountNumber** | **String** | Recipient bank account or wallet number | | +|**bankName** | **String** | Name of the recipient's bank or wallet (e.g. BDO, BPI, GCash, Maya) | | + + + +## Enum: RailEnum + +| Name | Value | +|---- | -----| +| INSTA_PAY | "INSTA_PAY" | + + + +## Enum: AddressingSystemEnum + +| Name | Value | +|---- | -----| +| INSTA_PAY | "INSTA_PAY" | + + + diff --git a/docs/NequiPaymentInfo.md b/docs/NequiPaymentInfo.md new file mode 100644 index 00000000..9fed6bd8 --- /dev/null +++ b/docs/NequiPaymentInfo.md @@ -0,0 +1,32 @@ + + +# NequiPaymentInfo + +NEQUI payment information for Colombian mobile payment transfers (COP) + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rail** | [**RailEnum**](#RailEnum) | The payment rail type for NEQUI transfers | | +|**addressingSystem** | [**AddressingSystemEnum**](#AddressingSystemEnum) | The addressing system used for NEQUI transfers | | +|**phone** | **String** | Recipient phone number in E.164 format | | + + + +## Enum: RailEnum + +| Name | Value | +|---- | -----| +| NEQUI | "NEQUI" | + + + +## Enum: AddressingSystemEnum + +| Name | Value | +|---- | -----| +| NEQUI | "NEQUI" | + + + diff --git a/docs/PesonetPaymentInfo.md b/docs/PesonetPaymentInfo.md new file mode 100644 index 00000000..b83de019 --- /dev/null +++ b/docs/PesonetPaymentInfo.md @@ -0,0 +1,35 @@ + + +# PesonetPaymentInfo + +PesoNet payment information for Philippine batch payment transfers (PHP) + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**rail** | [**RailEnum**](#RailEnum) | The payment rail type for PesoNet transfers | | +|**addressingSystem** | [**AddressingSystemEnum**](#AddressingSystemEnum) | The addressing system used for PesoNet transfers | | +|**accountHolderGivenName** | **String** | The given name (first name) of the account holder | | +|**accountHolderSurname** | **String** | The surname (last name) of the account holder | | +|**accountNumber** | **String** | Recipient bank account number | | +|**bankName** | **String** | Name of the recipient's bank | | + + + +## Enum: RailEnum + +| Name | Value | +|---- | -----| +| PESONET | "PESONET" | + + + +## Enum: AddressingSystemEnum + +| Name | Value | +|---- | -----| +| PESONET | "PESONET" | + + + diff --git a/src/main/java/com/fireblocks/sdk/model/AdditionalInfoRequestAdditionalInfo.java b/src/main/java/com/fireblocks/sdk/model/AdditionalInfoRequestAdditionalInfo.java index 6a983f53..bb8c69c0 100644 --- a/src/main/java/com/fireblocks/sdk/model/AdditionalInfoRequestAdditionalInfo.java +++ b/src/main/java/com/fireblocks/sdk/model/AdditionalInfoRequestAdditionalInfo.java @@ -217,6 +217,132 @@ public AdditionalInfoRequestAdditionalInfo deserialize( log.log(Level.FINER, "Input data does not match schema 'ChapsPaymentInfo'", e); } + // deserialize CipsPaymentInfo + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CipsPaymentInfo.class.equals(Integer.class) + || CipsPaymentInfo.class.equals(Long.class) + || CipsPaymentInfo.class.equals(Float.class) + || CipsPaymentInfo.class.equals(Double.class) + || CipsPaymentInfo.class.equals(Boolean.class) + || CipsPaymentInfo.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((CipsPaymentInfo.class.equals(Integer.class) + || CipsPaymentInfo.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((CipsPaymentInfo.class.equals(Float.class) + || CipsPaymentInfo.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (CipsPaymentInfo.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (CipsPaymentInfo.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CipsPaymentInfo.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 'CipsPaymentInfo'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CipsPaymentInfo'", e); + } + + // deserialize FpsHkPaymentInfo + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (FpsHkPaymentInfo.class.equals(Integer.class) + || FpsHkPaymentInfo.class.equals(Long.class) + || FpsHkPaymentInfo.class.equals(Float.class) + || FpsHkPaymentInfo.class.equals(Double.class) + || FpsHkPaymentInfo.class.equals(Boolean.class) + || FpsHkPaymentInfo.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((FpsHkPaymentInfo.class.equals(Integer.class) + || FpsHkPaymentInfo.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((FpsHkPaymentInfo.class.equals(Float.class) + || FpsHkPaymentInfo.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (FpsHkPaymentInfo.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (FpsHkPaymentInfo.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(FpsHkPaymentInfo.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 'FpsHkPaymentInfo'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'FpsHkPaymentInfo'", e); + } + + // deserialize FpsUkPaymentInfo + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (FpsUkPaymentInfo.class.equals(Integer.class) + || FpsUkPaymentInfo.class.equals(Long.class) + || FpsUkPaymentInfo.class.equals(Float.class) + || FpsUkPaymentInfo.class.equals(Double.class) + || FpsUkPaymentInfo.class.equals(Boolean.class) + || FpsUkPaymentInfo.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((FpsUkPaymentInfo.class.equals(Integer.class) + || FpsUkPaymentInfo.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((FpsUkPaymentInfo.class.equals(Float.class) + || FpsUkPaymentInfo.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (FpsUkPaymentInfo.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (FpsUkPaymentInfo.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(FpsUkPaymentInfo.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 'FpsUkPaymentInfo'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'FpsUkPaymentInfo'", e); + } + // deserialize IbanPaymentInfo try { boolean attemptParsing = true; @@ -259,6 +385,49 @@ public AdditionalInfoRequestAdditionalInfo deserialize( log.log(Level.FINER, "Input data does not match schema 'IbanPaymentInfo'", e); } + // deserialize InstaPayPaymentInfo + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (InstaPayPaymentInfo.class.equals(Integer.class) + || InstaPayPaymentInfo.class.equals(Long.class) + || InstaPayPaymentInfo.class.equals(Float.class) + || InstaPayPaymentInfo.class.equals(Double.class) + || InstaPayPaymentInfo.class.equals(Boolean.class) + || InstaPayPaymentInfo.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((InstaPayPaymentInfo.class.equals(Integer.class) + || InstaPayPaymentInfo.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((InstaPayPaymentInfo.class.equals(Float.class) + || InstaPayPaymentInfo.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (InstaPayPaymentInfo.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (InstaPayPaymentInfo.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(InstaPayPaymentInfo.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 'InstaPayPaymentInfo'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'InstaPayPaymentInfo'", e); + } + // deserialize InteracPaymentInfo try { boolean attemptParsing = true; @@ -386,6 +555,48 @@ public AdditionalInfoRequestAdditionalInfo deserialize( log.log(Level.FINER, "Input data does not match schema 'MomoPaymentInfo'", e); } + // deserialize NequiPaymentInfo + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NequiPaymentInfo.class.equals(Integer.class) + || NequiPaymentInfo.class.equals(Long.class) + || NequiPaymentInfo.class.equals(Float.class) + || NequiPaymentInfo.class.equals(Double.class) + || NequiPaymentInfo.class.equals(Boolean.class) + || NequiPaymentInfo.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((NequiPaymentInfo.class.equals(Integer.class) + || NequiPaymentInfo.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((NequiPaymentInfo.class.equals(Float.class) + || NequiPaymentInfo.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (NequiPaymentInfo.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (NequiPaymentInfo.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(NequiPaymentInfo.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 'NequiPaymentInfo'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NequiPaymentInfo'", e); + } + // deserialize PayidPaymentInfo try { boolean attemptParsing = true; @@ -428,6 +639,49 @@ public AdditionalInfoRequestAdditionalInfo deserialize( log.log(Level.FINER, "Input data does not match schema 'PayidPaymentInfo'", e); } + // deserialize PesonetPaymentInfo + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PesonetPaymentInfo.class.equals(Integer.class) + || PesonetPaymentInfo.class.equals(Long.class) + || PesonetPaymentInfo.class.equals(Float.class) + || PesonetPaymentInfo.class.equals(Double.class) + || PesonetPaymentInfo.class.equals(Boolean.class) + || PesonetPaymentInfo.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((PesonetPaymentInfo.class.equals(Integer.class) + || PesonetPaymentInfo.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((PesonetPaymentInfo.class.equals(Float.class) + || PesonetPaymentInfo.class.equals(Double.class)) + && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= + (PesonetPaymentInfo.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE + || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (PesonetPaymentInfo.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = + tree.traverse(jp.getCodec()).readValueAs(PesonetPaymentInfo.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 'PesonetPaymentInfo'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PesonetPaymentInfo'", e); + } + // deserialize PixPaymentInfo try { boolean attemptParsing = true; @@ -688,11 +942,31 @@ public AdditionalInfoRequestAdditionalInfo(ChapsPaymentInfo o) { setActualInstance(o); } + public AdditionalInfoRequestAdditionalInfo(CipsPaymentInfo o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public AdditionalInfoRequestAdditionalInfo(FpsHkPaymentInfo o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public AdditionalInfoRequestAdditionalInfo(FpsUkPaymentInfo o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public AdditionalInfoRequestAdditionalInfo(IbanPaymentInfo o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } + public AdditionalInfoRequestAdditionalInfo(InstaPayPaymentInfo o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public AdditionalInfoRequestAdditionalInfo(InteracPaymentInfo o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -708,11 +982,21 @@ public AdditionalInfoRequestAdditionalInfo(MomoPaymentInfo o) { setActualInstance(o); } + public AdditionalInfoRequestAdditionalInfo(NequiPaymentInfo o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public AdditionalInfoRequestAdditionalInfo(PayidPaymentInfo o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } + public AdditionalInfoRequestAdditionalInfo(PesonetPaymentInfo o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public AdditionalInfoRequestAdditionalInfo(PixPaymentInfo o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -742,11 +1026,17 @@ public AdditionalInfoRequestAdditionalInfo(UsWirePaymentInfo o) { schemas.put("AbaPaymentInfo", AbaPaymentInfo.class); schemas.put("AchPaymentInfo", AchPaymentInfo.class); schemas.put("ChapsPaymentInfo", ChapsPaymentInfo.class); + schemas.put("CipsPaymentInfo", CipsPaymentInfo.class); + schemas.put("FpsHkPaymentInfo", FpsHkPaymentInfo.class); + schemas.put("FpsUkPaymentInfo", FpsUkPaymentInfo.class); schemas.put("IbanPaymentInfo", IbanPaymentInfo.class); + schemas.put("InstaPayPaymentInfo", InstaPayPaymentInfo.class); schemas.put("InteracPaymentInfo", InteracPaymentInfo.class); schemas.put("LbtPaymentInfo", LbtPaymentInfo.class); schemas.put("MomoPaymentInfo", MomoPaymentInfo.class); + schemas.put("NequiPaymentInfo", NequiPaymentInfo.class); schemas.put("PayidPaymentInfo", PayidPaymentInfo.class); + schemas.put("PesonetPaymentInfo", PesonetPaymentInfo.class); schemas.put("PixPaymentInfo", PixPaymentInfo.class); schemas.put("SepaPaymentInfo", SepaPaymentInfo.class); schemas.put("SpeiAdvancedPaymentInfo", SpeiAdvancedPaymentInfo.class); @@ -764,9 +1054,10 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid * against the oneOf child schemas: AbaPaymentInfo, AchPaymentInfo, ChapsPaymentInfo, - * IbanPaymentInfo, InteracPaymentInfo, LbtPaymentInfo, MomoPaymentInfo, PayidPaymentInfo, - * PixPaymentInfo, SepaPaymentInfo, SpeiAdvancedPaymentInfo, SpeiBasicPaymentInfo, - * UsWirePaymentInfo + * CipsPaymentInfo, FpsHkPaymentInfo, FpsUkPaymentInfo, IbanPaymentInfo, InstaPayPaymentInfo, + * InteracPaymentInfo, LbtPaymentInfo, MomoPaymentInfo, NequiPaymentInfo, PayidPaymentInfo, + * PesonetPaymentInfo, PixPaymentInfo, SepaPaymentInfo, SpeiAdvancedPaymentInfo, + * SpeiBasicPaymentInfo, UsWirePaymentInfo * *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be * a composed schema (allOf, anyOf, oneOf). @@ -788,11 +1079,31 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(CipsPaymentInfo.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(FpsHkPaymentInfo.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(FpsUkPaymentInfo.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(IbanPaymentInfo.class, instance, new HashSet>())) { super.setActualInstance(instance); return; } + if (JSON.isInstanceOf(InstaPayPaymentInfo.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(InteracPaymentInfo.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -808,11 +1119,21 @@ public void setActualInstance(Object instance) { return; } + if (JSON.isInstanceOf(NequiPaymentInfo.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(PayidPaymentInfo.class, instance, new HashSet>())) { super.setActualInstance(instance); return; } + if (JSON.isInstanceOf(PesonetPaymentInfo.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(PixPaymentInfo.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -840,21 +1161,25 @@ public void setActualInstance(Object instance) { throw new RuntimeException( "Invalid instance type. Must be AbaPaymentInfo, AchPaymentInfo, ChapsPaymentInfo," - + " IbanPaymentInfo, InteracPaymentInfo, LbtPaymentInfo, MomoPaymentInfo," - + " PayidPaymentInfo, PixPaymentInfo, SepaPaymentInfo, SpeiAdvancedPaymentInfo," - + " SpeiBasicPaymentInfo, UsWirePaymentInfo"); + + " CipsPaymentInfo, FpsHkPaymentInfo, FpsUkPaymentInfo, IbanPaymentInfo," + + " InstaPayPaymentInfo, InteracPaymentInfo, LbtPaymentInfo, MomoPaymentInfo," + + " NequiPaymentInfo, PayidPaymentInfo, PesonetPaymentInfo, PixPaymentInfo," + + " SepaPaymentInfo, SpeiAdvancedPaymentInfo, SpeiBasicPaymentInfo," + + " UsWirePaymentInfo"); } /** * Get the actual instance, which can be the following: AbaPaymentInfo, AchPaymentInfo, - * ChapsPaymentInfo, IbanPaymentInfo, InteracPaymentInfo, LbtPaymentInfo, MomoPaymentInfo, - * PayidPaymentInfo, PixPaymentInfo, SepaPaymentInfo, SpeiAdvancedPaymentInfo, - * SpeiBasicPaymentInfo, UsWirePaymentInfo + * ChapsPaymentInfo, CipsPaymentInfo, FpsHkPaymentInfo, FpsUkPaymentInfo, IbanPaymentInfo, + * InstaPayPaymentInfo, InteracPaymentInfo, LbtPaymentInfo, MomoPaymentInfo, NequiPaymentInfo, + * PayidPaymentInfo, PesonetPaymentInfo, PixPaymentInfo, SepaPaymentInfo, + * SpeiAdvancedPaymentInfo, SpeiBasicPaymentInfo, UsWirePaymentInfo * * @return The actual instance (AbaPaymentInfo, AchPaymentInfo, ChapsPaymentInfo, - * IbanPaymentInfo, InteracPaymentInfo, LbtPaymentInfo, MomoPaymentInfo, PayidPaymentInfo, - * PixPaymentInfo, SepaPaymentInfo, SpeiAdvancedPaymentInfo, SpeiBasicPaymentInfo, - * UsWirePaymentInfo) + * CipsPaymentInfo, FpsHkPaymentInfo, FpsUkPaymentInfo, IbanPaymentInfo, + * InstaPayPaymentInfo, InteracPaymentInfo, LbtPaymentInfo, MomoPaymentInfo, + * NequiPaymentInfo, PayidPaymentInfo, PesonetPaymentInfo, PixPaymentInfo, SepaPaymentInfo, + * SpeiAdvancedPaymentInfo, SpeiBasicPaymentInfo, UsWirePaymentInfo) */ @Override public Object getActualInstance() { @@ -894,6 +1219,39 @@ public ChapsPaymentInfo getChapsPaymentInfo() throws ClassCastException { return (ChapsPaymentInfo) super.getActualInstance(); } + /** + * Get the actual instance of `CipsPaymentInfo`. If the actual instance is not + * `CipsPaymentInfo`, the ClassCastException will be thrown. + * + * @return The actual instance of `CipsPaymentInfo` + * @throws ClassCastException if the instance is not `CipsPaymentInfo` + */ + public CipsPaymentInfo getCipsPaymentInfo() throws ClassCastException { + return (CipsPaymentInfo) super.getActualInstance(); + } + + /** + * Get the actual instance of `FpsHkPaymentInfo`. If the actual instance is not + * `FpsHkPaymentInfo`, the ClassCastException will be thrown. + * + * @return The actual instance of `FpsHkPaymentInfo` + * @throws ClassCastException if the instance is not `FpsHkPaymentInfo` + */ + public FpsHkPaymentInfo getFpsHkPaymentInfo() throws ClassCastException { + return (FpsHkPaymentInfo) super.getActualInstance(); + } + + /** + * Get the actual instance of `FpsUkPaymentInfo`. If the actual instance is not + * `FpsUkPaymentInfo`, the ClassCastException will be thrown. + * + * @return The actual instance of `FpsUkPaymentInfo` + * @throws ClassCastException if the instance is not `FpsUkPaymentInfo` + */ + public FpsUkPaymentInfo getFpsUkPaymentInfo() throws ClassCastException { + return (FpsUkPaymentInfo) super.getActualInstance(); + } + /** * Get the actual instance of `IbanPaymentInfo`. If the actual instance is not * `IbanPaymentInfo`, the ClassCastException will be thrown. @@ -905,6 +1263,17 @@ public IbanPaymentInfo getIbanPaymentInfo() throws ClassCastException { return (IbanPaymentInfo) super.getActualInstance(); } + /** + * Get the actual instance of `InstaPayPaymentInfo`. If the actual instance is not + * `InstaPayPaymentInfo`, the ClassCastException will be thrown. + * + * @return The actual instance of `InstaPayPaymentInfo` + * @throws ClassCastException if the instance is not `InstaPayPaymentInfo` + */ + public InstaPayPaymentInfo getInstaPayPaymentInfo() throws ClassCastException { + return (InstaPayPaymentInfo) super.getActualInstance(); + } + /** * Get the actual instance of `InteracPaymentInfo`. If the actual instance is not * `InteracPaymentInfo`, the ClassCastException will be thrown. @@ -938,6 +1307,17 @@ public MomoPaymentInfo getMomoPaymentInfo() throws ClassCastException { return (MomoPaymentInfo) super.getActualInstance(); } + /** + * Get the actual instance of `NequiPaymentInfo`. If the actual instance is not + * `NequiPaymentInfo`, the ClassCastException will be thrown. + * + * @return The actual instance of `NequiPaymentInfo` + * @throws ClassCastException if the instance is not `NequiPaymentInfo` + */ + public NequiPaymentInfo getNequiPaymentInfo() throws ClassCastException { + return (NequiPaymentInfo) super.getActualInstance(); + } + /** * Get the actual instance of `PayidPaymentInfo`. If the actual instance is not * `PayidPaymentInfo`, the ClassCastException will be thrown. @@ -949,6 +1329,17 @@ public PayidPaymentInfo getPayidPaymentInfo() throws ClassCastException { return (PayidPaymentInfo) super.getActualInstance(); } + /** + * Get the actual instance of `PesonetPaymentInfo`. If the actual instance is not + * `PesonetPaymentInfo`, the ClassCastException will be thrown. + * + * @return The actual instance of `PesonetPaymentInfo` + * @throws ClassCastException if the instance is not `PesonetPaymentInfo` + */ + public PesonetPaymentInfo getPesonetPaymentInfo() throws ClassCastException { + return (PesonetPaymentInfo) super.getActualInstance(); + } + /** * Get the actual instance of `PixPaymentInfo`. If the actual instance is not `PixPaymentInfo`, * the ClassCastException will be thrown. @@ -1140,6 +1531,54 @@ public String toUrlQueryString(String prefix) { } return joiner.toString(); } + if (getActualInstance() instanceof CipsPaymentInfo) { + if (getActualInstance() != null) { + joiner.add( + ((CipsPaymentInfo) getActualInstance()) + .toUrlQueryString(prefix + "one_of_13" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof NequiPaymentInfo) { + if (getActualInstance() != null) { + joiner.add( + ((NequiPaymentInfo) getActualInstance()) + .toUrlQueryString(prefix + "one_of_14" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof FpsUkPaymentInfo) { + if (getActualInstance() != null) { + joiner.add( + ((FpsUkPaymentInfo) getActualInstance()) + .toUrlQueryString(prefix + "one_of_15" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof FpsHkPaymentInfo) { + if (getActualInstance() != null) { + joiner.add( + ((FpsHkPaymentInfo) getActualInstance()) + .toUrlQueryString(prefix + "one_of_16" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof InstaPayPaymentInfo) { + if (getActualInstance() != null) { + joiner.add( + ((InstaPayPaymentInfo) getActualInstance()) + .toUrlQueryString(prefix + "one_of_17" + suffix)); + } + return joiner.toString(); + } + if (getActualInstance() instanceof PesonetPaymentInfo) { + if (getActualInstance() != null) { + joiner.add( + ((PesonetPaymentInfo) getActualInstance()) + .toUrlQueryString(prefix + "one_of_18" + suffix)); + } + return joiner.toString(); + } return null; } } diff --git a/src/main/java/com/fireblocks/sdk/model/CipsPaymentInfo.java b/src/main/java/com/fireblocks/sdk/model/CipsPaymentInfo.java new file mode 100644 index 00000000..858344e4 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/CipsPaymentInfo.java @@ -0,0 +1,559 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** CIPS payment information for Cross-Border Interbank Payment System transfers (CNY) */ +@JsonPropertyOrder({ + CipsPaymentInfo.JSON_PROPERTY_RAIL, + CipsPaymentInfo.JSON_PROPERTY_ADDRESSING_SYSTEM, + CipsPaymentInfo.JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME, + CipsPaymentInfo.JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME, + CipsPaymentInfo.JSON_PROPERTY_BANK_NAME, + CipsPaymentInfo.JSON_PROPERTY_BANK_COUNTRY, + CipsPaymentInfo.JSON_PROPERTY_SWIFT_CODE, + CipsPaymentInfo.JSON_PROPERTY_ACCOUNT_NUMBER, + CipsPaymentInfo.JSON_PROPERTY_REFERENCE_ID +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class CipsPaymentInfo { + /** The payment rail type for CIPS transfers */ + public enum RailEnum { + CIPS(String.valueOf("CIPS")); + + private String value; + + RailEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RailEnum fromValue(String value) { + for (RailEnum b : RailEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RAIL = "rail"; + @jakarta.annotation.Nonnull private RailEnum rail; + + /** The addressing system used for CIPS transfers */ + public enum AddressingSystemEnum { + CIPS(String.valueOf("CIPS")); + + private String value; + + AddressingSystemEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AddressingSystemEnum fromValue(String value) { + for (AddressingSystemEnum b : AddressingSystemEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ADDRESSING_SYSTEM = "addressingSystem"; + @jakarta.annotation.Nonnull private AddressingSystemEnum addressingSystem; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME = "accountHolderGivenName"; + @jakarta.annotation.Nonnull private String accountHolderGivenName; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME = "accountHolderSurname"; + @jakarta.annotation.Nullable private String accountHolderSurname; + + public static final String JSON_PROPERTY_BANK_NAME = "bankName"; + @jakarta.annotation.Nonnull private String bankName; + + public static final String JSON_PROPERTY_BANK_COUNTRY = "bankCountry"; + @jakarta.annotation.Nonnull private String bankCountry; + + public static final String JSON_PROPERTY_SWIFT_CODE = "swiftCode"; + @jakarta.annotation.Nonnull private String swiftCode; + + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + @jakarta.annotation.Nonnull private String accountNumber; + + public static final String JSON_PROPERTY_REFERENCE_ID = "referenceId"; + @jakarta.annotation.Nullable private String referenceId; + + public CipsPaymentInfo() {} + + @JsonCreator + public CipsPaymentInfo( + @JsonProperty(value = JSON_PROPERTY_RAIL, required = true) RailEnum rail, + @JsonProperty(value = JSON_PROPERTY_ADDRESSING_SYSTEM, required = true) + AddressingSystemEnum addressingSystem, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME, required = true) + String accountHolderGivenName, + @JsonProperty(value = JSON_PROPERTY_BANK_NAME, required = true) String bankName, + @JsonProperty(value = JSON_PROPERTY_BANK_COUNTRY, required = true) String bankCountry, + @JsonProperty(value = JSON_PROPERTY_SWIFT_CODE, required = true) String swiftCode, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_NUMBER, required = true) + String accountNumber) { + this.rail = rail; + this.addressingSystem = addressingSystem; + this.accountHolderGivenName = accountHolderGivenName; + this.bankName = bankName; + this.bankCountry = bankCountry; + this.swiftCode = swiftCode; + this.accountNumber = accountNumber; + } + + public CipsPaymentInfo rail(@jakarta.annotation.Nonnull RailEnum rail) { + this.rail = rail; + return this; + } + + /** + * The payment rail type for CIPS transfers + * + * @return rail + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RailEnum getRail() { + return rail; + } + + @JsonProperty(JSON_PROPERTY_RAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRail(@jakarta.annotation.Nonnull RailEnum rail) { + this.rail = rail; + } + + public CipsPaymentInfo addressingSystem( + @jakarta.annotation.Nonnull AddressingSystemEnum addressingSystem) { + this.addressingSystem = addressingSystem; + return this; + } + + /** + * The addressing system used for CIPS transfers + * + * @return addressingSystem + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESSING_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AddressingSystemEnum getAddressingSystem() { + return addressingSystem; + } + + @JsonProperty(JSON_PROPERTY_ADDRESSING_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddressingSystem( + @jakarta.annotation.Nonnull AddressingSystemEnum addressingSystem) { + this.addressingSystem = addressingSystem; + } + + public CipsPaymentInfo accountHolderGivenName( + @jakarta.annotation.Nonnull String accountHolderGivenName) { + this.accountHolderGivenName = accountHolderGivenName; + return this; + } + + /** + * The given name (first name) of the account holder + * + * @return accountHolderGivenName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountHolderGivenName() { + return accountHolderGivenName; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountHolderGivenName( + @jakarta.annotation.Nonnull String accountHolderGivenName) { + this.accountHolderGivenName = accountHolderGivenName; + } + + public CipsPaymentInfo accountHolderSurname( + @jakarta.annotation.Nullable String accountHolderSurname) { + this.accountHolderSurname = accountHolderSurname; + return this; + } + + /** + * The surname (last name) of the account holder + * + * @return accountHolderSurname + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAccountHolderSurname() { + return accountHolderSurname; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountHolderSurname(@jakarta.annotation.Nullable String accountHolderSurname) { + this.accountHolderSurname = accountHolderSurname; + } + + public CipsPaymentInfo bankName(@jakarta.annotation.Nonnull String bankName) { + this.bankName = bankName; + return this; + } + + /** + * Name of the recipient's bank + * + * @return bankName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BANK_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBankName() { + return bankName; + } + + @JsonProperty(JSON_PROPERTY_BANK_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBankName(@jakarta.annotation.Nonnull String bankName) { + this.bankName = bankName; + } + + public CipsPaymentInfo bankCountry(@jakarta.annotation.Nonnull String bankCountry) { + this.bankCountry = bankCountry; + return this; + } + + /** + * ISO 3166-1 alpha-2 country code of the bank + * + * @return bankCountry + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BANK_COUNTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBankCountry() { + return bankCountry; + } + + @JsonProperty(JSON_PROPERTY_BANK_COUNTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBankCountry(@jakarta.annotation.Nonnull String bankCountry) { + this.bankCountry = bankCountry; + } + + public CipsPaymentInfo swiftCode(@jakarta.annotation.Nonnull String swiftCode) { + this.swiftCode = swiftCode; + return this; + } + + /** + * SWIFT/BIC code of the recipient bank + * + * @return swiftCode + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SWIFT_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSwiftCode() { + return swiftCode; + } + + @JsonProperty(JSON_PROPERTY_SWIFT_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSwiftCode(@jakarta.annotation.Nonnull String swiftCode) { + this.swiftCode = swiftCode; + } + + public CipsPaymentInfo accountNumber(@jakarta.annotation.Nonnull String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Recipient bank account number + * + * @return accountNumber + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountNumber() { + return accountNumber; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountNumber(@jakarta.annotation.Nonnull String accountNumber) { + this.accountNumber = accountNumber; + } + + public CipsPaymentInfo referenceId(@jakarta.annotation.Nullable String referenceId) { + this.referenceId = referenceId; + return this; + } + + /** + * Optional payment reference + * + * @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 CipsPaymentInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CipsPaymentInfo cipsPaymentInfo = (CipsPaymentInfo) o; + return Objects.equals(this.rail, cipsPaymentInfo.rail) + && Objects.equals(this.addressingSystem, cipsPaymentInfo.addressingSystem) + && Objects.equals( + this.accountHolderGivenName, cipsPaymentInfo.accountHolderGivenName) + && Objects.equals(this.accountHolderSurname, cipsPaymentInfo.accountHolderSurname) + && Objects.equals(this.bankName, cipsPaymentInfo.bankName) + && Objects.equals(this.bankCountry, cipsPaymentInfo.bankCountry) + && Objects.equals(this.swiftCode, cipsPaymentInfo.swiftCode) + && Objects.equals(this.accountNumber, cipsPaymentInfo.accountNumber) + && Objects.equals(this.referenceId, cipsPaymentInfo.referenceId); + } + + @Override + public int hashCode() { + return Objects.hash( + rail, + addressingSystem, + accountHolderGivenName, + accountHolderSurname, + bankName, + bankCountry, + swiftCode, + accountNumber, + referenceId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CipsPaymentInfo {\n"); + sb.append(" rail: ").append(toIndentedString(rail)).append("\n"); + sb.append(" addressingSystem: ").append(toIndentedString(addressingSystem)).append("\n"); + sb.append(" accountHolderGivenName: ") + .append(toIndentedString(accountHolderGivenName)) + .append("\n"); + sb.append(" accountHolderSurname: ") + .append(toIndentedString(accountHolderSurname)) + .append("\n"); + sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n"); + sb.append(" bankCountry: ").append(toIndentedString(bankCountry)).append("\n"); + sb.append(" swiftCode: ").append(toIndentedString(swiftCode)).append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).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 `rail` to the URL query string + if (getRail() != null) { + joiner.add( + String.format( + "%srail%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRail())))); + } + + // add `addressingSystem` to the URL query string + if (getAddressingSystem() != null) { + joiner.add( + String.format( + "%saddressingSystem%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAddressingSystem())))); + } + + // add `accountHolderGivenName` to the URL query string + if (getAccountHolderGivenName() != null) { + joiner.add( + String.format( + "%saccountHolderGivenName%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getAccountHolderGivenName())))); + } + + // add `accountHolderSurname` to the URL query string + if (getAccountHolderSurname() != null) { + joiner.add( + String.format( + "%saccountHolderSurname%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getAccountHolderSurname())))); + } + + // add `bankName` to the URL query string + if (getBankName() != null) { + joiner.add( + String.format( + "%sbankName%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBankName())))); + } + + // add `bankCountry` to the URL query string + if (getBankCountry() != null) { + joiner.add( + String.format( + "%sbankCountry%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBankCountry())))); + } + + // add `swiftCode` to the URL query string + if (getSwiftCode() != null) { + joiner.add( + String.format( + "%sswiftCode%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSwiftCode())))); + } + + // add `accountNumber` to the URL query string + if (getAccountNumber() != null) { + joiner.add( + String.format( + "%saccountNumber%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAccountNumber())))); + } + + // add `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/FpsHkPaymentInfo.java b/src/main/java/com/fireblocks/sdk/model/FpsHkPaymentInfo.java new file mode 100644 index 00000000..d14745f2 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/FpsHkPaymentInfo.java @@ -0,0 +1,500 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** FPS HK payment information for Hong Kong Faster Payment System transfers (HKD) */ +@JsonPropertyOrder({ + FpsHkPaymentInfo.JSON_PROPERTY_RAIL, + FpsHkPaymentInfo.JSON_PROPERTY_ADDRESSING_SYSTEM, + FpsHkPaymentInfo.JSON_PROPERTY_RECIPIENT_LEGAL_NAME, + FpsHkPaymentInfo.JSON_PROPERTY_ACCOUNT_NUMBER, + FpsHkPaymentInfo.JSON_PROPERTY_BANK_CODE, + FpsHkPaymentInfo.JSON_PROPERTY_PHONE, + FpsHkPaymentInfo.JSON_PROPERTY_EMAIL, + FpsHkPaymentInfo.JSON_PROPERTY_FPS_ID +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class FpsHkPaymentInfo { + /** The payment rail type for Hong Kong FPS transfers */ + public enum RailEnum { + FPS_HK(String.valueOf("FPS_HK")); + + private String value; + + RailEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RailEnum fromValue(String value) { + for (RailEnum b : RailEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RAIL = "rail"; + @jakarta.annotation.Nonnull private RailEnum rail; + + /** The addressing system used for Hong Kong FPS transfers */ + public enum AddressingSystemEnum { + FPS_HK(String.valueOf("FPS_HK")); + + private String value; + + AddressingSystemEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AddressingSystemEnum fromValue(String value) { + for (AddressingSystemEnum b : AddressingSystemEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ADDRESSING_SYSTEM = "addressingSystem"; + @jakarta.annotation.Nonnull private AddressingSystemEnum addressingSystem; + + public static final String JSON_PROPERTY_RECIPIENT_LEGAL_NAME = "recipientLegalName"; + @jakarta.annotation.Nullable private String recipientLegalName; + + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + @jakarta.annotation.Nullable private String accountNumber; + + public static final String JSON_PROPERTY_BANK_CODE = "bankCode"; + @jakarta.annotation.Nullable private String bankCode; + + public static final String JSON_PROPERTY_PHONE = "phone"; + @jakarta.annotation.Nullable private String phone; + + public static final String JSON_PROPERTY_EMAIL = "email"; + @jakarta.annotation.Nullable private String email; + + public static final String JSON_PROPERTY_FPS_ID = "fpsId"; + @jakarta.annotation.Nullable private String fpsId; + + public FpsHkPaymentInfo() {} + + @JsonCreator + public FpsHkPaymentInfo( + @JsonProperty(value = JSON_PROPERTY_RAIL, required = true) RailEnum rail, + @JsonProperty(value = JSON_PROPERTY_ADDRESSING_SYSTEM, required = true) + AddressingSystemEnum addressingSystem) { + this.rail = rail; + this.addressingSystem = addressingSystem; + } + + public FpsHkPaymentInfo rail(@jakarta.annotation.Nonnull RailEnum rail) { + this.rail = rail; + return this; + } + + /** + * The payment rail type for Hong Kong FPS transfers + * + * @return rail + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RailEnum getRail() { + return rail; + } + + @JsonProperty(JSON_PROPERTY_RAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRail(@jakarta.annotation.Nonnull RailEnum rail) { + this.rail = rail; + } + + public FpsHkPaymentInfo addressingSystem( + @jakarta.annotation.Nonnull AddressingSystemEnum addressingSystem) { + this.addressingSystem = addressingSystem; + return this; + } + + /** + * The addressing system used for Hong Kong FPS transfers + * + * @return addressingSystem + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESSING_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AddressingSystemEnum getAddressingSystem() { + return addressingSystem; + } + + @JsonProperty(JSON_PROPERTY_ADDRESSING_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddressingSystem( + @jakarta.annotation.Nonnull AddressingSystemEnum addressingSystem) { + this.addressingSystem = addressingSystem; + } + + public FpsHkPaymentInfo recipientLegalName( + @jakarta.annotation.Nullable String recipientLegalName) { + this.recipientLegalName = recipientLegalName; + return this; + } + + /** + * Full legal name of the recipient + * + * @return recipientLegalName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RECIPIENT_LEGAL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRecipientLegalName() { + return recipientLegalName; + } + + @JsonProperty(JSON_PROPERTY_RECIPIENT_LEGAL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRecipientLegalName(@jakarta.annotation.Nullable String recipientLegalName) { + this.recipientLegalName = recipientLegalName; + } + + public FpsHkPaymentInfo accountNumber(@jakarta.annotation.Nullable String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Recipient bank account number + * + * @return accountNumber + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAccountNumber() { + return accountNumber; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAccountNumber(@jakarta.annotation.Nullable String accountNumber) { + this.accountNumber = accountNumber; + } + + public FpsHkPaymentInfo bankCode(@jakarta.annotation.Nullable String bankCode) { + this.bankCode = bankCode; + return this; + } + + /** + * Hong Kong bank code + * + * @return bankCode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BANK_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBankCode() { + return bankCode; + } + + @JsonProperty(JSON_PROPERTY_BANK_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankCode(@jakarta.annotation.Nullable String bankCode) { + this.bankCode = bankCode; + } + + public FpsHkPaymentInfo phone(@jakarta.annotation.Nullable String phone) { + this.phone = phone; + return this; + } + + /** + * Recipient phone number in E.164 format + * + * @return phone + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPhone() { + return phone; + } + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPhone(@jakarta.annotation.Nullable String phone) { + this.phone = phone; + } + + public FpsHkPaymentInfo email(@jakarta.annotation.Nullable String email) { + this.email = email; + return this; + } + + /** + * Recipient email address + * + * @return email + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmail() { + return email; + } + + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEmail(@jakarta.annotation.Nullable String email) { + this.email = email; + } + + public FpsHkPaymentInfo fpsId(@jakarta.annotation.Nullable String fpsId) { + this.fpsId = fpsId; + return this; + } + + /** + * Hong Kong FPS identifier + * + * @return fpsId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FPS_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFpsId() { + return fpsId; + } + + @JsonProperty(JSON_PROPERTY_FPS_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFpsId(@jakarta.annotation.Nullable String fpsId) { + this.fpsId = fpsId; + } + + /** Return true if this FpsHkPaymentInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FpsHkPaymentInfo fpsHkPaymentInfo = (FpsHkPaymentInfo) o; + return Objects.equals(this.rail, fpsHkPaymentInfo.rail) + && Objects.equals(this.addressingSystem, fpsHkPaymentInfo.addressingSystem) + && Objects.equals(this.recipientLegalName, fpsHkPaymentInfo.recipientLegalName) + && Objects.equals(this.accountNumber, fpsHkPaymentInfo.accountNumber) + && Objects.equals(this.bankCode, fpsHkPaymentInfo.bankCode) + && Objects.equals(this.phone, fpsHkPaymentInfo.phone) + && Objects.equals(this.email, fpsHkPaymentInfo.email) + && Objects.equals(this.fpsId, fpsHkPaymentInfo.fpsId); + } + + @Override + public int hashCode() { + return Objects.hash( + rail, + addressingSystem, + recipientLegalName, + accountNumber, + bankCode, + phone, + email, + fpsId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FpsHkPaymentInfo {\n"); + sb.append(" rail: ").append(toIndentedString(rail)).append("\n"); + sb.append(" addressingSystem: ").append(toIndentedString(addressingSystem)).append("\n"); + sb.append(" recipientLegalName: ") + .append(toIndentedString(recipientLegalName)) + .append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" bankCode: ").append(toIndentedString(bankCode)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" fpsId: ").append(toIndentedString(fpsId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `rail` to the URL query string + if (getRail() != null) { + joiner.add( + String.format( + "%srail%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRail())))); + } + + // add `addressingSystem` to the URL query string + if (getAddressingSystem() != null) { + joiner.add( + String.format( + "%saddressingSystem%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAddressingSystem())))); + } + + // add `recipientLegalName` to the URL query string + if (getRecipientLegalName() != null) { + joiner.add( + String.format( + "%srecipientLegalName%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRecipientLegalName())))); + } + + // add `accountNumber` to the URL query string + if (getAccountNumber() != null) { + joiner.add( + String.format( + "%saccountNumber%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAccountNumber())))); + } + + // add `bankCode` to the URL query string + if (getBankCode() != null) { + joiner.add( + String.format( + "%sbankCode%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBankCode())))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add( + String.format( + "%sphone%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getPhone())))); + } + + // add `email` to the URL query string + if (getEmail() != null) { + joiner.add( + String.format( + "%semail%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getEmail())))); + } + + // add `fpsId` to the URL query string + if (getFpsId() != null) { + joiner.add( + String.format( + "%sfpsId%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getFpsId())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/FpsUkPaymentInfo.java b/src/main/java/com/fireblocks/sdk/model/FpsUkPaymentInfo.java new file mode 100644 index 00000000..87824e66 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/FpsUkPaymentInfo.java @@ -0,0 +1,481 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** FPS UK payment information for UK Faster Payments transfers (GBP) */ +@JsonPropertyOrder({ + FpsUkPaymentInfo.JSON_PROPERTY_RAIL, + FpsUkPaymentInfo.JSON_PROPERTY_ADDRESSING_SYSTEM, + FpsUkPaymentInfo.JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME, + FpsUkPaymentInfo.JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME, + FpsUkPaymentInfo.JSON_PROPERTY_ACCOUNT_NUMBER, + FpsUkPaymentInfo.JSON_PROPERTY_SORT_CODE, + FpsUkPaymentInfo.JSON_PROPERTY_BANK_ACCOUNT_COUNTRY +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class FpsUkPaymentInfo { + /** The payment rail type for UK Faster Payments transfers */ + public enum RailEnum { + FPS_UK(String.valueOf("FPS_UK")); + + private String value; + + RailEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RailEnum fromValue(String value) { + for (RailEnum b : RailEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RAIL = "rail"; + @jakarta.annotation.Nonnull private RailEnum rail; + + /** The addressing system used for UK Faster Payments transfers */ + public enum AddressingSystemEnum { + FPS_UK(String.valueOf("FPS_UK")); + + private String value; + + AddressingSystemEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AddressingSystemEnum fromValue(String value) { + for (AddressingSystemEnum b : AddressingSystemEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ADDRESSING_SYSTEM = "addressingSystem"; + @jakarta.annotation.Nonnull private AddressingSystemEnum addressingSystem; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME = "accountHolderGivenName"; + @jakarta.annotation.Nonnull private String accountHolderGivenName; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME = "accountHolderSurname"; + @jakarta.annotation.Nonnull private String accountHolderSurname; + + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + @jakarta.annotation.Nonnull private String accountNumber; + + public static final String JSON_PROPERTY_SORT_CODE = "sortCode"; + @jakarta.annotation.Nonnull private String sortCode; + + public static final String JSON_PROPERTY_BANK_ACCOUNT_COUNTRY = "bankAccountCountry"; + @jakarta.annotation.Nullable private String bankAccountCountry; + + public FpsUkPaymentInfo() {} + + @JsonCreator + public FpsUkPaymentInfo( + @JsonProperty(value = JSON_PROPERTY_RAIL, required = true) RailEnum rail, + @JsonProperty(value = JSON_PROPERTY_ADDRESSING_SYSTEM, required = true) + AddressingSystemEnum addressingSystem, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME, required = true) + String accountHolderGivenName, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME, required = true) + String accountHolderSurname, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_NUMBER, required = true) + String accountNumber, + @JsonProperty(value = JSON_PROPERTY_SORT_CODE, required = true) String sortCode) { + this.rail = rail; + this.addressingSystem = addressingSystem; + this.accountHolderGivenName = accountHolderGivenName; + this.accountHolderSurname = accountHolderSurname; + this.accountNumber = accountNumber; + this.sortCode = sortCode; + } + + public FpsUkPaymentInfo rail(@jakarta.annotation.Nonnull RailEnum rail) { + this.rail = rail; + return this; + } + + /** + * The payment rail type for UK Faster Payments transfers + * + * @return rail + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RailEnum getRail() { + return rail; + } + + @JsonProperty(JSON_PROPERTY_RAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRail(@jakarta.annotation.Nonnull RailEnum rail) { + this.rail = rail; + } + + public FpsUkPaymentInfo addressingSystem( + @jakarta.annotation.Nonnull AddressingSystemEnum addressingSystem) { + this.addressingSystem = addressingSystem; + return this; + } + + /** + * The addressing system used for UK Faster Payments transfers + * + * @return addressingSystem + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESSING_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AddressingSystemEnum getAddressingSystem() { + return addressingSystem; + } + + @JsonProperty(JSON_PROPERTY_ADDRESSING_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddressingSystem( + @jakarta.annotation.Nonnull AddressingSystemEnum addressingSystem) { + this.addressingSystem = addressingSystem; + } + + public FpsUkPaymentInfo accountHolderGivenName( + @jakarta.annotation.Nonnull String accountHolderGivenName) { + this.accountHolderGivenName = accountHolderGivenName; + return this; + } + + /** + * The given name (first name) of the account holder + * + * @return accountHolderGivenName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountHolderGivenName() { + return accountHolderGivenName; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountHolderGivenName( + @jakarta.annotation.Nonnull String accountHolderGivenName) { + this.accountHolderGivenName = accountHolderGivenName; + } + + public FpsUkPaymentInfo accountHolderSurname( + @jakarta.annotation.Nonnull String accountHolderSurname) { + this.accountHolderSurname = accountHolderSurname; + return this; + } + + /** + * The surname (last name) of the account holder + * + * @return accountHolderSurname + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountHolderSurname() { + return accountHolderSurname; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountHolderSurname(@jakarta.annotation.Nonnull String accountHolderSurname) { + this.accountHolderSurname = accountHolderSurname; + } + + public FpsUkPaymentInfo accountNumber(@jakarta.annotation.Nonnull String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * UK bank account number + * + * @return accountNumber + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountNumber() { + return accountNumber; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountNumber(@jakarta.annotation.Nonnull String accountNumber) { + this.accountNumber = accountNumber; + } + + public FpsUkPaymentInfo sortCode(@jakarta.annotation.Nonnull String sortCode) { + this.sortCode = sortCode; + return this; + } + + /** + * UK sort code (format XX-XX-XX) + * + * @return sortCode + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_SORT_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSortCode() { + return sortCode; + } + + @JsonProperty(JSON_PROPERTY_SORT_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setSortCode(@jakarta.annotation.Nonnull String sortCode) { + this.sortCode = sortCode; + } + + public FpsUkPaymentInfo bankAccountCountry( + @jakarta.annotation.Nullable String bankAccountCountry) { + this.bankAccountCountry = bankAccountCountry; + return this; + } + + /** + * ISO 3166-1 alpha-2 country code of the bank account + * + * @return bankAccountCountry + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_COUNTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBankAccountCountry() { + return bankAccountCountry; + } + + @JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_COUNTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBankAccountCountry(@jakarta.annotation.Nullable String bankAccountCountry) { + this.bankAccountCountry = bankAccountCountry; + } + + /** Return true if this FpsUkPaymentInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FpsUkPaymentInfo fpsUkPaymentInfo = (FpsUkPaymentInfo) o; + return Objects.equals(this.rail, fpsUkPaymentInfo.rail) + && Objects.equals(this.addressingSystem, fpsUkPaymentInfo.addressingSystem) + && Objects.equals( + this.accountHolderGivenName, fpsUkPaymentInfo.accountHolderGivenName) + && Objects.equals(this.accountHolderSurname, fpsUkPaymentInfo.accountHolderSurname) + && Objects.equals(this.accountNumber, fpsUkPaymentInfo.accountNumber) + && Objects.equals(this.sortCode, fpsUkPaymentInfo.sortCode) + && Objects.equals(this.bankAccountCountry, fpsUkPaymentInfo.bankAccountCountry); + } + + @Override + public int hashCode() { + return Objects.hash( + rail, + addressingSystem, + accountHolderGivenName, + accountHolderSurname, + accountNumber, + sortCode, + bankAccountCountry); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FpsUkPaymentInfo {\n"); + sb.append(" rail: ").append(toIndentedString(rail)).append("\n"); + sb.append(" addressingSystem: ").append(toIndentedString(addressingSystem)).append("\n"); + sb.append(" accountHolderGivenName: ") + .append(toIndentedString(accountHolderGivenName)) + .append("\n"); + sb.append(" accountHolderSurname: ") + .append(toIndentedString(accountHolderSurname)) + .append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" sortCode: ").append(toIndentedString(sortCode)).append("\n"); + sb.append(" bankAccountCountry: ") + .append(toIndentedString(bankAccountCountry)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `rail` to the URL query string + if (getRail() != null) { + joiner.add( + String.format( + "%srail%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRail())))); + } + + // add `addressingSystem` to the URL query string + if (getAddressingSystem() != null) { + joiner.add( + String.format( + "%saddressingSystem%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAddressingSystem())))); + } + + // add `accountHolderGivenName` to the URL query string + if (getAccountHolderGivenName() != null) { + joiner.add( + String.format( + "%saccountHolderGivenName%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getAccountHolderGivenName())))); + } + + // add `accountHolderSurname` to the URL query string + if (getAccountHolderSurname() != null) { + joiner.add( + String.format( + "%saccountHolderSurname%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getAccountHolderSurname())))); + } + + // add `accountNumber` to the URL query string + if (getAccountNumber() != null) { + joiner.add( + String.format( + "%saccountNumber%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAccountNumber())))); + } + + // add `sortCode` to the URL query string + if (getSortCode() != null) { + joiner.add( + String.format( + "%ssortCode%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getSortCode())))); + } + + // add `bankAccountCountry` to the URL query string + if (getBankAccountCountry() != null) { + joiner.add( + String.format( + "%sbankAccountCountry%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBankAccountCountry())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/InstaPayPaymentInfo.java b/src/main/java/com/fireblocks/sdk/model/InstaPayPaymentInfo.java new file mode 100644 index 00000000..7ec5e513 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/InstaPayPaymentInfo.java @@ -0,0 +1,439 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** InstaPay payment information for Philippine instant payment transfers (PHP) */ +@JsonPropertyOrder({ + InstaPayPaymentInfo.JSON_PROPERTY_RAIL, + InstaPayPaymentInfo.JSON_PROPERTY_ADDRESSING_SYSTEM, + InstaPayPaymentInfo.JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME, + InstaPayPaymentInfo.JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME, + InstaPayPaymentInfo.JSON_PROPERTY_ACCOUNT_NUMBER, + InstaPayPaymentInfo.JSON_PROPERTY_BANK_NAME +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class InstaPayPaymentInfo { + /** The payment rail type for InstaPay transfers */ + public enum RailEnum { + INSTA_PAY(String.valueOf("INSTA_PAY")); + + private String value; + + RailEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RailEnum fromValue(String value) { + for (RailEnum b : RailEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RAIL = "rail"; + @jakarta.annotation.Nonnull private RailEnum rail; + + /** The addressing system used for InstaPay transfers */ + public enum AddressingSystemEnum { + INSTA_PAY(String.valueOf("INSTA_PAY")); + + private String value; + + AddressingSystemEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AddressingSystemEnum fromValue(String value) { + for (AddressingSystemEnum b : AddressingSystemEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ADDRESSING_SYSTEM = "addressingSystem"; + @jakarta.annotation.Nonnull private AddressingSystemEnum addressingSystem; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME = "accountHolderGivenName"; + @jakarta.annotation.Nonnull private String accountHolderGivenName; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME = "accountHolderSurname"; + @jakarta.annotation.Nonnull private String accountHolderSurname; + + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + @jakarta.annotation.Nonnull private String accountNumber; + + public static final String JSON_PROPERTY_BANK_NAME = "bankName"; + @jakarta.annotation.Nonnull private String bankName; + + public InstaPayPaymentInfo() {} + + @JsonCreator + public InstaPayPaymentInfo( + @JsonProperty(value = JSON_PROPERTY_RAIL, required = true) RailEnum rail, + @JsonProperty(value = JSON_PROPERTY_ADDRESSING_SYSTEM, required = true) + AddressingSystemEnum addressingSystem, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME, required = true) + String accountHolderGivenName, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME, required = true) + String accountHolderSurname, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_NUMBER, required = true) + String accountNumber, + @JsonProperty(value = JSON_PROPERTY_BANK_NAME, required = true) String bankName) { + this.rail = rail; + this.addressingSystem = addressingSystem; + this.accountHolderGivenName = accountHolderGivenName; + this.accountHolderSurname = accountHolderSurname; + this.accountNumber = accountNumber; + this.bankName = bankName; + } + + public InstaPayPaymentInfo rail(@jakarta.annotation.Nonnull RailEnum rail) { + this.rail = rail; + return this; + } + + /** + * The payment rail type for InstaPay transfers + * + * @return rail + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RailEnum getRail() { + return rail; + } + + @JsonProperty(JSON_PROPERTY_RAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRail(@jakarta.annotation.Nonnull RailEnum rail) { + this.rail = rail; + } + + public InstaPayPaymentInfo addressingSystem( + @jakarta.annotation.Nonnull AddressingSystemEnum addressingSystem) { + this.addressingSystem = addressingSystem; + return this; + } + + /** + * The addressing system used for InstaPay transfers + * + * @return addressingSystem + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESSING_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AddressingSystemEnum getAddressingSystem() { + return addressingSystem; + } + + @JsonProperty(JSON_PROPERTY_ADDRESSING_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddressingSystem( + @jakarta.annotation.Nonnull AddressingSystemEnum addressingSystem) { + this.addressingSystem = addressingSystem; + } + + public InstaPayPaymentInfo accountHolderGivenName( + @jakarta.annotation.Nonnull String accountHolderGivenName) { + this.accountHolderGivenName = accountHolderGivenName; + return this; + } + + /** + * The given name (first name) of the account holder + * + * @return accountHolderGivenName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountHolderGivenName() { + return accountHolderGivenName; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountHolderGivenName( + @jakarta.annotation.Nonnull String accountHolderGivenName) { + this.accountHolderGivenName = accountHolderGivenName; + } + + public InstaPayPaymentInfo accountHolderSurname( + @jakarta.annotation.Nonnull String accountHolderSurname) { + this.accountHolderSurname = accountHolderSurname; + return this; + } + + /** + * The surname (last name) of the account holder + * + * @return accountHolderSurname + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountHolderSurname() { + return accountHolderSurname; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountHolderSurname(@jakarta.annotation.Nonnull String accountHolderSurname) { + this.accountHolderSurname = accountHolderSurname; + } + + public InstaPayPaymentInfo accountNumber(@jakarta.annotation.Nonnull String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Recipient bank account or wallet number + * + * @return accountNumber + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountNumber() { + return accountNumber; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountNumber(@jakarta.annotation.Nonnull String accountNumber) { + this.accountNumber = accountNumber; + } + + public InstaPayPaymentInfo bankName(@jakarta.annotation.Nonnull String bankName) { + this.bankName = bankName; + return this; + } + + /** + * Name of the recipient's bank or wallet (e.g. BDO, BPI, GCash, Maya) + * + * @return bankName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BANK_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBankName() { + return bankName; + } + + @JsonProperty(JSON_PROPERTY_BANK_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBankName(@jakarta.annotation.Nonnull String bankName) { + this.bankName = bankName; + } + + /** Return true if this InstaPayPaymentInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InstaPayPaymentInfo instaPayPaymentInfo = (InstaPayPaymentInfo) o; + return Objects.equals(this.rail, instaPayPaymentInfo.rail) + && Objects.equals(this.addressingSystem, instaPayPaymentInfo.addressingSystem) + && Objects.equals( + this.accountHolderGivenName, instaPayPaymentInfo.accountHolderGivenName) + && Objects.equals( + this.accountHolderSurname, instaPayPaymentInfo.accountHolderSurname) + && Objects.equals(this.accountNumber, instaPayPaymentInfo.accountNumber) + && Objects.equals(this.bankName, instaPayPaymentInfo.bankName); + } + + @Override + public int hashCode() { + return Objects.hash( + rail, + addressingSystem, + accountHolderGivenName, + accountHolderSurname, + accountNumber, + bankName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InstaPayPaymentInfo {\n"); + sb.append(" rail: ").append(toIndentedString(rail)).append("\n"); + sb.append(" addressingSystem: ").append(toIndentedString(addressingSystem)).append("\n"); + sb.append(" accountHolderGivenName: ") + .append(toIndentedString(accountHolderGivenName)) + .append("\n"); + sb.append(" accountHolderSurname: ") + .append(toIndentedString(accountHolderSurname)) + .append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `rail` to the URL query string + if (getRail() != null) { + joiner.add( + String.format( + "%srail%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRail())))); + } + + // add `addressingSystem` to the URL query string + if (getAddressingSystem() != null) { + joiner.add( + String.format( + "%saddressingSystem%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAddressingSystem())))); + } + + // add `accountHolderGivenName` to the URL query string + if (getAccountHolderGivenName() != null) { + joiner.add( + String.format( + "%saccountHolderGivenName%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getAccountHolderGivenName())))); + } + + // add `accountHolderSurname` to the URL query string + if (getAccountHolderSurname() != null) { + joiner.add( + String.format( + "%saccountHolderSurname%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getAccountHolderSurname())))); + } + + // add `accountNumber` to the URL query string + if (getAccountNumber() != null) { + joiner.add( + String.format( + "%saccountNumber%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAccountNumber())))); + } + + // add `bankName` to the URL query string + if (getBankName() != null) { + joiner.add( + String.format( + "%sbankName%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBankName())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/NequiPaymentInfo.java b/src/main/java/com/fireblocks/sdk/model/NequiPaymentInfo.java new file mode 100644 index 00000000..228e813e --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/NequiPaymentInfo.java @@ -0,0 +1,296 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** NEQUI payment information for Colombian mobile payment transfers (COP) */ +@JsonPropertyOrder({ + NequiPaymentInfo.JSON_PROPERTY_RAIL, + NequiPaymentInfo.JSON_PROPERTY_ADDRESSING_SYSTEM, + NequiPaymentInfo.JSON_PROPERTY_PHONE +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class NequiPaymentInfo { + /** The payment rail type for NEQUI transfers */ + public enum RailEnum { + NEQUI(String.valueOf("NEQUI")); + + private String value; + + RailEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RailEnum fromValue(String value) { + for (RailEnum b : RailEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RAIL = "rail"; + @jakarta.annotation.Nonnull private RailEnum rail; + + /** The addressing system used for NEQUI transfers */ + public enum AddressingSystemEnum { + NEQUI(String.valueOf("NEQUI")); + + private String value; + + AddressingSystemEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AddressingSystemEnum fromValue(String value) { + for (AddressingSystemEnum b : AddressingSystemEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ADDRESSING_SYSTEM = "addressingSystem"; + @jakarta.annotation.Nonnull private AddressingSystemEnum addressingSystem; + + public static final String JSON_PROPERTY_PHONE = "phone"; + @jakarta.annotation.Nonnull private String phone; + + public NequiPaymentInfo() {} + + @JsonCreator + public NequiPaymentInfo( + @JsonProperty(value = JSON_PROPERTY_RAIL, required = true) RailEnum rail, + @JsonProperty(value = JSON_PROPERTY_ADDRESSING_SYSTEM, required = true) + AddressingSystemEnum addressingSystem, + @JsonProperty(value = JSON_PROPERTY_PHONE, required = true) String phone) { + this.rail = rail; + this.addressingSystem = addressingSystem; + this.phone = phone; + } + + public NequiPaymentInfo rail(@jakarta.annotation.Nonnull RailEnum rail) { + this.rail = rail; + return this; + } + + /** + * The payment rail type for NEQUI transfers + * + * @return rail + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RailEnum getRail() { + return rail; + } + + @JsonProperty(JSON_PROPERTY_RAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRail(@jakarta.annotation.Nonnull RailEnum rail) { + this.rail = rail; + } + + public NequiPaymentInfo addressingSystem( + @jakarta.annotation.Nonnull AddressingSystemEnum addressingSystem) { + this.addressingSystem = addressingSystem; + return this; + } + + /** + * The addressing system used for NEQUI transfers + * + * @return addressingSystem + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESSING_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AddressingSystemEnum getAddressingSystem() { + return addressingSystem; + } + + @JsonProperty(JSON_PROPERTY_ADDRESSING_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddressingSystem( + @jakarta.annotation.Nonnull AddressingSystemEnum addressingSystem) { + this.addressingSystem = addressingSystem; + } + + public NequiPaymentInfo phone(@jakarta.annotation.Nonnull String phone) { + this.phone = phone; + return this; + } + + /** + * Recipient phone number in E.164 format + * + * @return phone + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPhone() { + return phone; + } + + @JsonProperty(JSON_PROPERTY_PHONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPhone(@jakarta.annotation.Nonnull String phone) { + this.phone = phone; + } + + /** Return true if this NequiPaymentInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NequiPaymentInfo nequiPaymentInfo = (NequiPaymentInfo) o; + return Objects.equals(this.rail, nequiPaymentInfo.rail) + && Objects.equals(this.addressingSystem, nequiPaymentInfo.addressingSystem) + && Objects.equals(this.phone, nequiPaymentInfo.phone); + } + + @Override + public int hashCode() { + return Objects.hash(rail, addressingSystem, phone); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NequiPaymentInfo {\n"); + sb.append(" rail: ").append(toIndentedString(rail)).append("\n"); + sb.append(" addressingSystem: ").append(toIndentedString(addressingSystem)).append("\n"); + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `rail` to the URL query string + if (getRail() != null) { + joiner.add( + String.format( + "%srail%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRail())))); + } + + // add `addressingSystem` to the URL query string + if (getAddressingSystem() != null) { + joiner.add( + String.format( + "%saddressingSystem%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAddressingSystem())))); + } + + // add `phone` to the URL query string + if (getPhone() != null) { + joiner.add( + String.format( + "%sphone%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getPhone())))); + } + + return joiner.toString(); + } +} diff --git a/src/main/java/com/fireblocks/sdk/model/PesonetPaymentInfo.java b/src/main/java/com/fireblocks/sdk/model/PesonetPaymentInfo.java new file mode 100644 index 00000000..b06aec67 --- /dev/null +++ b/src/main/java/com/fireblocks/sdk/model/PesonetPaymentInfo.java @@ -0,0 +1,439 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fireblocks.sdk.ApiClient; +import java.util.Objects; +import java.util.StringJoiner; + +/** PesoNet payment information for Philippine batch payment transfers (PHP) */ +@JsonPropertyOrder({ + PesonetPaymentInfo.JSON_PROPERTY_RAIL, + PesonetPaymentInfo.JSON_PROPERTY_ADDRESSING_SYSTEM, + PesonetPaymentInfo.JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME, + PesonetPaymentInfo.JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME, + PesonetPaymentInfo.JSON_PROPERTY_ACCOUNT_NUMBER, + PesonetPaymentInfo.JSON_PROPERTY_BANK_NAME +}) +@jakarta.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.14.0") +public class PesonetPaymentInfo { + /** The payment rail type for PesoNet transfers */ + public enum RailEnum { + PESONET(String.valueOf("PESONET")); + + private String value; + + RailEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RailEnum fromValue(String value) { + for (RailEnum b : RailEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_RAIL = "rail"; + @jakarta.annotation.Nonnull private RailEnum rail; + + /** The addressing system used for PesoNet transfers */ + public enum AddressingSystemEnum { + PESONET(String.valueOf("PESONET")); + + private String value; + + AddressingSystemEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AddressingSystemEnum fromValue(String value) { + for (AddressingSystemEnum b : AddressingSystemEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ADDRESSING_SYSTEM = "addressingSystem"; + @jakarta.annotation.Nonnull private AddressingSystemEnum addressingSystem; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME = "accountHolderGivenName"; + @jakarta.annotation.Nonnull private String accountHolderGivenName; + + public static final String JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME = "accountHolderSurname"; + @jakarta.annotation.Nonnull private String accountHolderSurname; + + public static final String JSON_PROPERTY_ACCOUNT_NUMBER = "accountNumber"; + @jakarta.annotation.Nonnull private String accountNumber; + + public static final String JSON_PROPERTY_BANK_NAME = "bankName"; + @jakarta.annotation.Nonnull private String bankName; + + public PesonetPaymentInfo() {} + + @JsonCreator + public PesonetPaymentInfo( + @JsonProperty(value = JSON_PROPERTY_RAIL, required = true) RailEnum rail, + @JsonProperty(value = JSON_PROPERTY_ADDRESSING_SYSTEM, required = true) + AddressingSystemEnum addressingSystem, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME, required = true) + String accountHolderGivenName, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME, required = true) + String accountHolderSurname, + @JsonProperty(value = JSON_PROPERTY_ACCOUNT_NUMBER, required = true) + String accountNumber, + @JsonProperty(value = JSON_PROPERTY_BANK_NAME, required = true) String bankName) { + this.rail = rail; + this.addressingSystem = addressingSystem; + this.accountHolderGivenName = accountHolderGivenName; + this.accountHolderSurname = accountHolderSurname; + this.accountNumber = accountNumber; + this.bankName = bankName; + } + + public PesonetPaymentInfo rail(@jakarta.annotation.Nonnull RailEnum rail) { + this.rail = rail; + return this; + } + + /** + * The payment rail type for PesoNet transfers + * + * @return rail + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_RAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RailEnum getRail() { + return rail; + } + + @JsonProperty(JSON_PROPERTY_RAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setRail(@jakarta.annotation.Nonnull RailEnum rail) { + this.rail = rail; + } + + public PesonetPaymentInfo addressingSystem( + @jakarta.annotation.Nonnull AddressingSystemEnum addressingSystem) { + this.addressingSystem = addressingSystem; + return this; + } + + /** + * The addressing system used for PesoNet transfers + * + * @return addressingSystem + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ADDRESSING_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AddressingSystemEnum getAddressingSystem() { + return addressingSystem; + } + + @JsonProperty(JSON_PROPERTY_ADDRESSING_SYSTEM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAddressingSystem( + @jakarta.annotation.Nonnull AddressingSystemEnum addressingSystem) { + this.addressingSystem = addressingSystem; + } + + public PesonetPaymentInfo accountHolderGivenName( + @jakarta.annotation.Nonnull String accountHolderGivenName) { + this.accountHolderGivenName = accountHolderGivenName; + return this; + } + + /** + * The given name (first name) of the account holder + * + * @return accountHolderGivenName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountHolderGivenName() { + return accountHolderGivenName; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_GIVEN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountHolderGivenName( + @jakarta.annotation.Nonnull String accountHolderGivenName) { + this.accountHolderGivenName = accountHolderGivenName; + } + + public PesonetPaymentInfo accountHolderSurname( + @jakarta.annotation.Nonnull String accountHolderSurname) { + this.accountHolderSurname = accountHolderSurname; + return this; + } + + /** + * The surname (last name) of the account holder + * + * @return accountHolderSurname + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountHolderSurname() { + return accountHolderSurname; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_HOLDER_SURNAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountHolderSurname(@jakarta.annotation.Nonnull String accountHolderSurname) { + this.accountHolderSurname = accountHolderSurname; + } + + public PesonetPaymentInfo accountNumber(@jakarta.annotation.Nonnull String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** + * Recipient bank account number + * + * @return accountNumber + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountNumber() { + return accountNumber; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_NUMBER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAccountNumber(@jakarta.annotation.Nonnull String accountNumber) { + this.accountNumber = accountNumber; + } + + public PesonetPaymentInfo bankName(@jakarta.annotation.Nonnull String bankName) { + this.bankName = bankName; + return this; + } + + /** + * Name of the recipient's bank + * + * @return bankName + */ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_BANK_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBankName() { + return bankName; + } + + @JsonProperty(JSON_PROPERTY_BANK_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setBankName(@jakarta.annotation.Nonnull String bankName) { + this.bankName = bankName; + } + + /** Return true if this PesonetPaymentInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PesonetPaymentInfo pesonetPaymentInfo = (PesonetPaymentInfo) o; + return Objects.equals(this.rail, pesonetPaymentInfo.rail) + && Objects.equals(this.addressingSystem, pesonetPaymentInfo.addressingSystem) + && Objects.equals( + this.accountHolderGivenName, pesonetPaymentInfo.accountHolderGivenName) + && Objects.equals( + this.accountHolderSurname, pesonetPaymentInfo.accountHolderSurname) + && Objects.equals(this.accountNumber, pesonetPaymentInfo.accountNumber) + && Objects.equals(this.bankName, pesonetPaymentInfo.bankName); + } + + @Override + public int hashCode() { + return Objects.hash( + rail, + addressingSystem, + accountHolderGivenName, + accountHolderSurname, + accountNumber, + bankName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PesonetPaymentInfo {\n"); + sb.append(" rail: ").append(toIndentedString(rail)).append("\n"); + sb.append(" addressingSystem: ").append(toIndentedString(addressingSystem)).append("\n"); + sb.append(" accountHolderGivenName: ") + .append(toIndentedString(accountHolderGivenName)) + .append("\n"); + sb.append(" accountHolderSurname: ") + .append(toIndentedString(accountHolderSurname)) + .append("\n"); + sb.append(" accountNumber: ").append(toIndentedString(accountNumber)).append("\n"); + sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `rail` to the URL query string + if (getRail() != null) { + joiner.add( + String.format( + "%srail%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getRail())))); + } + + // add `addressingSystem` to the URL query string + if (getAddressingSystem() != null) { + joiner.add( + String.format( + "%saddressingSystem%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAddressingSystem())))); + } + + // add `accountHolderGivenName` to the URL query string + if (getAccountHolderGivenName() != null) { + joiner.add( + String.format( + "%saccountHolderGivenName%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getAccountHolderGivenName())))); + } + + // add `accountHolderSurname` to the URL query string + if (getAccountHolderSurname() != null) { + joiner.add( + String.format( + "%saccountHolderSurname%s=%s", + prefix, + suffix, + ApiClient.urlEncode( + ApiClient.valueToString(getAccountHolderSurname())))); + } + + // add `accountNumber` to the URL query string + if (getAccountNumber() != null) { + joiner.add( + String.format( + "%saccountNumber%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getAccountNumber())))); + } + + // add `bankName` to the URL query string + if (getBankName() != null) { + joiner.add( + String.format( + "%sbankName%s=%s", + prefix, + suffix, + ApiClient.urlEncode(ApiClient.valueToString(getBankName())))); + } + + return joiner.toString(); + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/AdditionalInfoRequestAdditionalInfoTest.java b/src/test/java/com/fireblocks/sdk/model/AdditionalInfoRequestAdditionalInfoTest.java index 7091a9b2..64eb2d50 100644 --- a/src/test/java/com/fireblocks/sdk/model/AdditionalInfoRequestAdditionalInfoTest.java +++ b/src/test/java/com/fireblocks/sdk/model/AdditionalInfoRequestAdditionalInfoTest.java @@ -361,4 +361,34 @@ void bankAccountCountryTest() { void bankAccountHolderNameTest() { // TODO: test bankAccountHolderName } + + /** Test the property 'bankCountry' */ + @Test + void bankCountryTest() { + // TODO: test bankCountry + } + + /** Test the property 'referenceId' */ + @Test + void referenceIdTest() { + // TODO: test referenceId + } + + /** Test the property 'phone' */ + @Test + void phoneTest() { + // TODO: test phone + } + + /** Test the property 'recipientLegalName' */ + @Test + void recipientLegalNameTest() { + // TODO: test recipientLegalName + } + + /** Test the property 'fpsId' */ + @Test + void fpsIdTest() { + // TODO: test fpsId + } } diff --git a/src/test/java/com/fireblocks/sdk/model/CipsPaymentInfoTest.java b/src/test/java/com/fireblocks/sdk/model/CipsPaymentInfoTest.java new file mode 100644 index 00000000..13ce63bb --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/CipsPaymentInfoTest.java @@ -0,0 +1,81 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for CipsPaymentInfo */ +class CipsPaymentInfoTest { + private final CipsPaymentInfo model = new CipsPaymentInfo(); + + /** Model tests for CipsPaymentInfo */ + @Test + void testCipsPaymentInfo() { + // TODO: test CipsPaymentInfo + } + + /** Test the property 'rail' */ + @Test + void railTest() { + // TODO: test rail + } + + /** Test the property 'addressingSystem' */ + @Test + void addressingSystemTest() { + // TODO: test addressingSystem + } + + /** Test the property 'accountHolderGivenName' */ + @Test + void accountHolderGivenNameTest() { + // TODO: test accountHolderGivenName + } + + /** Test the property 'accountHolderSurname' */ + @Test + void accountHolderSurnameTest() { + // TODO: test accountHolderSurname + } + + /** Test the property 'bankName' */ + @Test + void bankNameTest() { + // TODO: test bankName + } + + /** Test the property 'bankCountry' */ + @Test + void bankCountryTest() { + // TODO: test bankCountry + } + + /** Test the property 'swiftCode' */ + @Test + void swiftCodeTest() { + // TODO: test swiftCode + } + + /** Test the property 'accountNumber' */ + @Test + void accountNumberTest() { + // TODO: test accountNumber + } + + /** Test the property 'referenceId' */ + @Test + void referenceIdTest() { + // TODO: test referenceId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/FpsHkPaymentInfoTest.java b/src/test/java/com/fireblocks/sdk/model/FpsHkPaymentInfoTest.java new file mode 100644 index 00000000..ca78dc9f --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/FpsHkPaymentInfoTest.java @@ -0,0 +1,75 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for FpsHkPaymentInfo */ +class FpsHkPaymentInfoTest { + private final FpsHkPaymentInfo model = new FpsHkPaymentInfo(); + + /** Model tests for FpsHkPaymentInfo */ + @Test + void testFpsHkPaymentInfo() { + // TODO: test FpsHkPaymentInfo + } + + /** Test the property 'rail' */ + @Test + void railTest() { + // TODO: test rail + } + + /** Test the property 'addressingSystem' */ + @Test + void addressingSystemTest() { + // TODO: test addressingSystem + } + + /** Test the property 'recipientLegalName' */ + @Test + void recipientLegalNameTest() { + // TODO: test recipientLegalName + } + + /** Test the property 'accountNumber' */ + @Test + void accountNumberTest() { + // TODO: test accountNumber + } + + /** Test the property 'bankCode' */ + @Test + void bankCodeTest() { + // TODO: test bankCode + } + + /** Test the property 'phone' */ + @Test + void phoneTest() { + // TODO: test phone + } + + /** Test the property 'email' */ + @Test + void emailTest() { + // TODO: test email + } + + /** Test the property 'fpsId' */ + @Test + void fpsIdTest() { + // TODO: test fpsId + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/FpsUkPaymentInfoTest.java b/src/test/java/com/fireblocks/sdk/model/FpsUkPaymentInfoTest.java new file mode 100644 index 00000000..cdbc38d7 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/FpsUkPaymentInfoTest.java @@ -0,0 +1,69 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for FpsUkPaymentInfo */ +class FpsUkPaymentInfoTest { + private final FpsUkPaymentInfo model = new FpsUkPaymentInfo(); + + /** Model tests for FpsUkPaymentInfo */ + @Test + void testFpsUkPaymentInfo() { + // TODO: test FpsUkPaymentInfo + } + + /** Test the property 'rail' */ + @Test + void railTest() { + // TODO: test rail + } + + /** Test the property 'addressingSystem' */ + @Test + void addressingSystemTest() { + // TODO: test addressingSystem + } + + /** Test the property 'accountHolderGivenName' */ + @Test + void accountHolderGivenNameTest() { + // TODO: test accountHolderGivenName + } + + /** Test the property 'accountHolderSurname' */ + @Test + void accountHolderSurnameTest() { + // TODO: test accountHolderSurname + } + + /** Test the property 'accountNumber' */ + @Test + void accountNumberTest() { + // TODO: test accountNumber + } + + /** Test the property 'sortCode' */ + @Test + void sortCodeTest() { + // TODO: test sortCode + } + + /** Test the property 'bankAccountCountry' */ + @Test + void bankAccountCountryTest() { + // TODO: test bankAccountCountry + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/InstaPayPaymentInfoTest.java b/src/test/java/com/fireblocks/sdk/model/InstaPayPaymentInfoTest.java new file mode 100644 index 00000000..347ec2ba --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/InstaPayPaymentInfoTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for InstaPayPaymentInfo */ +class InstaPayPaymentInfoTest { + private final InstaPayPaymentInfo model = new InstaPayPaymentInfo(); + + /** Model tests for InstaPayPaymentInfo */ + @Test + void testInstaPayPaymentInfo() { + // TODO: test InstaPayPaymentInfo + } + + /** Test the property 'rail' */ + @Test + void railTest() { + // TODO: test rail + } + + /** Test the property 'addressingSystem' */ + @Test + void addressingSystemTest() { + // TODO: test addressingSystem + } + + /** Test the property 'accountHolderGivenName' */ + @Test + void accountHolderGivenNameTest() { + // TODO: test accountHolderGivenName + } + + /** Test the property 'accountHolderSurname' */ + @Test + void accountHolderSurnameTest() { + // TODO: test accountHolderSurname + } + + /** Test the property 'accountNumber' */ + @Test + void accountNumberTest() { + // TODO: test accountNumber + } + + /** Test the property 'bankName' */ + @Test + void bankNameTest() { + // TODO: test bankName + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/NequiPaymentInfoTest.java b/src/test/java/com/fireblocks/sdk/model/NequiPaymentInfoTest.java new file mode 100644 index 00000000..9c0e552a --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/NequiPaymentInfoTest.java @@ -0,0 +1,45 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for NequiPaymentInfo */ +class NequiPaymentInfoTest { + private final NequiPaymentInfo model = new NequiPaymentInfo(); + + /** Model tests for NequiPaymentInfo */ + @Test + void testNequiPaymentInfo() { + // TODO: test NequiPaymentInfo + } + + /** Test the property 'rail' */ + @Test + void railTest() { + // TODO: test rail + } + + /** Test the property 'addressingSystem' */ + @Test + void addressingSystemTest() { + // TODO: test addressingSystem + } + + /** Test the property 'phone' */ + @Test + void phoneTest() { + // TODO: test phone + } +} diff --git a/src/test/java/com/fireblocks/sdk/model/PesonetPaymentInfoTest.java b/src/test/java/com/fireblocks/sdk/model/PesonetPaymentInfoTest.java new file mode 100644 index 00000000..f8540123 --- /dev/null +++ b/src/test/java/com/fireblocks/sdk/model/PesonetPaymentInfoTest.java @@ -0,0 +1,63 @@ +/* + * Fireblocks API + * Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain. - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com) + * + * The version of the OpenAPI document: 1.6.2 + * Contact: developers@fireblocks.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.fireblocks.sdk.model; + + +import org.junit.jupiter.api.Test; + +/** Model tests for PesonetPaymentInfo */ +class PesonetPaymentInfoTest { + private final PesonetPaymentInfo model = new PesonetPaymentInfo(); + + /** Model tests for PesonetPaymentInfo */ + @Test + void testPesonetPaymentInfo() { + // TODO: test PesonetPaymentInfo + } + + /** Test the property 'rail' */ + @Test + void railTest() { + // TODO: test rail + } + + /** Test the property 'addressingSystem' */ + @Test + void addressingSystemTest() { + // TODO: test addressingSystem + } + + /** Test the property 'accountHolderGivenName' */ + @Test + void accountHolderGivenNameTest() { + // TODO: test accountHolderGivenName + } + + /** Test the property 'accountHolderSurname' */ + @Test + void accountHolderSurnameTest() { + // TODO: test accountHolderSurname + } + + /** Test the property 'accountNumber' */ + @Test + void accountNumberTest() { + // TODO: test accountNumber + } + + /** Test the property 'bankName' */ + @Test + void bankNameTest() { + // TODO: test bankName + } +}