diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 18dbf0405..b0ef7708e 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.349.0"
+ ".": "0.350.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index d73422845..6ba32829f 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 228
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-776b1bee3036836b954fa0db1e6d0349a04f76799402089994a9147a05967c0e.yml
-openapi_spec_hash: 185a637305e75b302860dce8d352f54f
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-04156469b84df056ff40f1cd402b851af019c7433591a072e02f90f3bd5e5d62.yml
+openapi_spec_hash: c3ff2c35ac0bdadd4290ad7f063deb5e
config_hash: eb2035151c7b49c2f12caf55469b8f9a
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 908437b6c..3afdaa90e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.350.0 (2025-11-05)
+
+Full Changelog: [v0.349.0...v0.350.0](https://github.com/Increase/increase-java/compare/v0.349.0...v0.350.0)
+
+### Features
+
+* **api:** api update ([447ae5e](https://github.com/Increase/increase-java/commit/447ae5ef94de2246636a0520c2e7af22c36f5563))
+
## 0.349.0 (2025-11-04)
Full Changelog: [v0.348.0...v0.349.0](https://github.com/Increase/increase-java/compare/v0.348.0...v0.349.0)
diff --git a/README.md b/README.md
index b83397bc8..5b4d90011 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.349.0)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.349.0)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.350.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.350.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.349.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.350.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.349.0")
+implementation("com.increase.api:increase-java:0.350.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.349.0")
com.increase.api
increase-java
- 0.349.0
+ 0.350.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 67be31626..0dc4166e0 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.349.0" // x-release-please-version
+ version = "0.350.0" // x-release-please-version
}
subprojects {
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/Lockbox.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/Lockbox.kt
index 5509866a0..b2a7d061a 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/Lockbox.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/Lockbox.kt
@@ -29,11 +29,11 @@ private constructor(
private val id: JsonField,
private val accountId: JsonField,
private val address: JsonField,
+ private val checkDepositBehavior: JsonField,
private val createdAt: JsonField,
private val description: JsonField,
private val idempotencyKey: JsonField,
private val recipientName: JsonField,
- private val status: JsonField,
private val type: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -43,6 +43,9 @@ private constructor(
@JsonProperty("id") @ExcludeMissing id: JsonField = JsonMissing.of(),
@JsonProperty("account_id") @ExcludeMissing accountId: JsonField = JsonMissing.of(),
@JsonProperty("address") @ExcludeMissing address: JsonField = JsonMissing.of(),
+ @JsonProperty("check_deposit_behavior")
+ @ExcludeMissing
+ checkDepositBehavior: JsonField = JsonMissing.of(),
@JsonProperty("created_at")
@ExcludeMissing
createdAt: JsonField = JsonMissing.of(),
@@ -55,17 +58,16 @@ private constructor(
@JsonProperty("recipient_name")
@ExcludeMissing
recipientName: JsonField = JsonMissing.of(),
- @JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(),
@JsonProperty("type") @ExcludeMissing type: JsonField = JsonMissing.of(),
) : this(
id,
accountId,
address,
+ checkDepositBehavior,
createdAt,
description,
idempotencyKey,
recipientName,
- status,
type,
mutableMapOf(),
)
@@ -94,6 +96,15 @@ private constructor(
*/
fun address(): Address = address.getRequired("address")
+ /**
+ * Indicates if checks mailed to this lockbox will be deposited.
+ *
+ * @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 checkDepositBehavior(): CheckDepositBehavior =
+ checkDepositBehavior.getRequired("check_deposit_behavior")
+
/**
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Lockbox was created.
*
@@ -128,14 +139,6 @@ private constructor(
*/
fun recipientName(): Optional = recipientName.getOptional("recipient_name")
- /**
- * This indicates if mail can be sent to this address.
- *
- * @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 status(): Status = status.getRequired("status")
-
/**
* A constant representing the object's type. For this resource it will always be `lockbox`.
*
@@ -165,6 +168,16 @@ private constructor(
*/
@JsonProperty("address") @ExcludeMissing fun _address(): JsonField = address
+ /**
+ * Returns the raw JSON value of [checkDepositBehavior].
+ *
+ * Unlike [checkDepositBehavior], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("check_deposit_behavior")
+ @ExcludeMissing
+ fun _checkDepositBehavior(): JsonField = checkDepositBehavior
+
/**
* Returns the raw JSON value of [createdAt].
*
@@ -199,13 +212,6 @@ private constructor(
@ExcludeMissing
fun _recipientName(): JsonField = recipientName
- /**
- * Returns the raw JSON value of [status].
- *
- * Unlike [status], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status
-
/**
* Returns the raw JSON value of [type].
*
@@ -235,11 +241,11 @@ private constructor(
* .id()
* .accountId()
* .address()
+ * .checkDepositBehavior()
* .createdAt()
* .description()
* .idempotencyKey()
* .recipientName()
- * .status()
* .type()
* ```
*/
@@ -252,11 +258,11 @@ private constructor(
private var id: JsonField? = null
private var accountId: JsonField? = null
private var address: JsonField? = null
+ private var checkDepositBehavior: JsonField? = null
private var createdAt: JsonField? = null
private var description: JsonField? = null
private var idempotencyKey: JsonField? = null
private var recipientName: JsonField? = null
- private var status: JsonField? = null
private var type: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@@ -265,11 +271,11 @@ private constructor(
id = lockbox.id
accountId = lockbox.accountId
address = lockbox.address
+ checkDepositBehavior = lockbox.checkDepositBehavior
createdAt = lockbox.createdAt
description = lockbox.description
idempotencyKey = lockbox.idempotencyKey
recipientName = lockbox.recipientName
- status = lockbox.status
type = lockbox.type
additionalProperties = lockbox.additionalProperties.toMutableMap()
}
@@ -308,6 +314,21 @@ private constructor(
*/
fun address(address: JsonField) = apply { this.address = address }
+ /** Indicates if checks mailed to this lockbox will be deposited. */
+ fun checkDepositBehavior(checkDepositBehavior: CheckDepositBehavior) =
+ checkDepositBehavior(JsonField.of(checkDepositBehavior))
+
+ /**
+ * Sets [Builder.checkDepositBehavior] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.checkDepositBehavior] with a well-typed
+ * [CheckDepositBehavior] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun checkDepositBehavior(checkDepositBehavior: JsonField) = apply {
+ this.checkDepositBehavior = checkDepositBehavior
+ }
+
/**
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Lockbox was
* created.
@@ -380,17 +401,6 @@ private constructor(
this.recipientName = recipientName
}
- /** This indicates if mail can be sent to this address. */
- fun status(status: Status) = status(JsonField.of(status))
-
- /**
- * Sets [Builder.status] to an arbitrary JSON value.
- *
- * You should usually call [Builder.status] with a well-typed [Status] value instead. This
- * method is primarily for setting the field to an undocumented or not yet supported value.
- */
- fun status(status: JsonField) = apply { this.status = status }
-
/**
* A constant representing the object's type. For this resource it will always be `lockbox`.
*/
@@ -433,11 +443,11 @@ private constructor(
* .id()
* .accountId()
* .address()
+ * .checkDepositBehavior()
* .createdAt()
* .description()
* .idempotencyKey()
* .recipientName()
- * .status()
* .type()
* ```
*
@@ -448,11 +458,11 @@ private constructor(
checkRequired("id", id),
checkRequired("accountId", accountId),
checkRequired("address", address),
+ checkRequired("checkDepositBehavior", checkDepositBehavior),
checkRequired("createdAt", createdAt),
checkRequired("description", description),
checkRequired("idempotencyKey", idempotencyKey),
checkRequired("recipientName", recipientName),
- checkRequired("status", status),
checkRequired("type", type),
additionalProperties.toMutableMap(),
)
@@ -468,11 +478,11 @@ private constructor(
id()
accountId()
address().validate()
+ checkDepositBehavior().validate()
createdAt()
description()
idempotencyKey()
recipientName()
- status().validate()
type().validate()
validated = true
}
@@ -495,11 +505,11 @@ private constructor(
(if (id.asKnown().isPresent) 1 else 0) +
(if (accountId.asKnown().isPresent) 1 else 0) +
(address.asKnown().getOrNull()?.validity() ?: 0) +
+ (checkDepositBehavior.asKnown().getOrNull()?.validity() ?: 0) +
(if (createdAt.asKnown().isPresent) 1 else 0) +
(if (description.asKnown().isPresent) 1 else 0) +
(if (idempotencyKey.asKnown().isPresent) 1 else 0) +
(if (recipientName.asKnown().isPresent) 1 else 0) +
- (status.asKnown().getOrNull()?.validity() ?: 0) +
(type.asKnown().getOrNull()?.validity() ?: 0)
/** The mailing address for the Lockbox. */
@@ -870,8 +880,10 @@ private constructor(
"Address{city=$city, line1=$line1, line2=$line2, postalCode=$postalCode, recipient=$recipient, state=$state, additionalProperties=$additionalProperties}"
}
- /** This indicates if mail can be sent to this address. */
- class Status @JsonCreator private constructor(private val value: JsonField) : Enum {
+ /** Indicates if checks mailed to this lockbox will be deposited. */
+ class CheckDepositBehavior
+ @JsonCreator
+ private constructor(private val value: JsonField) : Enum {
/**
* Returns this class instance's raw value.
@@ -885,38 +897,42 @@ private constructor(
companion object {
- /** This Lockbox is active. Checks mailed to it will be deposited automatically. */
- @JvmField val ACTIVE = of("active")
+ /** Checks mailed to this Lockbox will be deposited. */
+ @JvmField val ENABLED = of("enabled")
- /** This Lockbox is inactive. Checks mailed to it will not be deposited. */
- @JvmField val INACTIVE = of("inactive")
+ /** Checks mailed to this Lockbox will not be deposited. */
+ @JvmField val DISABLED = of("disabled")
- @JvmStatic fun of(value: String) = Status(JsonField.of(value))
+ @JvmStatic fun of(value: String) = CheckDepositBehavior(JsonField.of(value))
}
- /** An enum containing [Status]'s known values. */
+ /** An enum containing [CheckDepositBehavior]'s known values. */
enum class Known {
- /** This Lockbox is active. Checks mailed to it will be deposited automatically. */
- ACTIVE,
- /** This Lockbox is inactive. Checks mailed to it will not be deposited. */
- INACTIVE,
+ /** Checks mailed to this Lockbox will be deposited. */
+ ENABLED,
+ /** Checks mailed to this Lockbox will not be deposited. */
+ DISABLED,
}
/**
- * An enum containing [Status]'s known values, as well as an [_UNKNOWN] member.
+ * An enum containing [CheckDepositBehavior]'s known values, as well as an [_UNKNOWN]
+ * member.
*
- * An instance of [Status] can contain an unknown value in a couple of cases:
+ * An instance of [CheckDepositBehavior] 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 {
- /** This Lockbox is active. Checks mailed to it will be deposited automatically. */
- ACTIVE,
- /** This Lockbox is inactive. Checks mailed to it will not be deposited. */
- INACTIVE,
- /** An enum member indicating that [Status] was instantiated with an unknown value. */
+ /** Checks mailed to this Lockbox will be deposited. */
+ ENABLED,
+ /** Checks mailed to this Lockbox will not be deposited. */
+ DISABLED,
+ /**
+ * An enum member indicating that [CheckDepositBehavior] was instantiated with an
+ * unknown value.
+ */
_UNKNOWN,
}
@@ -929,8 +945,8 @@ private constructor(
*/
fun value(): Value =
when (this) {
- ACTIVE -> Value.ACTIVE
- INACTIVE -> Value.INACTIVE
+ ENABLED -> Value.ENABLED
+ DISABLED -> Value.DISABLED
else -> Value._UNKNOWN
}
@@ -945,9 +961,9 @@ private constructor(
*/
fun known(): Known =
when (this) {
- ACTIVE -> Known.ACTIVE
- INACTIVE -> Known.INACTIVE
- else -> throw IncreaseInvalidDataException("Unknown Status: $value")
+ ENABLED -> Known.ENABLED
+ DISABLED -> Known.DISABLED
+ else -> throw IncreaseInvalidDataException("Unknown CheckDepositBehavior: $value")
}
/**
@@ -966,7 +982,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): Status = apply {
+ fun validate(): CheckDepositBehavior = apply {
if (validated) {
return@apply
}
@@ -996,7 +1012,7 @@ private constructor(
return true
}
- return other is Status && value == other.value
+ return other is CheckDepositBehavior && value == other.value
}
override fun hashCode() = value.hashCode()
@@ -1135,11 +1151,11 @@ private constructor(
id == other.id &&
accountId == other.accountId &&
address == other.address &&
+ checkDepositBehavior == other.checkDepositBehavior &&
createdAt == other.createdAt &&
description == other.description &&
idempotencyKey == other.idempotencyKey &&
recipientName == other.recipientName &&
- status == other.status &&
type == other.type &&
additionalProperties == other.additionalProperties
}
@@ -1149,11 +1165,11 @@ private constructor(
id,
accountId,
address,
+ checkDepositBehavior,
createdAt,
description,
idempotencyKey,
recipientName,
- status,
type,
additionalProperties,
)
@@ -1162,5 +1178,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "Lockbox{id=$id, accountId=$accountId, address=$address, createdAt=$createdAt, description=$description, idempotencyKey=$idempotencyKey, recipientName=$recipientName, status=$status, type=$type, additionalProperties=$additionalProperties}"
+ "Lockbox{id=$id, accountId=$accountId, address=$address, checkDepositBehavior=$checkDepositBehavior, createdAt=$createdAt, description=$description, idempotencyKey=$idempotencyKey, recipientName=$recipientName, type=$type, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxUpdateParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxUpdateParams.kt
index 4e4b537cd..9d4ab6b89 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxUpdateParams.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxUpdateParams.kt
@@ -32,6 +32,14 @@ private constructor(
/** The identifier of the Lockbox. */
fun lockboxId(): Optional = Optional.ofNullable(lockboxId)
+ /**
+ * This indicates if checks mailed to this lockbox will be deposited.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun checkDepositBehavior(): Optional = body.checkDepositBehavior()
+
/**
* The description you choose for the Lockbox.
*
@@ -49,12 +57,12 @@ private constructor(
fun recipientName(): Optional = body.recipientName()
/**
- * This indicates if checks can be sent to the Lockbox.
+ * Returns the raw JSON value of [checkDepositBehavior].
*
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * Unlike [checkDepositBehavior], this method doesn't throw if the JSON field has an unexpected
+ * type.
*/
- fun status(): Optional = body.status()
+ fun _checkDepositBehavior(): JsonField = body._checkDepositBehavior()
/**
* Returns the raw JSON value of [description].
@@ -70,13 +78,6 @@ private constructor(
*/
fun _recipientName(): JsonField = body._recipientName()
- /**
- * Returns the raw JSON value of [status].
- *
- * Unlike [status], this method doesn't throw if the JSON field has an unexpected type.
- */
- fun _status(): JsonField = body._status()
-
fun _additionalBodyProperties(): Map = body._additionalProperties()
/** Additional headers to send with the request. */
@@ -122,12 +123,28 @@ private constructor(
*
* 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:
+ * - [checkDepositBehavior]
* - [description]
* - [recipientName]
- * - [status]
*/
fun body(body: Body) = apply { this.body = body.toBuilder() }
+ /** This indicates if checks mailed to this lockbox will be deposited. */
+ fun checkDepositBehavior(checkDepositBehavior: CheckDepositBehavior) = apply {
+ body.checkDepositBehavior(checkDepositBehavior)
+ }
+
+ /**
+ * Sets [Builder.checkDepositBehavior] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.checkDepositBehavior] with a well-typed
+ * [CheckDepositBehavior] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun checkDepositBehavior(checkDepositBehavior: JsonField) = apply {
+ body.checkDepositBehavior(checkDepositBehavior)
+ }
+
/** The description you choose for the Lockbox. */
fun description(description: String) = apply { body.description(description) }
@@ -154,17 +171,6 @@ private constructor(
body.recipientName(recipientName)
}
- /** This indicates if checks can be sent to the Lockbox. */
- fun status(status: Status) = apply { body.status(status) }
-
- /**
- * Sets [Builder.status] to an arbitrary JSON value.
- *
- * You should usually call [Builder.status] with a well-typed [Status] value instead. This
- * method is primarily for setting the field to an undocumented or not yet supported value.
- */
- fun status(status: JsonField) = apply { body.status(status) }
-
fun additionalBodyProperties(additionalBodyProperties: Map) = apply {
body.additionalProperties(additionalBodyProperties)
}
@@ -311,22 +317,33 @@ private constructor(
class Body
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
+ private val checkDepositBehavior: JsonField,
private val description: JsonField,
private val recipientName: JsonField,
- private val status: JsonField,
private val additionalProperties: MutableMap,
) {
@JsonCreator
private constructor(
+ @JsonProperty("check_deposit_behavior")
+ @ExcludeMissing
+ checkDepositBehavior: JsonField = JsonMissing.of(),
@JsonProperty("description")
@ExcludeMissing
description: JsonField = JsonMissing.of(),
@JsonProperty("recipient_name")
@ExcludeMissing
recipientName: JsonField = JsonMissing.of(),
- @JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(),
- ) : this(description, recipientName, status, mutableMapOf())
+ ) : this(checkDepositBehavior, description, recipientName, mutableMapOf())
+
+ /**
+ * This indicates if checks mailed to this lockbox will be deposited.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun checkDepositBehavior(): Optional =
+ checkDepositBehavior.getOptional("check_deposit_behavior")
/**
* The description you choose for the Lockbox.
@@ -345,12 +362,14 @@ private constructor(
fun recipientName(): Optional = recipientName.getOptional("recipient_name")
/**
- * This indicates if checks can be sent to the Lockbox.
+ * Returns the raw JSON value of [checkDepositBehavior].
*
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
- * the server responded with an unexpected value).
+ * Unlike [checkDepositBehavior], this method doesn't throw if the JSON field has an
+ * unexpected type.
*/
- fun status(): Optional = status.getOptional("status")
+ @JsonProperty("check_deposit_behavior")
+ @ExcludeMissing
+ fun _checkDepositBehavior(): JsonField = checkDepositBehavior
/**
* Returns the raw JSON value of [description].
@@ -371,13 +390,6 @@ private constructor(
@ExcludeMissing
fun _recipientName(): JsonField = recipientName
- /**
- * Returns the raw JSON value of [status].
- *
- * Unlike [status], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status
-
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
@@ -399,19 +411,35 @@ private constructor(
/** A builder for [Body]. */
class Builder internal constructor() {
+ private var checkDepositBehavior: JsonField = JsonMissing.of()
private var description: JsonField = JsonMissing.of()
private var recipientName: JsonField = JsonMissing.of()
- private var status: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
internal fun from(body: Body) = apply {
+ checkDepositBehavior = body.checkDepositBehavior
description = body.description
recipientName = body.recipientName
- status = body.status
additionalProperties = body.additionalProperties.toMutableMap()
}
+ /** This indicates if checks mailed to this lockbox will be deposited. */
+ fun checkDepositBehavior(checkDepositBehavior: CheckDepositBehavior) =
+ checkDepositBehavior(JsonField.of(checkDepositBehavior))
+
+ /**
+ * Sets [Builder.checkDepositBehavior] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.checkDepositBehavior] with a well-typed
+ * [CheckDepositBehavior] value instead. This method is primarily for setting the field
+ * to an undocumented or not yet supported value.
+ */
+ fun checkDepositBehavior(checkDepositBehavior: JsonField) =
+ apply {
+ this.checkDepositBehavior = checkDepositBehavior
+ }
+
/** The description you choose for the Lockbox. */
fun description(description: String) = description(JsonField.of(description))
@@ -440,18 +468,6 @@ private constructor(
this.recipientName = recipientName
}
- /** This indicates if checks can be sent to the Lockbox. */
- fun status(status: Status) = status(JsonField.of(status))
-
- /**
- * Sets [Builder.status] to an arbitrary JSON value.
- *
- * You should usually call [Builder.status] with a well-typed [Status] value instead.
- * This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun status(status: JsonField) = apply { this.status = status }
-
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
@@ -477,7 +493,12 @@ private constructor(
* Further updates to this [Builder] will not mutate the returned instance.
*/
fun build(): Body =
- Body(description, recipientName, status, additionalProperties.toMutableMap())
+ Body(
+ checkDepositBehavior,
+ description,
+ recipientName,
+ additionalProperties.toMutableMap(),
+ )
}
private var validated: Boolean = false
@@ -487,9 +508,9 @@ private constructor(
return@apply
}
+ checkDepositBehavior().ifPresent { it.validate() }
description()
recipientName()
- status().ifPresent { it.validate() }
validated = true
}
@@ -509,9 +530,9 @@ private constructor(
*/
@JvmSynthetic
internal fun validity(): Int =
- (if (description.asKnown().isPresent) 1 else 0) +
- (if (recipientName.asKnown().isPresent) 1 else 0) +
- (status.asKnown().getOrNull()?.validity() ?: 0)
+ (checkDepositBehavior.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (description.asKnown().isPresent) 1 else 0) +
+ (if (recipientName.asKnown().isPresent) 1 else 0)
override fun equals(other: Any?): Boolean {
if (this === other) {
@@ -519,24 +540,26 @@ private constructor(
}
return other is Body &&
+ checkDepositBehavior == other.checkDepositBehavior &&
description == other.description &&
recipientName == other.recipientName &&
- status == other.status &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
- Objects.hash(description, recipientName, status, additionalProperties)
+ Objects.hash(checkDepositBehavior, description, recipientName, additionalProperties)
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "Body{description=$description, recipientName=$recipientName, status=$status, additionalProperties=$additionalProperties}"
+ "Body{checkDepositBehavior=$checkDepositBehavior, description=$description, recipientName=$recipientName, additionalProperties=$additionalProperties}"
}
- /** This indicates if checks can be sent to the Lockbox. */
- class Status @JsonCreator private constructor(private val value: JsonField) : Enum {
+ /** This indicates if checks mailed to this lockbox will be deposited. */
+ class CheckDepositBehavior
+ @JsonCreator
+ private constructor(private val value: JsonField) : Enum {
/**
* Returns this class instance's raw value.
@@ -550,38 +573,42 @@ private constructor(
companion object {
- /** This Lockbox is active. Checks mailed to it will be deposited automatically. */
- @JvmField val ACTIVE = of("active")
+ /** Checks mailed to this Lockbox will be deposited. */
+ @JvmField val ENABLED = of("enabled")
- /** This Lockbox is inactive. Checks mailed to it will not be deposited. */
- @JvmField val INACTIVE = of("inactive")
+ /** Checks mailed to this Lockbox will not be deposited. */
+ @JvmField val DISABLED = of("disabled")
- @JvmStatic fun of(value: String) = Status(JsonField.of(value))
+ @JvmStatic fun of(value: String) = CheckDepositBehavior(JsonField.of(value))
}
- /** An enum containing [Status]'s known values. */
+ /** An enum containing [CheckDepositBehavior]'s known values. */
enum class Known {
- /** This Lockbox is active. Checks mailed to it will be deposited automatically. */
- ACTIVE,
- /** This Lockbox is inactive. Checks mailed to it will not be deposited. */
- INACTIVE,
+ /** Checks mailed to this Lockbox will be deposited. */
+ ENABLED,
+ /** Checks mailed to this Lockbox will not be deposited. */
+ DISABLED,
}
/**
- * An enum containing [Status]'s known values, as well as an [_UNKNOWN] member.
+ * An enum containing [CheckDepositBehavior]'s known values, as well as an [_UNKNOWN]
+ * member.
*
- * An instance of [Status] can contain an unknown value in a couple of cases:
+ * An instance of [CheckDepositBehavior] 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 {
- /** This Lockbox is active. Checks mailed to it will be deposited automatically. */
- ACTIVE,
- /** This Lockbox is inactive. Checks mailed to it will not be deposited. */
- INACTIVE,
- /** An enum member indicating that [Status] was instantiated with an unknown value. */
+ /** Checks mailed to this Lockbox will be deposited. */
+ ENABLED,
+ /** Checks mailed to this Lockbox will not be deposited. */
+ DISABLED,
+ /**
+ * An enum member indicating that [CheckDepositBehavior] was instantiated with an
+ * unknown value.
+ */
_UNKNOWN,
}
@@ -594,8 +621,8 @@ private constructor(
*/
fun value(): Value =
when (this) {
- ACTIVE -> Value.ACTIVE
- INACTIVE -> Value.INACTIVE
+ ENABLED -> Value.ENABLED
+ DISABLED -> Value.DISABLED
else -> Value._UNKNOWN
}
@@ -610,9 +637,9 @@ private constructor(
*/
fun known(): Known =
when (this) {
- ACTIVE -> Known.ACTIVE
- INACTIVE -> Known.INACTIVE
- else -> throw IncreaseInvalidDataException("Unknown Status: $value")
+ ENABLED -> Known.ENABLED
+ DISABLED -> Known.DISABLED
+ else -> throw IncreaseInvalidDataException("Unknown CheckDepositBehavior: $value")
}
/**
@@ -631,7 +658,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): Status = apply {
+ fun validate(): CheckDepositBehavior = apply {
if (validated) {
return@apply
}
@@ -661,7 +688,7 @@ private constructor(
return true
}
- return other is Status && value == other.value
+ return other is CheckDepositBehavior && value == other.value
}
override fun hashCode() = value.hashCode()
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/lockboxes/LockboxListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/lockboxes/LockboxListPageResponseTest.kt
index 1bc8e73c0..10f673ed9 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/lockboxes/LockboxListPageResponseTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/lockboxes/LockboxListPageResponseTest.kt
@@ -28,11 +28,11 @@ internal class LockboxListPageResponseTest {
.state("CA")
.build()
)
+ .checkDepositBehavior(Lockbox.CheckDepositBehavior.ENABLED)
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.description("Lockbox 1")
.idempotencyKey(null)
.recipientName("Company Inc.")
- .status(Lockbox.Status.ACTIVE)
.type(Lockbox.Type.LOCKBOX)
.build()
)
@@ -54,11 +54,11 @@ internal class LockboxListPageResponseTest {
.state("CA")
.build()
)
+ .checkDepositBehavior(Lockbox.CheckDepositBehavior.ENABLED)
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.description("Lockbox 1")
.idempotencyKey(null)
.recipientName("Company Inc.")
- .status(Lockbox.Status.ACTIVE)
.type(Lockbox.Type.LOCKBOX)
.build()
)
@@ -84,11 +84,11 @@ internal class LockboxListPageResponseTest {
.state("CA")
.build()
)
+ .checkDepositBehavior(Lockbox.CheckDepositBehavior.ENABLED)
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.description("Lockbox 1")
.idempotencyKey(null)
.recipientName("Company Inc.")
- .status(Lockbox.Status.ACTIVE)
.type(Lockbox.Type.LOCKBOX)
.build()
)
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/lockboxes/LockboxTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/lockboxes/LockboxTest.kt
index 7e41a39b0..2eaa9160d 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/lockboxes/LockboxTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/lockboxes/LockboxTest.kt
@@ -26,11 +26,11 @@ internal class LockboxTest {
.state("CA")
.build()
)
+ .checkDepositBehavior(Lockbox.CheckDepositBehavior.ENABLED)
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.description("Lockbox 1")
.idempotencyKey(null)
.recipientName("Company Inc.")
- .status(Lockbox.Status.ACTIVE)
.type(Lockbox.Type.LOCKBOX)
.build()
@@ -47,11 +47,11 @@ internal class LockboxTest {
.state("CA")
.build()
)
+ assertThat(lockbox.checkDepositBehavior()).isEqualTo(Lockbox.CheckDepositBehavior.ENABLED)
assertThat(lockbox.createdAt()).isEqualTo(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
assertThat(lockbox.description()).contains("Lockbox 1")
assertThat(lockbox.idempotencyKey()).isEmpty
assertThat(lockbox.recipientName()).contains("Company Inc.")
- assertThat(lockbox.status()).isEqualTo(Lockbox.Status.ACTIVE)
assertThat(lockbox.type()).isEqualTo(Lockbox.Type.LOCKBOX)
}
@@ -72,11 +72,11 @@ internal class LockboxTest {
.state("CA")
.build()
)
+ .checkDepositBehavior(Lockbox.CheckDepositBehavior.ENABLED)
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.description("Lockbox 1")
.idempotencyKey(null)
.recipientName("Company Inc.")
- .status(Lockbox.Status.ACTIVE)
.type(Lockbox.Type.LOCKBOX)
.build()
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/lockboxes/LockboxUpdateParamsTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/lockboxes/LockboxUpdateParamsTest.kt
index ba3242219..f52dc3a5c 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/lockboxes/LockboxUpdateParamsTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/lockboxes/LockboxUpdateParamsTest.kt
@@ -11,9 +11,9 @@ internal class LockboxUpdateParamsTest {
fun create() {
LockboxUpdateParams.builder()
.lockboxId("lockbox_3xt21ok13q19advds4t5")
+ .checkDepositBehavior(LockboxUpdateParams.CheckDepositBehavior.DISABLED)
.description("x")
.recipientName("x")
- .status(LockboxUpdateParams.Status.INACTIVE)
.build()
}
@@ -31,16 +31,17 @@ internal class LockboxUpdateParamsTest {
val params =
LockboxUpdateParams.builder()
.lockboxId("lockbox_3xt21ok13q19advds4t5")
+ .checkDepositBehavior(LockboxUpdateParams.CheckDepositBehavior.DISABLED)
.description("x")
.recipientName("x")
- .status(LockboxUpdateParams.Status.INACTIVE)
.build()
val body = params._body()
+ assertThat(body.checkDepositBehavior())
+ .contains(LockboxUpdateParams.CheckDepositBehavior.DISABLED)
assertThat(body.description()).contains("x")
assertThat(body.recipientName()).contains("x")
- assertThat(body.status()).contains(LockboxUpdateParams.Status.INACTIVE)
}
@Test
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/LockboxServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/LockboxServiceAsyncTest.kt
index fa88627cf..722e1d4a9 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/LockboxServiceAsyncTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/LockboxServiceAsyncTest.kt
@@ -62,9 +62,9 @@ internal class LockboxServiceAsyncTest {
lockboxServiceAsync.update(
LockboxUpdateParams.builder()
.lockboxId("lockbox_3xt21ok13q19advds4t5")
+ .checkDepositBehavior(LockboxUpdateParams.CheckDepositBehavior.DISABLED)
.description("x")
.recipientName("x")
- .status(LockboxUpdateParams.Status.INACTIVE)
.build()
)
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/LockboxServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/LockboxServiceTest.kt
index 5bb8ce456..41da8d7e3 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/LockboxServiceTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/LockboxServiceTest.kt
@@ -60,9 +60,9 @@ internal class LockboxServiceTest {
lockboxService.update(
LockboxUpdateParams.builder()
.lockboxId("lockbox_3xt21ok13q19advds4t5")
+ .checkDepositBehavior(LockboxUpdateParams.CheckDepositBehavior.DISABLED)
.description("x")
.recipientName("x")
- .status(LockboxUpdateParams.Status.INACTIVE)
.build()
)