Skip to content

Commit 6ead207

Browse files
release: 5.2.0 (#542)
* feat(api): api update * release: 5.2.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent c5d8f38 commit 6ead207

File tree

7 files changed

+60
-13
lines changed

7 files changed

+60
-13
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "5.1.0"
2+
".": "5.2.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 45
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-bf858f37d7ab420841ddc6329dad8c46377308b6a5c8e935908011d0f9845e22.yml
3-
openapi_spec_hash: 2523952a32436e3c7fd3b55508c2e7ee
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-ff61a38530dfae03860bceb49379e84bfc7434eeb5d2f1dc9677cb162014faf1.yml
3+
openapi_spec_hash: df3bdaf4acf575bb07767cae7ca24d69
44
config_hash: 53778a0b839c4f6ad34fbba051f5e8a6

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 5.2.0 (2025-04-12)
4+
5+
Full Changelog: [v5.1.0...v5.2.0](https://github.com/Finch-API/finch-api-java/compare/v5.1.0...v5.2.0)
6+
7+
### Features
8+
9+
* **api:** api update ([544560e](https://github.com/Finch-API/finch-api-java/commit/544560e359f1a248bda35b6d076f0711bcec181b))
10+
311
## 5.1.0 (2025-04-11)
412

513
Full Changelog: [v5.0.0...v5.1.0](https://github.com/Finch-API/finch-api-java/compare/v5.0.0...v5.1.0)

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

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

5-
[![Maven Central](https://img.shields.io/maven-central/v/com.tryfinch.api/finch-java)](https://central.sonatype.com/artifact/com.tryfinch.api/finch-java/5.1.0)
6-
[![javadoc](https://javadoc.io/badge2/com.tryfinch.api/finch-java/5.1.0/javadoc.svg)](https://javadoc.io/doc/com.tryfinch.api/finch-java/5.1.0)
5+
[![Maven Central](https://img.shields.io/maven-central/v/com.tryfinch.api/finch-java)](https://central.sonatype.com/artifact/com.tryfinch.api/finch-java/5.2.0)
6+
[![javadoc](https://javadoc.io/badge2/com.tryfinch.api/finch-java/5.2.0/javadoc.svg)](https://javadoc.io/doc/com.tryfinch.api/finch-java/5.2.0)
77

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

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

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

18-
The REST API documentation can be found on [developer.tryfinch.com](https://developer.tryfinch.com/). Javadocs are also available on [javadoc.io](https://javadoc.io/doc/com.tryfinch.api/finch-java/5.1.0).
18+
The REST API documentation can be found on [developer.tryfinch.com](https://developer.tryfinch.com/). Javadocs are also available on [javadoc.io](https://javadoc.io/doc/com.tryfinch.api/finch-java/5.2.0).
1919

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

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

2828
```kotlin
29-
implementation("com.tryfinch.api:finch-java:5.1.0")
29+
implementation("com.tryfinch.api:finch-java:5.2.0")
3030
```
3131

3232
### Maven
@@ -35,7 +35,7 @@ implementation("com.tryfinch.api:finch-java:5.1.0")
3535
<dependency>
3636
<groupId>com.tryfinch.api</groupId>
3737
<artifactId>finch-java</artifactId>
38-
<version>5.1.0</version>
38+
<version>5.2.0</version>
3939
</dependency>
4040
```
4141

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repositories {
88

99
allprojects {
1010
group = "com.tryfinch.api"
11-
version = "5.1.0" // x-release-please-version
11+
version = "5.2.0" // x-release-please-version
1212
}
1313

1414
subprojects {

finch-java-core/src/main/kotlin/com/tryfinch/api/models/Introspection.kt

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import kotlin.jvm.optionals.getOrNull
2323

2424
class Introspection
2525
private constructor(
26+
private val id: JsonField<String>,
2627
private val accountId: JsonField<String>,
2728
private val authenticationMethods: JsonField<List<AuthenticationMethod>>,
2829
private val clientId: JsonField<String>,
@@ -44,6 +45,7 @@ private constructor(
4445

4546
@JsonCreator
4647
private constructor(
48+
@JsonProperty("id") @ExcludeMissing id: JsonField<String> = JsonMissing.of(),
4749
@JsonProperty("account_id") @ExcludeMissing accountId: JsonField<String> = JsonMissing.of(),
4850
@JsonProperty("authentication_methods")
4951
@ExcludeMissing
@@ -83,6 +85,7 @@ private constructor(
8385
providerId: JsonField<String> = JsonMissing.of(),
8486
@JsonProperty("username") @ExcludeMissing username: JsonField<String> = JsonMissing.of(),
8587
) : this(
88+
id,
8689
accountId,
8790
authenticationMethods,
8891
clientId,
@@ -102,6 +105,14 @@ private constructor(
102105
mutableMapOf(),
103106
)
104107

108+
/**
109+
* The Finch UUID of the token being introspected.
110+
*
111+
* @throws FinchInvalidDataException if the JSON field has an unexpected type or is unexpectedly
112+
* missing or null (e.g. if the server responded with an unexpected value).
113+
*/
114+
fun id(): String = id.getRequired("id")
115+
105116
/**
106117
* [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection instead of this
107118
* account ID.
@@ -236,6 +247,13 @@ private constructor(
236247
*/
237248
fun username(): String = username.getRequired("username")
238249

250+
/**
251+
* Returns the raw JSON value of [id].
252+
*
253+
* Unlike [id], this method doesn't throw if the JSON field has an unexpected type.
254+
*/
255+
@JsonProperty("id") @ExcludeMissing fun _id(): JsonField<String> = id
256+
239257
/**
240258
* Returns the raw JSON value of [accountId].
241259
*
@@ -393,6 +411,7 @@ private constructor(
393411
*
394412
* The following fields are required:
395413
* ```java
414+
* .id()
396415
* .accountId()
397416
* .authenticationMethods()
398417
* .clientId()
@@ -417,6 +436,7 @@ private constructor(
417436
/** A builder for [Introspection]. */
418437
class Builder internal constructor() {
419438

439+
private var id: JsonField<String>? = null
420440
private var accountId: JsonField<String>? = null
421441
private var authenticationMethods: JsonField<MutableList<AuthenticationMethod>>? = null
422442
private var clientId: JsonField<String>? = null
@@ -437,6 +457,7 @@ private constructor(
437457

438458
@JvmSynthetic
439459
internal fun from(introspection: Introspection) = apply {
460+
id = introspection.id
440461
accountId = introspection.accountId
441462
authenticationMethods = introspection.authenticationMethods.map { it.toMutableList() }
442463
clientId = introspection.clientId
@@ -456,6 +477,17 @@ private constructor(
456477
additionalProperties = introspection.additionalProperties.toMutableMap()
457478
}
458479

480+
/** The Finch UUID of the token being introspected. */
481+
fun id(id: String) = id(JsonField.of(id))
482+
483+
/**
484+
* Sets [Builder.id] to an arbitrary JSON value.
485+
*
486+
* You should usually call [Builder.id] with a well-typed [String] value instead. This
487+
* method is primarily for setting the field to an undocumented or not yet supported value.
488+
*/
489+
fun id(id: JsonField<String>) = apply { this.id = id }
490+
459491
/**
460492
* [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection instead of
461493
* this account ID.
@@ -756,6 +788,7 @@ private constructor(
756788
*
757789
* The following fields are required:
758790
* ```java
791+
* .id()
759792
* .accountId()
760793
* .authenticationMethods()
761794
* .clientId()
@@ -778,6 +811,7 @@ private constructor(
778811
*/
779812
fun build(): Introspection =
780813
Introspection(
814+
checkRequired("id", id),
781815
checkRequired("accountId", accountId),
782816
checkRequired("authenticationMethods", authenticationMethods).map {
783817
it.toImmutable()
@@ -807,6 +841,7 @@ private constructor(
807841
return@apply
808842
}
809843

844+
id()
810845
accountId()
811846
authenticationMethods().forEach { it.validate() }
812847
clientId()
@@ -841,7 +876,8 @@ private constructor(
841876
*/
842877
@JvmSynthetic
843878
internal fun validity(): Int =
844-
(if (accountId.asKnown().isPresent) 1 else 0) +
879+
(if (id.asKnown().isPresent) 1 else 0) +
880+
(if (accountId.asKnown().isPresent) 1 else 0) +
845881
(authenticationMethods.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
846882
(if (clientId.asKnown().isPresent) 1 else 0) +
847883
(clientType.asKnown().getOrNull()?.validity() ?: 0) +
@@ -1913,15 +1949,15 @@ private constructor(
19131949
return true
19141950
}
19151951

1916-
return /* spotless:off */ other is Introspection && accountId == other.accountId && authenticationMethods == other.authenticationMethods && clientId == other.clientId && clientType == other.clientType && companyId == other.companyId && connectionId == other.connectionId && connectionStatus == other.connectionStatus && connectionType == other.connectionType && customerEmail == other.customerEmail && customerId == other.customerId && customerName == other.customerName && manual == other.manual && payrollProviderId == other.payrollProviderId && products == other.products && providerId == other.providerId && username == other.username && additionalProperties == other.additionalProperties /* spotless:on */
1952+
return /* spotless:off */ other is Introspection && id == other.id && accountId == other.accountId && authenticationMethods == other.authenticationMethods && clientId == other.clientId && clientType == other.clientType && companyId == other.companyId && connectionId == other.connectionId && connectionStatus == other.connectionStatus && connectionType == other.connectionType && customerEmail == other.customerEmail && customerId == other.customerId && customerName == other.customerName && manual == other.manual && payrollProviderId == other.payrollProviderId && products == other.products && providerId == other.providerId && username == other.username && additionalProperties == other.additionalProperties /* spotless:on */
19171953
}
19181954

19191955
/* spotless:off */
1920-
private val hashCode: Int by lazy { Objects.hash(accountId, authenticationMethods, clientId, clientType, companyId, connectionId, connectionStatus, connectionType, customerEmail, customerId, customerName, manual, payrollProviderId, products, providerId, username, additionalProperties) }
1956+
private val hashCode: Int by lazy { Objects.hash(id, accountId, authenticationMethods, clientId, clientType, companyId, connectionId, connectionStatus, connectionType, customerEmail, customerId, customerName, manual, payrollProviderId, products, providerId, username, additionalProperties) }
19211957
/* spotless:on */
19221958

19231959
override fun hashCode(): Int = hashCode
19241960

19251961
override fun toString() =
1926-
"Introspection{accountId=$accountId, authenticationMethods=$authenticationMethods, clientId=$clientId, clientType=$clientType, companyId=$companyId, connectionId=$connectionId, connectionStatus=$connectionStatus, connectionType=$connectionType, customerEmail=$customerEmail, customerId=$customerId, customerName=$customerName, manual=$manual, payrollProviderId=$payrollProviderId, products=$products, providerId=$providerId, username=$username, additionalProperties=$additionalProperties}"
1962+
"Introspection{id=$id, accountId=$accountId, authenticationMethods=$authenticationMethods, clientId=$clientId, clientType=$clientType, companyId=$companyId, connectionId=$connectionId, connectionStatus=$connectionStatus, connectionType=$connectionType, customerEmail=$customerEmail, customerId=$customerId, customerName=$customerName, manual=$manual, payrollProviderId=$payrollProviderId, products=$products, providerId=$providerId, username=$username, additionalProperties=$additionalProperties}"
19271963
}

finch-java-core/src/test/kotlin/com/tryfinch/api/models/IntrospectionTest.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ internal class IntrospectionTest {
1414
fun create() {
1515
val introspection =
1616
Introspection.builder()
17+
.id("id")
1718
.accountId("account_id")
1819
.addAuthenticationMethod(
1920
Introspection.AuthenticationMethod.builder()
@@ -49,6 +50,7 @@ internal class IntrospectionTest {
4950
.username("username")
5051
.build()
5152

53+
assertThat(introspection.id()).isEqualTo("id")
5254
assertThat(introspection.accountId()).isEqualTo("account_id")
5355
assertThat(introspection.authenticationMethods())
5456
.containsExactly(
@@ -91,6 +93,7 @@ internal class IntrospectionTest {
9193
val jsonMapper = jsonMapper()
9294
val introspection =
9395
Introspection.builder()
96+
.id("id")
9497
.accountId("account_id")
9598
.addAuthenticationMethod(
9699
Introspection.AuthenticationMethod.builder()

0 commit comments

Comments
 (0)