diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 2607471c1..1c8721128 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.525.0"
+ ".": "0.526.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index e029231b5..6f61c3b1a 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-4615e5953fac5a76724144fc2e1f9f675a9722dc05adaeab23e4d09c9577086b.yml
-openapi_spec_hash: 6db98497c4dda09b575d5ee12371ef83
-config_hash: b24ba63471a818520cec39b4695e1825
+configured_endpoints: 236
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-47752267c48d299a01c906499bb7d584228ea8801b7d83e34ae4100d5dec3434.yml
+openapi_spec_hash: 9ea8bc6dc383de626d3fa15c823227ae
+config_hash: 026e2baa580c7f5f2447c24332081ba8
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8e346bdb1..9897f539f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
# Changelog
+## 0.526.0 (2026-04-27)
+
+Full Changelog: [v0.525.0...v0.526.0](https://github.com/Increase/increase-java/compare/v0.525.0...v0.526.0)
+
+### Features
+
+* **api:** api update ([5e99639](https://github.com/Increase/increase-java/commit/5e996394faa744ab511d666d1abc7b887f1828b8))
+* **api:** api update ([118c6f8](https://github.com/Increase/increase-java/commit/118c6f861601da7a97fad8fe9640fc8c76e88b11))
+
## 0.525.0 (2026-04-22)
Full Changelog: [v0.524.0...v0.525.0](https://github.com/Increase/increase-java/compare/v0.524.0...v0.525.0)
diff --git a/README.md b/README.md
index 9f2c1fb9e..b80aeaff4 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.525.0)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.525.0)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.526.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.526.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.525.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.526.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.525.0")
+implementation("com.increase.api:increase-java:0.526.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.525.0")
com.increase.api
increase-java
- 0.525.0
+ 0.526.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 7db5af3e2..6696adc6b 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.525.0" // x-release-please-version
+ version = "0.526.0" // x-release-please-version
}
subprojects {
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClient.kt b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClient.kt
index 325f50a3e..4f752c65f 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClient.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClient.kt
@@ -42,7 +42,8 @@ import com.increase.api.services.blocking.InboundWireTransferService
import com.increase.api.services.blocking.IntrafiAccountEnrollmentService
import com.increase.api.services.blocking.IntrafiBalanceService
import com.increase.api.services.blocking.IntrafiExclusionService
-import com.increase.api.services.blocking.LockboxService
+import com.increase.api.services.blocking.LockboxAddressService
+import com.increase.api.services.blocking.LockboxRecipientService
import com.increase.api.services.blocking.OAuthApplicationService
import com.increase.api.services.blocking.OAuthConnectionService
import com.increase.api.services.blocking.OAuthTokenService
@@ -155,7 +156,9 @@ interface IncreaseClient {
fun checkDeposits(): CheckDepositService
- fun lockboxes(): LockboxService
+ fun lockboxAddresses(): LockboxAddressService
+
+ fun lockboxRecipients(): LockboxRecipientService
fun inboundMailItems(): InboundMailItemService
@@ -291,7 +294,9 @@ interface IncreaseClient {
fun checkDeposits(): CheckDepositService.WithRawResponse
- fun lockboxes(): LockboxService.WithRawResponse
+ fun lockboxAddresses(): LockboxAddressService.WithRawResponse
+
+ fun lockboxRecipients(): LockboxRecipientService.WithRawResponse
fun inboundMailItems(): InboundMailItemService.WithRawResponse
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsync.kt
index eb524b929..7bd3c733c 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsync.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsync.kt
@@ -42,7 +42,8 @@ import com.increase.api.services.async.InboundWireTransferServiceAsync
import com.increase.api.services.async.IntrafiAccountEnrollmentServiceAsync
import com.increase.api.services.async.IntrafiBalanceServiceAsync
import com.increase.api.services.async.IntrafiExclusionServiceAsync
-import com.increase.api.services.async.LockboxServiceAsync
+import com.increase.api.services.async.LockboxAddressServiceAsync
+import com.increase.api.services.async.LockboxRecipientServiceAsync
import com.increase.api.services.async.OAuthApplicationServiceAsync
import com.increase.api.services.async.OAuthConnectionServiceAsync
import com.increase.api.services.async.OAuthTokenServiceAsync
@@ -155,7 +156,9 @@ interface IncreaseClientAsync {
fun checkDeposits(): CheckDepositServiceAsync
- fun lockboxes(): LockboxServiceAsync
+ fun lockboxAddresses(): LockboxAddressServiceAsync
+
+ fun lockboxRecipients(): LockboxRecipientServiceAsync
fun inboundMailItems(): InboundMailItemServiceAsync
@@ -295,7 +298,9 @@ interface IncreaseClientAsync {
fun checkDeposits(): CheckDepositServiceAsync.WithRawResponse
- fun lockboxes(): LockboxServiceAsync.WithRawResponse
+ fun lockboxAddresses(): LockboxAddressServiceAsync.WithRawResponse
+
+ fun lockboxRecipients(): LockboxRecipientServiceAsync.WithRawResponse
fun inboundMailItems(): InboundMailItemServiceAsync.WithRawResponse
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsyncImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsyncImpl.kt
index 23415543b..e0396b387 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsyncImpl.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientAsyncImpl.kt
@@ -82,8 +82,10 @@ import com.increase.api.services.async.IntrafiBalanceServiceAsync
import com.increase.api.services.async.IntrafiBalanceServiceAsyncImpl
import com.increase.api.services.async.IntrafiExclusionServiceAsync
import com.increase.api.services.async.IntrafiExclusionServiceAsyncImpl
-import com.increase.api.services.async.LockboxServiceAsync
-import com.increase.api.services.async.LockboxServiceAsyncImpl
+import com.increase.api.services.async.LockboxAddressServiceAsync
+import com.increase.api.services.async.LockboxAddressServiceAsyncImpl
+import com.increase.api.services.async.LockboxRecipientServiceAsync
+import com.increase.api.services.async.LockboxRecipientServiceAsyncImpl
import com.increase.api.services.async.OAuthApplicationServiceAsync
import com.increase.api.services.async.OAuthApplicationServiceAsyncImpl
import com.increase.api.services.async.OAuthConnectionServiceAsync
@@ -250,8 +252,12 @@ class IncreaseClientAsyncImpl(private val clientOptions: ClientOptions) : Increa
CheckDepositServiceAsyncImpl(clientOptionsWithUserAgent)
}
- private val lockboxes: LockboxServiceAsync by lazy {
- LockboxServiceAsyncImpl(clientOptionsWithUserAgent)
+ private val lockboxAddresses: LockboxAddressServiceAsync by lazy {
+ LockboxAddressServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
+
+ private val lockboxRecipients: LockboxRecipientServiceAsync by lazy {
+ LockboxRecipientServiceAsyncImpl(clientOptionsWithUserAgent)
}
private val inboundMailItems: InboundMailItemServiceAsync by lazy {
@@ -426,7 +432,9 @@ class IncreaseClientAsyncImpl(private val clientOptions: ClientOptions) : Increa
override fun checkDeposits(): CheckDepositServiceAsync = checkDeposits
- override fun lockboxes(): LockboxServiceAsync = lockboxes
+ override fun lockboxAddresses(): LockboxAddressServiceAsync = lockboxAddresses
+
+ override fun lockboxRecipients(): LockboxRecipientServiceAsync = lockboxRecipients
override fun inboundMailItems(): InboundMailItemServiceAsync = inboundMailItems
@@ -608,8 +616,12 @@ class IncreaseClientAsyncImpl(private val clientOptions: ClientOptions) : Increa
CheckDepositServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
- private val lockboxes: LockboxServiceAsync.WithRawResponse by lazy {
- LockboxServiceAsyncImpl.WithRawResponseImpl(clientOptions)
+ private val lockboxAddresses: LockboxAddressServiceAsync.WithRawResponse by lazy {
+ LockboxAddressServiceAsyncImpl.WithRawResponseImpl(clientOptions)
+ }
+
+ private val lockboxRecipients: LockboxRecipientServiceAsync.WithRawResponse by lazy {
+ LockboxRecipientServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
private val inboundMailItems: InboundMailItemServiceAsync.WithRawResponse by lazy {
@@ -801,7 +813,11 @@ class IncreaseClientAsyncImpl(private val clientOptions: ClientOptions) : Increa
override fun checkDeposits(): CheckDepositServiceAsync.WithRawResponse = checkDeposits
- override fun lockboxes(): LockboxServiceAsync.WithRawResponse = lockboxes
+ override fun lockboxAddresses(): LockboxAddressServiceAsync.WithRawResponse =
+ lockboxAddresses
+
+ override fun lockboxRecipients(): LockboxRecipientServiceAsync.WithRawResponse =
+ lockboxRecipients
override fun inboundMailItems(): InboundMailItemServiceAsync.WithRawResponse =
inboundMailItems
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientImpl.kt b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientImpl.kt
index cd5cece97..b7abfb3bb 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientImpl.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/client/IncreaseClientImpl.kt
@@ -82,8 +82,10 @@ import com.increase.api.services.blocking.IntrafiBalanceService
import com.increase.api.services.blocking.IntrafiBalanceServiceImpl
import com.increase.api.services.blocking.IntrafiExclusionService
import com.increase.api.services.blocking.IntrafiExclusionServiceImpl
-import com.increase.api.services.blocking.LockboxService
-import com.increase.api.services.blocking.LockboxServiceImpl
+import com.increase.api.services.blocking.LockboxAddressService
+import com.increase.api.services.blocking.LockboxAddressServiceImpl
+import com.increase.api.services.blocking.LockboxRecipientService
+import com.increase.api.services.blocking.LockboxRecipientServiceImpl
import com.increase.api.services.blocking.OAuthApplicationService
import com.increase.api.services.blocking.OAuthApplicationServiceImpl
import com.increase.api.services.blocking.OAuthConnectionService
@@ -247,7 +249,13 @@ class IncreaseClientImpl(private val clientOptions: ClientOptions) : IncreaseCli
CheckDepositServiceImpl(clientOptionsWithUserAgent)
}
- private val lockboxes: LockboxService by lazy { LockboxServiceImpl(clientOptionsWithUserAgent) }
+ private val lockboxAddresses: LockboxAddressService by lazy {
+ LockboxAddressServiceImpl(clientOptionsWithUserAgent)
+ }
+
+ private val lockboxRecipients: LockboxRecipientService by lazy {
+ LockboxRecipientServiceImpl(clientOptionsWithUserAgent)
+ }
private val inboundMailItems: InboundMailItemService by lazy {
InboundMailItemServiceImpl(clientOptionsWithUserAgent)
@@ -409,7 +417,9 @@ class IncreaseClientImpl(private val clientOptions: ClientOptions) : IncreaseCli
override fun checkDeposits(): CheckDepositService = checkDeposits
- override fun lockboxes(): LockboxService = lockboxes
+ override fun lockboxAddresses(): LockboxAddressService = lockboxAddresses
+
+ override fun lockboxRecipients(): LockboxRecipientService = lockboxRecipients
override fun inboundMailItems(): InboundMailItemService = inboundMailItems
@@ -589,8 +599,12 @@ class IncreaseClientImpl(private val clientOptions: ClientOptions) : IncreaseCli
CheckDepositServiceImpl.WithRawResponseImpl(clientOptions)
}
- private val lockboxes: LockboxService.WithRawResponse by lazy {
- LockboxServiceImpl.WithRawResponseImpl(clientOptions)
+ private val lockboxAddresses: LockboxAddressService.WithRawResponse by lazy {
+ LockboxAddressServiceImpl.WithRawResponseImpl(clientOptions)
+ }
+
+ private val lockboxRecipients: LockboxRecipientService.WithRawResponse by lazy {
+ LockboxRecipientServiceImpl.WithRawResponseImpl(clientOptions)
}
private val inboundMailItems: InboundMailItemService.WithRawResponse by lazy {
@@ -780,7 +794,10 @@ class IncreaseClientImpl(private val clientOptions: ClientOptions) : IncreaseCli
override fun checkDeposits(): CheckDepositService.WithRawResponse = checkDeposits
- override fun lockboxes(): LockboxService.WithRawResponse = lockboxes
+ override fun lockboxAddresses(): LockboxAddressService.WithRawResponse = lockboxAddresses
+
+ override fun lockboxRecipients(): LockboxRecipientService.WithRawResponse =
+ lockboxRecipients
override fun inboundMailItems(): InboundMailItemService.WithRawResponse = inboundMailItems
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransfer.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransfer.kt
index f39344f7b..6f764f509 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransfer.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/cardpushtransfers/CardPushTransfer.kt
@@ -6525,6 +6525,9 @@ private constructor(
/** Mastercard and Maestro */
@JvmField val MASTERCARD = of("mastercard")
+ /** Pulse */
+ @JvmField val PULSE = of("pulse")
+
@JvmStatic fun of(value: String) = Route(JsonField.of(value))
}
@@ -6534,6 +6537,8 @@ private constructor(
VISA,
/** Mastercard and Maestro */
MASTERCARD,
+ /** Pulse */
+ PULSE,
}
/**
@@ -6550,6 +6555,8 @@ private constructor(
VISA,
/** Mastercard and Maestro */
MASTERCARD,
+ /** Pulse */
+ PULSE,
/** An enum member indicating that [Route] was instantiated with an unknown value. */
_UNKNOWN,
}
@@ -6565,6 +6572,7 @@ private constructor(
when (this) {
VISA -> Value.VISA
MASTERCARD -> Value.MASTERCARD
+ PULSE -> Value.PULSE
else -> Value._UNKNOWN
}
@@ -6581,6 +6589,7 @@ private constructor(
when (this) {
VISA -> Known.VISA
MASTERCARD -> Known.MASTERCARD
+ PULSE -> Known.PULSE
else -> throw IncreaseInvalidDataException("Unknown Route: $value")
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardtokens/CardTokenCapabilities.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardtokens/CardTokenCapabilities.kt
index 6bd598f57..b262bdd98 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardtokens/CardTokenCapabilities.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/cardtokens/CardTokenCapabilities.kt
@@ -811,6 +811,9 @@ private constructor(
/** Mastercard and Maestro */
@JvmField val MASTERCARD = of("mastercard")
+ /** Pulse */
+ @JvmField val PULSE = of("pulse")
+
@JvmStatic fun of(value: String) = InnerRoute(JsonField.of(value))
}
@@ -820,6 +823,8 @@ private constructor(
VISA,
/** Mastercard and Maestro */
MASTERCARD,
+ /** Pulse */
+ PULSE,
}
/**
@@ -836,6 +841,8 @@ private constructor(
VISA,
/** Mastercard and Maestro */
MASTERCARD,
+ /** Pulse */
+ PULSE,
/**
* An enum member indicating that [InnerRoute] was instantiated with an unknown
* value.
@@ -854,6 +861,7 @@ private constructor(
when (this) {
VISA -> Value.VISA
MASTERCARD -> Value.MASTERCARD
+ PULSE -> Value.PULSE
else -> Value._UNKNOWN
}
@@ -870,6 +878,7 @@ private constructor(
when (this) {
VISA -> Known.VISA
MASTERCARD -> Known.MASTERCARD
+ PULSE -> Known.PULSE
else -> throw IncreaseInvalidDataException("Unknown InnerRoute: $value")
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/cardvalidations/CardValidation.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/cardvalidations/CardValidation.kt
index 0bb6714f2..773b4c75f 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/cardvalidations/CardValidation.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/cardvalidations/CardValidation.kt
@@ -4956,6 +4956,9 @@ private constructor(
/** Mastercard and Maestro */
@JvmField val MASTERCARD = of("mastercard")
+ /** Pulse */
+ @JvmField val PULSE = of("pulse")
+
@JvmStatic fun of(value: String) = Route(JsonField.of(value))
}
@@ -4965,6 +4968,8 @@ private constructor(
VISA,
/** Mastercard and Maestro */
MASTERCARD,
+ /** Pulse */
+ PULSE,
}
/**
@@ -4981,6 +4986,8 @@ private constructor(
VISA,
/** Mastercard and Maestro */
MASTERCARD,
+ /** Pulse */
+ PULSE,
/** An enum member indicating that [Route] was instantiated with an unknown value. */
_UNKNOWN,
}
@@ -4996,6 +5003,7 @@ private constructor(
when (this) {
VISA -> Value.VISA
MASTERCARD -> Value.MASTERCARD
+ PULSE -> Value.PULSE
else -> Value._UNKNOWN
}
@@ -5012,6 +5020,7 @@ private constructor(
when (this) {
VISA -> Known.VISA
MASTERCARD -> Known.MASTERCARD
+ PULSE -> Known.PULSE
else -> throw IncreaseInvalidDataException("Unknown Route: $value")
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/checkdeposits/CheckDeposit.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/checkdeposits/CheckDeposit.kt
index 275227e09..a7b364c39 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/checkdeposits/CheckDeposit.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/checkdeposits/CheckDeposit.kt
@@ -40,7 +40,7 @@ private constructor(
private val idempotencyKey: JsonField,
private val inboundFundsHold: JsonField,
private val inboundMailItemId: JsonField,
- private val lockboxId: JsonField,
+ private val lockboxRecipientId: JsonField,
private val status: JsonField,
private val transactionId: JsonField,
private val type: JsonField,
@@ -88,7 +88,9 @@ private constructor(
@JsonProperty("inbound_mail_item_id")
@ExcludeMissing
inboundMailItemId: JsonField = JsonMissing.of(),
- @JsonProperty("lockbox_id") @ExcludeMissing lockboxId: JsonField = JsonMissing.of(),
+ @JsonProperty("lockbox_recipient_id")
+ @ExcludeMissing
+ lockboxRecipientId: JsonField = JsonMissing.of(),
@JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(),
@JsonProperty("transaction_id")
@ExcludeMissing
@@ -110,7 +112,7 @@ private constructor(
idempotencyKey,
inboundFundsHold,
inboundMailItemId,
- lockboxId,
+ lockboxRecipientId,
status,
transactionId,
type,
@@ -252,13 +254,14 @@ private constructor(
inboundMailItemId.getOptional("inbound_mail_item_id")
/**
- * If the Check Deposit was the result of an Inbound Mail Item, this will contain the identifier
- * of the Lockbox that received it.
+ * If the Check Deposit was the result of an Inbound Mail Item routed to a Lockbox Recipient,
+ * this will contain the identifier of the Lockbox Recipient that received it.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
- fun lockboxId(): Optional = lockboxId.getOptional("lockbox_id")
+ fun lockboxRecipientId(): Optional =
+ lockboxRecipientId.getOptional("lockbox_recipient_id")
/**
* The status of the Check Deposit.
@@ -420,11 +423,14 @@ private constructor(
fun _inboundMailItemId(): JsonField = inboundMailItemId
/**
- * Returns the raw JSON value of [lockboxId].
+ * Returns the raw JSON value of [lockboxRecipientId].
*
- * Unlike [lockboxId], this method doesn't throw if the JSON field has an unexpected type.
+ * Unlike [lockboxRecipientId], this method doesn't throw if the JSON field has an unexpected
+ * type.
*/
- @JsonProperty("lockbox_id") @ExcludeMissing fun _lockboxId(): JsonField = lockboxId
+ @JsonProperty("lockbox_recipient_id")
+ @ExcludeMissing
+ fun _lockboxRecipientId(): JsonField = lockboxRecipientId
/**
* Returns the raw JSON value of [status].
@@ -483,7 +489,7 @@ private constructor(
* .idempotencyKey()
* .inboundFundsHold()
* .inboundMailItemId()
- * .lockboxId()
+ * .lockboxRecipientId()
* .status()
* .transactionId()
* .type()
@@ -510,7 +516,7 @@ private constructor(
private var idempotencyKey: JsonField? = null
private var inboundFundsHold: JsonField? = null
private var inboundMailItemId: JsonField? = null
- private var lockboxId: JsonField? = null
+ private var lockboxRecipientId: JsonField? = null
private var status: JsonField? = null
private var transactionId: JsonField? = null
private var type: JsonField? = null
@@ -533,7 +539,7 @@ private constructor(
idempotencyKey = checkDeposit.idempotencyKey
inboundFundsHold = checkDeposit.inboundFundsHold
inboundMailItemId = checkDeposit.inboundMailItemId
- lockboxId = checkDeposit.lockboxId
+ lockboxRecipientId = checkDeposit.lockboxRecipientId
status = checkDeposit.status
transactionId = checkDeposit.transactionId
type = checkDeposit.type
@@ -821,22 +827,28 @@ private constructor(
}
/**
- * If the Check Deposit was the result of an Inbound Mail Item, this will contain the
- * identifier of the Lockbox that received it.
+ * If the Check Deposit was the result of an Inbound Mail Item routed to a Lockbox
+ * Recipient, this will contain the identifier of the Lockbox Recipient that received it.
*/
- fun lockboxId(lockboxId: String?) = lockboxId(JsonField.ofNullable(lockboxId))
+ fun lockboxRecipientId(lockboxRecipientId: String?) =
+ lockboxRecipientId(JsonField.ofNullable(lockboxRecipientId))
- /** Alias for calling [Builder.lockboxId] with `lockboxId.orElse(null)`. */
- fun lockboxId(lockboxId: Optional) = lockboxId(lockboxId.getOrNull())
+ /**
+ * Alias for calling [Builder.lockboxRecipientId] with `lockboxRecipientId.orElse(null)`.
+ */
+ fun lockboxRecipientId(lockboxRecipientId: Optional) =
+ lockboxRecipientId(lockboxRecipientId.getOrNull())
/**
- * Sets [Builder.lockboxId] to an arbitrary JSON value.
+ * Sets [Builder.lockboxRecipientId] to an arbitrary JSON value.
*
- * You should usually call [Builder.lockboxId] with a well-typed [String] value instead.
- * This method is primarily for setting the field to an undocumented or not yet supported
- * value.
+ * You should usually call [Builder.lockboxRecipientId] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
*/
- fun lockboxId(lockboxId: JsonField) = apply { this.lockboxId = lockboxId }
+ fun lockboxRecipientId(lockboxRecipientId: JsonField) = apply {
+ this.lockboxRecipientId = lockboxRecipientId
+ }
/** The status of the Check Deposit. */
fun status(status: Status) = status(JsonField.of(status))
@@ -923,7 +935,7 @@ private constructor(
* .idempotencyKey()
* .inboundFundsHold()
* .inboundMailItemId()
- * .lockboxId()
+ * .lockboxRecipientId()
* .status()
* .transactionId()
* .type()
@@ -948,7 +960,7 @@ private constructor(
checkRequired("idempotencyKey", idempotencyKey),
checkRequired("inboundFundsHold", inboundFundsHold),
checkRequired("inboundMailItemId", inboundMailItemId),
- checkRequired("lockboxId", lockboxId),
+ checkRequired("lockboxRecipientId", lockboxRecipientId),
checkRequired("status", status),
checkRequired("transactionId", transactionId),
checkRequired("type", type),
@@ -978,7 +990,7 @@ private constructor(
idempotencyKey()
inboundFundsHold().ifPresent { it.validate() }
inboundMailItemId()
- lockboxId()
+ lockboxRecipientId()
status().validate()
transactionId()
type().validate()
@@ -1015,7 +1027,7 @@ private constructor(
(if (idempotencyKey.asKnown().isPresent) 1 else 0) +
(inboundFundsHold.asKnown().getOrNull()?.validity() ?: 0) +
(if (inboundMailItemId.asKnown().isPresent) 1 else 0) +
- (if (lockboxId.asKnown().isPresent) 1 else 0) +
+ (if (lockboxRecipientId.asKnown().isPresent) 1 else 0) +
(status.asKnown().getOrNull()?.validity() ?: 0) +
(if (transactionId.asKnown().isPresent) 1 else 0) +
(type.asKnown().getOrNull()?.validity() ?: 0)
@@ -5272,7 +5284,7 @@ private constructor(
idempotencyKey == other.idempotencyKey &&
inboundFundsHold == other.inboundFundsHold &&
inboundMailItemId == other.inboundMailItemId &&
- lockboxId == other.lockboxId &&
+ lockboxRecipientId == other.lockboxRecipientId &&
status == other.status &&
transactionId == other.transactionId &&
type == other.type &&
@@ -5296,7 +5308,7 @@ private constructor(
idempotencyKey,
inboundFundsHold,
inboundMailItemId,
- lockboxId,
+ lockboxRecipientId,
status,
transactionId,
type,
@@ -5307,5 +5319,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "CheckDeposit{id=$id, accountId=$accountId, amount=$amount, backImageFileId=$backImageFileId, createdAt=$createdAt, depositAcceptance=$depositAcceptance, depositAdjustments=$depositAdjustments, depositRejection=$depositRejection, depositReturn=$depositReturn, depositSubmission=$depositSubmission, description=$description, frontImageFileId=$frontImageFileId, idempotencyKey=$idempotencyKey, inboundFundsHold=$inboundFundsHold, inboundMailItemId=$inboundMailItemId, lockboxId=$lockboxId, status=$status, transactionId=$transactionId, type=$type, additionalProperties=$additionalProperties}"
+ "CheckDeposit{id=$id, accountId=$accountId, amount=$amount, backImageFileId=$backImageFileId, createdAt=$createdAt, depositAcceptance=$depositAcceptance, depositAdjustments=$depositAdjustments, depositRejection=$depositRejection, depositReturn=$depositReturn, depositSubmission=$depositSubmission, description=$description, frontImageFileId=$frontImageFileId, idempotencyKey=$idempotencyKey, inboundFundsHold=$inboundFundsHold, inboundMailItemId=$inboundMailItemId, lockboxRecipientId=$lockboxRecipientId, status=$status, transactionId=$transactionId, type=$type, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItem.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItem.kt
index 426a2c8ff..540c71a2a 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItem.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItem.kt
@@ -21,7 +21,7 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
-/** Inbound Mail Items represent pieces of physical mail delivered to a Lockbox. */
+/** Inbound Mail Items represent pieces of physical mail delivered to a Lockbox Address. */
class InboundMailItem
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
@@ -29,7 +29,8 @@ private constructor(
private val checks: JsonField>,
private val createdAt: JsonField,
private val fileId: JsonField,
- private val lockboxId: JsonField,
+ private val lockboxAddressId: JsonField,
+ private val lockboxRecipientId: JsonField,
private val recipientName: JsonField,
private val rejectionReason: JsonField,
private val status: JsonField,
@@ -45,7 +46,12 @@ private constructor(
@ExcludeMissing
createdAt: JsonField = JsonMissing.of(),
@JsonProperty("file_id") @ExcludeMissing fileId: JsonField = JsonMissing.of(),
- @JsonProperty("lockbox_id") @ExcludeMissing lockboxId: JsonField = JsonMissing.of(),
+ @JsonProperty("lockbox_address_id")
+ @ExcludeMissing
+ lockboxAddressId: JsonField = JsonMissing.of(),
+ @JsonProperty("lockbox_recipient_id")
+ @ExcludeMissing
+ lockboxRecipientId: JsonField = JsonMissing.of(),
@JsonProperty("recipient_name")
@ExcludeMissing
recipientName: JsonField = JsonMissing.of(),
@@ -59,7 +65,8 @@ private constructor(
checks,
createdAt,
fileId,
- lockboxId,
+ lockboxAddressId,
+ lockboxRecipientId,
recipientName,
rejectionReason,
status,
@@ -101,13 +108,22 @@ private constructor(
fun fileId(): String = fileId.getRequired("file_id")
/**
- * The identifier for the Lockbox that received this mail item. For mail items that could not be
- * processed due to an invalid address, this will be null.
+ * The identifier for the Lockbox Address that received this mail item.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun lockboxAddressId(): Optional = lockboxAddressId.getOptional("lockbox_address_id")
+
+ /**
+ * The identifier for the Lockbox Recipient that received this mail item. For mail items that
+ * could not be routed to a Lockbox Recipient, this will be null.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
- fun lockboxId(): Optional = lockboxId.getOptional("lockbox_id")
+ fun lockboxRecipientId(): Optional =
+ lockboxRecipientId.getOptional("lockbox_recipient_id")
/**
* The recipient name as written on the mail item.
@@ -174,11 +190,24 @@ private constructor(
@JsonProperty("file_id") @ExcludeMissing fun _fileId(): JsonField = fileId
/**
- * Returns the raw JSON value of [lockboxId].
+ * Returns the raw JSON value of [lockboxAddressId].
*
- * Unlike [lockboxId], this method doesn't throw if the JSON field has an unexpected type.
+ * Unlike [lockboxAddressId], this method doesn't throw if the JSON field has an unexpected
+ * type.
*/
- @JsonProperty("lockbox_id") @ExcludeMissing fun _lockboxId(): JsonField = lockboxId
+ @JsonProperty("lockbox_address_id")
+ @ExcludeMissing
+ fun _lockboxAddressId(): JsonField = lockboxAddressId
+
+ /**
+ * Returns the raw JSON value of [lockboxRecipientId].
+ *
+ * Unlike [lockboxRecipientId], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("lockbox_recipient_id")
+ @ExcludeMissing
+ fun _lockboxRecipientId(): JsonField = lockboxRecipientId
/**
* Returns the raw JSON value of [recipientName].
@@ -235,7 +264,8 @@ private constructor(
* .checks()
* .createdAt()
* .fileId()
- * .lockboxId()
+ * .lockboxAddressId()
+ * .lockboxRecipientId()
* .recipientName()
* .rejectionReason()
* .status()
@@ -252,7 +282,8 @@ private constructor(
private var checks: JsonField>? = null
private var createdAt: JsonField? = null
private var fileId: JsonField? = null
- private var lockboxId: JsonField? = null
+ private var lockboxAddressId: JsonField? = null
+ private var lockboxRecipientId: JsonField? = null
private var recipientName: JsonField? = null
private var rejectionReason: JsonField? = null
private var status: JsonField? = null
@@ -265,7 +296,8 @@ private constructor(
checks = inboundMailItem.checks.map { it.toMutableList() }
createdAt = inboundMailItem.createdAt
fileId = inboundMailItem.fileId
- lockboxId = inboundMailItem.lockboxId
+ lockboxAddressId = inboundMailItem.lockboxAddressId
+ lockboxRecipientId = inboundMailItem.lockboxRecipientId
recipientName = inboundMailItem.recipientName
rejectionReason = inboundMailItem.rejectionReason
status = inboundMailItem.status
@@ -336,23 +368,48 @@ private constructor(
*/
fun fileId(fileId: JsonField) = apply { this.fileId = fileId }
+ /** The identifier for the Lockbox Address that received this mail item. */
+ fun lockboxAddressId(lockboxAddressId: String?) =
+ lockboxAddressId(JsonField.ofNullable(lockboxAddressId))
+
+ /** Alias for calling [Builder.lockboxAddressId] with `lockboxAddressId.orElse(null)`. */
+ fun lockboxAddressId(lockboxAddressId: Optional) =
+ lockboxAddressId(lockboxAddressId.getOrNull())
+
/**
- * The identifier for the Lockbox that received this mail item. For mail items that could
- * not be processed due to an invalid address, this will be null.
+ * Sets [Builder.lockboxAddressId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.lockboxAddressId] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun lockboxAddressId(lockboxAddressId: JsonField) = apply {
+ this.lockboxAddressId = lockboxAddressId
+ }
+
+ /**
+ * The identifier for the Lockbox Recipient that received this mail item. For mail items
+ * that could not be routed to a Lockbox Recipient, this will be null.
*/
- fun lockboxId(lockboxId: String?) = lockboxId(JsonField.ofNullable(lockboxId))
+ fun lockboxRecipientId(lockboxRecipientId: String?) =
+ lockboxRecipientId(JsonField.ofNullable(lockboxRecipientId))
- /** Alias for calling [Builder.lockboxId] with `lockboxId.orElse(null)`. */
- fun lockboxId(lockboxId: Optional) = lockboxId(lockboxId.getOrNull())
+ /**
+ * Alias for calling [Builder.lockboxRecipientId] with `lockboxRecipientId.orElse(null)`.
+ */
+ fun lockboxRecipientId(lockboxRecipientId: Optional) =
+ lockboxRecipientId(lockboxRecipientId.getOrNull())
/**
- * Sets [Builder.lockboxId] to an arbitrary JSON value.
+ * Sets [Builder.lockboxRecipientId] to an arbitrary JSON value.
*
- * You should usually call [Builder.lockboxId] with a well-typed [String] value instead.
- * This method is primarily for setting the field to an undocumented or not yet supported
- * value.
+ * You should usually call [Builder.lockboxRecipientId] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
*/
- fun lockboxId(lockboxId: JsonField) = apply { this.lockboxId = lockboxId }
+ fun lockboxRecipientId(lockboxRecipientId: JsonField) = apply {
+ this.lockboxRecipientId = lockboxRecipientId
+ }
/** The recipient name as written on the mail item. */
fun recipientName(recipientName: String?) =
@@ -447,7 +504,8 @@ private constructor(
* .checks()
* .createdAt()
* .fileId()
- * .lockboxId()
+ * .lockboxAddressId()
+ * .lockboxRecipientId()
* .recipientName()
* .rejectionReason()
* .status()
@@ -462,7 +520,8 @@ private constructor(
checkRequired("checks", checks).map { it.toImmutable() },
checkRequired("createdAt", createdAt),
checkRequired("fileId", fileId),
- checkRequired("lockboxId", lockboxId),
+ checkRequired("lockboxAddressId", lockboxAddressId),
+ checkRequired("lockboxRecipientId", lockboxRecipientId),
checkRequired("recipientName", recipientName),
checkRequired("rejectionReason", rejectionReason),
checkRequired("status", status),
@@ -482,7 +541,8 @@ private constructor(
checks().forEach { it.validate() }
createdAt()
fileId()
- lockboxId()
+ lockboxAddressId()
+ lockboxRecipientId()
recipientName()
rejectionReason().ifPresent { it.validate() }
status().validate()
@@ -509,7 +569,8 @@ private constructor(
(checks.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
(if (createdAt.asKnown().isPresent) 1 else 0) +
(if (fileId.asKnown().isPresent) 1 else 0) +
- (if (lockboxId.asKnown().isPresent) 1 else 0) +
+ (if (lockboxAddressId.asKnown().isPresent) 1 else 0) +
+ (if (lockboxRecipientId.asKnown().isPresent) 1 else 0) +
(if (recipientName.asKnown().isPresent) 1 else 0) +
(rejectionReason.asKnown().getOrNull()?.validity() ?: 0) +
(status.asKnown().getOrNull()?.validity() ?: 0) +
@@ -1035,6 +1096,12 @@ private constructor(
/** The Lockbox or its associated Account is not active. */
@JvmField val LOCKBOX_NOT_ACTIVE = of("lockbox_not_active")
+ /** The Lockbox Address is not active. */
+ @JvmField val LOCKBOX_ADDRESS_NOT_ACTIVE = of("lockbox_address_not_active")
+
+ /** The Lockbox Recipient or its associated Account is not active. */
+ @JvmField val LOCKBOX_RECIPIENT_NOT_ACTIVE = of("lockbox_recipient_not_active")
+
@JvmStatic fun of(value: String) = RejectionReason(JsonField.of(value))
}
@@ -1046,6 +1113,10 @@ private constructor(
NO_CHECK,
/** The Lockbox or its associated Account is not active. */
LOCKBOX_NOT_ACTIVE,
+ /** The Lockbox Address is not active. */
+ LOCKBOX_ADDRESS_NOT_ACTIVE,
+ /** The Lockbox Recipient or its associated Account is not active. */
+ LOCKBOX_RECIPIENT_NOT_ACTIVE,
}
/**
@@ -1064,6 +1135,10 @@ private constructor(
NO_CHECK,
/** The Lockbox or its associated Account is not active. */
LOCKBOX_NOT_ACTIVE,
+ /** The Lockbox Address is not active. */
+ LOCKBOX_ADDRESS_NOT_ACTIVE,
+ /** The Lockbox Recipient or its associated Account is not active. */
+ LOCKBOX_RECIPIENT_NOT_ACTIVE,
/**
* An enum member indicating that [RejectionReason] was instantiated with an unknown
* value.
@@ -1083,6 +1158,8 @@ private constructor(
NO_MATCHING_LOCKBOX -> Value.NO_MATCHING_LOCKBOX
NO_CHECK -> Value.NO_CHECK
LOCKBOX_NOT_ACTIVE -> Value.LOCKBOX_NOT_ACTIVE
+ LOCKBOX_ADDRESS_NOT_ACTIVE -> Value.LOCKBOX_ADDRESS_NOT_ACTIVE
+ LOCKBOX_RECIPIENT_NOT_ACTIVE -> Value.LOCKBOX_RECIPIENT_NOT_ACTIVE
else -> Value._UNKNOWN
}
@@ -1100,6 +1177,8 @@ private constructor(
NO_MATCHING_LOCKBOX -> Known.NO_MATCHING_LOCKBOX
NO_CHECK -> Known.NO_CHECK
LOCKBOX_NOT_ACTIVE -> Known.LOCKBOX_NOT_ACTIVE
+ LOCKBOX_ADDRESS_NOT_ACTIVE -> Known.LOCKBOX_ADDRESS_NOT_ACTIVE
+ LOCKBOX_RECIPIENT_NOT_ACTIVE -> Known.LOCKBOX_RECIPIENT_NOT_ACTIVE
else -> throw IncreaseInvalidDataException("Unknown RejectionReason: $value")
}
@@ -1435,7 +1514,8 @@ private constructor(
checks == other.checks &&
createdAt == other.createdAt &&
fileId == other.fileId &&
- lockboxId == other.lockboxId &&
+ lockboxAddressId == other.lockboxAddressId &&
+ lockboxRecipientId == other.lockboxRecipientId &&
recipientName == other.recipientName &&
rejectionReason == other.rejectionReason &&
status == other.status &&
@@ -1449,7 +1529,8 @@ private constructor(
checks,
createdAt,
fileId,
- lockboxId,
+ lockboxAddressId,
+ lockboxRecipientId,
recipientName,
rejectionReason,
status,
@@ -1461,5 +1542,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "InboundMailItem{id=$id, checks=$checks, createdAt=$createdAt, fileId=$fileId, lockboxId=$lockboxId, recipientName=$recipientName, rejectionReason=$rejectionReason, status=$status, type=$type, additionalProperties=$additionalProperties}"
+ "InboundMailItem{id=$id, checks=$checks, createdAt=$createdAt, fileId=$fileId, lockboxAddressId=$lockboxAddressId, lockboxRecipientId=$lockboxRecipientId, recipientName=$recipientName, rejectionReason=$rejectionReason, status=$status, type=$type, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListParams.kt
index e279ee5d2..808acdf33 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListParams.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/inboundmailitems/InboundMailItemListParams.kt
@@ -17,7 +17,8 @@ private constructor(
private val createdAt: CreatedAt?,
private val cursor: String?,
private val limit: Long?,
- private val lockboxId: String?,
+ private val lockboxAddressId: String?,
+ private val lockboxRecipientId: String?,
private val additionalHeaders: Headers,
private val additionalQueryParams: QueryParams,
) : Params {
@@ -30,8 +31,11 @@ private constructor(
/** Limit the size of the list that is returned. The default (and maximum) is 100 objects. */
fun limit(): Optional = Optional.ofNullable(limit)
- /** Filter Inbound Mail Items to ones sent to the provided Lockbox. */
- fun lockboxId(): Optional = Optional.ofNullable(lockboxId)
+ /** Filter Inbound Mail Items to ones sent to the provided Lockbox Address. */
+ fun lockboxAddressId(): Optional = Optional.ofNullable(lockboxAddressId)
+
+ /** Filter Inbound Mail Items to ones sent to the provided Lockbox Recipient. */
+ fun lockboxRecipientId(): Optional = Optional.ofNullable(lockboxRecipientId)
/** Additional headers to send with the request. */
fun _additionalHeaders(): Headers = additionalHeaders
@@ -57,7 +61,8 @@ private constructor(
private var createdAt: CreatedAt? = null
private var cursor: String? = null
private var limit: Long? = null
- private var lockboxId: String? = null
+ private var lockboxAddressId: String? = null
+ private var lockboxRecipientId: String? = null
private var additionalHeaders: Headers.Builder = Headers.builder()
private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
@@ -66,7 +71,8 @@ private constructor(
createdAt = inboundMailItemListParams.createdAt
cursor = inboundMailItemListParams.cursor
limit = inboundMailItemListParams.limit
- lockboxId = inboundMailItemListParams.lockboxId
+ lockboxAddressId = inboundMailItemListParams.lockboxAddressId
+ lockboxRecipientId = inboundMailItemListParams.lockboxRecipientId
additionalHeaders = inboundMailItemListParams.additionalHeaders.toBuilder()
additionalQueryParams = inboundMailItemListParams.additionalQueryParams.toBuilder()
}
@@ -97,11 +103,25 @@ private constructor(
/** Alias for calling [Builder.limit] with `limit.orElse(null)`. */
fun limit(limit: Optional) = limit(limit.getOrNull())
- /** Filter Inbound Mail Items to ones sent to the provided Lockbox. */
- fun lockboxId(lockboxId: String?) = apply { this.lockboxId = lockboxId }
+ /** Filter Inbound Mail Items to ones sent to the provided Lockbox Address. */
+ fun lockboxAddressId(lockboxAddressId: String?) = apply {
+ this.lockboxAddressId = lockboxAddressId
+ }
+
+ /** Alias for calling [Builder.lockboxAddressId] with `lockboxAddressId.orElse(null)`. */
+ fun lockboxAddressId(lockboxAddressId: Optional) =
+ lockboxAddressId(lockboxAddressId.getOrNull())
- /** Alias for calling [Builder.lockboxId] with `lockboxId.orElse(null)`. */
- fun lockboxId(lockboxId: Optional) = lockboxId(lockboxId.getOrNull())
+ /** Filter Inbound Mail Items to ones sent to the provided Lockbox Recipient. */
+ fun lockboxRecipientId(lockboxRecipientId: String?) = apply {
+ this.lockboxRecipientId = lockboxRecipientId
+ }
+
+ /**
+ * Alias for calling [Builder.lockboxRecipientId] with `lockboxRecipientId.orElse(null)`.
+ */
+ fun lockboxRecipientId(lockboxRecipientId: Optional) =
+ lockboxRecipientId(lockboxRecipientId.getOrNull())
fun additionalHeaders(additionalHeaders: Headers) = apply {
this.additionalHeaders.clear()
@@ -211,7 +231,8 @@ private constructor(
createdAt,
cursor,
limit,
- lockboxId,
+ lockboxAddressId,
+ lockboxRecipientId,
additionalHeaders.build(),
additionalQueryParams.build(),
)
@@ -249,7 +270,8 @@ private constructor(
}
cursor?.let { put("cursor", it) }
limit?.let { put("limit", it.toString()) }
- lockboxId?.let { put("lockbox_id", it) }
+ lockboxAddressId?.let { put("lockbox_address_id", it) }
+ lockboxRecipientId?.let { put("lockbox_recipient_id", it) }
putAll(additionalQueryParams)
}
.build()
@@ -441,14 +463,23 @@ private constructor(
createdAt == other.createdAt &&
cursor == other.cursor &&
limit == other.limit &&
- lockboxId == other.lockboxId &&
+ lockboxAddressId == other.lockboxAddressId &&
+ lockboxRecipientId == other.lockboxRecipientId &&
additionalHeaders == other.additionalHeaders &&
additionalQueryParams == other.additionalQueryParams
}
override fun hashCode(): Int =
- Objects.hash(createdAt, cursor, limit, lockboxId, additionalHeaders, additionalQueryParams)
+ Objects.hash(
+ createdAt,
+ cursor,
+ limit,
+ lockboxAddressId,
+ lockboxRecipientId,
+ additionalHeaders,
+ additionalQueryParams,
+ )
override fun toString() =
- "InboundMailItemListParams{createdAt=$createdAt, cursor=$cursor, limit=$limit, lockboxId=$lockboxId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
+ "InboundMailItemListParams{createdAt=$createdAt, cursor=$cursor, limit=$limit, lockboxAddressId=$lockboxAddressId, lockboxRecipientId=$lockboxRecipientId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
}
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/lockboxaddresses/LockboxAddress.kt
similarity index 72%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/Lockbox.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddress.kt
index 68184474c..1a7482f59 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/lockboxaddresses/LockboxAddress.kt
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless.
-package com.increase.api.models.lockboxes
+package com.increase.api.models.lockboxaddresses
import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonAnySetter
@@ -19,21 +19,16 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
-/**
- * Lockboxes are physical locations that can receive mail containing paper checks. Increase will
- * automatically create a Check Deposit for checks received this way.
- */
-class Lockbox
+/** Lockbox Addresses are physical locations that can receive mail containing paper checks. */
+class LockboxAddress
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
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,
) {
@@ -41,11 +36,7 @@ private constructor(
@JsonCreator
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,25 +46,12 @@ private constructor(
@JsonProperty("idempotency_key")
@ExcludeMissing
idempotencyKey: JsonField = JsonMissing.of(),
- @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,
- type,
- mutableMapOf(),
- )
+ ) : this(id, address, createdAt, description, idempotencyKey, status, type, mutableMapOf())
/**
- * The Lockbox identifier.
+ * The Lockbox Address identifier.
*
* @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).
@@ -81,32 +59,16 @@ private constructor(
fun id(): String = id.getRequired("id")
/**
- * The identifier for the Account checks sent to this lockbox will be deposited into.
- *
- * @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 accountId(): String = accountId.getRequired("account_id")
-
- /**
- * The mailing address for the Lockbox.
+ * The mailing address for the Lockbox Address. It will be present after Increase generates it.
*
- * @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 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).
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
*/
- fun checkDepositBehavior(): CheckDepositBehavior =
- checkDepositBehavior.getRequired("check_deposit_behavior")
+ fun address(): Optional = address.getOptional("address")
/**
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Lockbox was created.
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Lockbox Address was
+ * created.
*
* @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).
@@ -114,7 +76,7 @@ private constructor(
fun createdAt(): OffsetDateTime = createdAt.getRequired("created_at")
/**
- * The description you choose for the Lockbox.
+ * The description you choose for the Lockbox Address.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -132,15 +94,16 @@ private constructor(
fun idempotencyKey(): Optional = idempotencyKey.getOptional("idempotency_key")
/**
- * The recipient name you choose for the Lockbox.
+ * The status of the Lockbox Address.
*
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
- * server responded with an unexpected value).
+ * @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 recipientName(): Optional = recipientName.getOptional("recipient_name")
+ fun status(): Status = status.getRequired("status")
/**
- * A constant representing the object's type. For this resource it will always be `lockbox`.
+ * A constant representing the object's type. For this resource it will always be
+ * `lockbox_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).
@@ -154,13 +117,6 @@ private constructor(
*/
@JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
- /**
- * Returns the raw JSON value of [accountId].
- *
- * Unlike [accountId], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("account_id") @ExcludeMissing fun _accountId(): JsonField = accountId
-
/**
* Returns the raw JSON value of [address].
*
@@ -168,16 +124,6 @@ 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].
*
@@ -204,13 +150,11 @@ private constructor(
fun _idempotencyKey(): JsonField = idempotencyKey
/**
- * Returns the raw JSON value of [recipientName].
+ * Returns the raw JSON value of [status].
*
- * Unlike [recipientName], this method doesn't throw if the JSON field has an unexpected type.
+ * Unlike [status], this method doesn't throw if the JSON field has an unexpected type.
*/
- @JsonProperty("recipient_name")
- @ExcludeMissing
- fun _recipientName(): JsonField = recipientName
+ @JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status
/**
* Returns the raw JSON value of [type].
@@ -234,53 +178,47 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of [Lockbox].
+ * Returns a mutable builder for constructing an instance of [LockboxAddress].
*
* The following fields are required:
* ```java
* .id()
- * .accountId()
* .address()
- * .checkDepositBehavior()
* .createdAt()
* .description()
* .idempotencyKey()
- * .recipientName()
+ * .status()
* .type()
* ```
*/
@JvmStatic fun builder() = Builder()
}
- /** A builder for [Lockbox]. */
+ /** A builder for [LockboxAddress]. */
class Builder internal 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()
@JvmSynthetic
- internal fun from(lockbox: Lockbox) = apply {
- id = lockbox.id
- accountId = lockbox.accountId
- address = lockbox.address
- checkDepositBehavior = lockbox.checkDepositBehavior
- createdAt = lockbox.createdAt
- description = lockbox.description
- idempotencyKey = lockbox.idempotencyKey
- recipientName = lockbox.recipientName
- type = lockbox.type
- additionalProperties = lockbox.additionalProperties.toMutableMap()
+ internal fun from(lockboxAddress: LockboxAddress) = apply {
+ id = lockboxAddress.id
+ address = lockboxAddress.address
+ createdAt = lockboxAddress.createdAt
+ description = lockboxAddress.description
+ idempotencyKey = lockboxAddress.idempotencyKey
+ status = lockboxAddress.status
+ type = lockboxAddress.type
+ additionalProperties = lockboxAddress.additionalProperties.toMutableMap()
}
- /** The Lockbox identifier. */
+ /** The Lockbox Address identifier. */
fun id(id: String) = id(JsonField.of(id))
/**
@@ -291,20 +229,14 @@ private constructor(
*/
fun id(id: JsonField) = apply { this.id = id }
- /** The identifier for the Account checks sent to this lockbox will be deposited into. */
- fun accountId(accountId: String) = accountId(JsonField.of(accountId))
-
/**
- * Sets [Builder.accountId] to an arbitrary JSON value.
- *
- * You should usually call [Builder.accountId] with a well-typed [String] value instead.
- * This method is primarily for setting the field to an undocumented or not yet supported
- * value.
+ * The mailing address for the Lockbox Address. It will be present after Increase generates
+ * it.
*/
- fun accountId(accountId: JsonField) = apply { this.accountId = accountId }
+ fun address(address: Address?) = address(JsonField.ofNullable(address))
- /** The mailing address for the Lockbox. */
- fun address(address: Address) = address(JsonField.of(address))
+ /** Alias for calling [Builder.address] with `address.orElse(null)`. */
+ fun address(address: Optional) = address(address.getOrNull())
/**
* Sets [Builder.address] to an arbitrary JSON value.
@@ -314,24 +246,9 @@ 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.
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Lockbox Address
+ * was created.
*/
fun createdAt(createdAt: OffsetDateTime) = createdAt(JsonField.of(createdAt))
@@ -344,7 +261,7 @@ private constructor(
*/
fun createdAt(createdAt: JsonField) = apply { this.createdAt = createdAt }
- /** The description you choose for the Lockbox. */
+ /** The description you choose for the Lockbox Address. */
fun description(description: String?) = description(JsonField.ofNullable(description))
/** Alias for calling [Builder.description] with `description.orElse(null)`. */
@@ -382,27 +299,20 @@ private constructor(
this.idempotencyKey = idempotencyKey
}
- /** The recipient name you choose for the Lockbox. */
- fun recipientName(recipientName: String?) =
- recipientName(JsonField.ofNullable(recipientName))
-
- /** Alias for calling [Builder.recipientName] with `recipientName.orElse(null)`. */
- fun recipientName(recipientName: Optional) =
- recipientName(recipientName.getOrNull())
+ /** The status of the Lockbox Address. */
+ fun status(status: Status) = status(JsonField.of(status))
/**
- * Sets [Builder.recipientName] to an arbitrary JSON value.
+ * Sets [Builder.status] to an arbitrary JSON value.
*
- * You should usually call [Builder.recipientName] with a well-typed [String] value instead.
- * This method is primarily for setting the field to an undocumented or not yet supported
- * 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 recipientName(recipientName: JsonField) = apply {
- this.recipientName = recipientName
- }
+ fun status(status: JsonField) = apply { this.status = status }
/**
- * A constant representing the object's type. For this resource it will always be `lockbox`.
+ * A constant representing the object's type. For this resource it will always be
+ * `lockbox_address`.
*/
fun type(type: Type) = type(JsonField.of(type))
@@ -434,35 +344,31 @@ private constructor(
}
/**
- * Returns an immutable instance of [Lockbox].
+ * Returns an immutable instance of [LockboxAddress].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
* The following fields are required:
* ```java
* .id()
- * .accountId()
* .address()
- * .checkDepositBehavior()
* .createdAt()
* .description()
* .idempotencyKey()
- * .recipientName()
+ * .status()
* .type()
* ```
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): Lockbox =
- Lockbox(
+ fun build(): LockboxAddress =
+ LockboxAddress(
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(),
)
@@ -470,19 +376,17 @@ private constructor(
private var validated: Boolean = false
- fun validate(): Lockbox = apply {
+ fun validate(): LockboxAddress = apply {
if (validated) {
return@apply
}
id()
- accountId()
- address().validate()
- checkDepositBehavior().validate()
+ address().ifPresent { it.validate() }
createdAt()
description()
idempotencyKey()
- recipientName()
+ status().validate()
type().validate()
validated = true
}
@@ -503,16 +407,16 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(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. */
+ /**
+ * The mailing address for the Lockbox Address. It will be present after Increase generates it.
+ */
class Address
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
@@ -520,7 +424,6 @@ private constructor(
private val line1: JsonField,
private val line2: JsonField,
private val postalCode: JsonField,
- private val recipient: JsonField,
private val state: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -533,11 +436,8 @@ private constructor(
@JsonProperty("postal_code")
@ExcludeMissing
postalCode: JsonField = JsonMissing.of(),
- @JsonProperty("recipient")
- @ExcludeMissing
- recipient: JsonField = JsonMissing.of(),
@JsonProperty("state") @ExcludeMissing state: JsonField = JsonMissing.of(),
- ) : this(city, line1, line2, postalCode, recipient, state, mutableMapOf())
+ ) : this(city, line1, line2, postalCode, state, mutableMapOf())
/**
* The city of the address.
@@ -571,16 +471,6 @@ private constructor(
*/
fun postalCode(): String = postalCode.getRequired("postal_code")
- /**
- * The recipient line of the address. This will include the recipient name you provide when
- * creating the address, as well as an ATTN suffix to help route the mail to your lockbox.
- * Mail senders must include this ATTN line to receive mail at this Lockbox.
- *
- * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
- * the server responded with an unexpected value).
- */
- fun recipient(): Optional = recipient.getOptional("recipient")
-
/**
* The two-letter United States Postal Service (USPS) abbreviation for the state of the
* address.
@@ -620,13 +510,6 @@ private constructor(
@ExcludeMissing
fun _postalCode(): JsonField = postalCode
- /**
- * Returns the raw JSON value of [recipient].
- *
- * Unlike [recipient], this method doesn't throw if the JSON field has an unexpected type.
- */
- @JsonProperty("recipient") @ExcludeMissing fun _recipient(): JsonField = recipient
-
/**
* Returns the raw JSON value of [state].
*
@@ -657,7 +540,6 @@ private constructor(
* .line1()
* .line2()
* .postalCode()
- * .recipient()
* .state()
* ```
*/
@@ -671,7 +553,6 @@ private constructor(
private var line1: JsonField? = null
private var line2: JsonField? = null
private var postalCode: JsonField? = null
- private var recipient: JsonField? = null
private var state: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@@ -681,7 +562,6 @@ private constructor(
line1 = address.line1
line2 = address.line2
postalCode = address.postalCode
- recipient = address.recipient
state = address.state
additionalProperties = address.additionalProperties.toMutableMap()
}
@@ -734,25 +614,6 @@ private constructor(
*/
fun postalCode(postalCode: JsonField) = apply { this.postalCode = postalCode }
- /**
- * The recipient line of the address. This will include the recipient name you provide
- * when creating the address, as well as an ATTN suffix to help route the mail to your
- * lockbox. Mail senders must include this ATTN line to receive mail at this Lockbox.
- */
- fun recipient(recipient: String?) = recipient(JsonField.ofNullable(recipient))
-
- /** Alias for calling [Builder.recipient] with `recipient.orElse(null)`. */
- fun recipient(recipient: Optional) = recipient(recipient.getOrNull())
-
- /**
- * Sets [Builder.recipient] to an arbitrary JSON value.
- *
- * You should usually call [Builder.recipient] with a well-typed [String] value instead.
- * This method is primarily for setting the field to an undocumented or not yet
- * supported value.
- */
- fun recipient(recipient: JsonField) = apply { this.recipient = recipient }
-
/**
* The two-letter United States Postal Service (USPS) abbreviation for the state of the
* address.
@@ -798,7 +659,6 @@ private constructor(
* .line1()
* .line2()
* .postalCode()
- * .recipient()
* .state()
* ```
*
@@ -810,7 +670,6 @@ private constructor(
checkRequired("line1", line1),
checkRequired("line2", line2),
checkRequired("postalCode", postalCode),
- checkRequired("recipient", recipient),
checkRequired("state", state),
additionalProperties.toMutableMap(),
)
@@ -827,7 +686,6 @@ private constructor(
line1()
line2()
postalCode()
- recipient()
state()
validated = true
}
@@ -852,7 +710,6 @@ private constructor(
(if (line1.asKnown().isPresent) 1 else 0) +
(if (line2.asKnown().isPresent) 1 else 0) +
(if (postalCode.asKnown().isPresent) 1 else 0) +
- (if (recipient.asKnown().isPresent) 1 else 0) +
(if (state.asKnown().isPresent) 1 else 0)
override fun equals(other: Any?): Boolean {
@@ -865,25 +722,22 @@ private constructor(
line1 == other.line1 &&
line2 == other.line2 &&
postalCode == other.postalCode &&
- recipient == other.recipient &&
state == other.state &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
- Objects.hash(city, line1, line2, postalCode, recipient, state, additionalProperties)
+ Objects.hash(city, line1, line2, postalCode, state, additionalProperties)
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "Address{city=$city, line1=$line1, line2=$line2, postalCode=$postalCode, recipient=$recipient, state=$state, additionalProperties=$additionalProperties}"
+ "Address{city=$city, line1=$line1, line2=$line2, postalCode=$postalCode, state=$state, additionalProperties=$additionalProperties}"
}
- /** Indicates if checks mailed to this lockbox will be deposited. */
- class CheckDepositBehavior
- @JsonCreator
- private constructor(private val value: JsonField) : Enum {
+ /** The status of the Lockbox Address. */
+ class Status @JsonCreator private constructor(private val value: JsonField) : Enum {
/**
* Returns this class instance's raw value.
@@ -897,49 +751,52 @@ private constructor(
companion object {
- /** Checks mailed to this Lockbox will be deposited. */
- @JvmField val ENABLED = of("enabled")
+ /** Increase is generating this Lockbox Address. */
+ @JvmField val PENDING = of("pending")
+
+ /** This Lockbox Address is active. */
+ @JvmField val ACTIVE = of("active")
- /** Checks mailed to this Lockbox will not be deposited. */
+ /** This Lockbox Address is disabled. */
@JvmField val DISABLED = of("disabled")
- /** Checks mailed to this Lockbox will be pending until actioned. */
- @JvmField val PEND_FOR_PROCESSING = of("pend_for_processing")
+ /** This Lockbox Address is permanently disabled. */
+ @JvmField val CANCELED = of("canceled")
- @JvmStatic fun of(value: String) = CheckDepositBehavior(JsonField.of(value))
+ @JvmStatic fun of(value: String) = Status(JsonField.of(value))
}
- /** An enum containing [CheckDepositBehavior]'s known values. */
+ /** An enum containing [Status]'s known values. */
enum class Known {
- /** Checks mailed to this Lockbox will be deposited. */
- ENABLED,
- /** Checks mailed to this Lockbox will not be deposited. */
+ /** Increase is generating this Lockbox Address. */
+ PENDING,
+ /** This Lockbox Address is active. */
+ ACTIVE,
+ /** This Lockbox Address is disabled. */
DISABLED,
- /** Checks mailed to this Lockbox will be pending until actioned. */
- PEND_FOR_PROCESSING,
+ /** This Lockbox Address is permanently disabled. */
+ CANCELED,
}
/**
- * An enum containing [CheckDepositBehavior]'s known values, as well as an [_UNKNOWN]
- * member.
+ * An enum containing [Status]'s known values, as well as an [_UNKNOWN] member.
*
- * An instance of [CheckDepositBehavior] can contain an unknown value in a couple of cases:
+ * An instance of [Status] 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 {
- /** Checks mailed to this Lockbox will be deposited. */
- ENABLED,
- /** Checks mailed to this Lockbox will not be deposited. */
+ /** Increase is generating this Lockbox Address. */
+ PENDING,
+ /** This Lockbox Address is active. */
+ ACTIVE,
+ /** This Lockbox Address is disabled. */
DISABLED,
- /** Checks mailed to this Lockbox will be pending until actioned. */
- PEND_FOR_PROCESSING,
- /**
- * An enum member indicating that [CheckDepositBehavior] was instantiated with an
- * unknown value.
- */
+ /** This Lockbox Address is permanently disabled. */
+ CANCELED,
+ /** An enum member indicating that [Status] was instantiated with an unknown value. */
_UNKNOWN,
}
@@ -952,9 +809,10 @@ private constructor(
*/
fun value(): Value =
when (this) {
- ENABLED -> Value.ENABLED
+ PENDING -> Value.PENDING
+ ACTIVE -> Value.ACTIVE
DISABLED -> Value.DISABLED
- PEND_FOR_PROCESSING -> Value.PEND_FOR_PROCESSING
+ CANCELED -> Value.CANCELED
else -> Value._UNKNOWN
}
@@ -969,10 +827,11 @@ private constructor(
*/
fun known(): Known =
when (this) {
- ENABLED -> Known.ENABLED
+ PENDING -> Known.PENDING
+ ACTIVE -> Known.ACTIVE
DISABLED -> Known.DISABLED
- PEND_FOR_PROCESSING -> Known.PEND_FOR_PROCESSING
- else -> throw IncreaseInvalidDataException("Unknown CheckDepositBehavior: $value")
+ CANCELED -> Known.CANCELED
+ else -> throw IncreaseInvalidDataException("Unknown Status: $value")
}
/**
@@ -991,7 +850,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): CheckDepositBehavior = apply {
+ fun validate(): Status = apply {
if (validated) {
return@apply
}
@@ -1021,7 +880,7 @@ private constructor(
return true
}
- return other is CheckDepositBehavior && value == other.value
+ return other is Status && value == other.value
}
override fun hashCode() = value.hashCode()
@@ -1029,7 +888,10 @@ private constructor(
override fun toString() = value.toString()
}
- /** A constant representing the object's type. For this resource it will always be `lockbox`. */
+ /**
+ * A constant representing the object's type. For this resource it will always be
+ * `lockbox_address`.
+ */
class Type @JsonCreator private constructor(private val value: JsonField) : Enum {
/**
@@ -1044,14 +906,14 @@ private constructor(
companion object {
- @JvmField val LOCKBOX = of("lockbox")
+ @JvmField val LOCKBOX_ADDRESS = of("lockbox_address")
@JvmStatic fun of(value: String) = Type(JsonField.of(value))
}
/** An enum containing [Type]'s known values. */
enum class Known {
- LOCKBOX
+ LOCKBOX_ADDRESS
}
/**
@@ -1064,7 +926,7 @@ private constructor(
* - It was constructed with an arbitrary value using the [of] method.
*/
enum class Value {
- LOCKBOX,
+ LOCKBOX_ADDRESS,
/** An enum member indicating that [Type] was instantiated with an unknown value. */
_UNKNOWN,
}
@@ -1078,7 +940,7 @@ private constructor(
*/
fun value(): Value =
when (this) {
- LOCKBOX -> Value.LOCKBOX
+ LOCKBOX_ADDRESS -> Value.LOCKBOX_ADDRESS
else -> Value._UNKNOWN
}
@@ -1093,7 +955,7 @@ private constructor(
*/
fun known(): Known =
when (this) {
- LOCKBOX -> Known.LOCKBOX
+ LOCKBOX_ADDRESS -> Known.LOCKBOX_ADDRESS
else -> throw IncreaseInvalidDataException("Unknown Type: $value")
}
@@ -1156,15 +1018,13 @@ private constructor(
return true
}
- return other is Lockbox &&
+ return other is LockboxAddress &&
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
}
@@ -1172,13 +1032,11 @@ private constructor(
private val hashCode: Int by lazy {
Objects.hash(
id,
- accountId,
address,
- checkDepositBehavior,
createdAt,
description,
idempotencyKey,
- recipientName,
+ status,
type,
additionalProperties,
)
@@ -1187,5 +1045,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "Lockbox{id=$id, accountId=$accountId, address=$address, checkDepositBehavior=$checkDepositBehavior, createdAt=$createdAt, description=$description, idempotencyKey=$idempotencyKey, recipientName=$recipientName, type=$type, additionalProperties=$additionalProperties}"
+ "LockboxAddress{id=$id, address=$address, createdAt=$createdAt, description=$description, idempotencyKey=$idempotencyKey, status=$status, type=$type, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressCreateParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressCreateParams.kt
new file mode 100644
index 000000000..57755d8e0
--- /dev/null
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressCreateParams.kt
@@ -0,0 +1,397 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.increase.api.models.lockboxaddresses
+
+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.errors.IncreaseInvalidDataException
+import java.util.Collections
+import java.util.Objects
+import java.util.Optional
+
+/** Create a Lockbox Address */
+class LockboxAddressCreateParams
+private constructor(
+ private val body: Body,
+ private val additionalHeaders: Headers,
+ private val additionalQueryParams: QueryParams,
+) : Params {
+
+ /**
+ * The description you choose for the Lockbox Address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun description(): Optional = body.description()
+
+ /**
+ * Returns the raw JSON value of [description].
+ *
+ * Unlike [description], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _description(): JsonField = body._description()
+
+ fun _additionalBodyProperties(): Map = body._additionalProperties()
+
+ /** Additional headers to send with the request. */
+ fun _additionalHeaders(): Headers = additionalHeaders
+
+ /** Additional query param to send with the request. */
+ fun _additionalQueryParams(): QueryParams = additionalQueryParams
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ @JvmStatic fun none(): LockboxAddressCreateParams = builder().build()
+
+ /**
+ * Returns a mutable builder for constructing an instance of [LockboxAddressCreateParams].
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [LockboxAddressCreateParams]. */
+ class Builder internal constructor() {
+
+ private var body: Body.Builder = Body.builder()
+ private var additionalHeaders: Headers.Builder = Headers.builder()
+ private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
+
+ @JvmSynthetic
+ internal fun from(lockboxAddressCreateParams: LockboxAddressCreateParams) = apply {
+ body = lockboxAddressCreateParams.body.toBuilder()
+ additionalHeaders = lockboxAddressCreateParams.additionalHeaders.toBuilder()
+ additionalQueryParams = lockboxAddressCreateParams.additionalQueryParams.toBuilder()
+ }
+
+ /**
+ * 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:
+ * - [description]
+ */
+ fun body(body: Body) = apply { this.body = body.toBuilder() }
+
+ /** The description you choose for the Lockbox Address. */
+ fun description(description: String) = apply { body.description(description) }
+
+ /**
+ * Sets [Builder.description] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.description] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun description(description: JsonField) = apply { body.description(description) }
+
+ 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)
+ }
+
+ fun additionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun putAdditionalHeader(name: String, value: String) = apply {
+ additionalHeaders.put(name, value)
+ }
+
+ fun putAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.put(name, values)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun replaceAdditionalHeaders(name: String, value: String) = apply {
+ additionalHeaders.replace(name, value)
+ }
+
+ fun replaceAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.replace(name, values)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.remove(name) }
+
+ fun removeAllAdditionalHeaders(names: Set) = apply {
+ additionalHeaders.removeAll(names)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: Map>) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun putAdditionalQueryParam(key: String, value: String) = apply {
+ additionalQueryParams.put(key, value)
+ }
+
+ fun putAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.put(key, values)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, value: String) = apply {
+ additionalQueryParams.replace(key, value)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.replace(key, values)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun removeAdditionalQueryParams(key: String) = apply { additionalQueryParams.remove(key) }
+
+ fun removeAllAdditionalQueryParams(keys: Set) = apply {
+ additionalQueryParams.removeAll(keys)
+ }
+
+ /**
+ * Returns an immutable instance of [LockboxAddressCreateParams].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): LockboxAddressCreateParams =
+ LockboxAddressCreateParams(
+ body.build(),
+ additionalHeaders.build(),
+ additionalQueryParams.build(),
+ )
+ }
+
+ fun _body(): Body = body
+
+ override fun _headers(): Headers = additionalHeaders
+
+ override fun _queryParams(): QueryParams = additionalQueryParams
+
+ class Body
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val description: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("description")
+ @ExcludeMissing
+ description: JsonField = JsonMissing.of()
+ ) : this(description, mutableMapOf())
+
+ /**
+ * The description you choose for the Lockbox Address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun description(): Optional = description.getOptional("description")
+
+ /**
+ * Returns the raw JSON value of [description].
+ *
+ * Unlike [description], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("description")
+ @ExcludeMissing
+ fun _description(): JsonField = description
+
+ @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 [Body]. */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [Body]. */
+ class Builder internal constructor() {
+
+ private var description: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(body: Body) = apply {
+ description = body.description
+ additionalProperties = body.additionalProperties.toMutableMap()
+ }
+
+ /** The description you choose for the Lockbox Address. */
+ fun description(description: String) = description(JsonField.of(description))
+
+ /**
+ * Sets [Builder.description] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.description] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun description(description: JsonField) = apply {
+ this.description = description
+ }
+
+ 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 [Body].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): Body = Body(description, additionalProperties.toMutableMap())
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): Body = apply {
+ if (validated) {
+ return@apply
+ }
+
+ description()
+ 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 (description.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Body &&
+ description == other.description &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy { Objects.hash(description, additionalProperties) }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Body{description=$description, additionalProperties=$additionalProperties}"
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is LockboxAddressCreateParams &&
+ body == other.body &&
+ additionalHeaders == other.additionalHeaders &&
+ additionalQueryParams == other.additionalQueryParams
+ }
+
+ override fun hashCode(): Int = Objects.hash(body, additionalHeaders, additionalQueryParams)
+
+ override fun toString() =
+ "LockboxAddressCreateParams{body=$body, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
+}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListPage.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressListPage.kt
similarity index 50%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListPage.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressListPage.kt
index ade6e2650..4bd6ed350 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListPage.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressListPage.kt
@@ -1,64 +1,65 @@
// File generated from our OpenAPI spec by Stainless.
-package com.increase.api.models.lockboxes
+package com.increase.api.models.lockboxaddresses
import com.increase.api.core.AutoPager
import com.increase.api.core.Page
import com.increase.api.core.checkRequired
-import com.increase.api.services.blocking.LockboxService
+import com.increase.api.services.blocking.LockboxAddressService
import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
-/** @see LockboxService.list */
-class LockboxListPage
+/** @see LockboxAddressService.list */
+class LockboxAddressListPage
private constructor(
- private val service: LockboxService,
- private val params: LockboxListParams,
- private val response: LockboxListPageResponse,
-) : Page {
+ private val service: LockboxAddressService,
+ private val params: LockboxAddressListParams,
+ private val response: LockboxAddressListPageResponse,
+) : Page {
/**
- * Delegates to [LockboxListPageResponse], but gracefully handles missing data.
+ * Delegates to [LockboxAddressListPageResponse], but gracefully handles missing data.
*
- * @see LockboxListPageResponse.data
+ * @see LockboxAddressListPageResponse.data
*/
- fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList()
+ fun data(): List =
+ response._data().getOptional("data").getOrNull() ?: emptyList()
/**
- * Delegates to [LockboxListPageResponse], but gracefully handles missing data.
+ * Delegates to [LockboxAddressListPageResponse], but gracefully handles missing data.
*
- * @see LockboxListPageResponse.nextCursor
+ * @see LockboxAddressListPageResponse.nextCursor
*/
fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
- override fun items(): List = data()
+ override fun items(): List = data()
override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
- fun nextPageParams(): LockboxListParams {
+ fun nextPageParams(): LockboxAddressListParams {
val nextCursor =
nextCursor().getOrNull()
?: throw IllegalStateException("Cannot construct next page params")
return params.toBuilder().cursor(nextCursor).build()
}
- override fun nextPage(): LockboxListPage = service.list(nextPageParams())
+ override fun nextPage(): LockboxAddressListPage = service.list(nextPageParams())
- fun autoPager(): AutoPager = AutoPager.from(this)
+ fun autoPager(): AutoPager = AutoPager.from(this)
/** The parameters that were used to request this page. */
- fun params(): LockboxListParams = params
+ fun params(): LockboxAddressListParams = params
/** The response that this page was parsed from. */
- fun response(): LockboxListPageResponse = response
+ fun response(): LockboxAddressListPageResponse = response
fun toBuilder() = Builder().from(this)
companion object {
/**
- * Returns a mutable builder for constructing an instance of [LockboxListPage].
+ * Returns a mutable builder for constructing an instance of [LockboxAddressListPage].
*
* The following fields are required:
* ```java
@@ -70,30 +71,30 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [LockboxListPage]. */
+ /** A builder for [LockboxAddressListPage]. */
class Builder internal constructor() {
- private var service: LockboxService? = null
- private var params: LockboxListParams? = null
- private var response: LockboxListPageResponse? = null
+ private var service: LockboxAddressService? = null
+ private var params: LockboxAddressListParams? = null
+ private var response: LockboxAddressListPageResponse? = null
@JvmSynthetic
- internal fun from(lockboxListPage: LockboxListPage) = apply {
- service = lockboxListPage.service
- params = lockboxListPage.params
- response = lockboxListPage.response
+ internal fun from(lockboxAddressListPage: LockboxAddressListPage) = apply {
+ service = lockboxAddressListPage.service
+ params = lockboxAddressListPage.params
+ response = lockboxAddressListPage.response
}
- fun service(service: LockboxService) = apply { this.service = service }
+ fun service(service: LockboxAddressService) = apply { this.service = service }
/** The parameters that were used to request this page. */
- fun params(params: LockboxListParams) = apply { this.params = params }
+ fun params(params: LockboxAddressListParams) = apply { this.params = params }
/** The response that this page was parsed from. */
- fun response(response: LockboxListPageResponse) = apply { this.response = response }
+ fun response(response: LockboxAddressListPageResponse) = apply { this.response = response }
/**
- * Returns an immutable instance of [LockboxListPage].
+ * Returns an immutable instance of [LockboxAddressListPage].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -106,8 +107,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): LockboxListPage =
- LockboxListPage(
+ fun build(): LockboxAddressListPage =
+ LockboxAddressListPage(
checkRequired("service", service),
checkRequired("params", params),
checkRequired("response", response),
@@ -119,7 +120,7 @@ private constructor(
return true
}
- return other is LockboxListPage &&
+ return other is LockboxAddressListPage &&
service == other.service &&
params == other.params &&
response == other.response
@@ -128,5 +129,5 @@ private constructor(
override fun hashCode(): Int = Objects.hash(service, params, response)
override fun toString() =
- "LockboxListPage{service=$service, params=$params, response=$response}"
+ "LockboxAddressListPage{service=$service, params=$params, response=$response}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListPageAsync.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressListPageAsync.kt
similarity index 54%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListPageAsync.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressListPageAsync.kt
index 10e81908f..128524907 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListPageAsync.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressListPageAsync.kt
@@ -1,68 +1,70 @@
// File generated from our OpenAPI spec by Stainless.
-package com.increase.api.models.lockboxes
+package com.increase.api.models.lockboxaddresses
import com.increase.api.core.AutoPagerAsync
import com.increase.api.core.PageAsync
import com.increase.api.core.checkRequired
-import com.increase.api.services.async.LockboxServiceAsync
+import com.increase.api.services.async.LockboxAddressServiceAsync
import java.util.Objects
import java.util.Optional
import java.util.concurrent.CompletableFuture
import java.util.concurrent.Executor
import kotlin.jvm.optionals.getOrNull
-/** @see LockboxServiceAsync.list */
-class LockboxListPageAsync
+/** @see LockboxAddressServiceAsync.list */
+class LockboxAddressListPageAsync
private constructor(
- private val service: LockboxServiceAsync,
+ private val service: LockboxAddressServiceAsync,
private val streamHandlerExecutor: Executor,
- private val params: LockboxListParams,
- private val response: LockboxListPageResponse,
-) : PageAsync {
+ private val params: LockboxAddressListParams,
+ private val response: LockboxAddressListPageResponse,
+) : PageAsync {
/**
- * Delegates to [LockboxListPageResponse], but gracefully handles missing data.
+ * Delegates to [LockboxAddressListPageResponse], but gracefully handles missing data.
*
- * @see LockboxListPageResponse.data
+ * @see LockboxAddressListPageResponse.data
*/
- fun data(): List = response._data().getOptional("data").getOrNull() ?: emptyList()
+ fun data(): List =
+ response._data().getOptional("data").getOrNull() ?: emptyList()
/**
- * Delegates to [LockboxListPageResponse], but gracefully handles missing data.
+ * Delegates to [LockboxAddressListPageResponse], but gracefully handles missing data.
*
- * @see LockboxListPageResponse.nextCursor
+ * @see LockboxAddressListPageResponse.nextCursor
*/
fun nextCursor(): Optional = response._nextCursor().getOptional("next_cursor")
- override fun items(): List = data()
+ override fun items(): List = data()
override fun hasNextPage(): Boolean = items().isNotEmpty() && nextCursor().isPresent
- fun nextPageParams(): LockboxListParams {
+ fun nextPageParams(): LockboxAddressListParams {
val nextCursor =
nextCursor().getOrNull()
?: throw IllegalStateException("Cannot construct next page params")
return params.toBuilder().cursor(nextCursor).build()
}
- override fun nextPage(): CompletableFuture =
+ override fun nextPage(): CompletableFuture =
service.list(nextPageParams())
- fun autoPager(): AutoPagerAsync = AutoPagerAsync.from(this, streamHandlerExecutor)
+ fun autoPager(): AutoPagerAsync =
+ AutoPagerAsync.from(this, streamHandlerExecutor)
/** The parameters that were used to request this page. */
- fun params(): LockboxListParams = params
+ fun params(): LockboxAddressListParams = params
/** The response that this page was parsed from. */
- fun response(): LockboxListPageResponse = response
+ fun response(): LockboxAddressListPageResponse = response
fun toBuilder() = Builder().from(this)
companion object {
/**
- * Returns a mutable builder for constructing an instance of [LockboxListPageAsync].
+ * Returns a mutable builder for constructing an instance of [LockboxAddressListPageAsync].
*
* The following fields are required:
* ```java
@@ -75,36 +77,36 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [LockboxListPageAsync]. */
+ /** A builder for [LockboxAddressListPageAsync]. */
class Builder internal constructor() {
- private var service: LockboxServiceAsync? = null
+ private var service: LockboxAddressServiceAsync? = null
private var streamHandlerExecutor: Executor? = null
- private var params: LockboxListParams? = null
- private var response: LockboxListPageResponse? = null
+ private var params: LockboxAddressListParams? = null
+ private var response: LockboxAddressListPageResponse? = null
@JvmSynthetic
- internal fun from(lockboxListPageAsync: LockboxListPageAsync) = apply {
- service = lockboxListPageAsync.service
- streamHandlerExecutor = lockboxListPageAsync.streamHandlerExecutor
- params = lockboxListPageAsync.params
- response = lockboxListPageAsync.response
+ internal fun from(lockboxAddressListPageAsync: LockboxAddressListPageAsync) = apply {
+ service = lockboxAddressListPageAsync.service
+ streamHandlerExecutor = lockboxAddressListPageAsync.streamHandlerExecutor
+ params = lockboxAddressListPageAsync.params
+ response = lockboxAddressListPageAsync.response
}
- fun service(service: LockboxServiceAsync) = apply { this.service = service }
+ fun service(service: LockboxAddressServiceAsync) = apply { this.service = service }
fun streamHandlerExecutor(streamHandlerExecutor: Executor) = apply {
this.streamHandlerExecutor = streamHandlerExecutor
}
/** The parameters that were used to request this page. */
- fun params(params: LockboxListParams) = apply { this.params = params }
+ fun params(params: LockboxAddressListParams) = apply { this.params = params }
/** The response that this page was parsed from. */
- fun response(response: LockboxListPageResponse) = apply { this.response = response }
+ fun response(response: LockboxAddressListPageResponse) = apply { this.response = response }
/**
- * Returns an immutable instance of [LockboxListPageAsync].
+ * Returns an immutable instance of [LockboxAddressListPageAsync].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -118,8 +120,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): LockboxListPageAsync =
- LockboxListPageAsync(
+ fun build(): LockboxAddressListPageAsync =
+ LockboxAddressListPageAsync(
checkRequired("service", service),
checkRequired("streamHandlerExecutor", streamHandlerExecutor),
checkRequired("params", params),
@@ -132,7 +134,7 @@ private constructor(
return true
}
- return other is LockboxListPageAsync &&
+ return other is LockboxAddressListPageAsync &&
service == other.service &&
streamHandlerExecutor == other.streamHandlerExecutor &&
params == other.params &&
@@ -142,5 +144,5 @@ private constructor(
override fun hashCode(): Int = Objects.hash(service, streamHandlerExecutor, params, response)
override fun toString() =
- "LockboxListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
+ "LockboxAddressListPageAsync{service=$service, streamHandlerExecutor=$streamHandlerExecutor, params=$params, response=$response}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListPageResponse.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressListPageResponse.kt
similarity index 79%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListPageResponse.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressListPageResponse.kt
index 004059007..81ef53142 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListPageResponse.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressListPageResponse.kt
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless.
-package com.increase.api.models.lockboxes
+package com.increase.api.models.lockboxaddresses
import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonAnySetter
@@ -19,18 +19,20 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
-/** A list of Lockbox objects. */
-class LockboxListPageResponse
+/** A list of Lockbox Address objects. */
+class LockboxAddressListPageResponse
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
- private val data: JsonField>,
+ private val data: JsonField>,
private val nextCursor: JsonField,
private val additionalProperties: MutableMap,
) {
@JsonCreator
private constructor(
- @JsonProperty("data") @ExcludeMissing data: JsonField> = JsonMissing.of(),
+ @JsonProperty("data")
+ @ExcludeMissing
+ data: JsonField> = JsonMissing.of(),
@JsonProperty("next_cursor")
@ExcludeMissing
nextCursor: JsonField = JsonMissing.of(),
@@ -42,7 +44,7 @@ private constructor(
* @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 data(): List = data.getRequired("data")
+ fun data(): List = data.getRequired("data")
/**
* A pointer to a place in the list. Pass this as the `cursor` parameter to retrieve the next
@@ -58,7 +60,7 @@ private constructor(
*
* Unlike [data], this method doesn't throw if the JSON field has an unexpected type.
*/
- @JsonProperty("data") @ExcludeMissing fun _data(): JsonField> = data
+ @JsonProperty("data") @ExcludeMissing fun _data(): JsonField> = data
/**
* Returns the raw JSON value of [nextCursor].
@@ -82,7 +84,8 @@ private constructor(
companion object {
/**
- * Returns a mutable builder for constructing an instance of [LockboxListPageResponse].
+ * Returns a mutable builder for constructing an instance of
+ * [LockboxAddressListPageResponse].
*
* The following fields are required:
* ```java
@@ -93,40 +96,41 @@ private constructor(
@JvmStatic fun builder() = Builder()
}
- /** A builder for [LockboxListPageResponse]. */
+ /** A builder for [LockboxAddressListPageResponse]. */
class Builder internal constructor() {
- private var data: JsonField>? = null
+ private var data: JsonField>? = null
private var nextCursor: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
- internal fun from(lockboxListPageResponse: LockboxListPageResponse) = apply {
- data = lockboxListPageResponse.data.map { it.toMutableList() }
- nextCursor = lockboxListPageResponse.nextCursor
- additionalProperties = lockboxListPageResponse.additionalProperties.toMutableMap()
+ internal fun from(lockboxAddressListPageResponse: LockboxAddressListPageResponse) = apply {
+ data = lockboxAddressListPageResponse.data.map { it.toMutableList() }
+ nextCursor = lockboxAddressListPageResponse.nextCursor
+ additionalProperties =
+ lockboxAddressListPageResponse.additionalProperties.toMutableMap()
}
/** The contents of the list. */
- fun data(data: List) = data(JsonField.of(data))
+ fun data(data: List) = data(JsonField.of(data))
/**
* Sets [Builder.data] to an arbitrary JSON value.
*
- * You should usually call [Builder.data] with a well-typed `List` value instead.
- * This method is primarily for setting the field to an undocumented or not yet supported
- * value.
+ * You should usually call [Builder.data] with a well-typed `List` value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
*/
- fun data(data: JsonField>) = apply {
+ fun data(data: JsonField>) = apply {
this.data = data.map { it.toMutableList() }
}
/**
- * Adds a single [Lockbox] to [Builder.data].
+ * Adds a single [LockboxAddress] to [Builder.data].
*
* @throws IllegalStateException if the field was previously set to a non-list.
*/
- fun addData(data: Lockbox) = apply {
+ fun addData(data: LockboxAddress) = apply {
this.data =
(this.data ?: JsonField.of(mutableListOf())).also {
checkKnown("data", it).add(data)
@@ -171,7 +175,7 @@ private constructor(
}
/**
- * Returns an immutable instance of [LockboxListPageResponse].
+ * Returns an immutable instance of [LockboxAddressListPageResponse].
*
* Further updates to this [Builder] will not mutate the returned instance.
*
@@ -183,8 +187,8 @@ private constructor(
*
* @throws IllegalStateException if any required field is unset.
*/
- fun build(): LockboxListPageResponse =
- LockboxListPageResponse(
+ fun build(): LockboxAddressListPageResponse =
+ LockboxAddressListPageResponse(
checkRequired("data", data).map { it.toImmutable() },
checkRequired("nextCursor", nextCursor),
additionalProperties.toMutableMap(),
@@ -193,7 +197,7 @@ private constructor(
private var validated: Boolean = false
- fun validate(): LockboxListPageResponse = apply {
+ fun validate(): LockboxAddressListPageResponse = apply {
if (validated) {
return@apply
}
@@ -226,7 +230,7 @@ private constructor(
return true
}
- return other is LockboxListPageResponse &&
+ return other is LockboxAddressListPageResponse &&
data == other.data &&
nextCursor == other.nextCursor &&
additionalProperties == other.additionalProperties
@@ -237,5 +241,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "LockboxListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
+ "LockboxAddressListPageResponse{data=$data, nextCursor=$nextCursor, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressListParams.kt
similarity index 90%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListParams.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressListParams.kt
index 7c0c67caa..d9c5a4ce8 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxListParams.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressListParams.kt
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless.
-package com.increase.api.models.lockboxes
+package com.increase.api.models.lockboxaddresses
import com.increase.api.core.Params
import com.increase.api.core.http.Headers
@@ -11,10 +11,9 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
-/** List Lockboxes */
-class LockboxListParams
+/** List Lockbox Addresses */
+class LockboxAddressListParams
private constructor(
- private val accountId: String?,
private val createdAt: CreatedAt?,
private val cursor: String?,
private val idempotencyKey: String?,
@@ -23,9 +22,6 @@ private constructor(
private val additionalQueryParams: QueryParams,
) : Params {
- /** Filter Lockboxes to those associated with the provided Account. */
- fun accountId(): Optional = Optional.ofNullable(accountId)
-
fun createdAt(): Optional = Optional.ofNullable(createdAt)
/** Return the page of entries after this one. */
@@ -51,16 +47,15 @@ private constructor(
companion object {
- @JvmStatic fun none(): LockboxListParams = builder().build()
+ @JvmStatic fun none(): LockboxAddressListParams = builder().build()
- /** Returns a mutable builder for constructing an instance of [LockboxListParams]. */
+ /** Returns a mutable builder for constructing an instance of [LockboxAddressListParams]. */
@JvmStatic fun builder() = Builder()
}
- /** A builder for [LockboxListParams]. */
+ /** A builder for [LockboxAddressListParams]. */
class Builder internal constructor() {
- private var accountId: String? = null
private var createdAt: CreatedAt? = null
private var cursor: String? = null
private var idempotencyKey: String? = null
@@ -69,22 +64,15 @@ private constructor(
private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
@JvmSynthetic
- internal fun from(lockboxListParams: LockboxListParams) = apply {
- accountId = lockboxListParams.accountId
- createdAt = lockboxListParams.createdAt
- cursor = lockboxListParams.cursor
- idempotencyKey = lockboxListParams.idempotencyKey
- limit = lockboxListParams.limit
- additionalHeaders = lockboxListParams.additionalHeaders.toBuilder()
- additionalQueryParams = lockboxListParams.additionalQueryParams.toBuilder()
+ internal fun from(lockboxAddressListParams: LockboxAddressListParams) = apply {
+ createdAt = lockboxAddressListParams.createdAt
+ cursor = lockboxAddressListParams.cursor
+ idempotencyKey = lockboxAddressListParams.idempotencyKey
+ limit = lockboxAddressListParams.limit
+ additionalHeaders = lockboxAddressListParams.additionalHeaders.toBuilder()
+ additionalQueryParams = lockboxAddressListParams.additionalQueryParams.toBuilder()
}
- /** Filter Lockboxes to those associated with the provided Account. */
- fun accountId(accountId: String?) = apply { this.accountId = accountId }
-
- /** Alias for calling [Builder.accountId] with `accountId.orElse(null)`. */
- fun accountId(accountId: Optional) = accountId(accountId.getOrNull())
-
fun createdAt(createdAt: CreatedAt?) = apply { this.createdAt = createdAt }
/** Alias for calling [Builder.createdAt] with `createdAt.orElse(null)`. */
@@ -222,13 +210,12 @@ private constructor(
}
/**
- * Returns an immutable instance of [LockboxListParams].
+ * Returns an immutable instance of [LockboxAddressListParams].
*
* Further updates to this [Builder] will not mutate the returned instance.
*/
- fun build(): LockboxListParams =
- LockboxListParams(
- accountId,
+ fun build(): LockboxAddressListParams =
+ LockboxAddressListParams(
createdAt,
cursor,
idempotencyKey,
@@ -243,7 +230,6 @@ private constructor(
override fun _queryParams(): QueryParams =
QueryParams.builder()
.apply {
- accountId?.let { put("account_id", it) }
createdAt?.let {
it.after().ifPresent {
put("created_at.after", DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(it))
@@ -459,8 +445,7 @@ private constructor(
return true
}
- return other is LockboxListParams &&
- accountId == other.accountId &&
+ return other is LockboxAddressListParams &&
createdAt == other.createdAt &&
cursor == other.cursor &&
idempotencyKey == other.idempotencyKey &&
@@ -471,7 +456,6 @@ private constructor(
override fun hashCode(): Int =
Objects.hash(
- accountId,
createdAt,
cursor,
idempotencyKey,
@@ -481,5 +465,5 @@ private constructor(
)
override fun toString() =
- "LockboxListParams{accountId=$accountId, createdAt=$createdAt, cursor=$cursor, idempotencyKey=$idempotencyKey, limit=$limit, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
+ "LockboxAddressListParams{createdAt=$createdAt, cursor=$cursor, idempotencyKey=$idempotencyKey, limit=$limit, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxRetrieveParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressRetrieveParams.kt
similarity index 73%
rename from increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxRetrieveParams.kt
rename to increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressRetrieveParams.kt
index 133aeaecd..06f391afe 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxes/LockboxRetrieveParams.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressRetrieveParams.kt
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless.
-package com.increase.api.models.lockboxes
+package com.increase.api.models.lockboxaddresses
import com.increase.api.core.Params
import com.increase.api.core.http.Headers
@@ -9,16 +9,16 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
-/** Retrieve a Lockbox */
-class LockboxRetrieveParams
+/** Retrieve a Lockbox Address */
+class LockboxAddressRetrieveParams
private constructor(
- private val lockboxId: String?,
+ private val lockboxAddressId: String?,
private val additionalHeaders: Headers,
private val additionalQueryParams: QueryParams,
) : Params {
- /** The identifier of the Lockbox to retrieve. */
- fun lockboxId(): Optional = Optional.ofNullable(lockboxId)
+ /** The identifier of the Lockbox Address to retrieve. */
+ fun lockboxAddressId(): Optional = Optional.ofNullable(lockboxAddressId)
/** Additional headers to send with the request. */
fun _additionalHeaders(): Headers = additionalHeaders
@@ -30,31 +30,36 @@ private constructor(
companion object {
- @JvmStatic fun none(): LockboxRetrieveParams = builder().build()
+ @JvmStatic fun none(): LockboxAddressRetrieveParams = builder().build()
- /** Returns a mutable builder for constructing an instance of [LockboxRetrieveParams]. */
+ /**
+ * Returns a mutable builder for constructing an instance of [LockboxAddressRetrieveParams].
+ */
@JvmStatic fun builder() = Builder()
}
- /** A builder for [LockboxRetrieveParams]. */
+ /** A builder for [LockboxAddressRetrieveParams]. */
class Builder internal constructor() {
- private var lockboxId: String? = null
+ private var lockboxAddressId: String? = null
private var additionalHeaders: Headers.Builder = Headers.builder()
private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
@JvmSynthetic
- internal fun from(lockboxRetrieveParams: LockboxRetrieveParams) = apply {
- lockboxId = lockboxRetrieveParams.lockboxId
- additionalHeaders = lockboxRetrieveParams.additionalHeaders.toBuilder()
- additionalQueryParams = lockboxRetrieveParams.additionalQueryParams.toBuilder()
+ internal fun from(lockboxAddressRetrieveParams: LockboxAddressRetrieveParams) = apply {
+ lockboxAddressId = lockboxAddressRetrieveParams.lockboxAddressId
+ additionalHeaders = lockboxAddressRetrieveParams.additionalHeaders.toBuilder()
+ additionalQueryParams = lockboxAddressRetrieveParams.additionalQueryParams.toBuilder()
}
- /** The identifier of the Lockbox to retrieve. */
- fun lockboxId(lockboxId: String?) = apply { this.lockboxId = lockboxId }
+ /** The identifier of the Lockbox Address to retrieve. */
+ fun lockboxAddressId(lockboxAddressId: String?) = apply {
+ this.lockboxAddressId = lockboxAddressId
+ }
- /** Alias for calling [Builder.lockboxId] with `lockboxId.orElse(null)`. */
- fun lockboxId(lockboxId: Optional) = lockboxId(lockboxId.getOrNull())
+ /** Alias for calling [Builder.lockboxAddressId] with `lockboxAddressId.orElse(null)`. */
+ fun lockboxAddressId(lockboxAddressId: Optional) =
+ lockboxAddressId(lockboxAddressId.getOrNull())
fun additionalHeaders(additionalHeaders: Headers) = apply {
this.additionalHeaders.clear()
@@ -155,13 +160,13 @@ private constructor(
}
/**
- * Returns an immutable instance of [LockboxRetrieveParams].
+ * Returns an immutable instance of [LockboxAddressRetrieveParams].
*
* Further updates to this [Builder] will not mutate the returned instance.
*/
- fun build(): LockboxRetrieveParams =
- LockboxRetrieveParams(
- lockboxId,
+ fun build(): LockboxAddressRetrieveParams =
+ LockboxAddressRetrieveParams(
+ lockboxAddressId,
additionalHeaders.build(),
additionalQueryParams.build(),
)
@@ -169,7 +174,7 @@ private constructor(
fun _pathParam(index: Int): String =
when (index) {
- 0 -> lockboxId ?: ""
+ 0 -> lockboxAddressId ?: ""
else -> ""
}
@@ -182,14 +187,15 @@ private constructor(
return true
}
- return other is LockboxRetrieveParams &&
- lockboxId == other.lockboxId &&
+ return other is LockboxAddressRetrieveParams &&
+ lockboxAddressId == other.lockboxAddressId &&
additionalHeaders == other.additionalHeaders &&
additionalQueryParams == other.additionalQueryParams
}
- override fun hashCode(): Int = Objects.hash(lockboxId, additionalHeaders, additionalQueryParams)
+ override fun hashCode(): Int =
+ Objects.hash(lockboxAddressId, additionalHeaders, additionalQueryParams)
override fun toString() =
- "LockboxRetrieveParams{lockboxId=$lockboxId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
+ "LockboxAddressRetrieveParams{lockboxAddressId=$lockboxAddressId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressUpdateParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressUpdateParams.kt
new file mode 100644
index 000000000..4c6fcf2e8
--- /dev/null
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/lockboxaddresses/LockboxAddressUpdateParams.kt
@@ -0,0 +1,631 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.increase.api.models.lockboxaddresses
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter
+import com.fasterxml.jackson.annotation.JsonAnySetter
+import com.fasterxml.jackson.annotation.JsonCreator
+import com.fasterxml.jackson.annotation.JsonProperty
+import com.increase.api.core.Enum
+import com.increase.api.core.ExcludeMissing
+import com.increase.api.core.JsonField
+import com.increase.api.core.JsonMissing
+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.errors.IncreaseInvalidDataException
+import java.util.Collections
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+/** Update a Lockbox Address */
+class LockboxAddressUpdateParams
+private constructor(
+ private val lockboxAddressId: String?,
+ private val body: Body,
+ private val additionalHeaders: Headers,
+ private val additionalQueryParams: QueryParams,
+) : Params {
+
+ /** The identifier of the Lockbox Address. */
+ fun lockboxAddressId(): Optional = Optional.ofNullable(lockboxAddressId)
+
+ /**
+ * The description you choose for the Lockbox Address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun description(): Optional = body.description()
+
+ /**
+ * The status of the Lockbox Address.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun status(): Optional = body.status()
+
+ /**
+ * Returns the raw JSON value of [description].
+ *
+ * Unlike [description], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _description(): JsonField = body._description()
+
+ /**
+ * 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. */
+ fun _additionalHeaders(): Headers = additionalHeaders
+
+ /** Additional query param to send with the request. */
+ fun _additionalQueryParams(): QueryParams = additionalQueryParams
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ @JvmStatic fun none(): LockboxAddressUpdateParams = builder().build()
+
+ /**
+ * Returns a mutable builder for constructing an instance of [LockboxAddressUpdateParams].
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [LockboxAddressUpdateParams]. */
+ class Builder internal constructor() {
+
+ private var lockboxAddressId: String? = null
+ private var body: Body.Builder = Body.builder()
+ private var additionalHeaders: Headers.Builder = Headers.builder()
+ private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
+
+ @JvmSynthetic
+ internal fun from(lockboxAddressUpdateParams: LockboxAddressUpdateParams) = apply {
+ lockboxAddressId = lockboxAddressUpdateParams.lockboxAddressId
+ body = lockboxAddressUpdateParams.body.toBuilder()
+ additionalHeaders = lockboxAddressUpdateParams.additionalHeaders.toBuilder()
+ additionalQueryParams = lockboxAddressUpdateParams.additionalQueryParams.toBuilder()
+ }
+
+ /** The identifier of the Lockbox Address. */
+ fun lockboxAddressId(lockboxAddressId: String?) = apply {
+ this.lockboxAddressId = lockboxAddressId
+ }
+
+ /** Alias for calling [Builder.lockboxAddressId] with `lockboxAddressId.orElse(null)`. */
+ fun lockboxAddressId(lockboxAddressId: Optional) =
+ lockboxAddressId(lockboxAddressId.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:
+ * - [description]
+ * - [status]
+ */
+ fun body(body: Body) = apply { this.body = body.toBuilder() }
+
+ /** The description you choose for the Lockbox Address. */
+ fun description(description: String) = apply { body.description(description) }
+
+ /**
+ * Sets [Builder.description] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.description] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun description(description: JsonField) = apply { body.description(description) }
+
+ /** The status of the Lockbox Address. */
+ 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)
+ }
+
+ 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)
+ }
+
+ fun additionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun putAdditionalHeader(name: String, value: String) = apply {
+ additionalHeaders.put(name, value)
+ }
+
+ fun putAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.put(name, values)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun replaceAdditionalHeaders(name: String, value: String) = apply {
+ additionalHeaders.replace(name, value)
+ }
+
+ fun replaceAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.replace(name, values)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.remove(name) }
+
+ fun removeAllAdditionalHeaders(names: Set) = apply {
+ additionalHeaders.removeAll(names)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: Map>) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun putAdditionalQueryParam(key: String, value: String) = apply {
+ additionalQueryParams.put(key, value)
+ }
+
+ fun putAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.put(key, values)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, value: String) = apply {
+ additionalQueryParams.replace(key, value)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.replace(key, values)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun removeAdditionalQueryParams(key: String) = apply { additionalQueryParams.remove(key) }
+
+ fun removeAllAdditionalQueryParams(keys: Set) = apply {
+ additionalQueryParams.removeAll(keys)
+ }
+
+ /**
+ * Returns an immutable instance of [LockboxAddressUpdateParams].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): LockboxAddressUpdateParams =
+ LockboxAddressUpdateParams(
+ lockboxAddressId,
+ body.build(),
+ additionalHeaders.build(),
+ additionalQueryParams.build(),
+ )
+ }
+
+ fun _body(): Body = body
+
+ fun _pathParam(index: Int): String =
+ when (index) {
+ 0 -> lockboxAddressId ?: ""
+ else -> ""
+ }
+
+ override fun _headers(): Headers = additionalHeaders
+
+ override fun _queryParams(): QueryParams = additionalQueryParams
+
+ class Body
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val description: JsonField,
+ private val status: JsonField,
+ private val additionalProperties: MutableMap