diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 4808d97d..b29b3b64 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "5.1.0"
+ ".": "5.2.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index c28b601a..20d5e414 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 45
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-bf858f37d7ab420841ddc6329dad8c46377308b6a5c8e935908011d0f9845e22.yml
-openapi_spec_hash: 2523952a32436e3c7fd3b55508c2e7ee
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-ff61a38530dfae03860bceb49379e84bfc7434eeb5d2f1dc9677cb162014faf1.yml
+openapi_spec_hash: df3bdaf4acf575bb07767cae7ca24d69
config_hash: 53778a0b839c4f6ad34fbba051f5e8a6
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1ab14aa2..787dc0a3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 5.2.0 (2025-04-12)
+
+Full Changelog: [v5.1.0...v5.2.0](https://github.com/Finch-API/finch-api-java/compare/v5.1.0...v5.2.0)
+
+### Features
+
+* **api:** api update ([544560e](https://github.com/Finch-API/finch-api-java/commit/544560e359f1a248bda35b6d076f0711bcec181b))
+
## 5.1.0 (2025-04-11)
Full Changelog: [v5.0.0...v5.1.0](https://github.com/Finch-API/finch-api-java/compare/v5.0.0...v5.1.0)
diff --git a/README.md b/README.md
index 687c0836..853a43cd 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.tryfinch.api/finch-java/5.1.0)
-[](https://javadoc.io/doc/com.tryfinch.api/finch-java/5.1.0)
+[](https://central.sonatype.com/artifact/com.tryfinch.api/finch-java/5.2.0)
+[](https://javadoc.io/doc/com.tryfinch.api/finch-java/5.2.0)
@@ -15,7 +15,7 @@ It is generated with [Stainless](https://www.stainless.com/).
-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).
+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).
@@ -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:5.1.0")
+implementation("com.tryfinch.api:finch-java:5.2.0")
```
### Maven
@@ -35,7 +35,7 @@ implementation("com.tryfinch.api:finch-java:5.1.0")
com.tryfinch.api
finch-java
- 5.1.0
+ 5.2.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index a52f35b7..35c07cc3 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.tryfinch.api"
- version = "5.1.0" // x-release-please-version
+ version = "5.2.0" // x-release-please-version
}
subprojects {
diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Introspection.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Introspection.kt
index bf5a6265..54135794 100644
--- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Introspection.kt
+++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Introspection.kt
@@ -23,6 +23,7 @@ import kotlin.jvm.optionals.getOrNull
class Introspection
private constructor(
+ private val id: JsonField,
private val accountId: JsonField,
private val authenticationMethods: JsonField>,
private val clientId: JsonField,
@@ -44,6 +45,7 @@ private constructor(
@JsonCreator
private constructor(
+ @JsonProperty("id") @ExcludeMissing id: JsonField = JsonMissing.of(),
@JsonProperty("account_id") @ExcludeMissing accountId: JsonField = JsonMissing.of(),
@JsonProperty("authentication_methods")
@ExcludeMissing
@@ -83,6 +85,7 @@ private constructor(
providerId: JsonField = JsonMissing.of(),
@JsonProperty("username") @ExcludeMissing username: JsonField = JsonMissing.of(),
) : this(
+ id,
accountId,
authenticationMethods,
clientId,
@@ -102,6 +105,14 @@ private constructor(
mutableMapOf(),
)
+ /**
+ * The Finch UUID of the token being introspected.
+ *
+ * @throws FinchInvalidDataException if the JSON field has an unexpected type or is unexpectedly
+ * missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun id(): String = id.getRequired("id")
+
/**
* [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection instead of this
* account ID.
@@ -236,6 +247,13 @@ private constructor(
*/
fun username(): String = username.getRequired("username")
+ /**
+ * Returns the raw JSON value of [id].
+ *
+ * Unlike [id], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
+
/**
* Returns the raw JSON value of [accountId].
*
@@ -393,6 +411,7 @@ private constructor(
*
* The following fields are required:
* ```java
+ * .id()
* .accountId()
* .authenticationMethods()
* .clientId()
@@ -417,6 +436,7 @@ private constructor(
/** A builder for [Introspection]. */
class Builder internal constructor() {
+ private var id: JsonField? = null
private var accountId: JsonField? = null
private var authenticationMethods: JsonField>? = null
private var clientId: JsonField? = null
@@ -437,6 +457,7 @@ private constructor(
@JvmSynthetic
internal fun from(introspection: Introspection) = apply {
+ id = introspection.id
accountId = introspection.accountId
authenticationMethods = introspection.authenticationMethods.map { it.toMutableList() }
clientId = introspection.clientId
@@ -456,6 +477,17 @@ private constructor(
additionalProperties = introspection.additionalProperties.toMutableMap()
}
+ /** The Finch UUID of the token being introspected. */
+ fun id(id: String) = id(JsonField.of(id))
+
+ /**
+ * Sets [Builder.id] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.id] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun id(id: JsonField) = apply { this.id = id }
+
/**
* [DEPRECATED] Use `connection_id` to associate tokens with a Finch connection instead of
* this account ID.
@@ -756,6 +788,7 @@ private constructor(
*
* The following fields are required:
* ```java
+ * .id()
* .accountId()
* .authenticationMethods()
* .clientId()
@@ -778,6 +811,7 @@ private constructor(
*/
fun build(): Introspection =
Introspection(
+ checkRequired("id", id),
checkRequired("accountId", accountId),
checkRequired("authenticationMethods", authenticationMethods).map {
it.toImmutable()
@@ -807,6 +841,7 @@ private constructor(
return@apply
}
+ id()
accountId()
authenticationMethods().forEach { it.validate() }
clientId()
@@ -841,7 +876,8 @@ private constructor(
*/
@JvmSynthetic
internal fun validity(): Int =
- (if (accountId.asKnown().isPresent) 1 else 0) +
+ (if (id.asKnown().isPresent) 1 else 0) +
+ (if (accountId.asKnown().isPresent) 1 else 0) +
(authenticationMethods.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
(if (clientId.asKnown().isPresent) 1 else 0) +
(clientType.asKnown().getOrNull()?.validity() ?: 0) +
@@ -1913,15 +1949,15 @@ private constructor(
return true
}
- 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 */
+ 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 */
}
/* spotless:off */
- 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) }
+ 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) }
/* spotless:on */
override fun hashCode(): Int = hashCode
override fun toString() =
- "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}"
+ "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}"
}
diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IntrospectionTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IntrospectionTest.kt
index 6b07ebce..79792152 100644
--- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IntrospectionTest.kt
+++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IntrospectionTest.kt
@@ -14,6 +14,7 @@ internal class IntrospectionTest {
fun create() {
val introspection =
Introspection.builder()
+ .id("id")
.accountId("account_id")
.addAuthenticationMethod(
Introspection.AuthenticationMethod.builder()
@@ -49,6 +50,7 @@ internal class IntrospectionTest {
.username("username")
.build()
+ assertThat(introspection.id()).isEqualTo("id")
assertThat(introspection.accountId()).isEqualTo("account_id")
assertThat(introspection.authenticationMethods())
.containsExactly(
@@ -91,6 +93,7 @@ internal class IntrospectionTest {
val jsonMapper = jsonMapper()
val introspection =
Introspection.builder()
+ .id("id")
.accountId("account_id")
.addAuthenticationMethod(
Introspection.AuthenticationMethod.builder()