diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 68764d436..2ba52d0aa 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.308.0"
+ ".": "0.309.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 160b294b4..7d655a6dd 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 216
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a6d99e6e3e405acf3e592e273aa1c5d519ed4f1157d0f87f1dcf21e7710f59b5.yml
-openapi_spec_hash: f1f21c7331c905f2e5549978454059dc
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7d240ad280fc9ed22a8bbe219835ed737b075963291d84b75efbbb38195eff8b.yml
+openapi_spec_hash: f2a2cad4f01bf5ab66e1f3dcb719315a
config_hash: 632b628b59d8f0b717153b3d8133f6cb
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 75d9fbf1d..53ef5e5b7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.309.0 (2025-08-29)
+
+Full Changelog: [v0.308.0...v0.309.0](https://github.com/Increase/increase-java/compare/v0.308.0...v0.309.0)
+
+### Features
+
+* **api:** api update ([fef001c](https://github.com/Increase/increase-java/commit/fef001cf2d2bcd435c4a7e1866e707d4df13574e))
+
## 0.308.0 (2025-08-28)
Full Changelog: [v0.307.0...v0.308.0](https://github.com/Increase/increase-java/compare/v0.307.0...v0.308.0)
diff --git a/README.md b/README.md
index c93b6eeb6..85f5868bc 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.308.0)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.308.0)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.309.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.309.0)
@@ -13,7 +13,7 @@ The Increase Java SDK is similar to the Increase Kotlin SDK but with minor diffe
-The REST API documentation can be found on [increase.com](https://increase.com/documentation). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.increase.api/increase-java/0.308.0).
+The REST API documentation can be found on [increase.com](https://increase.com/documentation). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.increase.api/increase-java/0.309.0).
@@ -24,7 +24,7 @@ The REST API documentation can be found on [increase.com](https://increase.com/d
### Gradle
```kotlin
-implementation("com.increase.api:increase-java:0.308.0")
+implementation("com.increase.api:increase-java:0.309.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.308.0")
com.increase.api
increase-java
- 0.308.0
+ 0.309.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index de32f5afe..01a1385c3 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.308.0" // x-release-please-version
+ version = "0.309.0" // x-release-please-version
}
subprojects {
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/simulations/inboundcheckdeposits/InboundCheckDepositCreateParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/simulations/inboundcheckdeposits/InboundCheckDepositCreateParams.kt
index 1d39d808f..b0f57f3fd 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/simulations/inboundcheckdeposits/InboundCheckDepositCreateParams.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/simulations/inboundcheckdeposits/InboundCheckDepositCreateParams.kt
@@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonAnySetter
import com.fasterxml.jackson.annotation.JsonCreator
import com.fasterxml.jackson.annotation.JsonProperty
+import com.increase.api.core.Enum
import com.increase.api.core.ExcludeMissing
import com.increase.api.core.JsonField
import com.increase.api.core.JsonMissing
@@ -17,6 +18,8 @@ import com.increase.api.core.http.QueryParams
import com.increase.api.errors.IncreaseInvalidDataException
import java.util.Collections
import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
/**
* Simulates an Inbound Check Deposit against your account. This imitates someone depositing a check
@@ -56,6 +59,16 @@ private constructor(
*/
fun checkNumber(): String = body.checkNumber()
+ /**
+ * Simulate the outcome of
+ * [payee name checking](https://increase.com/documentation/positive-pay#payee-name-mismatches).
+ * Defaults to `not_evaluated`.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun payeeNameAnalysis(): Optional = body.payeeNameAnalysis()
+
/**
* Returns the raw JSON value of [accountNumberId].
*
@@ -77,6 +90,14 @@ private constructor(
*/
fun _checkNumber(): JsonField = body._checkNumber()
+ /**
+ * Returns the raw JSON value of [payeeNameAnalysis].
+ *
+ * Unlike [payeeNameAnalysis], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ fun _payeeNameAnalysis(): JsonField = body._payeeNameAnalysis()
+
fun _additionalBodyProperties(): Map = body._additionalProperties()
/** Additional headers to send with the request. */
@@ -127,6 +148,7 @@ private constructor(
* - [accountNumberId]
* - [amount]
* - [checkNumber]
+ * - [payeeNameAnalysis]
*/
fun body(body: Body) = apply { this.body = body.toBuilder() }
@@ -169,6 +191,26 @@ private constructor(
*/
fun checkNumber(checkNumber: JsonField) = apply { body.checkNumber(checkNumber) }
+ /**
+ * Simulate the outcome of
+ * [payee name checking](https://increase.com/documentation/positive-pay#payee-name-mismatches).
+ * Defaults to `not_evaluated`.
+ */
+ fun payeeNameAnalysis(payeeNameAnalysis: PayeeNameAnalysis) = apply {
+ body.payeeNameAnalysis(payeeNameAnalysis)
+ }
+
+ /**
+ * Sets [Builder.payeeNameAnalysis] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.payeeNameAnalysis] with a well-typed [PayeeNameAnalysis]
+ * value instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun payeeNameAnalysis(payeeNameAnalysis: JsonField) = apply {
+ body.payeeNameAnalysis(payeeNameAnalysis)
+ }
+
fun additionalBodyProperties(additionalBodyProperties: Map) = apply {
body.additionalProperties(additionalBodyProperties)
}
@@ -319,6 +361,7 @@ private constructor(
private val accountNumberId: JsonField,
private val amount: JsonField,
private val checkNumber: JsonField,
+ private val payeeNameAnalysis: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -331,7 +374,10 @@ private constructor(
@JsonProperty("check_number")
@ExcludeMissing
checkNumber: JsonField = JsonMissing.of(),
- ) : this(accountNumberId, amount, checkNumber, mutableMapOf())
+ @JsonProperty("payee_name_analysis")
+ @ExcludeMissing
+ payeeNameAnalysis: JsonField = JsonMissing.of(),
+ ) : this(accountNumberId, amount, checkNumber, payeeNameAnalysis, mutableMapOf())
/**
* The identifier of the Account Number the Inbound Check Deposit will be against.
@@ -357,6 +403,17 @@ private constructor(
*/
fun checkNumber(): String = checkNumber.getRequired("check_number")
+ /**
+ * Simulate the outcome of
+ * [payee name checking](https://increase.com/documentation/positive-pay#payee-name-mismatches).
+ * Defaults to `not_evaluated`.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun payeeNameAnalysis(): Optional =
+ payeeNameAnalysis.getOptional("payee_name_analysis")
+
/**
* Returns the raw JSON value of [accountNumberId].
*
@@ -383,6 +440,16 @@ private constructor(
@ExcludeMissing
fun _checkNumber(): JsonField = checkNumber
+ /**
+ * Returns the raw JSON value of [payeeNameAnalysis].
+ *
+ * Unlike [payeeNameAnalysis], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("payee_name_analysis")
+ @ExcludeMissing
+ fun _payeeNameAnalysis(): JsonField = payeeNameAnalysis
+
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -416,6 +483,7 @@ private constructor(
private var accountNumberId: JsonField? = null
private var amount: JsonField? = null
private var checkNumber: JsonField? = null
+ private var payeeNameAnalysis: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -423,6 +491,7 @@ private constructor(
accountNumberId = body.accountNumberId
amount = body.amount
checkNumber = body.checkNumber
+ payeeNameAnalysis = body.payeeNameAnalysis
additionalProperties = body.additionalProperties.toMutableMap()
}
@@ -467,6 +536,25 @@ private constructor(
this.checkNumber = checkNumber
}
+ /**
+ * Simulate the outcome of
+ * [payee name checking](https://increase.com/documentation/positive-pay#payee-name-mismatches).
+ * Defaults to `not_evaluated`.
+ */
+ fun payeeNameAnalysis(payeeNameAnalysis: PayeeNameAnalysis) =
+ payeeNameAnalysis(JsonField.of(payeeNameAnalysis))
+
+ /**
+ * Sets [Builder.payeeNameAnalysis] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.payeeNameAnalysis] with a well-typed
+ * [PayeeNameAnalysis] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun payeeNameAnalysis(payeeNameAnalysis: JsonField) = apply {
+ this.payeeNameAnalysis = payeeNameAnalysis
+ }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -505,6 +593,7 @@ private constructor(
checkRequired("accountNumberId", accountNumberId),
checkRequired("amount", amount),
checkRequired("checkNumber", checkNumber),
+ payeeNameAnalysis,
additionalProperties.toMutableMap(),
)
}
@@ -519,6 +608,7 @@ private constructor(
accountNumberId()
amount()
checkNumber()
+ payeeNameAnalysis().ifPresent { it.validate() }
validated = true
}
@@ -540,7 +630,8 @@ private constructor(
internal fun validity(): Int =
(if (accountNumberId.asKnown().isPresent) 1 else 0) +
(if (amount.asKnown().isPresent) 1 else 0) +
- (if (checkNumber.asKnown().isPresent) 1 else 0)
+ (if (checkNumber.asKnown().isPresent) 1 else 0) +
+ (payeeNameAnalysis.asKnown().getOrNull()?.validity() ?: 0)
override fun equals(other: Any?): Boolean {
if (this === other) {
@@ -551,17 +642,175 @@ private constructor(
accountNumberId == other.accountNumberId &&
amount == other.amount &&
checkNumber == other.checkNumber &&
+ payeeNameAnalysis == other.payeeNameAnalysis &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
- Objects.hash(accountNumberId, amount, checkNumber, additionalProperties)
+ Objects.hash(
+ accountNumberId,
+ amount,
+ checkNumber,
+ payeeNameAnalysis,
+ additionalProperties,
+ )
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "Body{accountNumberId=$accountNumberId, amount=$amount, checkNumber=$checkNumber, additionalProperties=$additionalProperties}"
+ "Body{accountNumberId=$accountNumberId, amount=$amount, checkNumber=$checkNumber, payeeNameAnalysis=$payeeNameAnalysis, additionalProperties=$additionalProperties}"
+ }
+
+ /**
+ * Simulate the outcome of
+ * [payee name checking](https://increase.com/documentation/positive-pay#payee-name-mismatches).
+ * Defaults to `not_evaluated`.
+ */
+ class PayeeNameAnalysis @JsonCreator private constructor(private val value: JsonField) :
+ Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ /** The details on the check match the recipient name of the check transfer. */
+ @JvmField val NAME_MATCHES = of("name_matches")
+
+ /** The details on the check do not match the recipient name of the check transfer. */
+ @JvmField val DOES_NOT_MATCH = of("does_not_match")
+
+ /** The payee name analysis was not evaluated. */
+ @JvmField val NOT_EVALUATED = of("not_evaluated")
+
+ @JvmStatic fun of(value: String) = PayeeNameAnalysis(JsonField.of(value))
+ }
+
+ /** An enum containing [PayeeNameAnalysis]'s known values. */
+ enum class Known {
+ /** The details on the check match the recipient name of the check transfer. */
+ NAME_MATCHES,
+ /** The details on the check do not match the recipient name of the check transfer. */
+ DOES_NOT_MATCH,
+ /** The payee name analysis was not evaluated. */
+ NOT_EVALUATED,
+ }
+
+ /**
+ * An enum containing [PayeeNameAnalysis]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [PayeeNameAnalysis] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ /** The details on the check match the recipient name of the check transfer. */
+ NAME_MATCHES,
+ /** The details on the check do not match the recipient name of the check transfer. */
+ DOES_NOT_MATCH,
+ /** The payee name analysis was not evaluated. */
+ NOT_EVALUATED,
+ /**
+ * An enum member indicating that [PayeeNameAnalysis] was instantiated with an unknown
+ * value.
+ */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ fun value(): Value =
+ when (this) {
+ NAME_MATCHES -> Value.NAME_MATCHES
+ DOES_NOT_MATCH -> Value.DOES_NOT_MATCH
+ NOT_EVALUATED -> Value.NOT_EVALUATED
+ else -> Value._UNKNOWN
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws IncreaseInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ fun known(): Known =
+ when (this) {
+ NAME_MATCHES -> Known.NAME_MATCHES
+ DOES_NOT_MATCH -> Known.DOES_NOT_MATCH
+ NOT_EVALUATED -> Known.NOT_EVALUATED
+ else -> throw IncreaseInvalidDataException("Unknown PayeeNameAnalysis: $value")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws IncreaseInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow {
+ IncreaseInvalidDataException("Value is not a String")
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): PayeeNameAnalysis = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: IncreaseInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is PayeeNameAnalysis && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
}
override fun equals(other: Any?): Boolean {
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/simulations/inboundcheckdeposits/InboundCheckDepositCreateParamsTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/simulations/inboundcheckdeposits/InboundCheckDepositCreateParamsTest.kt
index 3403f9c87..4bd9444b3 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/simulations/inboundcheckdeposits/InboundCheckDepositCreateParamsTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/simulations/inboundcheckdeposits/InboundCheckDepositCreateParamsTest.kt
@@ -13,11 +13,31 @@ internal class InboundCheckDepositCreateParamsTest {
.accountNumberId("account_number_v18nkfqm6afpsrvy82b2")
.amount(1000L)
.checkNumber("1234567890")
+ .payeeNameAnalysis(InboundCheckDepositCreateParams.PayeeNameAnalysis.NAME_MATCHES)
.build()
}
@Test
fun body() {
+ val params =
+ InboundCheckDepositCreateParams.builder()
+ .accountNumberId("account_number_v18nkfqm6afpsrvy82b2")
+ .amount(1000L)
+ .checkNumber("1234567890")
+ .payeeNameAnalysis(InboundCheckDepositCreateParams.PayeeNameAnalysis.NAME_MATCHES)
+ .build()
+
+ val body = params._body()
+
+ assertThat(body.accountNumberId()).isEqualTo("account_number_v18nkfqm6afpsrvy82b2")
+ assertThat(body.amount()).isEqualTo(1000L)
+ assertThat(body.checkNumber()).isEqualTo("1234567890")
+ assertThat(body.payeeNameAnalysis())
+ .contains(InboundCheckDepositCreateParams.PayeeNameAnalysis.NAME_MATCHES)
+ }
+
+ @Test
+ fun bodyWithoutOptionalFields() {
val params =
InboundCheckDepositCreateParams.builder()
.accountNumberId("account_number_v18nkfqm6afpsrvy82b2")
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/simulations/InboundCheckDepositServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/simulations/InboundCheckDepositServiceAsyncTest.kt
index 1b33b5b3a..5bc3ae5ce 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/simulations/InboundCheckDepositServiceAsyncTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/simulations/InboundCheckDepositServiceAsyncTest.kt
@@ -26,6 +26,9 @@ internal class InboundCheckDepositServiceAsyncTest {
.accountNumberId("account_number_v18nkfqm6afpsrvy82b2")
.amount(1000L)
.checkNumber("1234567890")
+ .payeeNameAnalysis(
+ InboundCheckDepositCreateParams.PayeeNameAnalysis.NAME_MATCHES
+ )
.build()
)
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/simulations/InboundCheckDepositServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/simulations/InboundCheckDepositServiceTest.kt
index 68e4bb82b..fa0410139 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/simulations/InboundCheckDepositServiceTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/simulations/InboundCheckDepositServiceTest.kt
@@ -26,6 +26,9 @@ internal class InboundCheckDepositServiceTest {
.accountNumberId("account_number_v18nkfqm6afpsrvy82b2")
.amount(1000L)
.checkNumber("1234567890")
+ .payeeNameAnalysis(
+ InboundCheckDepositCreateParams.PayeeNameAnalysis.NAME_MATCHES
+ )
.build()
)