diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index f86031a6a..8e585de79 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.406.0"
+ ".": "0.407.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index fd48d4fba..87e086700 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-92af5c57fac9c88bad16079e7b437371720d00c368fd4eea5987f94b25855fcb.yml
-openapi_spec_hash: 7831d7cdab2d8972f5193916c617c9a2
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a822d0695f48967e594a88eef888b826cd51b62959bd4b3d0163b7d010bab969.yml
+openapi_spec_hash: 95ea277ed84c04aefd25bcb63ae4e2e5
config_hash: 27e44ed36b9c5617b580ead7231a594a
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4c077f71b..d2fd18c94 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.407.0 (2026-01-28)
+
+Full Changelog: [v0.406.0...v0.407.0](https://github.com/Increase/increase-java/compare/v0.406.0...v0.407.0)
+
+### Features
+
+* **api:** api update ([858a7a6](https://github.com/Increase/increase-java/commit/858a7a60e7b0a4fc71228581cb003c98fda30d5d))
+
## 0.406.0 (2026-01-27)
Full Changelog: [v0.405.0...v0.406.0](https://github.com/Increase/increase-java/compare/v0.405.0...v0.406.0)
diff --git a/README.md b/README.md
index e2ffce6a2..2375057bd 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.406.0)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.406.0)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.407.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.407.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.406.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.407.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.406.0")
+implementation("com.increase.api:increase-java:0.407.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.406.0")
com.increase.api
increase-java
- 0.406.0
+ 0.407.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index fcc205c6d..289e422cc 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.406.0" // x-release-please-version
+ version = "0.407.0" // x-release-please-version
}
subprojects {
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDispute.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDispute.kt
index b08e60e3a..09175f8d9 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDispute.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDispute.kt
@@ -42,6 +42,7 @@ private constructor(
private val userSubmissionRequiredBy: JsonField,
private val visa: JsonField,
private val win: JsonField,
+ private val withdrawal: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -68,6 +69,9 @@ private constructor(
userSubmissionRequiredBy: JsonField = JsonMissing.of(),
@JsonProperty("visa") @ExcludeMissing visa: JsonField = JsonMissing.of(),
@JsonProperty("win") @ExcludeMissing win: JsonField = JsonMissing.of(),
+ @JsonProperty("withdrawal")
+ @ExcludeMissing
+ withdrawal: JsonField = JsonMissing.of(),
) : this(
id,
amount,
@@ -82,6 +86,7 @@ private constructor(
userSubmissionRequiredBy,
visa,
win,
+ withdrawal,
mutableMapOf(),
)
@@ -198,6 +203,14 @@ private constructor(
*/
fun win(): Optional = win.getOptional("win")
+ /**
+ * If the Card Dispute has been withdrawn, this will contain details of the withdrawal.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun withdrawal(): Optional = withdrawal.getOptional("withdrawal")
+
/**
* Returns the raw JSON value of [id].
*
@@ -299,6 +312,15 @@ private constructor(
*/
@JsonProperty("win") @ExcludeMissing fun _win(): JsonField = win
+ /**
+ * Returns the raw JSON value of [withdrawal].
+ *
+ * Unlike [withdrawal], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("withdrawal")
+ @ExcludeMissing
+ fun _withdrawal(): JsonField = withdrawal
+
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -331,6 +353,7 @@ private constructor(
* .userSubmissionRequiredBy()
* .visa()
* .win()
+ * .withdrawal()
* ```
*/
@JvmStatic fun builder() = Builder()
@@ -352,6 +375,7 @@ private constructor(
private var userSubmissionRequiredBy: JsonField? = null
private var visa: JsonField? = null
private var win: JsonField? = null
+ private var withdrawal: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -369,6 +393,7 @@ private constructor(
userSubmissionRequiredBy = cardDispute.userSubmissionRequiredBy
visa = cardDispute.visa
win = cardDispute.win
+ withdrawal = cardDispute.withdrawal
additionalProperties = cardDispute.additionalProperties.toMutableMap()
}
@@ -567,6 +592,21 @@ private constructor(
*/
fun win(win: JsonField) = apply { this.win = win }
+ /** If the Card Dispute has been withdrawn, this will contain details of the withdrawal. */
+ fun withdrawal(withdrawal: Withdrawal?) = withdrawal(JsonField.ofNullable(withdrawal))
+
+ /** Alias for calling [Builder.withdrawal] with `withdrawal.orElse(null)`. */
+ fun withdrawal(withdrawal: Optional) = withdrawal(withdrawal.getOrNull())
+
+ /**
+ * Sets [Builder.withdrawal] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.withdrawal] with a well-typed [Withdrawal] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun withdrawal(withdrawal: JsonField) = apply { this.withdrawal = withdrawal }
+
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -606,6 +646,7 @@ private constructor(
* .userSubmissionRequiredBy()
* .visa()
* .win()
+ * .withdrawal()
* ```
*
* @throws IllegalStateException if any required field is unset.
@@ -625,6 +666,7 @@ private constructor(
checkRequired("userSubmissionRequiredBy", userSubmissionRequiredBy),
checkRequired("visa", visa),
checkRequired("win", win),
+ checkRequired("withdrawal", withdrawal),
additionalProperties.toMutableMap(),
)
}
@@ -649,6 +691,7 @@ private constructor(
userSubmissionRequiredBy()
visa().ifPresent { it.validate() }
win().ifPresent { it.validate() }
+ withdrawal().ifPresent { it.validate() }
validated = true
}
@@ -679,7 +722,8 @@ private constructor(
(type.asKnown().getOrNull()?.validity() ?: 0) +
(if (userSubmissionRequiredBy.asKnown().isPresent) 1 else 0) +
(visa.asKnown().getOrNull()?.validity() ?: 0) +
- (win.asKnown().getOrNull()?.validity() ?: 0)
+ (win.asKnown().getOrNull()?.validity() ?: 0) +
+ (withdrawal.asKnown().getOrNull()?.validity() ?: 0)
/** If the Card Dispute's status is `lost`, this will contain details of the lost dispute. */
class Loss
@@ -41377,6 +41421,175 @@ private constructor(
override fun toString() = "Win{wonAt=$wonAt, additionalProperties=$additionalProperties}"
}
+ /** If the Card Dispute has been withdrawn, this will contain details of the withdrawal. */
+ class Withdrawal
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val explanation: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("explanation")
+ @ExcludeMissing
+ explanation: JsonField = JsonMissing.of()
+ ) : this(explanation, mutableMapOf())
+
+ /**
+ * The explanation for the withdrawal of the Card Dispute.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun explanation(): Optional = explanation.getOptional("explanation")
+
+ /**
+ * Returns the raw JSON value of [explanation].
+ *
+ * Unlike [explanation], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("explanation")
+ @ExcludeMissing
+ fun _explanation(): JsonField = explanation
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [Withdrawal].
+ *
+ * The following fields are required:
+ * ```java
+ * .explanation()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [Withdrawal]. */
+ class Builder internal constructor() {
+
+ private var explanation: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(withdrawal: Withdrawal) = apply {
+ explanation = withdrawal.explanation
+ additionalProperties = withdrawal.additionalProperties.toMutableMap()
+ }
+
+ /** The explanation for the withdrawal of the Card Dispute. */
+ fun explanation(explanation: String?) = explanation(JsonField.ofNullable(explanation))
+
+ /** Alias for calling [Builder.explanation] with `explanation.orElse(null)`. */
+ fun explanation(explanation: Optional) = explanation(explanation.getOrNull())
+
+ /**
+ * Sets [Builder.explanation] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.explanation] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun explanation(explanation: JsonField) = apply {
+ this.explanation = explanation
+ }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [Withdrawal].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .explanation()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): Withdrawal =
+ Withdrawal(
+ checkRequired("explanation", explanation),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): Withdrawal = apply {
+ if (validated) {
+ return@apply
+ }
+
+ explanation()
+ 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 (explanation.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Withdrawal &&
+ explanation == other.explanation &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy { Objects.hash(explanation, additionalProperties) }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Withdrawal{explanation=$explanation, additionalProperties=$additionalProperties}"
+ }
+
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
@@ -41396,6 +41609,7 @@ private constructor(
userSubmissionRequiredBy == other.userSubmissionRequiredBy &&
visa == other.visa &&
win == other.win &&
+ withdrawal == other.withdrawal &&
additionalProperties == other.additionalProperties
}
@@ -41414,6 +41628,7 @@ private constructor(
userSubmissionRequiredBy,
visa,
win,
+ withdrawal,
additionalProperties,
)
}
@@ -41421,5 +41636,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "CardDispute{id=$id, amount=$amount, cardId=$cardId, createdAt=$createdAt, disputedTransactionId=$disputedTransactionId, idempotencyKey=$idempotencyKey, loss=$loss, network=$network, status=$status, type=$type, userSubmissionRequiredBy=$userSubmissionRequiredBy, visa=$visa, win=$win, additionalProperties=$additionalProperties}"
+ "CardDispute{id=$id, amount=$amount, cardId=$cardId, createdAt=$createdAt, disputedTransactionId=$disputedTransactionId, idempotencyKey=$idempotencyKey, loss=$loss, network=$network, status=$status, type=$type, userSubmissionRequiredBy=$userSubmissionRequiredBy, visa=$visa, win=$win, withdrawal=$withdrawal, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDisputeWithdrawParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDisputeWithdrawParams.kt
index 1f32200a3..4916c40da 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDisputeWithdrawParams.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/carddisputes/CardDisputeWithdrawParams.kt
@@ -2,11 +2,19 @@
package com.increase.api.models.carddisputes
+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.ExcludeMissing
+import com.increase.api.core.JsonField
+import com.increase.api.core.JsonMissing
import com.increase.api.core.JsonValue
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.util.Collections
import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
@@ -15,16 +23,30 @@ import kotlin.jvm.optionals.getOrNull
class CardDisputeWithdrawParams
private constructor(
private val cardDisputeId: String?,
+ private val body: Body,
private val additionalHeaders: Headers,
private val additionalQueryParams: QueryParams,
- private val additionalBodyProperties: Map,
) : Params {
/** The identifier of the Card Dispute to withdraw. */
fun cardDisputeId(): Optional = Optional.ofNullable(cardDisputeId)
- /** Additional body properties to send with the request. */
- fun _additionalBodyProperties(): Map = additionalBodyProperties
+ /**
+ * The explanation for withdrawing the Card Dispute.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun explanation(): Optional = body.explanation()
+
+ /**
+ * Returns the raw JSON value of [explanation].
+ *
+ * Unlike [explanation], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _explanation(): JsonField = body._explanation()
+
+ fun _additionalBodyProperties(): Map = body._additionalProperties()
/** Additional headers to send with the request. */
fun _additionalHeaders(): Headers = additionalHeaders
@@ -48,17 +70,16 @@ private constructor(
class Builder internal constructor() {
private var cardDisputeId: String? = null
+ private var body: Body.Builder = Body.builder()
private var additionalHeaders: Headers.Builder = Headers.builder()
private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
- private var additionalBodyProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(cardDisputeWithdrawParams: CardDisputeWithdrawParams) = apply {
cardDisputeId = cardDisputeWithdrawParams.cardDisputeId
+ body = cardDisputeWithdrawParams.body.toBuilder()
additionalHeaders = cardDisputeWithdrawParams.additionalHeaders.toBuilder()
additionalQueryParams = cardDisputeWithdrawParams.additionalQueryParams.toBuilder()
- additionalBodyProperties =
- cardDisputeWithdrawParams.additionalBodyProperties.toMutableMap()
}
/** The identifier of the Card Dispute to withdraw. */
@@ -68,6 +89,46 @@ private constructor(
fun cardDisputeId(cardDisputeId: Optional) =
cardDisputeId(cardDisputeId.getOrNull())
+ /**
+ * Sets the entire request body.
+ *
+ * This is generally only useful if you are already constructing the body separately.
+ * Otherwise, it's more convenient to use the top-level setters instead:
+ * - [explanation]
+ */
+ fun body(body: Body) = apply { this.body = body.toBuilder() }
+
+ /** The explanation for withdrawing the Card Dispute. */
+ fun explanation(explanation: String) = apply { body.explanation(explanation) }
+
+ /**
+ * Sets [Builder.explanation] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.explanation] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun explanation(explanation: JsonField) = apply { body.explanation(explanation) }
+
+ fun additionalBodyProperties(additionalBodyProperties: Map) = apply {
+ body.additionalProperties(additionalBodyProperties)
+ }
+
+ fun putAdditionalBodyProperty(key: String, value: JsonValue) = apply {
+ body.putAdditionalProperty(key, value)
+ }
+
+ fun putAllAdditionalBodyProperties(additionalBodyProperties: Map) =
+ apply {
+ body.putAllAdditionalProperties(additionalBodyProperties)
+ }
+
+ fun removeAdditionalBodyProperty(key: String) = apply { body.removeAdditionalProperty(key) }
+
+ fun removeAllAdditionalBodyProperties(keys: Set) = apply {
+ body.removeAllAdditionalProperties(keys)
+ }
+
fun additionalHeaders(additionalHeaders: Headers) = apply {
this.additionalHeaders.clear()
putAllAdditionalHeaders(additionalHeaders)
@@ -166,28 +227,6 @@ private constructor(
additionalQueryParams.removeAll(keys)
}
- fun additionalBodyProperties(additionalBodyProperties: Map) = apply {
- this.additionalBodyProperties.clear()
- putAllAdditionalBodyProperties(additionalBodyProperties)
- }
-
- fun putAdditionalBodyProperty(key: String, value: JsonValue) = apply {
- additionalBodyProperties.put(key, value)
- }
-
- fun putAllAdditionalBodyProperties(additionalBodyProperties: Map) =
- apply {
- this.additionalBodyProperties.putAll(additionalBodyProperties)
- }
-
- fun removeAdditionalBodyProperty(key: String) = apply {
- additionalBodyProperties.remove(key)
- }
-
- fun removeAllAdditionalBodyProperties(keys: Set) = apply {
- keys.forEach(::removeAdditionalBodyProperty)
- }
-
/**
* Returns an immutable instance of [CardDisputeWithdrawParams].
*
@@ -196,14 +235,13 @@ private constructor(
fun build(): CardDisputeWithdrawParams =
CardDisputeWithdrawParams(
cardDisputeId,
+ body.build(),
additionalHeaders.build(),
additionalQueryParams.build(),
- additionalBodyProperties.toImmutable(),
)
}
- fun _body(): Optional