diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index f4b8c8ab5..82487aa15 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.401.0"
+ ".": "0.402.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 458c6d830..123549fcd 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-cc66158bcd1307d07051dcfd43d73dad380a7d8eb637620b21ff4a59e6073b68.yml
-openapi_spec_hash: add50aa92e44e568b1efa8dba7bdb2d5
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-df015666c8d57cf91d4239bffeb549736581af5653e0ec2cd94357c434975e31.yml
+openapi_spec_hash: fceca44f4bd5f5f8fdbbaa6c80fc0410
config_hash: 27e44ed36b9c5617b580ead7231a594a
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 82ccd0a4f..406d9019b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.402.0 (2026-01-23)
+
+Full Changelog: [v0.401.0...v0.402.0](https://github.com/Increase/increase-java/compare/v0.401.0...v0.402.0)
+
+### Features
+
+* **api:** api update ([b1ad49f](https://github.com/Increase/increase-java/commit/b1ad49fd720548c779e257f44f17fb1721570d29))
+
## 0.401.0 (2026-01-23)
Full Changelog: [v0.400.1...v0.401.0](https://github.com/Increase/increase-java/compare/v0.400.1...v0.401.0)
diff --git a/README.md b/README.md
index 16e1621a7..aa44d1af4 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.401.0)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.401.0)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.402.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.402.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.401.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.402.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.401.0")
+implementation("com.increase.api:increase-java:0.402.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.401.0")
com.increase.api
increase-java
- 0.401.0
+ 0.402.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index aada4e174..e338a7a11 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.401.0" // x-release-please-version
+ version = "0.402.0" // x-release-please-version
}
subprojects {
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletToken.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletToken.kt
index 90d9b2431..9921ae5b9 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletToken.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletToken.kt
@@ -33,6 +33,7 @@ private constructor(
private val cardholder: JsonField,
private val createdAt: JsonField,
private val device: JsonField,
+ private val dynamicPrimaryAccountNumber: JsonField,
private val status: JsonField,
private val tokenRequestor: JsonField,
private val type: JsonField,
@@ -51,6 +52,9 @@ private constructor(
@ExcludeMissing
createdAt: JsonField = JsonMissing.of(),
@JsonProperty("device") @ExcludeMissing device: JsonField = JsonMissing.of(),
+ @JsonProperty("dynamic_primary_account_number")
+ @ExcludeMissing
+ dynamicPrimaryAccountNumber: JsonField = JsonMissing.of(),
@JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(),
@JsonProperty("token_requestor")
@ExcludeMissing
@@ -63,6 +67,7 @@ private constructor(
cardholder,
createdAt,
device,
+ dynamicPrimaryAccountNumber,
status,
tokenRequestor,
type,
@@ -111,6 +116,15 @@ private constructor(
*/
fun device(): Device = device.getRequired("device")
+ /**
+ * The redacted Dynamic Primary Account Number.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun dynamicPrimaryAccountNumber(): Optional =
+ dynamicPrimaryAccountNumber.getOptional("dynamic_primary_account_number")
+
/**
* This indicates if payments can be made with the Digital Wallet Token.
*
@@ -183,6 +197,17 @@ private constructor(
*/
@JsonProperty("device") @ExcludeMissing fun _device(): JsonField = device
+ /**
+ * Returns the raw JSON value of [dynamicPrimaryAccountNumber].
+ *
+ * Unlike [dynamicPrimaryAccountNumber], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("dynamic_primary_account_number")
+ @ExcludeMissing
+ fun _dynamicPrimaryAccountNumber(): JsonField =
+ dynamicPrimaryAccountNumber
+
/**
* Returns the raw JSON value of [status].
*
@@ -237,6 +262,7 @@ private constructor(
* .cardholder()
* .createdAt()
* .device()
+ * .dynamicPrimaryAccountNumber()
* .status()
* .tokenRequestor()
* .type()
@@ -254,6 +280,7 @@ private constructor(
private var cardholder: JsonField? = null
private var createdAt: JsonField? = null
private var device: JsonField? = null
+ private var dynamicPrimaryAccountNumber: JsonField? = null
private var status: JsonField? = null
private var tokenRequestor: JsonField? = null
private var type: JsonField? = null
@@ -267,6 +294,7 @@ private constructor(
cardholder = digitalWalletToken.cardholder
createdAt = digitalWalletToken.createdAt
device = digitalWalletToken.device
+ dynamicPrimaryAccountNumber = digitalWalletToken.dynamicPrimaryAccountNumber
status = digitalWalletToken.status
tokenRequestor = digitalWalletToken.tokenRequestor
type = digitalWalletToken.type
@@ -334,6 +362,29 @@ private constructor(
*/
fun device(device: JsonField) = apply { this.device = device }
+ /** The redacted Dynamic Primary Account Number. */
+ fun dynamicPrimaryAccountNumber(dynamicPrimaryAccountNumber: DynamicPrimaryAccountNumber?) =
+ dynamicPrimaryAccountNumber(JsonField.ofNullable(dynamicPrimaryAccountNumber))
+
+ /**
+ * Alias for calling [Builder.dynamicPrimaryAccountNumber] with
+ * `dynamicPrimaryAccountNumber.orElse(null)`.
+ */
+ fun dynamicPrimaryAccountNumber(
+ dynamicPrimaryAccountNumber: Optional
+ ) = dynamicPrimaryAccountNumber(dynamicPrimaryAccountNumber.getOrNull())
+
+ /**
+ * Sets [Builder.dynamicPrimaryAccountNumber] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.dynamicPrimaryAccountNumber] with a well-typed
+ * [DynamicPrimaryAccountNumber] value instead. This method is primarily for setting the
+ * field to an undocumented or not yet supported value.
+ */
+ fun dynamicPrimaryAccountNumber(
+ dynamicPrimaryAccountNumber: JsonField
+ ) = apply { this.dynamicPrimaryAccountNumber = dynamicPrimaryAccountNumber }
+
/** This indicates if payments can be made with the Digital Wallet Token. */
fun status(status: Status) = status(JsonField.of(status))
@@ -431,6 +482,7 @@ private constructor(
* .cardholder()
* .createdAt()
* .device()
+ * .dynamicPrimaryAccountNumber()
* .status()
* .tokenRequestor()
* .type()
@@ -446,6 +498,7 @@ private constructor(
checkRequired("cardholder", cardholder),
checkRequired("createdAt", createdAt),
checkRequired("device", device),
+ checkRequired("dynamicPrimaryAccountNumber", dynamicPrimaryAccountNumber),
checkRequired("status", status),
checkRequired("tokenRequestor", tokenRequestor),
checkRequired("type", type),
@@ -466,6 +519,7 @@ private constructor(
cardholder().validate()
createdAt()
device().validate()
+ dynamicPrimaryAccountNumber().ifPresent { it.validate() }
status().validate()
tokenRequestor().validate()
type().validate()
@@ -493,6 +547,7 @@ private constructor(
(cardholder.asKnown().getOrNull()?.validity() ?: 0) +
(if (createdAt.asKnown().isPresent) 1 else 0) +
(device.asKnown().getOrNull()?.validity() ?: 0) +
+ (dynamicPrimaryAccountNumber.asKnown().getOrNull()?.validity() ?: 0) +
(status.asKnown().getOrNull()?.validity() ?: 0) +
(tokenRequestor.asKnown().getOrNull()?.validity() ?: 0) +
(type.asKnown().getOrNull()?.validity() ?: 0) +
@@ -1158,6 +1213,206 @@ private constructor(
"Device{deviceType=$deviceType, identifier=$identifier, ipAddress=$ipAddress, name=$name, additionalProperties=$additionalProperties}"
}
+ /** The redacted Dynamic Primary Account Number. */
+ class DynamicPrimaryAccountNumber
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val first6: JsonField,
+ private val last4: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("first6") @ExcludeMissing first6: JsonField = JsonMissing.of(),
+ @JsonProperty("last4") @ExcludeMissing last4: JsonField = JsonMissing.of(),
+ ) : this(first6, last4, mutableMapOf())
+
+ /**
+ * The first 6 digits of the token's Dynamic Primary Account Number.
+ *
+ * @throws IncreaseInvalidDataException 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 first6(): String = first6.getRequired("first6")
+
+ /**
+ * The last 4 digits of the token's Dynamic Primary Account Number.
+ *
+ * @throws IncreaseInvalidDataException 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 last4(): String = last4.getRequired("last4")
+
+ /**
+ * Returns the raw JSON value of [first6].
+ *
+ * Unlike [first6], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("first6") @ExcludeMissing fun _first6(): JsonField = first6
+
+ /**
+ * Returns the raw JSON value of [last4].
+ *
+ * Unlike [last4], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("last4") @ExcludeMissing fun _last4(): JsonField = last4
+
+ @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
+ * [DynamicPrimaryAccountNumber].
+ *
+ * The following fields are required:
+ * ```java
+ * .first6()
+ * .last4()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [DynamicPrimaryAccountNumber]. */
+ class Builder internal constructor() {
+
+ private var first6: JsonField? = null
+ private var last4: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(dynamicPrimaryAccountNumber: DynamicPrimaryAccountNumber) = apply {
+ first6 = dynamicPrimaryAccountNumber.first6
+ last4 = dynamicPrimaryAccountNumber.last4
+ additionalProperties =
+ dynamicPrimaryAccountNumber.additionalProperties.toMutableMap()
+ }
+
+ /** The first 6 digits of the token's Dynamic Primary Account Number. */
+ fun first6(first6: String) = first6(JsonField.of(first6))
+
+ /**
+ * Sets [Builder.first6] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.first6] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun first6(first6: JsonField) = apply { this.first6 = first6 }
+
+ /** The last 4 digits of the token's Dynamic Primary Account Number. */
+ fun last4(last4: String) = last4(JsonField.of(last4))
+
+ /**
+ * Sets [Builder.last4] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.last4] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun last4(last4: JsonField) = apply { this.last4 = last4 }
+
+ 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 [DynamicPrimaryAccountNumber].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .first6()
+ * .last4()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): DynamicPrimaryAccountNumber =
+ DynamicPrimaryAccountNumber(
+ checkRequired("first6", first6),
+ checkRequired("last4", last4),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): DynamicPrimaryAccountNumber = apply {
+ if (validated) {
+ return@apply
+ }
+
+ first6()
+ last4()
+ 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 (first6.asKnown().isPresent) 1 else 0) + (if (last4.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is DynamicPrimaryAccountNumber &&
+ first6 == other.first6 &&
+ last4 == other.last4 &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy { Objects.hash(first6, last4, additionalProperties) }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "DynamicPrimaryAccountNumber{first6=$first6, last4=$last4, additionalProperties=$additionalProperties}"
+ }
+
/** This indicates if payments can be made with the Digital Wallet Token. */
class Status @JsonCreator private constructor(private val value: JsonField) : Enum {
@@ -1982,6 +2237,7 @@ private constructor(
cardholder == other.cardholder &&
createdAt == other.createdAt &&
device == other.device &&
+ dynamicPrimaryAccountNumber == other.dynamicPrimaryAccountNumber &&
status == other.status &&
tokenRequestor == other.tokenRequestor &&
type == other.type &&
@@ -1996,6 +2252,7 @@ private constructor(
cardholder,
createdAt,
device,
+ dynamicPrimaryAccountNumber,
status,
tokenRequestor,
type,
@@ -2007,5 +2264,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "DigitalWalletToken{id=$id, cardId=$cardId, cardholder=$cardholder, createdAt=$createdAt, device=$device, status=$status, tokenRequestor=$tokenRequestor, type=$type, updates=$updates, additionalProperties=$additionalProperties}"
+ "DigitalWalletToken{id=$id, cardId=$cardId, cardholder=$cardholder, createdAt=$createdAt, device=$device, dynamicPrimaryAccountNumber=$dynamicPrimaryAccountNumber, status=$status, tokenRequestor=$tokenRequestor, type=$type, updates=$updates, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListPageResponseTest.kt
index bc7b67a4a..5248556e3 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListPageResponseTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenListPageResponseTest.kt
@@ -30,6 +30,12 @@ internal class DigitalWalletTokenListPageResponseTest {
.name("My Work Phone")
.build()
)
+ .dynamicPrimaryAccountNumber(
+ DigitalWalletToken.DynamicPrimaryAccountNumber.builder()
+ .first6("first6")
+ .last4("last4")
+ .build()
+ )
.status(DigitalWalletToken.Status.ACTIVE)
.tokenRequestor(DigitalWalletToken.TokenRequestor.APPLE_PAY)
.type(DigitalWalletToken.Type.DIGITAL_WALLET_TOKEN)
@@ -59,6 +65,12 @@ internal class DigitalWalletTokenListPageResponseTest {
.name("My Work Phone")
.build()
)
+ .dynamicPrimaryAccountNumber(
+ DigitalWalletToken.DynamicPrimaryAccountNumber.builder()
+ .first6("first6")
+ .last4("last4")
+ .build()
+ )
.status(DigitalWalletToken.Status.ACTIVE)
.tokenRequestor(DigitalWalletToken.TokenRequestor.APPLE_PAY)
.type(DigitalWalletToken.Type.DIGITAL_WALLET_TOKEN)
@@ -94,6 +106,12 @@ internal class DigitalWalletTokenListPageResponseTest {
.name("My Work Phone")
.build()
)
+ .dynamicPrimaryAccountNumber(
+ DigitalWalletToken.DynamicPrimaryAccountNumber.builder()
+ .first6("first6")
+ .last4("last4")
+ .build()
+ )
.status(DigitalWalletToken.Status.ACTIVE)
.tokenRequestor(DigitalWalletToken.TokenRequestor.APPLE_PAY)
.type(DigitalWalletToken.Type.DIGITAL_WALLET_TOKEN)
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenTest.kt
index 56db86f2c..24f428d18 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/digitalwallettokens/DigitalWalletTokenTest.kt
@@ -26,6 +26,12 @@ internal class DigitalWalletTokenTest {
.name("My Work Phone")
.build()
)
+ .dynamicPrimaryAccountNumber(
+ DigitalWalletToken.DynamicPrimaryAccountNumber.builder()
+ .first6("first6")
+ .last4("last4")
+ .build()
+ )
.status(DigitalWalletToken.Status.ACTIVE)
.tokenRequestor(DigitalWalletToken.TokenRequestor.APPLE_PAY)
.type(DigitalWalletToken.Type.DIGITAL_WALLET_TOKEN)
@@ -52,6 +58,13 @@ internal class DigitalWalletTokenTest {
.name("My Work Phone")
.build()
)
+ assertThat(digitalWalletToken.dynamicPrimaryAccountNumber())
+ .contains(
+ DigitalWalletToken.DynamicPrimaryAccountNumber.builder()
+ .first6("first6")
+ .last4("last4")
+ .build()
+ )
assertThat(digitalWalletToken.status()).isEqualTo(DigitalWalletToken.Status.ACTIVE)
assertThat(digitalWalletToken.tokenRequestor())
.isEqualTo(DigitalWalletToken.TokenRequestor.APPLE_PAY)
@@ -83,6 +96,12 @@ internal class DigitalWalletTokenTest {
.name("My Work Phone")
.build()
)
+ .dynamicPrimaryAccountNumber(
+ DigitalWalletToken.DynamicPrimaryAccountNumber.builder()
+ .first6("first6")
+ .last4("last4")
+ .build()
+ )
.status(DigitalWalletToken.Status.ACTIVE)
.tokenRequestor(DigitalWalletToken.TokenRequestor.APPLE_PAY)
.type(DigitalWalletToken.Type.DIGITAL_WALLET_TOKEN)