From dee5f59ca4f91233cd8e1463342339fed4e7f264 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 07:13:07 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 +- .../wiretransfers/WireTransferListParams.kt | 348 +++++++++++++++++- .../WireTransferListParamsTest.kt | 11 + 3 files changed, 360 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index d1f0847b3..a42ce1f9a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2277bacfbbf3570574b1c8abe74936d197944101f1e66238be7baf8e3303e52d.yml -openapi_spec_hash: f9004c6a75fbf5b4984080b8f8dd184c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-910400a5c3fcab85b95bf574472b6356767c24d4f76eb296bcba4b7db309710c.yml +openapi_spec_hash: c8b1cebba3d13a5c050c1296b93e2bdb config_hash: d15ecbf4dc8a7a0ef99397d11b557444 diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/wiretransfers/WireTransferListParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/wiretransfers/WireTransferListParams.kt index 43511fcd3..ecfc0119b 100644 --- a/increase-java-core/src/main/kotlin/com/increase/api/models/wiretransfers/WireTransferListParams.kt +++ b/increase-java-core/src/main/kotlin/com/increase/api/models/wiretransfers/WireTransferListParams.kt @@ -2,9 +2,14 @@ package com.increase.api.models.wiretransfers +import com.fasterxml.jackson.annotation.JsonCreator +import com.increase.api.core.Enum +import com.increase.api.core.JsonField import com.increase.api.core.Params import com.increase.api.core.http.Headers import com.increase.api.core.http.QueryParams +import com.increase.api.core.toImmutable +import com.increase.api.errors.IncreaseInvalidDataException import java.time.OffsetDateTime import java.time.format.DateTimeFormatter import java.util.Objects @@ -20,6 +25,7 @@ private constructor( private val externalAccountId: String?, private val idempotencyKey: String?, private val limit: Long?, + private val status: Status?, private val additionalHeaders: Headers, private val additionalQueryParams: QueryParams, ) : Params { @@ -45,6 +51,8 @@ private constructor( /** Limit the size of the list that is returned. The default (and maximum) is 100 objects. */ fun limit(): Optional = Optional.ofNullable(limit) + fun status(): Optional = Optional.ofNullable(status) + /** Additional headers to send with the request. */ fun _additionalHeaders(): Headers = additionalHeaders @@ -70,6 +78,7 @@ private constructor( private var externalAccountId: String? = null private var idempotencyKey: String? = null private var limit: Long? = null + private var status: Status? = null private var additionalHeaders: Headers.Builder = Headers.builder() private var additionalQueryParams: QueryParams.Builder = QueryParams.builder() @@ -81,6 +90,7 @@ private constructor( externalAccountId = wireTransferListParams.externalAccountId idempotencyKey = wireTransferListParams.idempotencyKey limit = wireTransferListParams.limit + status = wireTransferListParams.status additionalHeaders = wireTransferListParams.additionalHeaders.toBuilder() additionalQueryParams = wireTransferListParams.additionalQueryParams.toBuilder() } @@ -138,6 +148,11 @@ private constructor( /** Alias for calling [Builder.limit] with `limit.orElse(null)`. */ fun limit(limit: Optional) = limit(limit.getOrNull()) + fun status(status: Status?) = apply { this.status = status } + + /** Alias for calling [Builder.status] with `status.orElse(null)`. */ + fun status(status: Optional) = status(status.getOrNull()) + fun additionalHeaders(additionalHeaders: Headers) = apply { this.additionalHeaders.clear() putAllAdditionalHeaders(additionalHeaders) @@ -249,6 +264,7 @@ private constructor( externalAccountId, idempotencyKey, limit, + status, additionalHeaders.build(), additionalQueryParams.build(), ) @@ -289,6 +305,14 @@ private constructor( externalAccountId?.let { put("external_account_id", it) } idempotencyKey?.let { put("idempotency_key", it) } limit?.let { put("limit", it.toString()) } + status?.let { + it.in_().ifPresent { put("status.in", it.joinToString(",") { it.toString() }) } + it._additionalProperties().keys().forEach { key -> + it._additionalProperties().values(key).forEach { value -> + put("status.$key", value) + } + } + } putAll(additionalQueryParams) } .build() @@ -471,6 +495,326 @@ private constructor( "CreatedAt{after=$after, before=$before, onOrAfter=$onOrAfter, onOrBefore=$onOrBefore, additionalProperties=$additionalProperties}" } + class Status + private constructor(private val in_: List?, private val additionalProperties: QueryParams) { + + /** + * Return results whose value is in the provided list. For GET requests, this should be + * encoded as a comma-delimited string, such as `?in=one,two,three`. + */ + fun in_(): Optional> = Optional.ofNullable(in_) + + /** Query params to send with the request. */ + fun _additionalProperties(): QueryParams = additionalProperties + + fun toBuilder() = Builder().from(this) + + companion object { + + /** Returns a mutable builder for constructing an instance of [Status]. */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [Status]. */ + class Builder internal constructor() { + + private var in_: MutableList? = null + private var additionalProperties: QueryParams.Builder = QueryParams.builder() + + @JvmSynthetic + internal fun from(status: Status) = apply { + in_ = status.in_?.toMutableList() + additionalProperties = status.additionalProperties.toBuilder() + } + + /** + * Return results whose value is in the provided list. For GET requests, this should be + * encoded as a comma-delimited string, such as `?in=one,two,three`. + */ + fun in_(in_: List?) = apply { this.in_ = in_?.toMutableList() } + + /** Alias for calling [Builder.in_] with `in_.orElse(null)`. */ + fun in_(in_: Optional>) = in_(in_.getOrNull()) + + /** + * Adds a single [In] to [Builder.in_]. + * + * @throws IllegalStateException if the field was previously set to a non-list. + */ + fun addIn(in_: In) = apply { + this.in_ = (this.in_ ?: mutableListOf()).apply { add(in_) } + } + + fun additionalProperties(additionalProperties: QueryParams) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun additionalProperties(additionalProperties: Map>) = apply { + this.additionalProperties.clear() + putAllAdditionalProperties(additionalProperties) + } + + fun putAdditionalProperty(key: String, value: String) = apply { + additionalProperties.put(key, value) + } + + fun putAdditionalProperties(key: String, values: Iterable) = apply { + additionalProperties.put(key, values) + } + + fun putAllAdditionalProperties(additionalProperties: QueryParams) = apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun putAllAdditionalProperties(additionalProperties: Map>) = + apply { + this.additionalProperties.putAll(additionalProperties) + } + + fun replaceAdditionalProperties(key: String, value: String) = apply { + additionalProperties.replace(key, value) + } + + fun replaceAdditionalProperties(key: String, values: Iterable) = apply { + additionalProperties.replace(key, values) + } + + fun replaceAllAdditionalProperties(additionalProperties: QueryParams) = apply { + this.additionalProperties.replaceAll(additionalProperties) + } + + fun replaceAllAdditionalProperties( + additionalProperties: Map> + ) = apply { this.additionalProperties.replaceAll(additionalProperties) } + + fun removeAdditionalProperties(key: String) = apply { additionalProperties.remove(key) } + + fun removeAllAdditionalProperties(keys: Set) = apply { + additionalProperties.removeAll(keys) + } + + /** + * Returns an immutable instance of [Status]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): Status = Status(in_?.toImmutable(), additionalProperties.build()) + } + + class In @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 transfer is pending approval. */ + @JvmField val PENDING_APPROVAL = of("pending_approval") + + /** The transfer has been canceled. */ + @JvmField val CANCELED = of("canceled") + + /** The transfer is pending review by Increase. */ + @JvmField val PENDING_REVIEWING = of("pending_reviewing") + + /** The transfer has been rejected by Increase. */ + @JvmField val REJECTED = of("rejected") + + /** The transfer requires attention from an Increase operator. */ + @JvmField val REQUIRES_ATTENTION = of("requires_attention") + + /** The transfer is pending creation. */ + @JvmField val PENDING_CREATING = of("pending_creating") + + /** The transfer has been reversed. */ + @JvmField val REVERSED = of("reversed") + + /** The transfer has been submitted to Fedwire. */ + @JvmField val SUBMITTED = of("submitted") + + /** The transfer has been acknowledged by Fedwire and can be considered complete. */ + @JvmField val COMPLETE = of("complete") + + @JvmStatic fun of(value: String) = In(JsonField.of(value)) + } + + /** An enum containing [In]'s known values. */ + enum class Known { + /** The transfer is pending approval. */ + PENDING_APPROVAL, + /** The transfer has been canceled. */ + CANCELED, + /** The transfer is pending review by Increase. */ + PENDING_REVIEWING, + /** The transfer has been rejected by Increase. */ + REJECTED, + /** The transfer requires attention from an Increase operator. */ + REQUIRES_ATTENTION, + /** The transfer is pending creation. */ + PENDING_CREATING, + /** The transfer has been reversed. */ + REVERSED, + /** The transfer has been submitted to Fedwire. */ + SUBMITTED, + /** The transfer has been acknowledged by Fedwire and can be considered complete. */ + COMPLETE, + } + + /** + * An enum containing [In]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [In] 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 transfer is pending approval. */ + PENDING_APPROVAL, + /** The transfer has been canceled. */ + CANCELED, + /** The transfer is pending review by Increase. */ + PENDING_REVIEWING, + /** The transfer has been rejected by Increase. */ + REJECTED, + /** The transfer requires attention from an Increase operator. */ + REQUIRES_ATTENTION, + /** The transfer is pending creation. */ + PENDING_CREATING, + /** The transfer has been reversed. */ + REVERSED, + /** The transfer has been submitted to Fedwire. */ + SUBMITTED, + /** The transfer has been acknowledged by Fedwire and can be considered complete. */ + COMPLETE, + /** An enum member indicating that [In] 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) { + PENDING_APPROVAL -> Value.PENDING_APPROVAL + CANCELED -> Value.CANCELED + PENDING_REVIEWING -> Value.PENDING_REVIEWING + REJECTED -> Value.REJECTED + REQUIRES_ATTENTION -> Value.REQUIRES_ATTENTION + PENDING_CREATING -> Value.PENDING_CREATING + REVERSED -> Value.REVERSED + SUBMITTED -> Value.SUBMITTED + COMPLETE -> Value.COMPLETE + 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) { + PENDING_APPROVAL -> Known.PENDING_APPROVAL + CANCELED -> Known.CANCELED + PENDING_REVIEWING -> Known.PENDING_REVIEWING + REJECTED -> Known.REJECTED + REQUIRES_ATTENTION -> Known.REQUIRES_ATTENTION + PENDING_CREATING -> Known.PENDING_CREATING + REVERSED -> Known.REVERSED + SUBMITTED -> Known.SUBMITTED + COMPLETE -> Known.COMPLETE + else -> throw IncreaseInvalidDataException("Unknown In: $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(): In = 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 In && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Status && + in_ == other.in_ && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { Objects.hash(in_, additionalProperties) } + + override fun hashCode(): Int = hashCode + + override fun toString() = "Status{in_=$in_, additionalProperties=$additionalProperties}" + } + override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -483,6 +827,7 @@ private constructor( externalAccountId == other.externalAccountId && idempotencyKey == other.idempotencyKey && limit == other.limit && + status == other.status && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams } @@ -495,10 +840,11 @@ private constructor( externalAccountId, idempotencyKey, limit, + status, additionalHeaders, additionalQueryParams, ) override fun toString() = - "WireTransferListParams{accountId=$accountId, createdAt=$createdAt, cursor=$cursor, externalAccountId=$externalAccountId, idempotencyKey=$idempotencyKey, limit=$limit, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" + "WireTransferListParams{accountId=$accountId, createdAt=$createdAt, cursor=$cursor, externalAccountId=$externalAccountId, idempotencyKey=$idempotencyKey, limit=$limit, status=$status, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/wiretransfers/WireTransferListParamsTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/wiretransfers/WireTransferListParamsTest.kt index 3b219fe5e..4a7c5fb48 100644 --- a/increase-java-core/src/test/kotlin/com/increase/api/models/wiretransfers/WireTransferListParamsTest.kt +++ b/increase-java-core/src/test/kotlin/com/increase/api/models/wiretransfers/WireTransferListParamsTest.kt @@ -25,6 +25,11 @@ internal class WireTransferListParamsTest { .externalAccountId("external_account_id") .idempotencyKey("x") .limit(1L) + .status( + WireTransferListParams.Status.builder() + .addIn(WireTransferListParams.Status.In.PENDING_APPROVAL) + .build() + ) .build() } @@ -45,6 +50,11 @@ internal class WireTransferListParamsTest { .externalAccountId("external_account_id") .idempotencyKey("x") .limit(1L) + .status( + WireTransferListParams.Status.builder() + .addIn(WireTransferListParams.Status.In.PENDING_APPROVAL) + .build() + ) .build() val queryParams = params._queryParams() @@ -61,6 +71,7 @@ internal class WireTransferListParamsTest { .put("external_account_id", "external_account_id") .put("idempotency_key", "x") .put("limit", "1") + .put("status.in", listOf("pending_approval").joinToString(",")) .build() ) } From 561c68f0cfd733a2fe37b8a949260c61722281aa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 07:13:34 +0000 Subject: [PATCH 2/2] release: 0.447.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ README.md | 10 +++++----- build.gradle.kts | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d5f4d2ce5..0510f41f2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.446.0" + ".": "0.447.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 02761b67c..ff19e7f78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.447.0 (2026-03-05) + +Full Changelog: [v0.446.0...v0.447.0](https://github.com/Increase/increase-java/compare/v0.446.0...v0.447.0) + +### Features + +* **api:** api update ([dee5f59](https://github.com/Increase/increase-java/commit/dee5f59ca4f91233cd8e1463342339fed4e7f264)) + ## 0.446.0 (2026-03-05) Full Changelog: [v0.445.0...v0.446.0](https://github.com/Increase/increase-java/compare/v0.445.0...v0.446.0) diff --git a/README.md b/README.md index 83e278236..faacaa6da 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.increase.api/increase-java)](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.446.0) -[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.446.0/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-java/0.446.0) +[![Maven Central](https://img.shields.io/maven-central/v/com.increase.api/increase-java)](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.447.0) +[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.447.0/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-java/0.447.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.446.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.447.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.446.0") +implementation("com.increase.api:increase-java:0.447.0") ``` ### Maven @@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.446.0") com.increase.api increase-java - 0.446.0 + 0.447.0 ``` diff --git a/build.gradle.kts b/build.gradle.kts index 6b5525227..3b1c144a8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.increase.api" - version = "0.446.0" // x-release-please-version + version = "0.447.0" // x-release-please-version } subprojects {