Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions docs/auth-flow/optimize/connection-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,25 +120,6 @@ if accessTokenReq.StatusCode == 200 {

</TabItem>

<TabItem value="java" label="Java">

```java
GetConnectionManagementAccessTokenRequest accessTokenReq = GetConnectionManagementAccessTokenRequest.builder()
.companyId(companyId)
.build();

GetConnectionManagementAccessTokenResponse accessTokenRes = platformClient.connectionManagement().getAccessToken()
.request(accessTokenReq)
.call();

if (accessTokenRes.connectionManagementAccessToken().isPresent()) {
accessToken = companyResponse.connectionManagementAccessToken().get().accessToken;
System.out.println(accessToken);
}
```

</TabItem>

</Tabs>

Pass the token to the Connections component so that we can get the company-specific information and display it in the UI. We summarized this process on the diagram:
Expand Down
23 changes: 0 additions & 23 deletions docs/bank-feeds/create-account.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,29 +417,6 @@ sourceAccountResponse, err := bankFeedsClient.SourceAccounts.Create(ctx, operati

</TabItem>

<TabItem value="java" label="Java">

```java
CreateSourceAccountRequest req = CreateSourceAccountRequest.builder()
.requestBody(CreateSourceAccountRequestBody.of(SourceAccountV2.builder()
.id("ac-001")
.accountName("Checking Account")
.accountType(AccountType.LOAN)
.accountNumber("01120912")
.currency("USD")
.balance(new BigDecimal("4002"))
.build()))
.companyId(companyId)
.connectionId(connectionId)
.build();

CreateSourceAccountResponse res = bankFeedsClient.sourceAccounts().create()
.request(req)
.call();
```

</TabItem>

</Tabs>

Once the source account is successfully created, guide your customer through the **mapping process** to associate it with a corresponding target account in their accounting software. The account will stay in a `pending` status until that happens, and it must change to `linked` before you can successfully transmit any bank transactions.
Expand Down
2 changes: 1 addition & 1 deletion docs/lending/guides/loan-writeback/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This solution covers the loan writeback procedure for both general lending, such

Deploy your loan writeback solution quicker by using our Lending SDK to integrate directly with our API. The loan writeback namespace includes all the methods you need to develop your loan writeback solution.

Check out our SDKs for [TypeScript](https://github.com/codatio/client-sdk-typescript/tree/main/lending#loanwriteback), [Python](https://github.com/codatio/client-sdk-python/tree/main/lending#loan_writeback), [C#](https://github.com/codatio/client-sdk-csharp/tree/main/lending#loanwriteback), [Go](https://github.com/codatio/client-sdk-go/tree/main/lending#loanwriteback), and [Java](https://github.com/codatio/client-sdk-java/tree/main/lending#loanwriteback).
Check out our SDKs for [TypeScript](https://github.com/codatio/client-sdk-typescript/tree/main/lending#loanwriteback), [Python](https://github.com/codatio/client-sdk-python/tree/main/lending#loan_writeback), [C#](https://github.com/codatio/client-sdk-csharp/tree/main/lending#loanwriteback), and [Go](https://github.com/codatio/client-sdk-go/tree/main/lending#loanwriteback).

:::

Expand Down
117 changes: 0 additions & 117 deletions docs/lending/guides/loan-writeback/record-general-loan.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,40 +183,6 @@ transfersCreateResponse, err := codatLending.LoanWriteback.Transfers.Create(ctx,

</TabItem>

<TabItem value="java" label="Java">

```java
CreateTransferRequest req = CreateTransferRequest.builder()
.companyId(companyId)
.connectionId(connectionId)
.accountingTransfer(AccountingTransfer.builder()
.date(repaymentDate)
.from(TransferAccount.builder()
.accountRef(AccountRef.builder()
.id(borrowersBankAccount.id)
.build()
)
.amount(totalRepaymentAmount)
.currency(borrowersBankAccount.currency)
.build())
.to(TransferAccount.builder()
.accountRef(AccountRef.builder()
.id(lendersBankAccountId)
.build()
)
.amount(totalRepaymentAmount)
.currency(borrowersBankAccount.currency)
.build())
.build())
.build();

CreateTransferResponse res = codatLending.loanWriteback().transfers().create()
.request(req)
.call();
```

</TabItem>

<TabItem value="http" label="HTTP">

```http
Expand Down Expand Up @@ -437,62 +403,6 @@ res, err := codatLending.LoanWriteback.DirectCosts.Create(ctx, operations.Create

</TabItem>

<TabItem value="java" label="Java">

```java
CreateDirectCostRequest req = CreateDirectCostRequest.builder()
.companyId(companyId)
.connectionId(connectionId)
.directCostPrototype(DirectCostPrototype.builder()
contactRef(ContactRef.builder()
.dataType("suppliers")
.id(supplier.Id)
.build()
)
.currency(borrowersBankAccount.currency)
.issueDate(repaymentDate)
.lineItems(List.of(
DirectCostLineItem.builder()
.accountRef(AccountRef.builder()
.id(expenseAccount.Id)
.build()
)
.description("Fees and/or interest")
.quantity(new BigDecimal("1"))

.taxAmount(new BigDecimal("0"))
.unitAmount(new BigDecimal(interestAndFeesAmount))
.build()
)
)
.paymentAllocations(List.of(
AccountingPaymentAllocation.builder()
.allocation(Allocation.builder()
.totalAmount(new BigDecimal(interestAndFeesAmount))
.build()
)
.payment(PaymentAllocationPayment.builder()
.accountRef(AccountRef.builder()
.id(expenseAccount.Id)
.build()
)
.build()
)
.build()
)
)
.taxAmount(new BigDecimal("0"))
.totalAmount(new BigDecimal(interestAndFeesAmount))
.build())
.build();

CreateDirectCostResponse res = codatLending.loanWriteback().directCosts().create()
.request(req)
.call();
```

</TabItem>

<TabItem value="http" label="HTTP">

```http
Expand Down Expand Up @@ -641,33 +551,6 @@ bankTransactionsCreateRequest, err := codatLending.LoanWriteback.BankTransaction

</TabItem>

<TabItem value="java" label="Java">

```java
CreateBankTransactionsRequest req = CreateBankTransactionsRequest.builder()
.companyId(companyId)
.connectionId(connectionId)
.accountId(lendersBankAccountId)
.accountingCreateBankTransactions(AccountingCreateBankTransactions.builder()
.accountId(lendersBankAccountId)
.transactions(List.of(
CreateBankAccountTransaction.builder()
.id(transactionID) // Unique identifier for this bank transaction
.amount(new BigDecimal(totalRepaymentAmount))
.date(repaymentDate)
.description(description) // Include a reference to the direct cost, the loan and you, the lender
.build()))
.build())
.build();

CreateBankTransactionsResponse res = codatLending.loanWriteback().bankTransactions().create()
.request(req)
.call();

```

</TabItem>

<TabItem value="http" label="HTTP">

```http
Expand Down
84 changes: 0 additions & 84 deletions docs/using-the-api/managing-companies.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,25 +97,6 @@ if companyCreatedRes.Company != nil {

</TabItem>

<TabItem value="java" label="Java">

```go
CompanyRequestBody req = CompanyRequestBody.builder()
.name("Toft stores")
.description("Need a loan for refurb.")
.build();

CreateCompanyResponse companyCreatedRes = platformClient.companies().create()
.request(req)
.call();

if (companyCreatedRes.company().isPresent()) {
// handle response
}
```

</TabItem>

</Tabs>

:::caution Retain the company ID
Expand Down Expand Up @@ -228,30 +209,6 @@ if companyCreatedRes.Company != nil {

</TabItem>

<TabItem value="java" label="Java">

```java
CompanyRequestBody req = CompanyRequestBody.builder()
.name("Toft stores")
.tags(
java.util.Map.ofEntries(
entry("uid", "cust_1MtJUT2eZvKYlo2CNaw2HvEv"),
entry("region", "uk")
)
)
.build();

CreateCompanyResponse companyCreatedRes = platformClient.companies().create()
.request(req)
.call();

if (companyCreatedRes.company().isPresent()) {
// handle response
}
```

</TabItem>

</Tabs>

</TabItem>
Expand Down Expand Up @@ -352,33 +309,6 @@ if companyUpdatedRes.Company != nil {

</TabItem>

<TabItem value="java" label="Java">

```java
UpdateCompanyRequest req = UpdateCompanyRequest.builder()
.companyId("8a210b68-6988-11ed-a1eb-0242ac120002")
.companyRequestBody(CompanyRequestBody.builder()
.name("Bank of Dave")
.tags(
java.util.Map.ofEntries(
entry("uid", "cust_1MtJUT2eZvKYlo2CNaw2HvEv"),
entry("region", "uk")
)
).build()
)
.build();

UpdateCompanyResponse companyUpdatedRes = platformClient.companies().update()
.request(req)
.call();

if (companyUpdatedRes.company().isPresent()) {
// handle response
}
```

</TabItem>

</Tabs>

</TabItem>
Expand Down Expand Up @@ -444,20 +374,6 @@ res, err := platformClient.Companies.List(ctx, operations.ListCompaniesRequest{

</TabItem>

<TabItem value="java" label="Java">

```java
ListCompaniesRequest req = ListCompaniesRequest.builder()
.tags(String.format("uid=%d", customerId))
.build();

ListCompaniesResponse res = platformClient.companies().list()
.request(req)
.call();
```

</TabItem>

</Tabs>

### Authorize access to company data
Expand Down
45 changes: 0 additions & 45 deletions docs/using-the-api/push.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,51 +345,6 @@ accountCreateResponse, err := expensesClient.Accounts.Create(ctx, operations.Cre
</Tabs>
</TabItem>

<TabItem value="java" label="Java">
<Tabs>
<TabItem value="wo" label="Create an account">

```java
CreateAccountRequest accountCreateRequest = CreateAccountRequest.builder()
.companyId(companyId)
.connectionId(connectionId)
.accountPrototype(AccountPrototype.builder()
.nominalCode("4200123456")
.name("Codat Assets Account")
.fullyQualifiedCategory("Asset.Current")
.build())
.build();

CreateAccountResponse accountCreateResponse = expensesClient.accounts().create()
.request(accountCreateRequest)
.call();
```

</TabItem>

<TabItem value="with" label="Create an account with an error">

```java
CreateAccountRequest accountCreateRequest = CreateAccountRequest.builder()
.companyId(companyId)
.connectionId(connectionId)
.accountPrototype(AccountPrototype.builder()
.nominalCode("350045006500") // Nominal code intentionally consists of too many characters
.name("Excessive Length Account")
.fullyQualifiedCategory("Asset.Current")
.build())
.build();

CreateAccountResponse accountCreateResponse = expensesClient.accounts().create()
.request(accountCreateRequest)
.call();
```

</TabItem>

</Tabs>
</TabItem>

</Tabs>

This results in a corresponding response from the endpoint, which includes the following details:
Expand Down
22 changes: 0 additions & 22 deletions docs/using-the-api/upload-attachments.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,28 +119,6 @@ uploadAttachmentResponse, err := sdk.Bills.UploadAttachment(ctx, operations.Uplo

</TabItem>

<TabItem value="java" label="Java">

```java
UploadBillAttachmentRequest uploadAttachmentRequest = UploadBillAttachmentRequest.builder()
.companyId(companyId)
.connectionId(connectionId)
.billId(billId)
.attachmentUpload(AttachmentUpload.builder()
.file(CodatFile.builder()
.content(fileContent.getBytes())
.fileName(fileName)
.build())
.build())
.build();

UploadBillAttachmentResponse uploadAttachmentResponse = sdk.bills().uploadAttachment()
.request(uploadAttachmentRequest)
.call();
```

</TabItem>

</Tabs>

### Consume the write webhook
Expand Down
Loading
Loading