In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP |
| `status` | *Optional\* | :heavy_minus_sign: | The status. | |
| `targetAccountId` | *JsonNullable\* | :heavy_minus_sign: | Unique ID for the target account in the accounting software. | |
diff --git a/bank-feeds/docs/models/components/SourceAccountPrototype.md b/bank-feeds/docs/models/components/SourceAccountPrototype.md
new file mode 100644
index 00000000..a75a0873
--- /dev/null
+++ b/bank-feeds/docs/models/components/SourceAccountPrototype.md
@@ -0,0 +1,15 @@
+# SourceAccountPrototype
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `accountName` | *JsonNullable\* | :heavy_minus_sign: | The bank account name. | |
+| `accountNumber` | *JsonNullable\* | :heavy_minus_sign: | The account number. | |
+| `accountType` | *JsonNullable\* | :heavy_minus_sign: | The type of bank account e.g. Credit. | |
+| `balance` | *JsonNullable\* | :heavy_minus_sign: | The latest balance for the bank account. | |
+| `currency` | *Optional\* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
## Unknown currencies
In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP |
+| `id` | *Optional\* | :heavy_minus_sign: | Unique ID for the bank account. | |
+| `modifiedDate` | *Optional\* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones > > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
+| `sortCode` | *JsonNullable\* | :heavy_minus_sign: | The sort code. | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/components/SourceAccountV2.md b/bank-feeds/docs/models/components/SourceAccountV2.md
index ed3cb91d..5461724d 100644
--- a/bank-feeds/docs/models/components/SourceAccountV2.md
+++ b/bank-feeds/docs/models/components/SourceAccountV2.md
@@ -10,11 +10,12 @@ The target bank account in a supported accounting software for ingestion into a
| `accountInfo` | [JsonNullable\](../../models/components/AccountInfo.md) | :heavy_minus_sign: | N/A | |
| `accountName` | *String* | :heavy_check_mark: | The bank account name. | |
| `accountNumber` | *String* | :heavy_check_mark: | The account number. | |
-| `accountType` | [AccountType](../../models/components/AccountType.md) | :heavy_check_mark: | The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard. | |
+| `accountType` | [SourceAccountV2AccountType](../../models/components/SourceAccountV2AccountType.md) | :heavy_check_mark: | The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard. | |
| `balance` | *BigDecimal* | :heavy_check_mark: | The latest balance for the bank account. | |
| `currency` | *String* | :heavy_check_mark: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
## Unknown currencies
In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP |
| `feedStartDate` | *JsonNullable\* | :heavy_minus_sign: | In Codat's data model, dates are represented using the ISO 8601 standard. Date fields are formatted as strings; for example: ``` 2020-10-08 ``` | 2022-10-23 |
| `id` | *String* | :heavy_check_mark: | Unique ID for the bank account. | |
| `modifiedDate` | *Optional\* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones > > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
| `routingInfo` | [Optional\](../../models/components/RoutingInfo.md) | :heavy_minus_sign: | Routing information for the bank. This does not include account number. | |
+| `sortCode` | *JsonNullable\* | :heavy_minus_sign: | The sort code. | |
| `status` | [JsonNullable\](../../models/components/SourceAccountV2Status.md) | :heavy_minus_sign: | Status of the source account. | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/components/SourceAccountV2AccountType.md b/bank-feeds/docs/models/components/SourceAccountV2AccountType.md
new file mode 100644
index 00000000..a8207471
--- /dev/null
+++ b/bank-feeds/docs/models/components/SourceAccountV2AccountType.md
@@ -0,0 +1,14 @@
+# SourceAccountV2AccountType
+
+The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard.
+
+
+## Values
+
+| Name | Value |
+| -------------- | -------------- |
+| `CHECKING` | checking |
+| `SAVINGS` | savings |
+| `LOAN` | loan |
+| `CREDIT_CARD` | creditCard |
+| `PREPAID_CARD` | prepaidCard |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/components/SourceAccountV2Prototype.md b/bank-feeds/docs/models/components/SourceAccountV2Prototype.md
new file mode 100644
index 00000000..4a86f973
--- /dev/null
+++ b/bank-feeds/docs/models/components/SourceAccountV2Prototype.md
@@ -0,0 +1,17 @@
+# SourceAccountV2Prototype
+
+
+## Fields
+
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `accountInfo` | [JsonNullable\](../../models/components/AccountInfo.md) | :heavy_minus_sign: | N/A | |
+| `accountName` | *Optional\* | :heavy_minus_sign: | The bank account name. | |
+| `accountNumber` | *Optional\* | :heavy_minus_sign: | The account number. | |
+| `accountType` | [Optional\](../../models/components/AccountType.md) | :heavy_minus_sign: | The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard. | |
+| `balance` | *Optional\* | :heavy_minus_sign: | The latest balance for the bank account. | |
+| `currency` | *Optional\* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
## Unknown currencies
In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP |
+| `id` | *Optional\* | :heavy_minus_sign: | Unique ID for the bank account. | |
+| `modifiedDate` | *Optional\* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:
``` 2020-10-08T22:40:50Z 2021-01-01T00:00:00 ```
When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - Unqualified local time: `2021-11-15T01:00:00` - UTC time offsets: `2021-11-15T01:00:00-05:00`
> Time zones > > Not all dates from Codat will contain information about time zones. > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
+| `routingInfo` | [Optional\](../../models/components/RoutingInfo.md) | :heavy_minus_sign: | Routing information for the bank. This does not include account number. | |
+| `sortCode` | *JsonNullable\* | :heavy_minus_sign: | The sort code. | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/components/SourceAccountWebhookPayload.md b/bank-feeds/docs/models/components/SourceAccountWebhookPayload.md
index 92b6c6dd..e31b0cd1 100644
--- a/bank-feeds/docs/models/components/SourceAccountWebhookPayload.md
+++ b/bank-feeds/docs/models/components/SourceAccountWebhookPayload.md
@@ -3,9 +3,9 @@
## Fields
-| Field | Type | Required | Description | Example |
-| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `companyId` | *Optional\* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
-| `connectionId` | *Optional\* | :heavy_minus_sign: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
-| `referenceCompany` | [Optional\](../../models/components/CompanyReference.md) | :heavy_minus_sign: | N/A | |
-| `sourceAccount` | [Optional\](../../models/components/SourceAccount.md) | :heavy_minus_sign: | The target bank account in a supported accounting software for ingestion into a bank feed. | { "id": "acc-002", "accountName": "account-081", "sortCode": "123456", "accountType": "Credit", "accountNumber": "12345670", "currency": "GBP", "balance": 99.99, "modifiedDate": "2023-01-09T14:14:14.1057478Z", "status": "pending" } |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
+| `companyId` | *Optional\* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 |
+| `connectionId` | *Optional\* | :heavy_minus_sign: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 |
+| `referenceCompany` | [Optional\](../../models/components/CompanyReference.md) | :heavy_minus_sign: | N/A | |
+| `sourceAccount` | [Optional\](../../models/components/SourceAccountWebhookPayloadSourceAccount.md) | :heavy_minus_sign: | N/A | |
\ No newline at end of file
diff --git a/bank-feeds/docs/models/components/SourceAccountWebhookPayloadSourceAccount.md b/bank-feeds/docs/models/components/SourceAccountWebhookPayloadSourceAccount.md
new file mode 100644
index 00000000..ccd7275b
--- /dev/null
+++ b/bank-feeds/docs/models/components/SourceAccountWebhookPayloadSourceAccount.md
@@ -0,0 +1,2 @@
+# SourceAccountWebhookPayloadSourceAccount
+
diff --git a/bank-feeds/docs/models/operations/ListCompaniesRequest.md b/bank-feeds/docs/models/operations/ListCompaniesRequest.md
index a1dd2014..b8d960f8 100644
--- a/bank-feeds/docs/models/operations/ListCompaniesRequest.md
+++ b/bank-feeds/docs/models/operations/ListCompaniesRequest.md
@@ -3,9 +3,10 @@
## Fields
-| Field | Type | Required | Description | Example |
-| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
-| `orderBy` | *Optional\* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate |
-| `page` | *Optional\* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 |
-| `pageSize` | *Optional\* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 |
-| `query` | *Optional\* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee |
\ No newline at end of file
+| Field | Type | Required | Description | Example |
+| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `orderBy` | *Optional\* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate |
+| `page` | *Optional\* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 |
+| `pageSize` | *Optional\* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 |
+| `query` | *Optional\* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee |
+| `tags` | *Optional\* | :heavy_minus_sign: | Filter companies by tags using the "equals" (=), "not equals" (!=), and "contains" (~) operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying). | region=uk && team=invoice-finance |
\ No newline at end of file
diff --git a/bank-feeds/docs/sdks/accountmapping/README.md b/bank-feeds/docs/sdks/accountmapping/README.md
index c32916e4..85ff5d7e 100644
--- a/bank-feeds/docs/sdks/accountmapping/README.md
+++ b/bank-feeds/docs/sdks/accountmapping/README.md
@@ -67,7 +67,7 @@ public class Application {
.companyId("8a210b68-6988-11ed-a1eb-0242ac120002")
.connectionId("2e9d2c44-f675-40ba-8049-353bfcb5e171")
.bankFeedAccountMapping(BankFeedAccountMapping.builder()
- .sourceAccountId("")
+ .sourceAccountId("acc-002")
.targetAccountId("account-081")
.build())
.build();
diff --git a/bank-feeds/docs/sdks/companies/README.md b/bank-feeds/docs/sdks/companies/README.md
index d1860b74..57096dc1 100644
--- a/bank-feeds/docs/sdks/companies/README.md
+++ b/bank-feeds/docs/sdks/companies/README.md
@@ -43,7 +43,7 @@ public class Application {
.build();
CompanyRequestBody req = CompanyRequestBody.builder()
- .name("Bank of Dave")
+ .name("Technicalium")
.description("Requested early access to the new financing scheme.")
.build();
@@ -254,6 +254,19 @@ public class Application {
A [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.
Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
+## Filter by tags
+
+The *List companies* endpoint supports the filtering of companies using [tags](https://docs.codat.io/using-the-api/managing-companies#add-metadata-to-a-company). It supports the following operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying):
+
+- equals (`=`)
+- not equals (`!=`)
+- contains (`~`)
+
+For example, you can use the querying to filter companies tagged with a specific foreign key, region, or owning team:
+- Foreign key: `uid = {yourCustomerId}`
+- Region: `region != uk`
+- Owning team and region: `region = uk && owningTeam = invoice-finance`
+
### Example Usage
```java
@@ -278,6 +291,7 @@ public class Application {
.page(1)
.pageSize(100)
.query("id=e3334455-1aed-4e71-ab43-6bccf12092ee")
+ .tags("region=uk && team=invoice-finance")
.build();
ListCompaniesResponse res = sdk.companies().list()
@@ -338,7 +352,7 @@ public class Application {
UpdateCompanyRequest req = UpdateCompanyRequest.builder()
.companyId("8a210b68-6988-11ed-a1eb-0242ac120002")
.companyRequestBody(CompanyRequestBody.builder()
- .name("Bank of Dave")
+ .name("New Name")
.description("Requested early access to the new financing scheme.")
.build())
.build();
diff --git a/bank-feeds/docs/sdks/connections/README.md b/bank-feeds/docs/sdks/connections/README.md
index f42c9e9e..9e08b531 100644
--- a/bank-feeds/docs/sdks/connections/README.md
+++ b/bank-feeds/docs/sdks/connections/README.md
@@ -254,9 +254,11 @@ public class Application {
package hello.world;
import io.codat.bank_feeds.CodatBankFeeds;
+import io.codat.bank_feeds.models.components.DataConnectionStatus;
import io.codat.bank_feeds.models.errors.ErrorMessage;
import io.codat.bank_feeds.models.operations.UnlinkConnectionRequest;
import io.codat.bank_feeds.models.operations.UnlinkConnectionResponse;
+import io.codat.bank_feeds.models.operations.UnlinkConnectionUpdateConnection;
import java.lang.Exception;
public class Application {
@@ -270,6 +272,9 @@ public class Application {
UnlinkConnectionRequest req = UnlinkConnectionRequest.builder()
.companyId("8a210b68-6988-11ed-a1eb-0242ac120002")
.connectionId("2e9d2c44-f675-40ba-8049-353bfcb5e171")
+ .requestBody(UnlinkConnectionUpdateConnection.builder()
+ .status(DataConnectionStatus.UNLINKED)
+ .build())
.build();
UnlinkConnectionResponse res = sdk.connections().unlink()
diff --git a/bank-feeds/docs/sdks/sourceaccounts/README.md b/bank-feeds/docs/sdks/sourceaccounts/README.md
index 6146a98a..0e7637d6 100644
--- a/bank-feeds/docs/sdks/sourceaccounts/README.md
+++ b/bank-feeds/docs/sdks/sourceaccounts/README.md
@@ -29,17 +29,12 @@ package hello.world;
import io.codat.bank_feeds.CodatBankFeeds;
import io.codat.bank_feeds.models.components.AccountInfo;
-import io.codat.bank_feeds.models.components.AccountType;
-import io.codat.bank_feeds.models.components.RoutingInfo;
-import io.codat.bank_feeds.models.components.SourceAccountV2;
-import io.codat.bank_feeds.models.components.SourceAccountV2Status;
-import io.codat.bank_feeds.models.components.Type;
+import io.codat.bank_feeds.models.components.SourceAccountV2Prototype;
import io.codat.bank_feeds.models.errors.ErrorMessage;
import io.codat.bank_feeds.models.operations.CreateSourceAccountRequest;
import io.codat.bank_feeds.models.operations.CreateSourceAccountRequestBody;
import io.codat.bank_feeds.models.operations.CreateSourceAccountResponse;
import java.lang.Exception;
-import java.math.BigDecimal;
public class Application {
@@ -52,26 +47,12 @@ public class Application {
CreateSourceAccountRequest req = CreateSourceAccountRequest.builder()
.companyId("8a210b68-6988-11ed-a1eb-0242ac120002")
.connectionId("2e9d2c44-f675-40ba-8049-353bfcb5e171")
- .requestBody(CreateSourceAccountRequestBody.of(SourceAccountV2.builder()
- .accountName("")
- .accountNumber("")
- .accountType(AccountType.LOAN)
- .balance(new BigDecimal("1343.65"))
- .currency("GBP")
- .id("")
+ .requestBody(CreateSourceAccountRequestBody.of(SourceAccountV2Prototype.builder()
.accountInfo(AccountInfo.builder()
- .accountOpenDate("2023-05-23T00:00:00Z")
- .availableBalance(new BigDecimal("400"))
- .description("account description 2")
- .nickname("account 1290")
- .build())
- .feedStartDate("2024-05-01T00:00:00Z")
- .modifiedDate("2024-08-02T00:00:00.000Z")
- .routingInfo(RoutingInfo.builder()
- .bankCode("21001088")
- .type(Type.BANKCODE)
+ .accountOpenDate("2022-10-23")
.build())
- .status(SourceAccountV2Status.PENDING)
+ .currency("USD")
+ .modifiedDate("2022-10-23T00:00:00Z")
.build()))
.build();
@@ -139,7 +120,7 @@ public class Application {
.connectionId("2e9d2c44-f675-40ba-8049-353bfcb5e171")
.requestBody(CreateBatchSourceAccountRequestBody.ofSourceAccount(List.of(
SourceAccount.builder()
- .id("")
+ .id("acc-002")
.accountName("account-081")
.accountNumber("12345670")
.accountType("Credit")
@@ -150,7 +131,7 @@ public class Application {
.status(Status.PENDING)
.build(),
SourceAccount.builder()
- .id("")
+ .id("acc-003")
.accountName("account-095")
.accountNumber("12345671")
.accountType("Credit")
@@ -335,7 +316,7 @@ public class Application {
.build();
GenerateCredentialsRequest req = GenerateCredentialsRequest.builder()
- .requestBody("0xeCFd9fD7b9".getBytes(StandardCharsets.UTF_8))
+ .requestBody("0xeDCfFBde9E".getBytes(StandardCharsets.UTF_8))
.companyId("8a210b68-6988-11ed-a1eb-0242ac120002")
.connectionId("2e9d2c44-f675-40ba-8049-353bfcb5e171")
.build();
@@ -465,12 +446,13 @@ public class Application {
.companyId("8a210b68-6988-11ed-a1eb-0242ac120002")
.connectionId("2e9d2c44-f675-40ba-8049-353bfcb5e171")
.sourceAccount(SourceAccount.builder()
- .id("")
- .accountName("account-081")
- .accountNumber("12345670")
+ .id("acc-003")
+ .accountName("account-095")
+ .accountNumber("12345671")
.accountType("Credit")
- .balance(new BigDecimal("99.99"))
- .currency("GBP")
+ .balance(new BigDecimal("0"))
+ .currency("USD")
+ .feedStartDate("2022-10-23T00:00:00Z")
.modifiedDate("2023-01-09T14:14:14.1057478Z")
.sortCode("123456")
.status(Status.PENDING)
diff --git a/bank-feeds/docs/sdks/transactions/README.md b/bank-feeds/docs/sdks/transactions/README.md
index 53f3eb33..b934f9a3 100644
--- a/bank-feeds/docs/sdks/transactions/README.md
+++ b/bank-feeds/docs/sdks/transactions/README.md
@@ -29,6 +29,7 @@ Alternatively, you can view the [Get create bank transaction model](https://docs
package hello.world;
import io.codat.bank_feeds.CodatBankFeeds;
+import io.codat.bank_feeds.models.components.BankTransactionType;
import io.codat.bank_feeds.models.components.BankTransactions;
import io.codat.bank_feeds.models.components.CreateBankTransactions;
import io.codat.bank_feeds.models.errors.ErrorMessage;
@@ -51,17 +52,40 @@ public class Application {
.companyId("8a210b68-6988-11ed-a1eb-0242ac120002")
.connectionId("2e9d2c44-f675-40ba-8049-353bfcb5e171")
.createBankTransactions(CreateBankTransactions.builder()
- .accountId("EILBDVJVNUAGVKRQ")
+ .accountId("49cd5a42-b311-4750-9361-52e2ed1d4653")
.transactions(List.of(
BankTransactions.builder()
- .amount(new BigDecimal("999.99"))
- .balance(new BigDecimal("-999.99"))
- .counterparty("ACME INC")
- .date("2022-10-23T00:00:00Z")
- .description("Debit for Payment Id sdp-1-57379a43-c4b8-49f5-bd7c-699189ee7a60")
+ .amount(new BigDecimal("100"))
+ .balance(new BigDecimal("100"))
+ .counterparty("Bank of Example")
+ .date("2023-08-22T10:21:00Z")
+ .description("Repayment of Credit Card")
.id("716422529")
+ .reconciled(true)
+ .reference("Ref-12345")
+ .transactionType(BankTransactionType.CREDIT)
+ .build(),
+ BankTransactions.builder()
+ .amount(new BigDecimal("-100"))
+ .balance(new BigDecimal("0"))
+ .counterparty("Amazon")
+ .date("2023-08-22T10:22:00Z")
+ .description("Amazon Purchase")
+ .id("716422530")
+ .reconciled(false)
+ .reference("Ref-12346")
+ .transactionType(BankTransactionType.DEBIT)
+ .build(),
+ BankTransactions.builder()
+ .amount(new BigDecimal("-60"))
+ .balance(new BigDecimal("-60"))
+ .counterparty("Office Mart")
+ .date("2023-08-22T10:23:00Z")
+ .description("Office Supplies")
+ .id("716422531")
.reconciled(false)
- .reference("reference for transaction")
+ .reference("Ref-12347")
+ .transactionType(BankTransactionType.DEBIT)
.build()))
.build())
.build();
@@ -186,7 +210,7 @@ public class Application {
GetCreateOperationRequest req = GetCreateOperationRequest.builder()
.companyId("8a210b68-6988-11ed-a1eb-0242ac120002")
- .pushOperationKey("1b33a562-bac6-42b7-8818-d55dba8df363")
+ .pushOperationKey("1fb73c31-a851-46c2-ab8a-5ce6e25b57b8")
.build();
GetCreateOperationResponse res = sdk.transactions().getCreateOperation()
diff --git a/bank-feeds/src/main/java/io/codat/bank_feeds/AccountMapping.java b/bank-feeds/src/main/java/io/codat/bank_feeds/AccountMapping.java
index 99d4862b..669a21e4 100644
--- a/bank-feeds/src/main/java/io/codat/bank_feeds/AccountMapping.java
+++ b/bank-feeds/src/main/java/io/codat/bank_feeds/AccountMapping.java
@@ -199,10 +199,10 @@ public CreateBankAccountMappingResponse create(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -234,7 +234,7 @@ public CreateBankAccountMappingResponse create(
new BeforeRequestContextImpl(
"create-bank-account-mapping",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -247,7 +247,7 @@ public CreateBankAccountMappingResponse create(
new AfterErrorContextImpl(
"create-bank-account-mapping",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -260,7 +260,7 @@ public CreateBankAccountMappingResponse create(
new AfterSuccessContextImpl(
"create-bank-account-mapping",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -386,10 +386,10 @@ public GetBankAccountMappingResponse get(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -421,7 +421,7 @@ public GetBankAccountMappingResponse get(
new BeforeRequestContextImpl(
"get-bank-account-mapping",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -434,7 +434,7 @@ public GetBankAccountMappingResponse get(
new AfterErrorContextImpl(
"get-bank-account-mapping",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -447,7 +447,7 @@ public GetBankAccountMappingResponse get(
new AfterSuccessContextImpl(
"get-bank-account-mapping",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
diff --git a/bank-feeds/src/main/java/io/codat/bank_feeds/BankAccounts.java b/bank-feeds/src/main/java/io/codat/bank_feeds/BankAccounts.java
index edc92590..1dbabf19 100644
--- a/bank-feeds/src/main/java/io/codat/bank_feeds/BankAccounts.java
+++ b/bank-feeds/src/main/java/io/codat/bank_feeds/BankAccounts.java
@@ -139,10 +139,10 @@ public CreateBankAccountResponse create(
CreateBankAccountRequest.class,
request,
null));
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -174,7 +174,7 @@ public CreateBankAccountResponse create(
new BeforeRequestContextImpl(
"create-bank-account",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -187,7 +187,7 @@ public CreateBankAccountResponse create(
new AfterErrorContextImpl(
"create-bank-account",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -200,7 +200,7 @@ public CreateBankAccountResponse create(
new AfterSuccessContextImpl(
"create-bank-account",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -329,10 +329,10 @@ public GetCreateBankAccountsModelResponse getCreateModel(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -364,7 +364,7 @@ public GetCreateBankAccountsModelResponse getCreateModel(
new BeforeRequestContextImpl(
"get-create-bankAccounts-model",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -377,7 +377,7 @@ public GetCreateBankAccountsModelResponse getCreateModel(
new AfterErrorContextImpl(
"get-create-bankAccounts-model",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -390,7 +390,7 @@ public GetCreateBankAccountsModelResponse getCreateModel(
new AfterSuccessContextImpl(
"get-create-bankAccounts-model",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -518,10 +518,10 @@ public ListBankAccountsResponse list(
ListBankAccountsRequest.class,
request,
null));
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -553,7 +553,7 @@ public ListBankAccountsResponse list(
new BeforeRequestContextImpl(
"list-bank-accounts",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -566,7 +566,7 @@ public ListBankAccountsResponse list(
new AfterErrorContextImpl(
"list-bank-accounts",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -579,7 +579,7 @@ public ListBankAccountsResponse list(
new AfterSuccessContextImpl(
"list-bank-accounts",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
diff --git a/bank-feeds/src/main/java/io/codat/bank_feeds/CodatBankFeeds.java b/bank-feeds/src/main/java/io/codat/bank_feeds/CodatBankFeeds.java
index 2e3a6a3a..2a9d756e 100644
--- a/bank-feeds/src/main/java/io/codat/bank_feeds/CodatBankFeeds.java
+++ b/bank-feeds/src/main/java/io/codat/bank_feeds/CodatBankFeeds.java
@@ -12,6 +12,7 @@
import java.lang.String;
import java.util.Map;
import java.util.Optional;
+import java.util.function.Consumer;
/**
* Bank Feeds API: Bank Feeds API enables your SMB users to set up bank feeds from accounts in your application to supported accounting software.
@@ -245,9 +246,16 @@ public Builder retryConfig(RetryConfig retryConfig) {
this.sdkConfiguration.retryConfig = Optional.of(retryConfig);
return this;
}
- // Visible for testing, will be accessed via reflection
- void _hooks(io.codat.bank_feeds.utils.Hooks hooks) {
- sdkConfiguration.setHooks(hooks);
+ // Visible for testing, may be accessed via reflection in tests
+ Builder _hooks(io.codat.bank_feeds.utils.Hooks hooks) {
+ sdkConfiguration.setHooks(hooks);
+ return this;
+ }
+
+ // Visible for testing, may be accessed via reflection in tests
+ Builder _hooks(Consumer super io.codat.bank_feeds.utils.Hooks> consumer) {
+ consumer.accept(sdkConfiguration.hooks());
+ return this;
}
/**
diff --git a/bank-feeds/src/main/java/io/codat/bank_feeds/Companies.java b/bank-feeds/src/main/java/io/codat/bank_feeds/Companies.java
index 5e0246c4..e0d7c8c8 100644
--- a/bank-feeds/src/main/java/io/codat/bank_feeds/Companies.java
+++ b/bank-feeds/src/main/java/io/codat/bank_feeds/Companies.java
@@ -139,10 +139,10 @@ public CreateCompanyResponse create(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -174,7 +174,7 @@ public CreateCompanyResponse create(
new BeforeRequestContextImpl(
"create-company",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -187,7 +187,7 @@ public CreateCompanyResponse create(
new AfterErrorContextImpl(
"create-company",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -200,7 +200,7 @@ public CreateCompanyResponse create(
new AfterSuccessContextImpl(
"create-company",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -320,10 +320,10 @@ public DeleteCompanyResponse delete(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -355,7 +355,7 @@ public DeleteCompanyResponse delete(
new BeforeRequestContextImpl(
"delete-company",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -368,7 +368,7 @@ public DeleteCompanyResponse delete(
new AfterErrorContextImpl(
"delete-company",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -381,7 +381,7 @@ public DeleteCompanyResponse delete(
new AfterSuccessContextImpl(
"delete-company",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -490,10 +490,10 @@ public GetCompanyResponse get(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -525,7 +525,7 @@ public GetCompanyResponse get(
new BeforeRequestContextImpl(
"get-company",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -538,7 +538,7 @@ public GetCompanyResponse get(
new AfterErrorContextImpl(
"get-company",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -551,7 +551,7 @@ public GetCompanyResponse get(
new AfterSuccessContextImpl(
"get-company",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -662,10 +662,10 @@ public GetCompanyAccessTokenResponse getAccessToken(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -697,7 +697,7 @@ public GetCompanyAccessTokenResponse getAccessToken(
new BeforeRequestContextImpl(
"get-company-access-token",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -710,7 +710,7 @@ public GetCompanyAccessTokenResponse getAccessToken(
new AfterErrorContextImpl(
"get-company-access-token",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -723,7 +723,7 @@ public GetCompanyAccessTokenResponse getAccessToken(
new AfterSuccessContextImpl(
"get-company-access-token",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -790,6 +790,19 @@ public GetCompanyAccessTokenResponse getAccessToken(
*
* A [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.
* Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
+ *
+ * ## Filter by tags
+ *
+ * The *List companies* endpoint supports the filtering of companies using [tags](https://docs.codat.io/using-the-api/managing-companies#add-metadata-to-a-company). It supports the following operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying):
+ *
+ * - equals (`=`)
+ * - not equals (`!=`)
+ * - contains (`~`)
+ *
+ * For example, you can use the querying to filter companies tagged with a specific foreign key, region, or owning team:
+ * - Foreign key: `uid = {yourCustomerId}`
+ * - Region: `region != uk`
+ * - Owning team and region: `region = uk && owningTeam = invoice-finance`
* @return The call builder
*/
public ListCompaniesRequestBuilder list() {
@@ -802,6 +815,19 @@ public ListCompaniesRequestBuilder list() {
*
* A [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.
* Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
+ *
+ * ## Filter by tags
+ *
+ * The *List companies* endpoint supports the filtering of companies using [tags](https://docs.codat.io/using-the-api/managing-companies#add-metadata-to-a-company). It supports the following operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying):
+ *
+ * - equals (`=`)
+ * - not equals (`!=`)
+ * - contains (`~`)
+ *
+ * For example, you can use the querying to filter companies tagged with a specific foreign key, region, or owning team:
+ * - Foreign key: `uid = {yourCustomerId}`
+ * - Region: `region != uk`
+ * - Owning team and region: `region = uk && owningTeam = invoice-finance`
* @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
@@ -817,6 +843,19 @@ public ListCompaniesResponse list(
*
* A [company](https://docs.codat.io/bank-feeds-api#/schemas/Company) represents a business sharing access to their data.
* Each company can have multiple [connections](https://docs.codat.io/bank-feeds-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
+ *
+ * ## Filter by tags
+ *
+ * The *List companies* endpoint supports the filtering of companies using [tags](https://docs.codat.io/using-the-api/managing-companies#add-metadata-to-a-company). It supports the following operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying):
+ *
+ * - equals (`=`)
+ * - not equals (`!=`)
+ * - contains (`~`)
+ *
+ * For example, you can use the querying to filter companies tagged with a specific foreign key, region, or owning team:
+ * - Foreign key: `uid = {yourCustomerId}`
+ * - Region: `region != uk`
+ * - Owning team and region: `region = uk && owningTeam = invoice-finance`
* @param request The request object containing all of the parameters for the API call.
* @param options additional options
* @return The response from the API call
@@ -843,10 +882,10 @@ public ListCompaniesResponse list(
ListCompaniesRequest.class,
request,
null));
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -878,7 +917,7 @@ public ListCompaniesResponse list(
new BeforeRequestContextImpl(
"list-companies",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -891,7 +930,7 @@ public ListCompaniesResponse list(
new AfterErrorContextImpl(
"list-companies",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -904,7 +943,7 @@ public ListCompaniesResponse list(
new AfterSuccessContextImpl(
"list-companies",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -1031,10 +1070,10 @@ public UpdateCompanyResponse update(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -1066,7 +1105,7 @@ public UpdateCompanyResponse update(
new BeforeRequestContextImpl(
"update-company",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -1079,7 +1118,7 @@ public UpdateCompanyResponse update(
new AfterErrorContextImpl(
"update-company",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -1092,7 +1131,7 @@ public UpdateCompanyResponse update(
new AfterSuccessContextImpl(
"update-company",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
diff --git a/bank-feeds/src/main/java/io/codat/bank_feeds/CompanyInformation.java b/bank-feeds/src/main/java/io/codat/bank_feeds/CompanyInformation.java
index 4267c274..11130746 100644
--- a/bank-feeds/src/main/java/io/codat/bank_feeds/CompanyInformation.java
+++ b/bank-feeds/src/main/java/io/codat/bank_feeds/CompanyInformation.java
@@ -99,10 +99,10 @@ public GetCompanyInformationResponse get(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -134,7 +134,7 @@ public GetCompanyInformationResponse get(
new BeforeRequestContextImpl(
"get-company-information",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -147,7 +147,7 @@ public GetCompanyInformationResponse get(
new AfterErrorContextImpl(
"get-company-information",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -160,7 +160,7 @@ public GetCompanyInformationResponse get(
new AfterSuccessContextImpl(
"get-company-information",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
diff --git a/bank-feeds/src/main/java/io/codat/bank_feeds/Configuration.java b/bank-feeds/src/main/java/io/codat/bank_feeds/Configuration.java
index 154b96c0..03776d5a 100644
--- a/bank-feeds/src/main/java/io/codat/bank_feeds/Configuration.java
+++ b/bank-feeds/src/main/java/io/codat/bank_feeds/Configuration.java
@@ -100,10 +100,10 @@ public GetConfigurationResponse get(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -135,7 +135,7 @@ public GetConfigurationResponse get(
new BeforeRequestContextImpl(
"get-configuration",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -148,7 +148,7 @@ public GetConfigurationResponse get(
new AfterErrorContextImpl(
"get-configuration",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -161,7 +161,7 @@ public GetConfigurationResponse get(
new AfterSuccessContextImpl(
"get-configuration",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -279,10 +279,10 @@ public SetConfigurationResponse set(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -314,7 +314,7 @@ public SetConfigurationResponse set(
new BeforeRequestContextImpl(
"set-configuration",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -327,7 +327,7 @@ public SetConfigurationResponse set(
new AfterErrorContextImpl(
"set-configuration",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -340,7 +340,7 @@ public SetConfigurationResponse set(
new AfterSuccessContextImpl(
"set-configuration",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
diff --git a/bank-feeds/src/main/java/io/codat/bank_feeds/Connections.java b/bank-feeds/src/main/java/io/codat/bank_feeds/Connections.java
index 1a923f1c..3f28d177 100644
--- a/bank-feeds/src/main/java/io/codat/bank_feeds/Connections.java
+++ b/bank-feeds/src/main/java/io/codat/bank_feeds/Connections.java
@@ -129,10 +129,10 @@ public CreateConnectionResponse create(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -164,7 +164,7 @@ public CreateConnectionResponse create(
new BeforeRequestContextImpl(
"create-connection",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -177,7 +177,7 @@ public CreateConnectionResponse create(
new AfterErrorContextImpl(
"create-connection",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -190,7 +190,7 @@ public CreateConnectionResponse create(
new AfterSuccessContextImpl(
"create-connection",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -301,10 +301,10 @@ public DeleteConnectionResponse delete(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -336,7 +336,7 @@ public DeleteConnectionResponse delete(
new BeforeRequestContextImpl(
"delete-connection",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -349,7 +349,7 @@ public DeleteConnectionResponse delete(
new AfterErrorContextImpl(
"delete-connection",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -362,7 +362,7 @@ public DeleteConnectionResponse delete(
new AfterSuccessContextImpl(
"delete-connection",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -459,10 +459,10 @@ public GetConnectionResponse get(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -494,7 +494,7 @@ public GetConnectionResponse get(
new BeforeRequestContextImpl(
"get-connection",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -507,7 +507,7 @@ public GetConnectionResponse get(
new AfterErrorContextImpl(
"get-connection",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -520,7 +520,7 @@ public GetConnectionResponse get(
new AfterSuccessContextImpl(
"get-connection",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -633,10 +633,10 @@ public ListConnectionsResponse list(
ListConnectionsRequest.class,
request,
null));
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -668,7 +668,7 @@ public ListConnectionsResponse list(
new BeforeRequestContextImpl(
"list-connections",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -681,7 +681,7 @@ public ListConnectionsResponse list(
new AfterErrorContextImpl(
"list-connections",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -694,7 +694,7 @@ public ListConnectionsResponse list(
new AfterSuccessContextImpl(
"list-connections",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -812,10 +812,10 @@ public UnlinkConnectionResponse unlink(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -847,7 +847,7 @@ public UnlinkConnectionResponse unlink(
new BeforeRequestContextImpl(
"unlink-connection",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -860,7 +860,7 @@ public UnlinkConnectionResponse unlink(
new AfterErrorContextImpl(
"unlink-connection",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -873,7 +873,7 @@ public UnlinkConnectionResponse unlink(
new AfterSuccessContextImpl(
"unlink-connection",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
diff --git a/bank-feeds/src/main/java/io/codat/bank_feeds/SDKConfiguration.java b/bank-feeds/src/main/java/io/codat/bank_feeds/SDKConfiguration.java
index d7b07867..61e01be4 100644
--- a/bank-feeds/src/main/java/io/codat/bank_feeds/SDKConfiguration.java
+++ b/bank-feeds/src/main/java/io/codat/bank_feeds/SDKConfiguration.java
@@ -18,13 +18,19 @@ class SDKConfiguration {
public Optional securitySource() {
return Optional.ofNullable(securitySource);
}
+
public HTTPClient defaultClient;
+
public String serverUrl;
+
+ public String resolvedServerUrl() {
+ return serverUrl;
+ }
public int serverIdx = 0;
private static final String LANGUAGE = "java";
public static final String OPENAPI_DOC_VERSION = "3.0.0";
- public static final String SDK_VERSION = "2.0.0";
- public static final String GEN_VERSION = "2.462.1";
+ public static final String SDK_VERSION = "3.0.0";
+ public static final String GEN_VERSION = "2.479.3";
private static final String BASE_PACKAGE = "io.codat.bank_feeds";
public static final String USER_AGENT =
String.format("speakeasy-sdk/%s %s %s %s %s",
@@ -51,7 +57,7 @@ public void setHooks(Hooks hooks) {
public void initialize() {
SDKHooks.initialize(_hooks);
// apply the sdk init hook immediately
- SdkInitData data = _hooks.sdkInit(new SdkInitData(serverUrl, defaultClient));
+ SdkInitData data = _hooks.sdkInit(new SdkInitData(resolvedServerUrl(), defaultClient));
this.serverUrl = data.baseUrl();
this.defaultClient = data.client();
}
diff --git a/bank-feeds/src/main/java/io/codat/bank_feeds/SourceAccounts.java b/bank-feeds/src/main/java/io/codat/bank_feeds/SourceAccounts.java
index 227a3918..1a761803 100644
--- a/bank-feeds/src/main/java/io/codat/bank_feeds/SourceAccounts.java
+++ b/bank-feeds/src/main/java/io/codat/bank_feeds/SourceAccounts.java
@@ -145,10 +145,10 @@ public CreateSourceAccountResponse create(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -180,7 +180,7 @@ public CreateSourceAccountResponse create(
new BeforeRequestContextImpl(
"create-source-account",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -193,7 +193,7 @@ public CreateSourceAccountResponse create(
new AfterErrorContextImpl(
"create-source-account",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -206,7 +206,7 @@ public CreateSourceAccountResponse create(
new AfterSuccessContextImpl(
"create-source-account",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -333,10 +333,10 @@ public CreateBatchSourceAccountResponse createBatch(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -368,7 +368,7 @@ public CreateBatchSourceAccountResponse createBatch(
new BeforeRequestContextImpl(
"create-batch-source-account",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -381,7 +381,7 @@ public CreateBatchSourceAccountResponse createBatch(
new AfterErrorContextImpl(
"create-batch-source-account",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -394,7 +394,7 @@ public CreateBatchSourceAccountResponse createBatch(
new AfterSuccessContextImpl(
"create-batch-source-account",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -526,10 +526,10 @@ public DeleteSourceAccountResponse delete(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -561,7 +561,7 @@ public DeleteSourceAccountResponse delete(
new BeforeRequestContextImpl(
"delete-source-account",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -574,7 +574,7 @@ public DeleteSourceAccountResponse delete(
new AfterErrorContextImpl(
"delete-source-account",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -587,7 +587,7 @@ public DeleteSourceAccountResponse delete(
new AfterSuccessContextImpl(
"delete-source-account",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -690,10 +690,10 @@ public DeleteBankFeedCredentialsResponse deleteCredentials(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -725,7 +725,7 @@ public DeleteBankFeedCredentialsResponse deleteCredentials(
new BeforeRequestContextImpl(
"delete-bank-feed-credentials",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -738,7 +738,7 @@ public DeleteBankFeedCredentialsResponse deleteCredentials(
new AfterErrorContextImpl(
"delete-bank-feed-credentials",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -751,7 +751,7 @@ public DeleteBankFeedCredentialsResponse deleteCredentials(
new AfterSuccessContextImpl(
"delete-bank-feed-credentials",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -879,10 +879,10 @@ public GenerateCredentialsResponse generateCredentials(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -914,7 +914,7 @@ public GenerateCredentialsResponse generateCredentials(
new BeforeRequestContextImpl(
"generate-credentials",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -927,7 +927,7 @@ public GenerateCredentialsResponse generateCredentials(
new AfterErrorContextImpl(
"generate-credentials",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -940,7 +940,7 @@ public GenerateCredentialsResponse generateCredentials(
new AfterSuccessContextImpl(
"generate-credentials",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -1063,10 +1063,10 @@ public ListSourceAccountsResponse list(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -1098,7 +1098,7 @@ public ListSourceAccountsResponse list(
new BeforeRequestContextImpl(
"list-source-accounts",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -1111,7 +1111,7 @@ public ListSourceAccountsResponse list(
new AfterErrorContextImpl(
"list-source-accounts",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -1124,7 +1124,7 @@ public ListSourceAccountsResponse list(
new AfterSuccessContextImpl(
"list-source-accounts",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -1257,10 +1257,10 @@ public UpdateSourceAccountResponse update(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -1292,7 +1292,7 @@ public UpdateSourceAccountResponse update(
new BeforeRequestContextImpl(
"update-source-account",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -1305,7 +1305,7 @@ public UpdateSourceAccountResponse update(
new AfterErrorContextImpl(
"update-source-account",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -1318,7 +1318,7 @@ public UpdateSourceAccountResponse update(
new AfterSuccessContextImpl(
"update-source-account",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
diff --git a/bank-feeds/src/main/java/io/codat/bank_feeds/Sync.java b/bank-feeds/src/main/java/io/codat/bank_feeds/Sync.java
index bbc43b11..22943c52 100644
--- a/bank-feeds/src/main/java/io/codat/bank_feeds/Sync.java
+++ b/bank-feeds/src/main/java/io/codat/bank_feeds/Sync.java
@@ -94,10 +94,10 @@ public GetLastSuccessfulResponse getLastSuccessfulSync(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -129,7 +129,7 @@ public GetLastSuccessfulResponse getLastSuccessfulSync(
new BeforeRequestContextImpl(
"get-last-successful",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -142,7 +142,7 @@ public GetLastSuccessfulResponse getLastSuccessfulSync(
new AfterErrorContextImpl(
"get-last-successful",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -155,7 +155,7 @@ public GetLastSuccessfulResponse getLastSuccessfulSync(
new AfterSuccessContextImpl(
"get-last-successful",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
diff --git a/bank-feeds/src/main/java/io/codat/bank_feeds/Transactions.java b/bank-feeds/src/main/java/io/codat/bank_feeds/Transactions.java
index a3c5edf9..3f6c21c6 100644
--- a/bank-feeds/src/main/java/io/codat/bank_feeds/Transactions.java
+++ b/bank-feeds/src/main/java/io/codat/bank_feeds/Transactions.java
@@ -147,10 +147,10 @@ public CreateBankTransactionsResponse create(
CreateBankTransactionsRequest.class,
request,
null));
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -182,7 +182,7 @@ public CreateBankTransactionsResponse create(
new BeforeRequestContextImpl(
"create-bank-transactions",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -195,7 +195,7 @@ public CreateBankTransactionsResponse create(
new AfterErrorContextImpl(
"create-bank-transactions",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -208,7 +208,7 @@ public CreateBankTransactionsResponse create(
new AfterSuccessContextImpl(
"create-bank-transactions",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -334,10 +334,10 @@ public GetCreateBankTransactionsModelResponse getCreateModel(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -369,7 +369,7 @@ public GetCreateBankTransactionsModelResponse getCreateModel(
new BeforeRequestContextImpl(
"get-create-bank-transactions-model",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -382,7 +382,7 @@ public GetCreateBankTransactionsModelResponse getCreateModel(
new AfterErrorContextImpl(
"get-create-bank-transactions-model",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -395,7 +395,7 @@ public GetCreateBankTransactionsModelResponse getCreateModel(
new AfterSuccessContextImpl(
"get-create-bank-transactions-model",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -515,10 +515,10 @@ public GetCreateOperationResponse getCreateOperation(
_req.addHeader("Accept", "application/json")
.addHeader("user-agent",
SDKConfiguration.USER_AGENT);
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -550,7 +550,7 @@ public GetCreateOperationResponse getCreateOperation(
new BeforeRequestContextImpl(
"get-create-operation",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -563,7 +563,7 @@ public GetCreateOperationResponse getCreateOperation(
new AfterErrorContextImpl(
"get-create-operation",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -576,7 +576,7 @@ public GetCreateOperationResponse getCreateOperation(
new AfterSuccessContextImpl(
"get-create-operation",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
@@ -701,10 +701,10 @@ public ListCreateOperationsResponse listCreateOperations(
ListCreateOperationsRequest.class,
request,
null));
-
+
+ Optional _hookSecuritySource = this.sdkConfiguration.securitySource();
Utils.configureSecurity(_req,
this.sdkConfiguration.securitySource.getSecurity());
-
HTTPClient _client = this.sdkConfiguration.defaultClient;
HTTPRequest _finalReq = _req;
RetryConfig _retryConfig;
@@ -736,7 +736,7 @@ public ListCreateOperationsResponse listCreateOperations(
new BeforeRequestContextImpl(
"list-create-operations",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_finalReq.build());
} catch (Exception _e) {
throw new NonRetryableException(_e);
@@ -749,7 +749,7 @@ public ListCreateOperationsResponse listCreateOperations(
new AfterErrorContextImpl(
"list-create-operations",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
Optional.empty(),
Optional.of(_e));
}
@@ -762,7 +762,7 @@ public ListCreateOperationsResponse listCreateOperations(
new AfterSuccessContextImpl(
"list-create-operations",
Optional.of(List.of()),
- sdkConfiguration.securitySource()),
+ _hookSecuritySource),
_retries.run());
String _contentType = _httpRes
.headers()
diff --git a/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/BankFeedMapping.java b/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/BankFeedMapping.java
index 56a1090d..8b845051 100644
--- a/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/BankFeedMapping.java
+++ b/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/BankFeedMapping.java
@@ -14,6 +14,7 @@
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
+import java.math.BigDecimal;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
@@ -76,7 +77,7 @@ public class BankFeedMapping {
*/
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("sourceBalance")
- private Optional sourceBalance;
+ private Optional extends BigDecimal> sourceBalance;
/**
* The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
@@ -125,7 +126,7 @@ public BankFeedMapping(
@JsonProperty("sourceAccountId") Optional sourceAccountId,
@JsonProperty("sourceAccountName") Optional sourceAccountName,
@JsonProperty("sourceAccountNumber") Optional sourceAccountNumber,
- @JsonProperty("sourceBalance") Optional sourceBalance,
+ @JsonProperty("sourceBalance") Optional extends BigDecimal> sourceBalance,
@JsonProperty("sourceCurrency") Optional sourceCurrency,
@JsonProperty("status") Optional status,
@JsonProperty("targetAccountId") JsonNullable targetAccountId,
@@ -210,9 +211,10 @@ public Optional sourceAccountNumber() {
/**
* Balance for the source account.
*/
+ @SuppressWarnings("unchecked")
@JsonIgnore
- public Optional sourceBalance() {
- return sourceBalance;
+ public Optional sourceBalance() {
+ return (Optional) sourceBalance;
}
/**
@@ -377,16 +379,24 @@ public BankFeedMapping withSourceAccountNumber(Optional sourceAccountNum
/**
* Balance for the source account.
*/
- public BankFeedMapping withSourceBalance(String sourceBalance) {
+ public BankFeedMapping withSourceBalance(BigDecimal sourceBalance) {
Utils.checkNotNull(sourceBalance, "sourceBalance");
this.sourceBalance = Optional.ofNullable(sourceBalance);
return this;
}
+ /**
+ * Balance for the source account.
+ */
+ public BankFeedMapping withSourceBalance(double sourceBalance) {
+ this.sourceBalance = Optional.of(BigDecimal.valueOf(sourceBalance));
+ return this;
+ }
+
/**
* Balance for the source account.
*/
- public BankFeedMapping withSourceBalance(Optional sourceBalance) {
+ public BankFeedMapping withSourceBalance(Optional extends BigDecimal> sourceBalance) {
Utils.checkNotNull(sourceBalance, "sourceBalance");
this.sourceBalance = sourceBalance;
return this;
@@ -556,7 +566,7 @@ public final static class Builder {
private Optional sourceAccountNumber = Optional.empty();
- private Optional sourceBalance = Optional.empty();
+ private Optional extends BigDecimal> sourceBalance = Optional.empty();
private Optional sourceCurrency = Optional.empty();
@@ -683,7 +693,7 @@ public Builder sourceAccountNumber(Optional sourceAccountNumber) {
/**
* Balance for the source account.
*/
- public Builder sourceBalance(String sourceBalance) {
+ public Builder sourceBalance(BigDecimal sourceBalance) {
Utils.checkNotNull(sourceBalance, "sourceBalance");
this.sourceBalance = Optional.ofNullable(sourceBalance);
return this;
@@ -692,7 +702,15 @@ public Builder sourceBalance(String sourceBalance) {
/**
* Balance for the source account.
*/
- public Builder sourceBalance(Optional sourceBalance) {
+ public Builder sourceBalance(double sourceBalance) {
+ this.sourceBalance = Optional.of(BigDecimal.valueOf(sourceBalance));
+ return this;
+ }
+
+ /**
+ * Balance for the source account.
+ */
+ public Builder sourceBalance(Optional extends BigDecimal> sourceBalance) {
Utils.checkNotNull(sourceBalance, "sourceBalance");
this.sourceBalance = sourceBalance;
return this;
diff --git a/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountPrototype.java b/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountPrototype.java
new file mode 100644
index 00000000..f6832f17
--- /dev/null
+++ b/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountPrototype.java
@@ -0,0 +1,711 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+
+package io.codat.bank_feeds.models.components;
+
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.codat.bank_feeds.utils.Utils;
+import java.lang.Override;
+import java.lang.String;
+import java.lang.SuppressWarnings;
+import java.math.BigDecimal;
+import java.util.Objects;
+import java.util.Optional;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+
+public class SourceAccountPrototype {
+
+ /**
+ * The bank account name.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("accountName")
+ private JsonNullable accountName;
+
+ /**
+ * The account number.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("accountNumber")
+ private JsonNullable accountNumber;
+
+ /**
+ * The type of bank account e.g. Credit.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("accountType")
+ private JsonNullable accountType;
+
+ /**
+ * The latest balance for the bank account.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("balance")
+ private JsonNullable extends BigDecimal> balance;
+
+ /**
+ * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+ *
+ * ## Unknown currencies
+ *
+ * In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+ *
+ * There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("currency")
+ private Optional currency;
+
+ /**
+ * Unique ID for the bank account.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("id")
+ private Optional id;
+
+ /**
+ * In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
+ *
+ * ```
+ * 2020-10-08T22:40:50Z
+ * 2021-01-01T00:00:00
+ * ```
+ *
+ *
+ *
+ * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+ *
+ * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ * - Unqualified local time: `2021-11-15T01:00:00`
+ * - UTC time offsets: `2021-11-15T01:00:00-05:00`
+ *
+ * > Time zones
+ * >
+ * > Not all dates from Codat will contain information about time zones.
+ * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("modifiedDate")
+ private Optional modifiedDate;
+
+ /**
+ * The sort code.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("sortCode")
+ private JsonNullable sortCode;
+
+ @JsonCreator
+ public SourceAccountPrototype(
+ @JsonProperty("accountName") JsonNullable accountName,
+ @JsonProperty("accountNumber") JsonNullable accountNumber,
+ @JsonProperty("accountType") JsonNullable accountType,
+ @JsonProperty("balance") JsonNullable extends BigDecimal> balance,
+ @JsonProperty("currency") Optional currency,
+ @JsonProperty("id") Optional id,
+ @JsonProperty("modifiedDate") Optional modifiedDate,
+ @JsonProperty("sortCode") JsonNullable sortCode) {
+ Utils.checkNotNull(accountName, "accountName");
+ Utils.checkNotNull(accountNumber, "accountNumber");
+ Utils.checkNotNull(accountType, "accountType");
+ Utils.checkNotNull(balance, "balance");
+ Utils.checkNotNull(currency, "currency");
+ Utils.checkNotNull(id, "id");
+ Utils.checkNotNull(modifiedDate, "modifiedDate");
+ Utils.checkNotNull(sortCode, "sortCode");
+ this.accountName = accountName;
+ this.accountNumber = accountNumber;
+ this.accountType = accountType;
+ this.balance = balance;
+ this.currency = currency;
+ this.id = id;
+ this.modifiedDate = modifiedDate;
+ this.sortCode = sortCode;
+ }
+
+ public SourceAccountPrototype() {
+ this(JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), Optional.empty(), Optional.empty(), JsonNullable.undefined());
+ }
+
+ /**
+ * The bank account name.
+ */
+ @JsonIgnore
+ public JsonNullable accountName() {
+ return accountName;
+ }
+
+ /**
+ * The account number.
+ */
+ @JsonIgnore
+ public JsonNullable accountNumber() {
+ return accountNumber;
+ }
+
+ /**
+ * The type of bank account e.g. Credit.
+ */
+ @JsonIgnore
+ public JsonNullable accountType() {
+ return accountType;
+ }
+
+ /**
+ * The latest balance for the bank account.
+ */
+ @SuppressWarnings("unchecked")
+ @JsonIgnore
+ public JsonNullable balance() {
+ return (JsonNullable) balance;
+ }
+
+ /**
+ * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+ *
+ * ## Unknown currencies
+ *
+ * In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+ *
+ * There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ */
+ @JsonIgnore
+ public Optional currency() {
+ return currency;
+ }
+
+ /**
+ * Unique ID for the bank account.
+ */
+ @JsonIgnore
+ public Optional id() {
+ return id;
+ }
+
+ /**
+ * In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
+ *
+ * ```
+ * 2020-10-08T22:40:50Z
+ * 2021-01-01T00:00:00
+ * ```
+ *
+ *
+ *
+ * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+ *
+ * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ * - Unqualified local time: `2021-11-15T01:00:00`
+ * - UTC time offsets: `2021-11-15T01:00:00-05:00`
+ *
+ * > Time zones
+ * >
+ * > Not all dates from Codat will contain information about time zones.
+ * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ */
+ @JsonIgnore
+ public Optional modifiedDate() {
+ return modifiedDate;
+ }
+
+ /**
+ * The sort code.
+ */
+ @JsonIgnore
+ public JsonNullable sortCode() {
+ return sortCode;
+ }
+
+ public final static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * The bank account name.
+ */
+ public SourceAccountPrototype withAccountName(String accountName) {
+ Utils.checkNotNull(accountName, "accountName");
+ this.accountName = JsonNullable.of(accountName);
+ return this;
+ }
+
+ /**
+ * The bank account name.
+ */
+ public SourceAccountPrototype withAccountName(JsonNullable accountName) {
+ Utils.checkNotNull(accountName, "accountName");
+ this.accountName = accountName;
+ return this;
+ }
+
+ /**
+ * The account number.
+ */
+ public SourceAccountPrototype withAccountNumber(String accountNumber) {
+ Utils.checkNotNull(accountNumber, "accountNumber");
+ this.accountNumber = JsonNullable.of(accountNumber);
+ return this;
+ }
+
+ /**
+ * The account number.
+ */
+ public SourceAccountPrototype withAccountNumber(JsonNullable accountNumber) {
+ Utils.checkNotNull(accountNumber, "accountNumber");
+ this.accountNumber = accountNumber;
+ return this;
+ }
+
+ /**
+ * The type of bank account e.g. Credit.
+ */
+ public SourceAccountPrototype withAccountType(String accountType) {
+ Utils.checkNotNull(accountType, "accountType");
+ this.accountType = JsonNullable.of(accountType);
+ return this;
+ }
+
+ /**
+ * The type of bank account e.g. Credit.
+ */
+ public SourceAccountPrototype withAccountType(JsonNullable accountType) {
+ Utils.checkNotNull(accountType, "accountType");
+ this.accountType = accountType;
+ return this;
+ }
+
+ /**
+ * The latest balance for the bank account.
+ */
+ public SourceAccountPrototype withBalance(BigDecimal balance) {
+ Utils.checkNotNull(balance, "balance");
+ this.balance = JsonNullable.of(balance);
+ return this;
+ }
+
+ /**
+ * The latest balance for the bank account.
+ */
+ public SourceAccountPrototype withBalance(double balance) {
+ this.balance = JsonNullable.of(BigDecimal.valueOf(balance));
+ return this;
+ }
+
+ /**
+ * The latest balance for the bank account.
+ */
+ public SourceAccountPrototype withBalance(JsonNullable extends BigDecimal> balance) {
+ Utils.checkNotNull(balance, "balance");
+ this.balance = balance;
+ return this;
+ }
+
+ /**
+ * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+ *
+ * ## Unknown currencies
+ *
+ * In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+ *
+ * There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ */
+ public SourceAccountPrototype withCurrency(String currency) {
+ Utils.checkNotNull(currency, "currency");
+ this.currency = Optional.ofNullable(currency);
+ return this;
+ }
+
+ /**
+ * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+ *
+ * ## Unknown currencies
+ *
+ * In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+ *
+ * There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ */
+ public SourceAccountPrototype withCurrency(Optional currency) {
+ Utils.checkNotNull(currency, "currency");
+ this.currency = currency;
+ return this;
+ }
+
+ /**
+ * Unique ID for the bank account.
+ */
+ public SourceAccountPrototype withId(String id) {
+ Utils.checkNotNull(id, "id");
+ this.id = Optional.ofNullable(id);
+ return this;
+ }
+
+ /**
+ * Unique ID for the bank account.
+ */
+ public SourceAccountPrototype withId(Optional id) {
+ Utils.checkNotNull(id, "id");
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
+ *
+ * ```
+ * 2020-10-08T22:40:50Z
+ * 2021-01-01T00:00:00
+ * ```
+ *
+ *
+ *
+ * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+ *
+ * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ * - Unqualified local time: `2021-11-15T01:00:00`
+ * - UTC time offsets: `2021-11-15T01:00:00-05:00`
+ *
+ * > Time zones
+ * >
+ * > Not all dates from Codat will contain information about time zones.
+ * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ */
+ public SourceAccountPrototype withModifiedDate(String modifiedDate) {
+ Utils.checkNotNull(modifiedDate, "modifiedDate");
+ this.modifiedDate = Optional.ofNullable(modifiedDate);
+ return this;
+ }
+
+ /**
+ * In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
+ *
+ * ```
+ * 2020-10-08T22:40:50Z
+ * 2021-01-01T00:00:00
+ * ```
+ *
+ *
+ *
+ * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+ *
+ * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ * - Unqualified local time: `2021-11-15T01:00:00`
+ * - UTC time offsets: `2021-11-15T01:00:00-05:00`
+ *
+ * > Time zones
+ * >
+ * > Not all dates from Codat will contain information about time zones.
+ * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ */
+ public SourceAccountPrototype withModifiedDate(Optional modifiedDate) {
+ Utils.checkNotNull(modifiedDate, "modifiedDate");
+ this.modifiedDate = modifiedDate;
+ return this;
+ }
+
+ /**
+ * The sort code.
+ */
+ public SourceAccountPrototype withSortCode(String sortCode) {
+ Utils.checkNotNull(sortCode, "sortCode");
+ this.sortCode = JsonNullable.of(sortCode);
+ return this;
+ }
+
+ /**
+ * The sort code.
+ */
+ public SourceAccountPrototype withSortCode(JsonNullable sortCode) {
+ Utils.checkNotNull(sortCode, "sortCode");
+ this.sortCode = sortCode;
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ SourceAccountPrototype other = (SourceAccountPrototype) o;
+ return
+ Objects.deepEquals(this.accountName, other.accountName) &&
+ Objects.deepEquals(this.accountNumber, other.accountNumber) &&
+ Objects.deepEquals(this.accountType, other.accountType) &&
+ Objects.deepEquals(this.balance, other.balance) &&
+ Objects.deepEquals(this.currency, other.currency) &&
+ Objects.deepEquals(this.id, other.id) &&
+ Objects.deepEquals(this.modifiedDate, other.modifiedDate) &&
+ Objects.deepEquals(this.sortCode, other.sortCode);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ accountName,
+ accountNumber,
+ accountType,
+ balance,
+ currency,
+ id,
+ modifiedDate,
+ sortCode);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(SourceAccountPrototype.class,
+ "accountName", accountName,
+ "accountNumber", accountNumber,
+ "accountType", accountType,
+ "balance", balance,
+ "currency", currency,
+ "id", id,
+ "modifiedDate", modifiedDate,
+ "sortCode", sortCode);
+ }
+
+ public final static class Builder {
+
+ private JsonNullable accountName = JsonNullable.undefined();
+
+ private JsonNullable accountNumber = JsonNullable.undefined();
+
+ private JsonNullable accountType = JsonNullable.undefined();
+
+ private JsonNullable extends BigDecimal> balance = JsonNullable.undefined();
+
+ private Optional currency = Optional.empty();
+
+ private Optional id = Optional.empty();
+
+ private Optional modifiedDate = Optional.empty();
+
+ private JsonNullable sortCode = JsonNullable.undefined();
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+ /**
+ * The bank account name.
+ */
+ public Builder accountName(String accountName) {
+ Utils.checkNotNull(accountName, "accountName");
+ this.accountName = JsonNullable.of(accountName);
+ return this;
+ }
+
+ /**
+ * The bank account name.
+ */
+ public Builder accountName(JsonNullable accountName) {
+ Utils.checkNotNull(accountName, "accountName");
+ this.accountName = accountName;
+ return this;
+ }
+
+ /**
+ * The account number.
+ */
+ public Builder accountNumber(String accountNumber) {
+ Utils.checkNotNull(accountNumber, "accountNumber");
+ this.accountNumber = JsonNullable.of(accountNumber);
+ return this;
+ }
+
+ /**
+ * The account number.
+ */
+ public Builder accountNumber(JsonNullable accountNumber) {
+ Utils.checkNotNull(accountNumber, "accountNumber");
+ this.accountNumber = accountNumber;
+ return this;
+ }
+
+ /**
+ * The type of bank account e.g. Credit.
+ */
+ public Builder accountType(String accountType) {
+ Utils.checkNotNull(accountType, "accountType");
+ this.accountType = JsonNullable.of(accountType);
+ return this;
+ }
+
+ /**
+ * The type of bank account e.g. Credit.
+ */
+ public Builder accountType(JsonNullable accountType) {
+ Utils.checkNotNull(accountType, "accountType");
+ this.accountType = accountType;
+ return this;
+ }
+
+ /**
+ * The latest balance for the bank account.
+ */
+ public Builder balance(BigDecimal balance) {
+ Utils.checkNotNull(balance, "balance");
+ this.balance = JsonNullable.of(balance);
+ return this;
+ }
+
+ /**
+ * The latest balance for the bank account.
+ */
+ public Builder balance(double balance) {
+ this.balance = JsonNullable.of(BigDecimal.valueOf(balance));
+ return this;
+ }
+
+ /**
+ * The latest balance for the bank account.
+ */
+ public Builder balance(JsonNullable extends BigDecimal> balance) {
+ Utils.checkNotNull(balance, "balance");
+ this.balance = balance;
+ return this;
+ }
+
+ /**
+ * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+ *
+ * ## Unknown currencies
+ *
+ * In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+ *
+ * There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ */
+ public Builder currency(String currency) {
+ Utils.checkNotNull(currency, "currency");
+ this.currency = Optional.ofNullable(currency);
+ return this;
+ }
+
+ /**
+ * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+ *
+ * ## Unknown currencies
+ *
+ * In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+ *
+ * There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ */
+ public Builder currency(Optional currency) {
+ Utils.checkNotNull(currency, "currency");
+ this.currency = currency;
+ return this;
+ }
+
+ /**
+ * Unique ID for the bank account.
+ */
+ public Builder id(String id) {
+ Utils.checkNotNull(id, "id");
+ this.id = Optional.ofNullable(id);
+ return this;
+ }
+
+ /**
+ * Unique ID for the bank account.
+ */
+ public Builder id(Optional id) {
+ Utils.checkNotNull(id, "id");
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
+ *
+ * ```
+ * 2020-10-08T22:40:50Z
+ * 2021-01-01T00:00:00
+ * ```
+ *
+ *
+ *
+ * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+ *
+ * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ * - Unqualified local time: `2021-11-15T01:00:00`
+ * - UTC time offsets: `2021-11-15T01:00:00-05:00`
+ *
+ * > Time zones
+ * >
+ * > Not all dates from Codat will contain information about time zones.
+ * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ */
+ public Builder modifiedDate(String modifiedDate) {
+ Utils.checkNotNull(modifiedDate, "modifiedDate");
+ this.modifiedDate = Optional.ofNullable(modifiedDate);
+ return this;
+ }
+
+ /**
+ * In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
+ *
+ * ```
+ * 2020-10-08T22:40:50Z
+ * 2021-01-01T00:00:00
+ * ```
+ *
+ *
+ *
+ * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+ *
+ * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ * - Unqualified local time: `2021-11-15T01:00:00`
+ * - UTC time offsets: `2021-11-15T01:00:00-05:00`
+ *
+ * > Time zones
+ * >
+ * > Not all dates from Codat will contain information about time zones.
+ * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ */
+ public Builder modifiedDate(Optional modifiedDate) {
+ Utils.checkNotNull(modifiedDate, "modifiedDate");
+ this.modifiedDate = modifiedDate;
+ return this;
+ }
+
+ /**
+ * The sort code.
+ */
+ public Builder sortCode(String sortCode) {
+ Utils.checkNotNull(sortCode, "sortCode");
+ this.sortCode = JsonNullable.of(sortCode);
+ return this;
+ }
+
+ /**
+ * The sort code.
+ */
+ public Builder sortCode(JsonNullable sortCode) {
+ Utils.checkNotNull(sortCode, "sortCode");
+ this.sortCode = sortCode;
+ return this;
+ }
+
+ public SourceAccountPrototype build() {
+ return new SourceAccountPrototype(
+ accountName,
+ accountNumber,
+ accountType,
+ balance,
+ currency,
+ id,
+ modifiedDate,
+ sortCode);
+ }
+ }
+}
+
diff --git a/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountV2.java b/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountV2.java
index 843e03bb..8c0079a1 100644
--- a/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountV2.java
+++ b/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountV2.java
@@ -45,7 +45,7 @@ public class SourceAccountV2 {
* The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard.
*/
@JsonProperty("accountType")
- private AccountType accountType;
+ private SourceAccountV2AccountType accountType;
/**
* The latest balance for the bank account.
@@ -113,6 +113,13 @@ public class SourceAccountV2 {
@JsonProperty("routingInfo")
private Optional extends RoutingInfo> routingInfo;
+ /**
+ * The sort code.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("sortCode")
+ private JsonNullable sortCode;
+
/**
* Status of the source account.
*/
@@ -125,13 +132,14 @@ public SourceAccountV2(
@JsonProperty("accountInfo") JsonNullable extends AccountInfo> accountInfo,
@JsonProperty("accountName") String accountName,
@JsonProperty("accountNumber") String accountNumber,
- @JsonProperty("accountType") AccountType accountType,
+ @JsonProperty("accountType") SourceAccountV2AccountType accountType,
@JsonProperty("balance") BigDecimal balance,
@JsonProperty("currency") String currency,
@JsonProperty("feedStartDate") JsonNullable feedStartDate,
@JsonProperty("id") String id,
@JsonProperty("modifiedDate") Optional modifiedDate,
@JsonProperty("routingInfo") Optional extends RoutingInfo> routingInfo,
+ @JsonProperty("sortCode") JsonNullable sortCode,
@JsonProperty("status") JsonNullable extends SourceAccountV2Status> status) {
Utils.checkNotNull(accountInfo, "accountInfo");
Utils.checkNotNull(accountName, "accountName");
@@ -143,6 +151,7 @@ public SourceAccountV2(
Utils.checkNotNull(id, "id");
Utils.checkNotNull(modifiedDate, "modifiedDate");
Utils.checkNotNull(routingInfo, "routingInfo");
+ Utils.checkNotNull(sortCode, "sortCode");
Utils.checkNotNull(status, "status");
this.accountInfo = accountInfo;
this.accountName = accountName;
@@ -154,17 +163,18 @@ public SourceAccountV2(
this.id = id;
this.modifiedDate = modifiedDate;
this.routingInfo = routingInfo;
+ this.sortCode = sortCode;
this.status = status;
}
public SourceAccountV2(
String accountName,
String accountNumber,
- AccountType accountType,
+ SourceAccountV2AccountType accountType,
BigDecimal balance,
String currency,
String id) {
- this(JsonNullable.undefined(), accountName, accountNumber, accountType, balance, currency, JsonNullable.undefined(), id, Optional.empty(), Optional.empty(), JsonNullable.undefined());
+ this(JsonNullable.undefined(), accountName, accountNumber, accountType, balance, currency, JsonNullable.undefined(), id, Optional.empty(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined());
}
@SuppressWarnings("unchecked")
@@ -193,7 +203,7 @@ public String accountNumber() {
* The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard.
*/
@JsonIgnore
- public AccountType accountType() {
+ public SourceAccountV2AccountType accountType() {
return accountType;
}
@@ -273,6 +283,14 @@ public Optional routingInfo() {
return (Optional) routingInfo;
}
+ /**
+ * The sort code.
+ */
+ @JsonIgnore
+ public JsonNullable sortCode() {
+ return sortCode;
+ }
+
/**
* Status of the source account.
*/
@@ -319,7 +337,7 @@ public SourceAccountV2 withAccountNumber(String accountNumber) {
/**
* The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard.
*/
- public SourceAccountV2 withAccountType(AccountType accountType) {
+ public SourceAccountV2 withAccountType(SourceAccountV2AccountType accountType) {
Utils.checkNotNull(accountType, "accountType");
this.accountType = accountType;
return this;
@@ -462,6 +480,24 @@ public SourceAccountV2 withRoutingInfo(Optional extends RoutingInfo> routingIn
return this;
}
+ /**
+ * The sort code.
+ */
+ public SourceAccountV2 withSortCode(String sortCode) {
+ Utils.checkNotNull(sortCode, "sortCode");
+ this.sortCode = JsonNullable.of(sortCode);
+ return this;
+ }
+
+ /**
+ * The sort code.
+ */
+ public SourceAccountV2 withSortCode(JsonNullable sortCode) {
+ Utils.checkNotNull(sortCode, "sortCode");
+ this.sortCode = sortCode;
+ return this;
+ }
+
/**
* Status of the source account.
*/
@@ -500,6 +536,7 @@ public boolean equals(java.lang.Object o) {
Objects.deepEquals(this.id, other.id) &&
Objects.deepEquals(this.modifiedDate, other.modifiedDate) &&
Objects.deepEquals(this.routingInfo, other.routingInfo) &&
+ Objects.deepEquals(this.sortCode, other.sortCode) &&
Objects.deepEquals(this.status, other.status);
}
@@ -516,6 +553,7 @@ public int hashCode() {
id,
modifiedDate,
routingInfo,
+ sortCode,
status);
}
@@ -532,6 +570,7 @@ public String toString() {
"id", id,
"modifiedDate", modifiedDate,
"routingInfo", routingInfo,
+ "sortCode", sortCode,
"status", status);
}
@@ -543,7 +582,7 @@ public final static class Builder {
private String accountNumber;
- private AccountType accountType;
+ private SourceAccountV2AccountType accountType;
private BigDecimal balance;
@@ -557,6 +596,8 @@ public final static class Builder {
private Optional extends RoutingInfo> routingInfo = Optional.empty();
+ private JsonNullable sortCode = JsonNullable.undefined();
+
private JsonNullable extends SourceAccountV2Status> status = JsonNullable.undefined();
private Builder() {
@@ -596,7 +637,7 @@ public Builder accountNumber(String accountNumber) {
/**
* The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard.
*/
- public Builder accountType(AccountType accountType) {
+ public Builder accountType(SourceAccountV2AccountType accountType) {
Utils.checkNotNull(accountType, "accountType");
this.accountType = accountType;
return this;
@@ -739,6 +780,24 @@ public Builder routingInfo(Optional extends RoutingInfo> routingInfo) {
return this;
}
+ /**
+ * The sort code.
+ */
+ public Builder sortCode(String sortCode) {
+ Utils.checkNotNull(sortCode, "sortCode");
+ this.sortCode = JsonNullable.of(sortCode);
+ return this;
+ }
+
+ /**
+ * The sort code.
+ */
+ public Builder sortCode(JsonNullable sortCode) {
+ Utils.checkNotNull(sortCode, "sortCode");
+ this.sortCode = sortCode;
+ return this;
+ }
+
/**
* Status of the source account.
*/
@@ -769,6 +828,7 @@ public SourceAccountV2 build() {
id,
modifiedDate,
routingInfo,
+ sortCode,
status);
}
}
diff --git a/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountV2AccountType.java b/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountV2AccountType.java
new file mode 100644
index 00000000..2a4777f3
--- /dev/null
+++ b/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountV2AccountType.java
@@ -0,0 +1,30 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+
+package io.codat.bank_feeds.models.components;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.lang.String;
+
+/**
+ * SourceAccountV2AccountType - The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard.
+ */
+public enum SourceAccountV2AccountType {
+ CHECKING("checking"),
+ SAVINGS("savings"),
+ LOAN("loan"),
+ CREDIT_CARD("creditCard"),
+ PREPAID_CARD("prepaidCard");
+
+ @JsonValue
+ private final String value;
+
+ private SourceAccountV2AccountType(String value) {
+ this.value = value;
+ }
+
+ public String value() {
+ return value;
+ }
+}
diff --git a/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountV2Prototype.java b/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountV2Prototype.java
new file mode 100644
index 00000000..4a0e886b
--- /dev/null
+++ b/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountV2Prototype.java
@@ -0,0 +1,816 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+
+package io.codat.bank_feeds.models.components;
+
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.codat.bank_feeds.utils.Utils;
+import java.lang.Override;
+import java.lang.String;
+import java.lang.SuppressWarnings;
+import java.math.BigDecimal;
+import java.util.Objects;
+import java.util.Optional;
+import org.openapitools.jackson.nullable.JsonNullable;
+
+
+public class SourceAccountV2Prototype {
+
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("accountInfo")
+ private JsonNullable extends AccountInfo> accountInfo;
+
+ /**
+ * The bank account name.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("accountName")
+ private Optional accountName;
+
+ /**
+ * The account number.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("accountNumber")
+ private Optional accountNumber;
+
+ /**
+ * The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("accountType")
+ private Optional extends AccountType> accountType;
+
+ /**
+ * The latest balance for the bank account.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("balance")
+ private Optional extends BigDecimal> balance;
+
+ /**
+ * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+ *
+ * ## Unknown currencies
+ *
+ * In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+ *
+ * There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("currency")
+ private Optional currency;
+
+ /**
+ * Unique ID for the bank account.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("id")
+ private Optional id;
+
+ /**
+ * In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
+ *
+ * ```
+ * 2020-10-08T22:40:50Z
+ * 2021-01-01T00:00:00
+ * ```
+ *
+ *
+ *
+ * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+ *
+ * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ * - Unqualified local time: `2021-11-15T01:00:00`
+ * - UTC time offsets: `2021-11-15T01:00:00-05:00`
+ *
+ * > Time zones
+ * >
+ * > Not all dates from Codat will contain information about time zones.
+ * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("modifiedDate")
+ private Optional modifiedDate;
+
+ /**
+ * Routing information for the bank. This does not include account number.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("routingInfo")
+ private Optional extends RoutingInfo> routingInfo;
+
+ /**
+ * The sort code.
+ */
+ @JsonInclude(Include.NON_ABSENT)
+ @JsonProperty("sortCode")
+ private JsonNullable sortCode;
+
+ @JsonCreator
+ public SourceAccountV2Prototype(
+ @JsonProperty("accountInfo") JsonNullable extends AccountInfo> accountInfo,
+ @JsonProperty("accountName") Optional accountName,
+ @JsonProperty("accountNumber") Optional accountNumber,
+ @JsonProperty("accountType") Optional extends AccountType> accountType,
+ @JsonProperty("balance") Optional extends BigDecimal> balance,
+ @JsonProperty("currency") Optional currency,
+ @JsonProperty("id") Optional id,
+ @JsonProperty("modifiedDate") Optional modifiedDate,
+ @JsonProperty("routingInfo") Optional extends RoutingInfo> routingInfo,
+ @JsonProperty("sortCode") JsonNullable sortCode) {
+ Utils.checkNotNull(accountInfo, "accountInfo");
+ Utils.checkNotNull(accountName, "accountName");
+ Utils.checkNotNull(accountNumber, "accountNumber");
+ Utils.checkNotNull(accountType, "accountType");
+ Utils.checkNotNull(balance, "balance");
+ Utils.checkNotNull(currency, "currency");
+ Utils.checkNotNull(id, "id");
+ Utils.checkNotNull(modifiedDate, "modifiedDate");
+ Utils.checkNotNull(routingInfo, "routingInfo");
+ Utils.checkNotNull(sortCode, "sortCode");
+ this.accountInfo = accountInfo;
+ this.accountName = accountName;
+ this.accountNumber = accountNumber;
+ this.accountType = accountType;
+ this.balance = balance;
+ this.currency = currency;
+ this.id = id;
+ this.modifiedDate = modifiedDate;
+ this.routingInfo = routingInfo;
+ this.sortCode = sortCode;
+ }
+
+ public SourceAccountV2Prototype() {
+ this(JsonNullable.undefined(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), JsonNullable.undefined());
+ }
+
+ @SuppressWarnings("unchecked")
+ @JsonIgnore
+ public JsonNullable accountInfo() {
+ return (JsonNullable) accountInfo;
+ }
+
+ /**
+ * The bank account name.
+ */
+ @JsonIgnore
+ public Optional accountName() {
+ return accountName;
+ }
+
+ /**
+ * The account number.
+ */
+ @JsonIgnore
+ public Optional accountNumber() {
+ return accountNumber;
+ }
+
+ /**
+ * The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard.
+ */
+ @SuppressWarnings("unchecked")
+ @JsonIgnore
+ public Optional accountType() {
+ return (Optional) accountType;
+ }
+
+ /**
+ * The latest balance for the bank account.
+ */
+ @SuppressWarnings("unchecked")
+ @JsonIgnore
+ public Optional balance() {
+ return (Optional) balance;
+ }
+
+ /**
+ * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+ *
+ * ## Unknown currencies
+ *
+ * In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+ *
+ * There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ */
+ @JsonIgnore
+ public Optional currency() {
+ return currency;
+ }
+
+ /**
+ * Unique ID for the bank account.
+ */
+ @JsonIgnore
+ public Optional id() {
+ return id;
+ }
+
+ /**
+ * In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
+ *
+ * ```
+ * 2020-10-08T22:40:50Z
+ * 2021-01-01T00:00:00
+ * ```
+ *
+ *
+ *
+ * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+ *
+ * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ * - Unqualified local time: `2021-11-15T01:00:00`
+ * - UTC time offsets: `2021-11-15T01:00:00-05:00`
+ *
+ * > Time zones
+ * >
+ * > Not all dates from Codat will contain information about time zones.
+ * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ */
+ @JsonIgnore
+ public Optional modifiedDate() {
+ return modifiedDate;
+ }
+
+ /**
+ * Routing information for the bank. This does not include account number.
+ */
+ @SuppressWarnings("unchecked")
+ @JsonIgnore
+ public Optional routingInfo() {
+ return (Optional) routingInfo;
+ }
+
+ /**
+ * The sort code.
+ */
+ @JsonIgnore
+ public JsonNullable sortCode() {
+ return sortCode;
+ }
+
+ public final static Builder builder() {
+ return new Builder();
+ }
+
+ public SourceAccountV2Prototype withAccountInfo(AccountInfo accountInfo) {
+ Utils.checkNotNull(accountInfo, "accountInfo");
+ this.accountInfo = JsonNullable.of(accountInfo);
+ return this;
+ }
+
+ public SourceAccountV2Prototype withAccountInfo(JsonNullable extends AccountInfo> accountInfo) {
+ Utils.checkNotNull(accountInfo, "accountInfo");
+ this.accountInfo = accountInfo;
+ return this;
+ }
+
+ /**
+ * The bank account name.
+ */
+ public SourceAccountV2Prototype withAccountName(String accountName) {
+ Utils.checkNotNull(accountName, "accountName");
+ this.accountName = Optional.ofNullable(accountName);
+ return this;
+ }
+
+ /**
+ * The bank account name.
+ */
+ public SourceAccountV2Prototype withAccountName(Optional accountName) {
+ Utils.checkNotNull(accountName, "accountName");
+ this.accountName = accountName;
+ return this;
+ }
+
+ /**
+ * The account number.
+ */
+ public SourceAccountV2Prototype withAccountNumber(String accountNumber) {
+ Utils.checkNotNull(accountNumber, "accountNumber");
+ this.accountNumber = Optional.ofNullable(accountNumber);
+ return this;
+ }
+
+ /**
+ * The account number.
+ */
+ public SourceAccountV2Prototype withAccountNumber(Optional accountNumber) {
+ Utils.checkNotNull(accountNumber, "accountNumber");
+ this.accountNumber = accountNumber;
+ return this;
+ }
+
+ /**
+ * The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard.
+ */
+ public SourceAccountV2Prototype withAccountType(AccountType accountType) {
+ Utils.checkNotNull(accountType, "accountType");
+ this.accountType = Optional.ofNullable(accountType);
+ return this;
+ }
+
+ /**
+ * The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard.
+ */
+ public SourceAccountV2Prototype withAccountType(Optional extends AccountType> accountType) {
+ Utils.checkNotNull(accountType, "accountType");
+ this.accountType = accountType;
+ return this;
+ }
+
+ /**
+ * The latest balance for the bank account.
+ */
+ public SourceAccountV2Prototype withBalance(BigDecimal balance) {
+ Utils.checkNotNull(balance, "balance");
+ this.balance = Optional.ofNullable(balance);
+ return this;
+ }
+
+ /**
+ * The latest balance for the bank account.
+ */
+ public SourceAccountV2Prototype withBalance(double balance) {
+ this.balance = Optional.of(BigDecimal.valueOf(balance));
+ return this;
+ }
+
+ /**
+ * The latest balance for the bank account.
+ */
+ public SourceAccountV2Prototype withBalance(Optional extends BigDecimal> balance) {
+ Utils.checkNotNull(balance, "balance");
+ this.balance = balance;
+ return this;
+ }
+
+ /**
+ * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+ *
+ * ## Unknown currencies
+ *
+ * In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+ *
+ * There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ */
+ public SourceAccountV2Prototype withCurrency(String currency) {
+ Utils.checkNotNull(currency, "currency");
+ this.currency = Optional.ofNullable(currency);
+ return this;
+ }
+
+ /**
+ * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+ *
+ * ## Unknown currencies
+ *
+ * In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+ *
+ * There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ */
+ public SourceAccountV2Prototype withCurrency(Optional currency) {
+ Utils.checkNotNull(currency, "currency");
+ this.currency = currency;
+ return this;
+ }
+
+ /**
+ * Unique ID for the bank account.
+ */
+ public SourceAccountV2Prototype withId(String id) {
+ Utils.checkNotNull(id, "id");
+ this.id = Optional.ofNullable(id);
+ return this;
+ }
+
+ /**
+ * Unique ID for the bank account.
+ */
+ public SourceAccountV2Prototype withId(Optional id) {
+ Utils.checkNotNull(id, "id");
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
+ *
+ * ```
+ * 2020-10-08T22:40:50Z
+ * 2021-01-01T00:00:00
+ * ```
+ *
+ *
+ *
+ * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+ *
+ * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ * - Unqualified local time: `2021-11-15T01:00:00`
+ * - UTC time offsets: `2021-11-15T01:00:00-05:00`
+ *
+ * > Time zones
+ * >
+ * > Not all dates from Codat will contain information about time zones.
+ * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ */
+ public SourceAccountV2Prototype withModifiedDate(String modifiedDate) {
+ Utils.checkNotNull(modifiedDate, "modifiedDate");
+ this.modifiedDate = Optional.ofNullable(modifiedDate);
+ return this;
+ }
+
+ /**
+ * In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
+ *
+ * ```
+ * 2020-10-08T22:40:50Z
+ * 2021-01-01T00:00:00
+ * ```
+ *
+ *
+ *
+ * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+ *
+ * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ * - Unqualified local time: `2021-11-15T01:00:00`
+ * - UTC time offsets: `2021-11-15T01:00:00-05:00`
+ *
+ * > Time zones
+ * >
+ * > Not all dates from Codat will contain information about time zones.
+ * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ */
+ public SourceAccountV2Prototype withModifiedDate(Optional modifiedDate) {
+ Utils.checkNotNull(modifiedDate, "modifiedDate");
+ this.modifiedDate = modifiedDate;
+ return this;
+ }
+
+ /**
+ * Routing information for the bank. This does not include account number.
+ */
+ public SourceAccountV2Prototype withRoutingInfo(RoutingInfo routingInfo) {
+ Utils.checkNotNull(routingInfo, "routingInfo");
+ this.routingInfo = Optional.ofNullable(routingInfo);
+ return this;
+ }
+
+ /**
+ * Routing information for the bank. This does not include account number.
+ */
+ public SourceAccountV2Prototype withRoutingInfo(Optional extends RoutingInfo> routingInfo) {
+ Utils.checkNotNull(routingInfo, "routingInfo");
+ this.routingInfo = routingInfo;
+ return this;
+ }
+
+ /**
+ * The sort code.
+ */
+ public SourceAccountV2Prototype withSortCode(String sortCode) {
+ Utils.checkNotNull(sortCode, "sortCode");
+ this.sortCode = JsonNullable.of(sortCode);
+ return this;
+ }
+
+ /**
+ * The sort code.
+ */
+ public SourceAccountV2Prototype withSortCode(JsonNullable sortCode) {
+ Utils.checkNotNull(sortCode, "sortCode");
+ this.sortCode = sortCode;
+ return this;
+ }
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ SourceAccountV2Prototype other = (SourceAccountV2Prototype) o;
+ return
+ Objects.deepEquals(this.accountInfo, other.accountInfo) &&
+ Objects.deepEquals(this.accountName, other.accountName) &&
+ Objects.deepEquals(this.accountNumber, other.accountNumber) &&
+ Objects.deepEquals(this.accountType, other.accountType) &&
+ Objects.deepEquals(this.balance, other.balance) &&
+ Objects.deepEquals(this.currency, other.currency) &&
+ Objects.deepEquals(this.id, other.id) &&
+ Objects.deepEquals(this.modifiedDate, other.modifiedDate) &&
+ Objects.deepEquals(this.routingInfo, other.routingInfo) &&
+ Objects.deepEquals(this.sortCode, other.sortCode);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ accountInfo,
+ accountName,
+ accountNumber,
+ accountType,
+ balance,
+ currency,
+ id,
+ modifiedDate,
+ routingInfo,
+ sortCode);
+ }
+
+ @Override
+ public String toString() {
+ return Utils.toString(SourceAccountV2Prototype.class,
+ "accountInfo", accountInfo,
+ "accountName", accountName,
+ "accountNumber", accountNumber,
+ "accountType", accountType,
+ "balance", balance,
+ "currency", currency,
+ "id", id,
+ "modifiedDate", modifiedDate,
+ "routingInfo", routingInfo,
+ "sortCode", sortCode);
+ }
+
+ public final static class Builder {
+
+ private JsonNullable extends AccountInfo> accountInfo = JsonNullable.undefined();
+
+ private Optional accountName = Optional.empty();
+
+ private Optional accountNumber = Optional.empty();
+
+ private Optional extends AccountType> accountType = Optional.empty();
+
+ private Optional extends BigDecimal> balance = Optional.empty();
+
+ private Optional currency = Optional.empty();
+
+ private Optional id = Optional.empty();
+
+ private Optional modifiedDate = Optional.empty();
+
+ private Optional extends RoutingInfo> routingInfo = Optional.empty();
+
+ private JsonNullable sortCode = JsonNullable.undefined();
+
+ private Builder() {
+ // force use of static builder() method
+ }
+
+ public Builder accountInfo(AccountInfo accountInfo) {
+ Utils.checkNotNull(accountInfo, "accountInfo");
+ this.accountInfo = JsonNullable.of(accountInfo);
+ return this;
+ }
+
+ public Builder accountInfo(JsonNullable extends AccountInfo> accountInfo) {
+ Utils.checkNotNull(accountInfo, "accountInfo");
+ this.accountInfo = accountInfo;
+ return this;
+ }
+
+ /**
+ * The bank account name.
+ */
+ public Builder accountName(String accountName) {
+ Utils.checkNotNull(accountName, "accountName");
+ this.accountName = Optional.ofNullable(accountName);
+ return this;
+ }
+
+ /**
+ * The bank account name.
+ */
+ public Builder accountName(Optional accountName) {
+ Utils.checkNotNull(accountName, "accountName");
+ this.accountName = accountName;
+ return this;
+ }
+
+ /**
+ * The account number.
+ */
+ public Builder accountNumber(String accountNumber) {
+ Utils.checkNotNull(accountNumber, "accountNumber");
+ this.accountNumber = Optional.ofNullable(accountNumber);
+ return this;
+ }
+
+ /**
+ * The account number.
+ */
+ public Builder accountNumber(Optional accountNumber) {
+ Utils.checkNotNull(accountNumber, "accountNumber");
+ this.accountNumber = accountNumber;
+ return this;
+ }
+
+ /**
+ * The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard.
+ */
+ public Builder accountType(AccountType accountType) {
+ Utils.checkNotNull(accountType, "accountType");
+ this.accountType = Optional.ofNullable(accountType);
+ return this;
+ }
+
+ /**
+ * The type of bank account e.g. checking, savings, loan, creditCard, prepaidCard.
+ */
+ public Builder accountType(Optional extends AccountType> accountType) {
+ Utils.checkNotNull(accountType, "accountType");
+ this.accountType = accountType;
+ return this;
+ }
+
+ /**
+ * The latest balance for the bank account.
+ */
+ public Builder balance(BigDecimal balance) {
+ Utils.checkNotNull(balance, "balance");
+ this.balance = Optional.ofNullable(balance);
+ return this;
+ }
+
+ /**
+ * The latest balance for the bank account.
+ */
+ public Builder balance(double balance) {
+ this.balance = Optional.of(BigDecimal.valueOf(balance));
+ return this;
+ }
+
+ /**
+ * The latest balance for the bank account.
+ */
+ public Builder balance(Optional extends BigDecimal> balance) {
+ Utils.checkNotNull(balance, "balance");
+ this.balance = balance;
+ return this;
+ }
+
+ /**
+ * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+ *
+ * ## Unknown currencies
+ *
+ * In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+ *
+ * There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ */
+ public Builder currency(String currency) {
+ Utils.checkNotNull(currency, "currency");
+ this.currency = Optional.ofNullable(currency);
+ return this;
+ }
+
+ /**
+ * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.
+ *
+ * ## Unknown currencies
+ *
+ * In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.
+ *
+ * There are only a very small number of edge cases where this currency code is returned by the Codat system.
+ */
+ public Builder currency(Optional currency) {
+ Utils.checkNotNull(currency, "currency");
+ this.currency = currency;
+ return this;
+ }
+
+ /**
+ * Unique ID for the bank account.
+ */
+ public Builder id(String id) {
+ Utils.checkNotNull(id, "id");
+ this.id = Optional.ofNullable(id);
+ return this;
+ }
+
+ /**
+ * Unique ID for the bank account.
+ */
+ public Builder id(Optional id) {
+ Utils.checkNotNull(id, "id");
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
+ *
+ * ```
+ * 2020-10-08T22:40:50Z
+ * 2021-01-01T00:00:00
+ * ```
+ *
+ *
+ *
+ * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+ *
+ * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ * - Unqualified local time: `2021-11-15T01:00:00`
+ * - UTC time offsets: `2021-11-15T01:00:00-05:00`
+ *
+ * > Time zones
+ * >
+ * > Not all dates from Codat will contain information about time zones.
+ * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ */
+ public Builder modifiedDate(String modifiedDate) {
+ Utils.checkNotNull(modifiedDate, "modifiedDate");
+ this.modifiedDate = Optional.ofNullable(modifiedDate);
+ return this;
+ }
+
+ /**
+ * In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
+ *
+ * ```
+ * 2020-10-08T22:40:50Z
+ * 2021-01-01T00:00:00
+ * ```
+ *
+ *
+ *
+ * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:
+ *
+ * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
+ * - Unqualified local time: `2021-11-15T01:00:00`
+ * - UTC time offsets: `2021-11-15T01:00:00-05:00`
+ *
+ * > Time zones
+ * >
+ * > Not all dates from Codat will contain information about time zones.
+ * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced.
+ */
+ public Builder modifiedDate(Optional modifiedDate) {
+ Utils.checkNotNull(modifiedDate, "modifiedDate");
+ this.modifiedDate = modifiedDate;
+ return this;
+ }
+
+ /**
+ * Routing information for the bank. This does not include account number.
+ */
+ public Builder routingInfo(RoutingInfo routingInfo) {
+ Utils.checkNotNull(routingInfo, "routingInfo");
+ this.routingInfo = Optional.ofNullable(routingInfo);
+ return this;
+ }
+
+ /**
+ * Routing information for the bank. This does not include account number.
+ */
+ public Builder routingInfo(Optional extends RoutingInfo> routingInfo) {
+ Utils.checkNotNull(routingInfo, "routingInfo");
+ this.routingInfo = routingInfo;
+ return this;
+ }
+
+ /**
+ * The sort code.
+ */
+ public Builder sortCode(String sortCode) {
+ Utils.checkNotNull(sortCode, "sortCode");
+ this.sortCode = JsonNullable.of(sortCode);
+ return this;
+ }
+
+ /**
+ * The sort code.
+ */
+ public Builder sortCode(JsonNullable sortCode) {
+ Utils.checkNotNull(sortCode, "sortCode");
+ this.sortCode = sortCode;
+ return this;
+ }
+
+ public SourceAccountV2Prototype build() {
+ return new SourceAccountV2Prototype(
+ accountInfo,
+ accountName,
+ accountNumber,
+ accountType,
+ balance,
+ currency,
+ id,
+ modifiedDate,
+ routingInfo,
+ sortCode);
+ }
+ }
+}
+
diff --git a/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountWebhookPayload.java b/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountWebhookPayload.java
index 7d2f6f3d..8b0764d7 100644
--- a/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountWebhookPayload.java
+++ b/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountWebhookPayload.java
@@ -38,19 +38,16 @@ public class SourceAccountWebhookPayload {
@JsonProperty("referenceCompany")
private Optional extends CompanyReference> referenceCompany;
- /**
- * The target bank account in a supported accounting software for ingestion into a bank feed.
- */
@JsonInclude(Include.NON_ABSENT)
@JsonProperty("sourceAccount")
- private Optional extends SourceAccount> sourceAccount;
+ private Optional extends SourceAccountWebhookPayloadSourceAccount> sourceAccount;
@JsonCreator
public SourceAccountWebhookPayload(
@JsonProperty("companyId") Optional companyId,
@JsonProperty("connectionId") Optional connectionId,
@JsonProperty("referenceCompany") Optional extends CompanyReference> referenceCompany,
- @JsonProperty("sourceAccount") Optional extends SourceAccount> sourceAccount) {
+ @JsonProperty("sourceAccount") Optional extends SourceAccountWebhookPayloadSourceAccount> sourceAccount) {
Utils.checkNotNull(companyId, "companyId");
Utils.checkNotNull(connectionId, "connectionId");
Utils.checkNotNull(referenceCompany, "referenceCompany");
@@ -87,13 +84,10 @@ public Optional referenceCompany() {
return (Optional) referenceCompany;
}
- /**
- * The target bank account in a supported accounting software for ingestion into a bank feed.
- */
@SuppressWarnings("unchecked")
@JsonIgnore
- public Optional sourceAccount() {
- return (Optional) sourceAccount;
+ public Optional sourceAccount() {
+ return (Optional) sourceAccount;
}
public final static Builder builder() {
@@ -148,19 +142,13 @@ public SourceAccountWebhookPayload withReferenceCompany(Optional extends Compa
return this;
}
- /**
- * The target bank account in a supported accounting software for ingestion into a bank feed.
- */
- public SourceAccountWebhookPayload withSourceAccount(SourceAccount sourceAccount) {
+ public SourceAccountWebhookPayload withSourceAccount(SourceAccountWebhookPayloadSourceAccount sourceAccount) {
Utils.checkNotNull(sourceAccount, "sourceAccount");
this.sourceAccount = Optional.ofNullable(sourceAccount);
return this;
}
- /**
- * The target bank account in a supported accounting software for ingestion into a bank feed.
- */
- public SourceAccountWebhookPayload withSourceAccount(Optional extends SourceAccount> sourceAccount) {
+ public SourceAccountWebhookPayload withSourceAccount(Optional extends SourceAccountWebhookPayloadSourceAccount> sourceAccount) {
Utils.checkNotNull(sourceAccount, "sourceAccount");
this.sourceAccount = sourceAccount;
return this;
@@ -208,7 +196,7 @@ public final static class Builder {
private Optional extends CompanyReference> referenceCompany = Optional.empty();
- private Optional extends SourceAccount> sourceAccount = Optional.empty();
+ private Optional extends SourceAccountWebhookPayloadSourceAccount> sourceAccount = Optional.empty();
private Builder() {
// force use of static builder() method
@@ -262,19 +250,13 @@ public Builder referenceCompany(Optional extends CompanyReference> referenceCo
return this;
}
- /**
- * The target bank account in a supported accounting software for ingestion into a bank feed.
- */
- public Builder sourceAccount(SourceAccount sourceAccount) {
+ public Builder sourceAccount(SourceAccountWebhookPayloadSourceAccount sourceAccount) {
Utils.checkNotNull(sourceAccount, "sourceAccount");
this.sourceAccount = Optional.ofNullable(sourceAccount);
return this;
}
- /**
- * The target bank account in a supported accounting software for ingestion into a bank feed.
- */
- public Builder sourceAccount(Optional extends SourceAccount> sourceAccount) {
+ public Builder sourceAccount(Optional extends SourceAccountWebhookPayloadSourceAccount> sourceAccount) {
Utils.checkNotNull(sourceAccount, "sourceAccount");
this.sourceAccount = sourceAccount;
return this;
diff --git a/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountWebhookPayloadSourceAccount.java b/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountWebhookPayloadSourceAccount.java
new file mode 100644
index 00000000..d529ba5d
--- /dev/null
+++ b/bank-feeds/src/main/java/io/codat/bank_feeds/models/components/SourceAccountWebhookPayloadSourceAccount.java
@@ -0,0 +1,97 @@
+/*
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
+ */
+
+package io.codat.bank_feeds.models.components;
+
+
+import com.fasterxml.jackson.annotation.JsonValue;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import io.codat.bank_feeds.utils.OneOfDeserializer;
+import io.codat.bank_feeds.utils.TypedObject;
+import io.codat.bank_feeds.utils.Utils.JsonShape;
+import io.codat.bank_feeds.utils.Utils.TypeReferenceWithShape;
+import io.codat.bank_feeds.utils.Utils;
+import java.lang.Override;
+import java.lang.String;
+import java.lang.SuppressWarnings;
+import java.util.Objects;
+
+
+@JsonDeserialize(using = SourceAccountWebhookPayloadSourceAccount._Deserializer.class)
+public class SourceAccountWebhookPayloadSourceAccount {
+
+ @JsonValue
+ private TypedObject value;
+
+ private SourceAccountWebhookPayloadSourceAccount(TypedObject value) {
+ this.value = value;
+ }
+
+ public static SourceAccountWebhookPayloadSourceAccount of(SourceAccountV2 value) {
+ Utils.checkNotNull(value, "value");
+ return new SourceAccountWebhookPayloadSourceAccount(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){}));
+ }
+
+ public static SourceAccountWebhookPayloadSourceAccount of(SourceAccount value) {
+ Utils.checkNotNull(value, "value");
+ return new SourceAccountWebhookPayloadSourceAccount(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference(){}));
+ }
+
+ /**
+ * Returns an instance of one of these types:
+ *