From 0813cabf39e65dd77aa39c57ac46f7e4f0b30089 Mon Sep 17 00:00:00 2001 From: NumaryBot Date: Mon, 5 Feb 2024 09:30:05 +0000 Subject: [PATCH] release(sdk): v2.0.0-rc.3 --- .speakeasy/gen.lock | 18 +++-- README.md | 3 +- .../operations/ForwardBankAccountRequest.md | 9 +++ .../operations/ForwardBankAccountResponse.md | 11 ++++ docs/models/shared/BankAccount.md | 27 ++++---- docs/models/shared/BankAccountAdjustment.md | 12 ++++ .../shared/ForwardBankAccountRequest.md | 8 +++ docs/sdks/payments/README.md | 55 ++++++++++++++++ gen.yaml | 2 +- lib/build.gradle | 2 +- .../com/formance/formance_sdk/Payments.java | 43 ++++++++++++ .../formance_sdk/SDKConfiguration.java | 6 +- .../operations/ForwardBankAccountRequest.java | 35 ++++++++++ .../ForwardBankAccountResponse.java | 61 +++++++++++++++++ .../models/shared/BankAccount.java | 9 +++ .../models/shared/BankAccountAdjustment.java | 65 +++++++++++++++++++ .../shared/ForwardBankAccountRequest.java | 22 +++++++ 17 files changed, 364 insertions(+), 24 deletions(-) create mode 100644 docs/models/operations/ForwardBankAccountRequest.md create mode 100644 docs/models/operations/ForwardBankAccountResponse.md create mode 100644 docs/models/shared/BankAccountAdjustment.md create mode 100644 docs/models/shared/ForwardBankAccountRequest.md create mode 100644 lib/src/main/java/com/formance/formance_sdk/models/operations/ForwardBankAccountRequest.java create mode 100644 lib/src/main/java/com/formance/formance_sdk/models/operations/ForwardBankAccountResponse.java create mode 100644 lib/src/main/java/com/formance/formance_sdk/models/shared/BankAccountAdjustment.java create mode 100644 lib/src/main/java/com/formance/formance_sdk/models/shared/ForwardBankAccountRequest.java diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index a92df2c9..f43db0f7 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 -id: f267af7d-c886-4a51-a4ea-b44589996ebc +id: d7cdcc67-a6b0-4229-9908-a9421ad85956 management: - docChecksum: 7dfe7c153410dab21130617af7d17ee2 - docVersion: v2.0.0-rc.2 + docChecksum: 25f7693c65559e6fd8db6433caadba98 + docVersion: v2.0.0-rc.3 speakeasyVersion: internal generationVersion: 2.237.2 - releaseVersion: v2.0.0-rc.2 - configChecksum: e6e29df7a433e57069fbc60c9b6309e7 + releaseVersion: v2.0.0-rc.3 + configChecksum: b9cbeaeb78adf492676596e1305248a0 features: java: core: 3.2.2 @@ -228,6 +228,8 @@ generatedFiles: - lib/src/main/java/com/formance/formance_sdk/models/operations/DeletePoolResponse.java - lib/src/main/java/com/formance/formance_sdk/models/operations/DeleteTransferInitiationRequest.java - lib/src/main/java/com/formance/formance_sdk/models/operations/DeleteTransferInitiationResponse.java + - lib/src/main/java/com/formance/formance_sdk/models/operations/ForwardBankAccountRequest.java + - lib/src/main/java/com/formance/formance_sdk/models/operations/ForwardBankAccountResponse.java - lib/src/main/java/com/formance/formance_sdk/models/operations/GetAccountBalancesRequest.java - lib/src/main/java/com/formance/formance_sdk/models/operations/GetAccountBalancesResponse.java - lib/src/main/java/com/formance/formance_sdk/models/operations/GetBankAccountRequest.java @@ -587,6 +589,7 @@ generatedFiles: - lib/src/main/java/com/formance/formance_sdk/models/shared/TransferRequest.java - lib/src/main/java/com/formance/formance_sdk/models/shared/BankAccountResponse.java - lib/src/main/java/com/formance/formance_sdk/models/shared/BankAccount.java + - lib/src/main/java/com/formance/formance_sdk/models/shared/BankAccountAdjustment.java - lib/src/main/java/com/formance/formance_sdk/models/shared/BankAccountRequest.java - lib/src/main/java/com/formance/formance_sdk/models/shared/PaymentResponse.java - lib/src/main/java/com/formance/formance_sdk/models/shared/Raw.java @@ -608,6 +611,7 @@ generatedFiles: - lib/src/main/java/com/formance/formance_sdk/models/shared/TransferInitiationAdjusments.java - lib/src/main/java/com/formance/formance_sdk/models/shared/TransferInitiationRequestType.java - lib/src/main/java/com/formance/formance_sdk/models/shared/TransferInitiationRequest.java + - lib/src/main/java/com/formance/formance_sdk/models/shared/ForwardBankAccountRequest.java - lib/src/main/java/com/formance/formance_sdk/models/shared/BalancesCursorCursor.java - lib/src/main/java/com/formance/formance_sdk/models/shared/BalancesCursor.java - lib/src/main/java/com/formance/formance_sdk/models/shared/AccountBalance.java @@ -866,6 +870,8 @@ generatedFiles: - docs/models/operations/DeletePoolResponse.md - docs/models/operations/DeleteTransferInitiationRequest.md - docs/models/operations/DeleteTransferInitiationResponse.md + - docs/models/operations/ForwardBankAccountRequest.md + - docs/models/operations/ForwardBankAccountResponse.md - docs/models/operations/GetAccountBalancesRequest.md - docs/models/operations/GetAccountBalancesResponse.md - docs/models/operations/GetBankAccountRequest.md @@ -1225,6 +1231,7 @@ generatedFiles: - docs/models/shared/TransferRequest.md - docs/models/shared/BankAccountResponse.md - docs/models/shared/BankAccount.md + - docs/models/shared/BankAccountAdjustment.md - docs/models/shared/BankAccountRequest.md - docs/models/shared/PaymentResponse.md - docs/models/shared/Raw.md @@ -1246,6 +1253,7 @@ generatedFiles: - docs/models/shared/TransferInitiationAdjusments.md - docs/models/shared/TransferInitiationRequestType.md - docs/models/shared/TransferInitiationRequest.md + - docs/models/shared/ForwardBankAccountRequest.md - docs/models/shared/BalancesCursorCursor.md - docs/models/shared/BalancesCursor.md - docs/models/shared/AccountBalance.md diff --git a/README.md b/README.md index 96d0f47b..5ea8e211 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ It has been generated successfully based on your OpenAPI spec. However, it is no ### Gradle ```groovy -implementation 'com.formance.formance_sdk:formance-sdk-java:v2.0.0-rc.2' +implementation 'com.formance.formance_sdk:formance-sdk-java:v2.0.0-rc.3' ``` @@ -173,6 +173,7 @@ public class Application { * [createTransferInitiation](docs/sdks/payments/README.md#createtransferinitiation) - Create a TransferInitiation * [deletePool](docs/sdks/payments/README.md#deletepool) - Delete a Pool * [deleteTransferInitiation](docs/sdks/payments/README.md#deletetransferinitiation) - Delete a transfer initiation +* [forwardBankAccount](docs/sdks/payments/README.md#forwardbankaccount) - Forward a bank account to a connector * [getAccountBalances](docs/sdks/payments/README.md#getaccountbalances) - Get account balances * [getBankAccount](docs/sdks/payments/README.md#getbankaccount) - Get a bank account created by user on Formance * [~~getConnectorTask~~](docs/sdks/payments/README.md#getconnectortask) - Read a specific task of the connector :warning: **Deprecated** diff --git a/docs/models/operations/ForwardBankAccountRequest.md b/docs/models/operations/ForwardBankAccountRequest.md new file mode 100644 index 00000000..48cb04ba --- /dev/null +++ b/docs/models/operations/ForwardBankAccountRequest.md @@ -0,0 +1,9 @@ +# ForwardBankAccountRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `forwardBankAccountRequest` | [com.formance.formance_sdk.models.shared.ForwardBankAccountRequest](../../models/shared/ForwardBankAccountRequest.md) | :heavy_check_mark: | N/A | +| `bankAccountId` | *String* | :heavy_check_mark: | The bank account ID. | \ No newline at end of file diff --git a/docs/models/operations/ForwardBankAccountResponse.md b/docs/models/operations/ForwardBankAccountResponse.md new file mode 100644 index 00000000..570e2d4a --- /dev/null +++ b/docs/models/operations/ForwardBankAccountResponse.md @@ -0,0 +1,11 @@ +# ForwardBankAccountResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `bankAccountResponse` | [com.formance.formance_sdk.models.shared.BankAccountResponse](../../models/shared/BankAccountResponse.md) | :heavy_minus_sign: | OK | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *Integer* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/models/shared/BankAccount.md b/docs/models/shared/BankAccount.md index 29fc1ed4..9c1068b1 100644 --- a/docs/models/shared/BankAccount.md +++ b/docs/models/shared/BankAccount.md @@ -3,16 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `accountID` | *String* | :heavy_minus_sign: | N/A | -| `accountNumber` | *String* | :heavy_minus_sign: | N/A | -| `connectorID` | *String* | :heavy_check_mark: | N/A | -| `country` | *String* | :heavy_check_mark: | N/A | -| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | -| `iban` | *String* | :heavy_minus_sign: | N/A | -| `id` | *String* | :heavy_check_mark: | N/A | -| `metadata` | Map | :heavy_minus_sign: | N/A | -| `name` | *String* | :heavy_check_mark: | N/A | -| `provider` | *String* | :heavy_minus_sign: | N/A | -| `swiftBicCode` | *String* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `accountID` | *String* | :heavy_minus_sign: | N/A | +| `accountNumber` | *String* | :heavy_minus_sign: | N/A | +| `adjustments` | List<[com.formance.formance_sdk.models.shared.BankAccountAdjustment](../../models/shared/BankAccountAdjustment.md)> | :heavy_minus_sign: | N/A | +| `connectorID` | *String* | :heavy_check_mark: | N/A | +| `country` | *String* | :heavy_check_mark: | N/A | +| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | +| `iban` | *String* | :heavy_minus_sign: | N/A | +| `id` | *String* | :heavy_check_mark: | N/A | +| `metadata` | Map | :heavy_minus_sign: | N/A | +| `name` | *String* | :heavy_check_mark: | N/A | +| `provider` | *String* | :heavy_minus_sign: | N/A | +| `swiftBicCode` | *String* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/shared/BankAccountAdjustment.md b/docs/models/shared/BankAccountAdjustment.md new file mode 100644 index 00000000..0f603ad0 --- /dev/null +++ b/docs/models/shared/BankAccountAdjustment.md @@ -0,0 +1,12 @@ +# BankAccountAdjustment + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `accountID` | *String* | :heavy_check_mark: | N/A | +| `connectorID` | *String* | :heavy_check_mark: | N/A | +| `createdAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | N/A | +| `id` | *String* | :heavy_check_mark: | N/A | +| `provider` | *String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/shared/ForwardBankAccountRequest.md b/docs/models/shared/ForwardBankAccountRequest.md new file mode 100644 index 00000000..5c72000f --- /dev/null +++ b/docs/models/shared/ForwardBankAccountRequest.md @@ -0,0 +1,8 @@ +# ForwardBankAccountRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `connectorID` | *String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/payments/README.md b/docs/sdks/payments/README.md index c5966312..77d18971 100644 --- a/docs/sdks/payments/README.md +++ b/docs/sdks/payments/README.md @@ -11,6 +11,7 @@ * [createTransferInitiation](#createtransferinitiation) - Create a TransferInitiation * [deletePool](#deletepool) - Delete a Pool * [deleteTransferInitiation](#deletetransferinitiation) - Delete a transfer initiation +* [forwardBankAccount](#forwardbankaccount) - Forward a bank account to a connector * [getAccountBalances](#getaccountbalances) - Get account balances * [getBankAccount](#getbankaccount) - Get a bank account created by user on Formance * [~~getConnectorTask~~](#getconnectortask) - Read a specific task of the connector :warning: **Deprecated** @@ -512,6 +513,60 @@ public class Application { **[com.formance.formance_sdk.models.operations.DeleteTransferInitiationResponse](../../models/operations/DeleteTransferInitiationResponse.md)** +## forwardBankAccount + +Forward a bank account to a connector + +### Example Usage + +```java +package hello.world; + +import com.formance.formance_sdk.SDK; +import com.formance.formance_sdk.models.operations.ForwardBankAccountRequest; +import com.formance.formance_sdk.models.operations.ForwardBankAccountResponse; +import com.formance.formance_sdk.models.shared.ForwardBankAccountRequest; +import com.formance.formance_sdk.models.shared.Security; + +public class Application { + public static void main(String[] args) { + try { + SDK sdk = SDK.builder() + .setSecurity(new Security( + "string"){{ + authorization = "Bearer "; + }}) + .build(); + + com.formance.formance_sdk.models.operations.ForwardBankAccountRequest req = new ForwardBankAccountRequest( + new ForwardBankAccountRequest( + "string"), + "string"); + + com.formance.formance_sdk.models.operations.ForwardBankAccountResponse res = sdk.payments.forwardBankAccount(req); + + if (res.bankAccountResponse != null) { + // handle response + } + } catch (Exception e) { + // handle exception + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| `request` | [com.formance.formance_sdk.models.operations.ForwardBankAccountRequest](../../models/operations/ForwardBankAccountRequest.md) | :heavy_check_mark: | The request object to use for the request. | + + +### Response + +**[com.formance.formance_sdk.models.operations.ForwardBankAccountResponse](../../models/operations/ForwardBankAccountResponse.md)** + + ## getAccountBalances Get account balances diff --git a/gen.yaml b/gen.yaml index 6892d1f9..13032921 100755 --- a/gen.yaml +++ b/gen.yaml @@ -8,7 +8,7 @@ generation: comments: {} telemetryEnabled: false java: - version: v2.0.0-rc.2 + version: v2.0.0-rc.3 artifactID: formance-sdk companyEmail: support@formance.com companyName: Formance diff --git a/lib/build.gradle b/lib/build.gradle index bc5bcca9..98c0e0d8 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -56,7 +56,7 @@ publishing { maven(MavenPublication) { groupId = 'com.formance' artifactId = 'formance-sdk' - version = 'v2.0.0-rc.2' + version = 'v2.0.0-rc.3' from components.java diff --git a/lib/src/main/java/com/formance/formance_sdk/Payments.java b/lib/src/main/java/com/formance/formance_sdk/Payments.java index 579dd761..3df699d9 100644 --- a/lib/src/main/java/com/formance/formance_sdk/Payments.java +++ b/lib/src/main/java/com/formance/formance_sdk/Payments.java @@ -345,6 +345,49 @@ public com.formance.formance_sdk.models.operations.DeleteTransferInitiationRespo return res; } + /** + * Forward a bank account to a connector + * @param request the request object containing all of the parameters for the API call + * @return the response from the API call + * @throws Exception if the API call fails + */ + public com.formance.formance_sdk.models.operations.ForwardBankAccountResponse forwardBankAccount(com.formance.formance_sdk.models.operations.ForwardBankAccountRequest request) throws Exception { + String baseUrl = this.sdkConfiguration.serverUrl; + String url = com.formance.formance_sdk.utils.Utils.generateURL(com.formance.formance_sdk.models.operations.ForwardBankAccountRequest.class, baseUrl, "/api/payments/bank-accounts/{bankAccountId}/forward", request, null); + + HTTPRequest req = new HTTPRequest(); + req.setMethod("POST"); + req.setURL(url); + SerializedBody serializedRequestBody = com.formance.formance_sdk.utils.Utils.serializeRequestBody(request, "forwardBankAccountRequest", "json"); + if (serializedRequestBody == null) { + throw new Exception("Request body is required"); + } + req.setBody(serializedRequestBody); + + req.addHeader("Accept", "application/json"); + req.addHeader("user-agent", this.sdkConfiguration.userAgent); + + HTTPClient client = this.sdkConfiguration.securityClient; + + HttpResponse httpRes = client.send(req); + + String contentType = httpRes.headers().firstValue("Content-Type").orElse("application/octet-stream"); + + com.formance.formance_sdk.models.operations.ForwardBankAccountResponse res = new com.formance.formance_sdk.models.operations.ForwardBankAccountResponse(contentType, httpRes.statusCode(), httpRes) {{ + bankAccountResponse = null; + }}; + + if (httpRes.statusCode() == 200) { + if (com.formance.formance_sdk.utils.Utils.matchContentType(contentType, "application/json")) { + ObjectMapper mapper = JSON.getMapper(); + com.formance.formance_sdk.models.shared.BankAccountResponse out = mapper.readValue(new String(httpRes.body(), StandardCharsets.UTF_8), com.formance.formance_sdk.models.shared.BankAccountResponse.class); + res.bankAccountResponse = out; + } + } + + return res; + } + /** * Get account balances * @param request the request object containing all of the parameters for the API call diff --git a/lib/src/main/java/com/formance/formance_sdk/SDKConfiguration.java b/lib/src/main/java/com/formance/formance_sdk/SDKConfiguration.java index 93a903ea..cdda65f0 100644 --- a/lib/src/main/java/com/formance/formance_sdk/SDKConfiguration.java +++ b/lib/src/main/java/com/formance/formance_sdk/SDKConfiguration.java @@ -14,10 +14,10 @@ class SDKConfiguration { public String serverUrl; public int serverIdx = 0; public String language = "java"; - public String openapiDocVersion = "v2.0.0-rc.2"; - public String sdkVersion = "v2.0.0-rc.2"; + public String openapiDocVersion = "v2.0.0-rc.3"; + public String sdkVersion = "v2.0.0-rc.3"; public String genVersion = "2.237.2"; - public String userAgent = "speakeasy-sdk/java v2.0.0-rc.2 2.237.2 v2.0.0-rc.2 com.formance.formance_sdk"; + public String userAgent = "speakeasy-sdk/java v2.0.0-rc.3 2.237.2 v2.0.0-rc.3 com.formance.formance_sdk"; } \ No newline at end of file diff --git a/lib/src/main/java/com/formance/formance_sdk/models/operations/ForwardBankAccountRequest.java b/lib/src/main/java/com/formance/formance_sdk/models/operations/ForwardBankAccountRequest.java new file mode 100644 index 00000000..87adf2eb --- /dev/null +++ b/lib/src/main/java/com/formance/formance_sdk/models/operations/ForwardBankAccountRequest.java @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.formance.formance_sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.formance.formance_sdk.utils.SpeakeasyMetadata; + + +public class ForwardBankAccountRequest { + @SpeakeasyMetadata("request:mediaType=application/json") + public com.formance.formance_sdk.models.shared.ForwardBankAccountRequest forwardBankAccountRequest; + + public ForwardBankAccountRequest withForwardBankAccountRequest(com.formance.formance_sdk.models.shared.ForwardBankAccountRequest forwardBankAccountRequest) { + this.forwardBankAccountRequest = forwardBankAccountRequest; + return this; + } + + /** + * The bank account ID. + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=bankAccountId") + public String bankAccountId; + + public ForwardBankAccountRequest withBankAccountId(String bankAccountId) { + this.bankAccountId = bankAccountId; + return this; + } + + public ForwardBankAccountRequest(@JsonProperty("ForwardBankAccountRequest") com.formance.formance_sdk.models.shared.ForwardBankAccountRequest forwardBankAccountRequest, @JsonProperty("bankAccountId") String bankAccountId) { + this.forwardBankAccountRequest = forwardBankAccountRequest; + this.bankAccountId = bankAccountId; + } +} diff --git a/lib/src/main/java/com/formance/formance_sdk/models/operations/ForwardBankAccountResponse.java b/lib/src/main/java/com/formance/formance_sdk/models/operations/ForwardBankAccountResponse.java new file mode 100644 index 00000000..f1426970 --- /dev/null +++ b/lib/src/main/java/com/formance/formance_sdk/models/operations/ForwardBankAccountResponse.java @@ -0,0 +1,61 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.formance.formance_sdk.models.operations; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.net.http.HttpResponse; + + +public class ForwardBankAccountResponse { + /** + * OK + */ + + public com.formance.formance_sdk.models.shared.BankAccountResponse bankAccountResponse; + + public ForwardBankAccountResponse withBankAccountResponse(com.formance.formance_sdk.models.shared.BankAccountResponse bankAccountResponse) { + this.bankAccountResponse = bankAccountResponse; + return this; + } + + /** + * HTTP response content type for this operation + */ + + public String contentType; + + public ForwardBankAccountResponse withContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + + public Integer statusCode; + + public ForwardBankAccountResponse withStatusCode(Integer statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + + public HttpResponse rawResponse; + + public ForwardBankAccountResponse withRawResponse(HttpResponse rawResponse) { + this.rawResponse = rawResponse; + return this; + } + + public ForwardBankAccountResponse(@JsonProperty("ContentType") String contentType, @JsonProperty("StatusCode") Integer statusCode, @JsonProperty("RawResponse") HttpResponse rawResponse) { + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } +} diff --git a/lib/src/main/java/com/formance/formance_sdk/models/shared/BankAccount.java b/lib/src/main/java/com/formance/formance_sdk/models/shared/BankAccount.java index 55626f02..23b47c91 100644 --- a/lib/src/main/java/com/formance/formance_sdk/models/shared/BankAccount.java +++ b/lib/src/main/java/com/formance/formance_sdk/models/shared/BankAccount.java @@ -33,6 +33,15 @@ public BankAccount withAccountNumber(String accountNumber) { return this; } + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("adjustments") + public BankAccountAdjustment[] adjustments; + + public BankAccount withAdjustments(BankAccountAdjustment[] adjustments) { + this.adjustments = adjustments; + return this; + } + @JsonProperty("connectorID") public String connectorID; diff --git a/lib/src/main/java/com/formance/formance_sdk/models/shared/BankAccountAdjustment.java b/lib/src/main/java/com/formance/formance_sdk/models/shared/BankAccountAdjustment.java new file mode 100644 index 00000000..3512991b --- /dev/null +++ b/lib/src/main/java/com/formance/formance_sdk/models/shared/BankAccountAdjustment.java @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.formance.formance_sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.formance.formance_sdk.utils.DateTimeDeserializer; +import com.formance.formance_sdk.utils.DateTimeSerializer; +import java.time.OffsetDateTime; + + +public class BankAccountAdjustment { + @JsonProperty("accountID") + public String accountID; + + public BankAccountAdjustment withAccountID(String accountID) { + this.accountID = accountID; + return this; + } + + @JsonProperty("connectorID") + public String connectorID; + + public BankAccountAdjustment withConnectorID(String connectorID) { + this.connectorID = connectorID; + return this; + } + + @JsonSerialize(using = DateTimeSerializer.class) + @JsonDeserialize(using = DateTimeDeserializer.class) + @JsonProperty("createdAt") + public OffsetDateTime createdAt; + + public BankAccountAdjustment withCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + @JsonProperty("id") + public String id; + + public BankAccountAdjustment withId(String id) { + this.id = id; + return this; + } + + @JsonProperty("provider") + public String provider; + + public BankAccountAdjustment withProvider(String provider) { + this.provider = provider; + return this; + } + + public BankAccountAdjustment(@JsonProperty("accountID") String accountID, @JsonProperty("connectorID") String connectorID, @JsonProperty("createdAt") OffsetDateTime createdAt, @JsonProperty("id") String id, @JsonProperty("provider") String provider) { + this.accountID = accountID; + this.connectorID = connectorID; + this.createdAt = createdAt; + this.id = id; + this.provider = provider; + } +} diff --git a/lib/src/main/java/com/formance/formance_sdk/models/shared/ForwardBankAccountRequest.java b/lib/src/main/java/com/formance/formance_sdk/models/shared/ForwardBankAccountRequest.java new file mode 100644 index 00000000..a2edcf04 --- /dev/null +++ b/lib/src/main/java/com/formance/formance_sdk/models/shared/ForwardBankAccountRequest.java @@ -0,0 +1,22 @@ +/* + * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + */ + +package com.formance.formance_sdk.models.shared; + +import com.fasterxml.jackson.annotation.JsonProperty; + + +public class ForwardBankAccountRequest { + @JsonProperty("connectorID") + public String connectorID; + + public ForwardBankAccountRequest withConnectorID(String connectorID) { + this.connectorID = connectorID; + return this; + } + + public ForwardBankAccountRequest(@JsonProperty("connectorID") String connectorID) { + this.connectorID = connectorID; + } +}