Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ec2fe8b
chore(docs): grammar improvements
stainless-app[bot] May 21, 2025
ad3d78f
feat(api): api update
stainless-app[bot] May 22, 2025
d06d641
feat(api): api update
stainless-app[bot] May 22, 2025
3bf7c83
codegen metadata
stainless-app[bot] May 23, 2025
4cda84c
codegen metadata
stainless-app[bot] May 23, 2025
8cfd398
codegen metadata
stainless-app[bot] May 27, 2025
b0f69c4
codegen metadata
stainless-app[bot] May 27, 2025
6c2f07f
chore(tests): skip endpoints with basic auth
stainless-app[bot] May 28, 2025
17cef16
fix(client): remove `@MustBeClosed` for future returning methods
stainless-app[bot] May 29, 2025
1d74258
fix(client): `hasNextPage` impl for some classes
stainless-app[bot] Jun 2, 2025
6e3128c
fix(client): fix PayStatementResponse body
stainless-app[bot] Jun 4, 2025
d6b79ed
fix(client): update pagination
stainless-app[bot] Jun 4, 2025
66732fc
codegen metadata
stainless-app[bot] Jun 4, 2025
ec234c1
chore(internal): codegen related update
stainless-app[bot] Jun 10, 2025
85f964f
feat(api): api update
stainless-app[bot] Jun 11, 2025
ba2711a
feat(api): api update
stainless-app[bot] Jun 11, 2025
9b313e8
feat(client): implement per-endpoint base URL support
stainless-app[bot] Jun 11, 2025
a6d2027
feat(client): add a `withOptions` method
stainless-app[bot] Jun 13, 2025
d88d4b3
chore(ci): enable for pull requests
stainless-app[bot] Jun 17, 2025
c2130c2
fix(client): bump max requests per host to max requests (5 -> 64)
stainless-app[bot] Jun 23, 2025
9ec953f
fix(ci): release-doctor — report correct token name
stainless-app[bot] Jun 26, 2025
65d0eb9
chore(ci): only run for pushes and fork pull requests
stainless-app[bot] Jun 27, 2025
f16754f
fix(client): don't close client on `withOptions` usage when original …
stainless-app[bot] Jun 29, 2025
459de5c
refactor(internal): minor `ClientOptionsTest` change
stainless-app[bot] Jun 30, 2025
2040de9
fix: missing baseUrl call
TomerAberbach Jul 2, 2025
0657c13
release: 7.3.0
stainless-app[bot] Jul 2, 2025
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
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ on:
- 'integrated/**'
- 'stl-preview-head/**'
- 'stl-preview-base/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
- 'stl-preview-base/**'

jobs:
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/finch-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork

steps:
- uses: actions/checkout@v4
Expand All @@ -35,6 +40,7 @@ jobs:
timeout-minutes: 10
name: test
runs-on: ${{ github.repository == 'stainless-sdks/finch-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "7.2.0"
".": "7.3.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 45
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-944a0f9d35f3b8ec2ba62fa12e551cf89f0b845f8ed1e3c7f67a9fb80b32d96f.yml
openapi_spec_hash: 37c849e7b5dd941c011385b49467e077
config_hash: 53778a0b839c4f6ad34fbba051f5e8a6
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-f7e741bc6e0175fd96a9db5348092b90a77b0985154c0814bb681ad5dccdf19a.yml
openapi_spec_hash: b348a9ef407a8e91dd770fcb219d4ac5
config_hash: 5146b12344dae76238940989dac1e8a0
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
# Changelog

## 7.3.0 (2025-07-02)

Full Changelog: [v7.2.0...v7.3.0](https://github.com/Finch-API/finch-api-java/compare/v7.2.0...v7.3.0)

### Features

* **api:** api update ([ba2711a](https://github.com/Finch-API/finch-api-java/commit/ba2711a7466433c91cafd023ab09a29dda400322))
* **api:** api update ([85f964f](https://github.com/Finch-API/finch-api-java/commit/85f964f88bf80872817b2eff4e8a1017a9fabb4e))
* **api:** api update ([d06d641](https://github.com/Finch-API/finch-api-java/commit/d06d641383d5b756ed558ce9dc23382995855b97))
* **api:** api update ([ad3d78f](https://github.com/Finch-API/finch-api-java/commit/ad3d78f6515a72e9bc485e5eb9a5dfd98e8cd3d9))
* **client:** add a `withOptions` method ([a6d2027](https://github.com/Finch-API/finch-api-java/commit/a6d2027c37a9dcf2582041bfa003b3d52a2699f4))
* **client:** implement per-endpoint base URL support ([9b313e8](https://github.com/Finch-API/finch-api-java/commit/9b313e857a753068e492ffc9fd8a2a9022664ac9))


### Bug Fixes

* **ci:** release-doctor — report correct token name ([9ec953f](https://github.com/Finch-API/finch-api-java/commit/9ec953ffd3bc6c481f8b426db00fdee0364f737f))
* **client:** `hasNextPage` impl for some classes ([1d74258](https://github.com/Finch-API/finch-api-java/commit/1d74258cd7af29bab12fa98e22201fdd736ff70e))
* **client:** bump max requests per host to max requests (5 -> 64) ([c2130c2](https://github.com/Finch-API/finch-api-java/commit/c2130c25fe4053c6d85800dbf4e00935b85ff293))
* **client:** don't close client on `withOptions` usage when original is gc'd ([f16754f](https://github.com/Finch-API/finch-api-java/commit/f16754fba73202a310517fafa12da662f70030e2))
* **client:** fix PayStatementResponse body ([6e3128c](https://github.com/Finch-API/finch-api-java/commit/6e3128c15c5554728a0a1ab30f52458031d52f6c))
* **client:** remove `@MustBeClosed` for future returning methods ([17cef16](https://github.com/Finch-API/finch-api-java/commit/17cef164e3b1da2ee49ed2c8e134bc3b2ff22e18))
* **client:** update pagination ([d6b79ed](https://github.com/Finch-API/finch-api-java/commit/d6b79edb8319349a9b1141eb686f1e72b45929aa))
* missing baseUrl call ([2040de9](https://github.com/Finch-API/finch-api-java/commit/2040de9e68d7b36faf74855e99b3e6d2d960cf7b))


### Chores

* **ci:** enable for pull requests ([d88d4b3](https://github.com/Finch-API/finch-api-java/commit/d88d4b39718a89f914aa89ad944d67eabb833f7a))
* **ci:** only run for pushes and fork pull requests ([65d0eb9](https://github.com/Finch-API/finch-api-java/commit/65d0eb99b3b44fca36f3b1598911b242f1405ef0))
* **docs:** grammar improvements ([ec2fe8b](https://github.com/Finch-API/finch-api-java/commit/ec2fe8b45c5898aee580617acbce9364802647be))
* **internal:** codegen related update ([ec234c1](https://github.com/Finch-API/finch-api-java/commit/ec234c1c781c1453c7cea59e897420e0b820a15b))
* **tests:** skip endpoints with basic auth ([6c2f07f](https://github.com/Finch-API/finch-api-java/commit/6c2f07f7ce293abdf78dd6584111eb1fcb6b7b52))


### Refactors

* **internal:** minor `ClientOptionsTest` change ([459de5c](https://github.com/Finch-API/finch-api-java/commit/459de5c5529c89b73febf0d0b30c12d46d314460))

## 7.2.0 (2025-05-16)

Full Changelog: [v7.1.0...v7.2.0](https://github.com/Finch-API/finch-api-java/compare/v7.1.0...v7.2.0)
Expand Down
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<!-- x-release-please-start-version -->

[![Maven Central](https://img.shields.io/maven-central/v/com.tryfinch.api/finch-java)](https://central.sonatype.com/artifact/com.tryfinch.api/finch-java/7.2.0)
[![javadoc](https://javadoc.io/badge2/com.tryfinch.api/finch-java/7.2.0/javadoc.svg)](https://javadoc.io/doc/com.tryfinch.api/finch-java/7.2.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.tryfinch.api/finch-java)](https://central.sonatype.com/artifact/com.tryfinch.api/finch-java/7.3.0)
[![javadoc](https://javadoc.io/badge2/com.tryfinch.api/finch-java/7.3.0/javadoc.svg)](https://javadoc.io/doc/com.tryfinch.api/finch-java/7.3.0)

<!-- x-release-please-end -->

Expand All @@ -15,7 +15,7 @@ It is generated with [Stainless](https://www.stainless.com/).

<!-- x-release-please-start-version -->

The REST API documentation can be found on [developer.tryfinch.com](https://developer.tryfinch.com/). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.tryfinch.api/finch-java/7.2.0).
The REST API documentation can be found on [developer.tryfinch.com](https://developer.tryfinch.com/). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.tryfinch.api/finch-java/7.3.0).

<!-- x-release-please-end -->

Expand All @@ -26,7 +26,7 @@ The REST API documentation can be found on [developer.tryfinch.com](https://deve
### Gradle

```kotlin
implementation("com.tryfinch.api:finch-java:7.2.0")
implementation("com.tryfinch.api:finch-java:7.3.0")
```

### Maven
Expand All @@ -35,7 +35,7 @@ implementation("com.tryfinch.api:finch-java:7.2.0")
<dependency>
<groupId>com.tryfinch.api</groupId>
<artifactId>finch-java</artifactId>
<version>7.2.0</version>
<version>7.3.0</version>
</dependency>
```

Expand Down Expand Up @@ -114,6 +114,21 @@ See this table for the available options:
> Don't create more than one client in the same application. Each client has a connection pool and
> thread pools, which are more efficient to share between requests.

### Modifying configuration

To temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:

```java
import com.tryfinch.api.client.FinchClient;

FinchClient clientWithOptions = client.withOptions(optionsBuilder -> {
optionsBuilder.baseUrl("https://example.com");
optionsBuilder.maxRetries(42);
});
```

The `withOptions()` method does not affect the original client or service.

## Requests and responses

To send a request to the Finch API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Java class.
Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ before making any information public.
## Reporting Non-SDK Related Security Issues

If you encounter security issues that are not directly related to SDKs but pertain to the services
or products provided by Finch please follow the respective company's security reporting guidelines.
or products provided by Finch, please follow the respective company's security reporting guidelines.

### Finch Terms and Policies

Please contact founders@tryfinch.com for any questions or concerns regarding security of our services.
Please contact founders@tryfinch.com for any questions or concerns regarding the security of our services.

---

Expand Down
8 changes: 4 additions & 4 deletions bin/check-release-environment
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
errors=()

if [ -z "${SONATYPE_USERNAME}" ]; then
errors+=("The FINCH_SONATYPE_USERNAME secret has not been set. Please set it in either this repository's secrets or your organization secrets")
errors+=("The SONATYPE_USERNAME secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi

if [ -z "${SONATYPE_PASSWORD}" ]; then
errors+=("The FINCH_SONATYPE_PASSWORD secret has not been set. Please set it in either this repository's secrets or your organization secrets")
errors+=("The SONATYPE_PASSWORD secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi

if [ -z "${GPG_SIGNING_KEY}" ]; then
errors+=("The FINCH_SONATYPE_GPG_SIGNING_KEY secret has not been set. Please set it in either this repository's secrets or your organization secrets")
errors+=("The GPG_SIGNING_KEY secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi

if [ -z "${GPG_SIGNING_PASSWORD}" ]; then
errors+=("The FINCH_SONATYPE_GPG_SIGNING_PASSWORD secret has not been set. Please set it in either this repository's secrets or your organization secrets")
errors+=("The GPG_SIGNING_PASSWORD secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi

lenErrors=${#errors[@]}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {

allprojects {
group = "com.tryfinch.api"
version = "7.2.0" // x-release-please-version
version = "7.3.0" // x-release-please-version
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,7 @@ class FinchOkHttpClient private constructor() {
fun build(): FinchClient =
FinchClientImpl(
clientOptions
.httpClient(
OkHttpClient.builder()
.baseUrl(clientOptions.baseUrl())
.timeout(timeout)
.proxy(proxy)
.build()
)
.httpClient(OkHttpClient.builder().timeout(timeout).proxy(proxy).build())
.build()
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,7 @@ class FinchOkHttpClientAsync private constructor() {
fun build(): FinchClientAsync =
FinchClientAsyncImpl(
clientOptions
.httpClient(
OkHttpClient.builder()
.baseUrl(clientOptions.baseUrl())
.timeout(timeout)
.proxy(proxy)
.build()
)
.httpClient(OkHttpClient.builder().timeout(timeout).proxy(proxy).build())
.build()
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.tryfinch.api.client.okhttp

import com.tryfinch.api.core.RequestOptions
import com.tryfinch.api.core.Timeout
import com.tryfinch.api.core.checkRequired
import com.tryfinch.api.core.http.Headers
import com.tryfinch.api.core.http.HttpClient
import com.tryfinch.api.core.http.HttpMethod
Expand All @@ -17,7 +16,6 @@ import java.time.Duration
import java.util.concurrent.CompletableFuture
import okhttp3.Call
import okhttp3.Callback
import okhttp3.HttpUrl
import okhttp3.HttpUrl.Companion.toHttpUrl
import okhttp3.MediaType
import okhttp3.MediaType.Companion.toMediaType
Expand All @@ -28,8 +26,7 @@ import okhttp3.Response
import okhttp3.logging.HttpLoggingInterceptor
import okio.BufferedSink

class OkHttpClient
private constructor(private val okHttpClient: okhttp3.OkHttpClient, private val baseUrl: HttpUrl) :
class OkHttpClient private constructor(private val okHttpClient: okhttp3.OkHttpClient) :
HttpClient {

override fun execute(request: HttpRequest, requestOptions: RequestOptions): HttpResponse {
Expand Down Expand Up @@ -140,11 +137,7 @@ private constructor(private val okHttpClient: okhttp3.OkHttpClient, private val
}

private fun HttpRequest.toUrl(): String {
url?.let {
return it
}

val builder = baseUrl.newBuilder()
val builder = baseUrl.toHttpUrl().newBuilder()
pathSegments.forEach(builder::addPathSegment)
queryParams.keys().forEach { key ->
queryParams.values(key).forEach { builder.addQueryParameter(key, it) }
Expand Down Expand Up @@ -194,12 +187,9 @@ private constructor(private val okHttpClient: okhttp3.OkHttpClient, private val

class Builder internal constructor() {

private var baseUrl: HttpUrl? = null
private var timeout: Timeout = Timeout.default()
private var proxy: Proxy? = null

fun baseUrl(baseUrl: String) = apply { this.baseUrl = baseUrl.toHttpUrl() }

fun timeout(timeout: Timeout) = apply { this.timeout = timeout }

fun timeout(timeout: Duration) = timeout(Timeout.builder().request(timeout).build())
Expand All @@ -214,8 +204,12 @@ private constructor(private val okHttpClient: okhttp3.OkHttpClient, private val
.writeTimeout(timeout.write())
.callTimeout(timeout.request())
.proxy(proxy)
.build(),
checkRequired("baseUrl", baseUrl),
.build()
.apply {
// We usually make all our requests to the same host so it makes sense to
// raise the per-host limit to the overall limit.
dispatcher.maxRequestsPerHost = dispatcher.maxRequests
}
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package com.tryfinch.api.client

import com.fasterxml.jackson.annotation.JsonProperty
import com.tryfinch.api.core.ClientOptions
import com.tryfinch.api.services.blocking.AccessTokenService
import com.tryfinch.api.services.blocking.AccountService
import com.tryfinch.api.services.blocking.ConnectService
Expand All @@ -13,6 +14,7 @@ import com.tryfinch.api.services.blocking.ProviderService
import com.tryfinch.api.services.blocking.RequestForwardingService
import com.tryfinch.api.services.blocking.SandboxService
import com.tryfinch.api.services.blocking.WebhookService
import java.util.function.Consumer

/**
* A client for interacting with the Finch REST API synchronously. You can also switch to
Expand Down Expand Up @@ -43,6 +45,13 @@ interface FinchClient {
*/
fun withRawResponse(): WithRawResponse

/**
* Returns a view of this service with the given option modifications applied.
*
* The original service is not modified.
*/
fun withOptions(modifier: Consumer<ClientOptions.Builder>): FinchClient

fun accessTokens(): AccessTokenService

fun hris(): HrisService
Expand Down Expand Up @@ -109,6 +118,13 @@ interface FinchClient {
/** A view of [FinchClient] that provides access to raw HTTP responses for each method. */
interface WithRawResponse {

/**
* Returns a view of this service with the given option modifications applied.
*
* The original service is not modified.
*/
fun withOptions(modifier: Consumer<ClientOptions.Builder>): FinchClient.WithRawResponse

fun accessTokens(): AccessTokenService.WithRawResponse

fun hris(): HrisService.WithRawResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package com.tryfinch.api.client

import com.fasterxml.jackson.annotation.JsonProperty
import com.tryfinch.api.core.ClientOptions
import com.tryfinch.api.services.async.AccessTokenServiceAsync
import com.tryfinch.api.services.async.AccountServiceAsync
import com.tryfinch.api.services.async.ConnectServiceAsync
Expand All @@ -14,6 +15,7 @@ import com.tryfinch.api.services.async.RequestForwardingServiceAsync
import com.tryfinch.api.services.async.SandboxServiceAsync
import com.tryfinch.api.services.async.WebhookServiceAsync
import java.util.concurrent.CompletableFuture
import java.util.function.Consumer

/**
* A client for interacting with the Finch REST API asynchronously. You can also switch to
Expand Down Expand Up @@ -44,6 +46,13 @@ interface FinchClientAsync {
*/
fun withRawResponse(): WithRawResponse

/**
* Returns a view of this service with the given option modifications applied.
*
* The original service is not modified.
*/
fun withOptions(modifier: Consumer<ClientOptions.Builder>): FinchClientAsync

fun accessTokens(): AccessTokenServiceAsync

fun hris(): HrisServiceAsync
Expand Down Expand Up @@ -110,6 +119,13 @@ interface FinchClientAsync {
/** A view of [FinchClientAsync] that provides access to raw HTTP responses for each method. */
interface WithRawResponse {

/**
* Returns a view of this service with the given option modifications applied.
*
* The original service is not modified.
*/
fun withOptions(modifier: Consumer<ClientOptions.Builder>): FinchClientAsync.WithRawResponse

fun accessTokens(): AccessTokenServiceAsync.WithRawResponse

fun hris(): HrisServiceAsync.WithRawResponse
Expand Down
Loading