diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 4663cfd4a..aaa9928e9 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.468.0"
+ ".": "0.469.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 06f5ab863..c29f1d485 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 236
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5a342683774b79b3ee013a195d77a651ea053be4ec6a314e92ab08b62f62517b.yml
-openapi_spec_hash: 2c87b069a3c3e1c647251016452c0b28
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4d9e8a8a1909ef7c96fe28293ab07720938ce09be84687c57e3cf95890a78205.yml
+openapi_spec_hash: 4b3867a81a8429bf6ab119f910e72865
config_hash: e73b1147c039cb3d6a2c56ae5926bca8
diff --git a/CHANGELOG.md b/CHANGELOG.md
index db899b7a4..bc27ccb79 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.469.0 (2026-03-12)
+
+Full Changelog: [v0.468.0...v0.469.0](https://github.com/Increase/increase-java/compare/v0.468.0...v0.469.0)
+
+### Features
+
+* **api:** api update ([8e3b7ef](https://github.com/Increase/increase-java/commit/8e3b7ef31853c73cfb9562793a4d62df956f75d3))
+
## 0.468.0 (2026-03-12)
Full Changelog: [v0.467.0...v0.468.0](https://github.com/Increase/increase-java/compare/v0.467.0...v0.468.0)
diff --git a/README.md b/README.md
index b40202f68..734d4ad4e 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.468.0)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.468.0)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.469.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.469.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.468.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.469.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.468.0")
+implementation("com.increase.api:increase-java:0.469.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.468.0")
com.increase.api
increase-java
- 0.468.0
+ 0.469.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index a423fc306..c1f86fc17 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.468.0" // x-release-please-version
+ version = "0.469.0" // x-release-please-version
}
subprojects {
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransfer.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransfer.kt
index fafdaef5c..3caf3fc9e 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransfer.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransfer.kt
@@ -3286,7 +3286,7 @@ private constructor(
private val recipientName: JsonField,
private val returnAddress: JsonField,
private val shippingMethod: JsonField,
- private val signatureText: JsonField,
+ private val signature: JsonField,
private val trackingUpdates: JsonField>,
private val additionalProperties: MutableMap,
) {
@@ -3314,9 +3314,9 @@ private constructor(
@JsonProperty("shipping_method")
@ExcludeMissing
shippingMethod: JsonField = JsonMissing.of(),
- @JsonProperty("signature_text")
+ @JsonProperty("signature")
@ExcludeMissing
- signatureText: JsonField = JsonMissing.of(),
+ signature: JsonField = JsonMissing.of(),
@JsonProperty("tracking_updates")
@ExcludeMissing
trackingUpdates: JsonField> = JsonMissing.of(),
@@ -3330,7 +3330,7 @@ private constructor(
recipientName,
returnAddress,
shippingMethod,
- signatureText,
+ signature,
trackingUpdates,
mutableMapOf(),
)
@@ -3412,13 +3412,12 @@ private constructor(
shippingMethod.getOptional("shipping_method")
/**
- * The text that will appear as the signature on the check in cursive font. If blank, the
- * check will be printed with 'No signature required'.
+ * The signature that will appear on the check.
*
- * @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 signatureText(): Optional = signatureText.getOptional("signature_text")
+ fun signature(): Signature = signature.getRequired("signature")
/**
* Tracking updates relating to the physical check's delivery.
@@ -3511,14 +3510,13 @@ private constructor(
fun _shippingMethod(): JsonField = shippingMethod
/**
- * Returns the raw JSON value of [signatureText].
+ * Returns the raw JSON value of [signature].
*
- * Unlike [signatureText], this method doesn't throw if the JSON field has an unexpected
- * type.
+ * Unlike [signature], this method doesn't throw if the JSON field has an unexpected type.
*/
- @JsonProperty("signature_text")
+ @JsonProperty("signature")
@ExcludeMissing
- fun _signatureText(): JsonField = signatureText
+ fun _signature(): JsonField = signature
/**
* Returns the raw JSON value of [trackingUpdates].
@@ -3558,7 +3556,7 @@ private constructor(
* .recipientName()
* .returnAddress()
* .shippingMethod()
- * .signatureText()
+ * .signature()
* .trackingUpdates()
* ```
*/
@@ -3577,7 +3575,7 @@ private constructor(
private var recipientName: JsonField? = null
private var returnAddress: JsonField? = null
private var shippingMethod: JsonField? = null
- private var signatureText: JsonField? = null
+ private var signature: JsonField? = null
private var trackingUpdates: JsonField>? = null
private var additionalProperties: MutableMap = mutableMapOf()
@@ -3592,7 +3590,7 @@ private constructor(
recipientName = physicalCheck.recipientName
returnAddress = physicalCheck.returnAddress
shippingMethod = physicalCheck.shippingMethod
- signatureText = physicalCheck.signatureText
+ signature = physicalCheck.signature
trackingUpdates = physicalCheck.trackingUpdates.map { it.toMutableList() }
additionalProperties = physicalCheck.additionalProperties.toMutableMap()
}
@@ -3766,27 +3764,17 @@ private constructor(
this.shippingMethod = shippingMethod
}
- /**
- * The text that will appear as the signature on the check in cursive font. If blank,
- * the check will be printed with 'No signature required'.
- */
- fun signatureText(signatureText: String?) =
- signatureText(JsonField.ofNullable(signatureText))
-
- /** Alias for calling [Builder.signatureText] with `signatureText.orElse(null)`. */
- fun signatureText(signatureText: Optional) =
- signatureText(signatureText.getOrNull())
+ /** The signature that will appear on the check. */
+ fun signature(signature: Signature) = signature(JsonField.of(signature))
/**
- * Sets [Builder.signatureText] to an arbitrary JSON value.
+ * Sets [Builder.signature] to an arbitrary JSON value.
*
- * You should usually call [Builder.signatureText] with a well-typed [String] value
+ * You should usually call [Builder.signature] with a well-typed [Signature] value
* instead. This method is primarily for setting the field to an undocumented or not yet
* supported value.
*/
- fun signatureText(signatureText: JsonField) = apply {
- this.signatureText = signatureText
- }
+ fun signature(signature: JsonField) = apply { this.signature = signature }
/** Tracking updates relating to the physical check's delivery. */
fun trackingUpdates(trackingUpdates: List) =
@@ -3850,7 +3838,7 @@ private constructor(
* .recipientName()
* .returnAddress()
* .shippingMethod()
- * .signatureText()
+ * .signature()
* .trackingUpdates()
* ```
*
@@ -3867,7 +3855,7 @@ private constructor(
checkRequired("recipientName", recipientName),
checkRequired("returnAddress", returnAddress),
checkRequired("shippingMethod", shippingMethod),
- checkRequired("signatureText", signatureText),
+ checkRequired("signature", signature),
checkRequired("trackingUpdates", trackingUpdates).map { it.toImmutable() },
additionalProperties.toMutableMap(),
)
@@ -3889,7 +3877,7 @@ private constructor(
recipientName()
returnAddress().ifPresent { it.validate() }
shippingMethod().ifPresent { it.validate() }
- signatureText()
+ signature().validate()
trackingUpdates().forEach { it.validate() }
validated = true
}
@@ -3919,7 +3907,7 @@ private constructor(
(if (recipientName.asKnown().isPresent) 1 else 0) +
(returnAddress.asKnown().getOrNull()?.validity() ?: 0) +
(shippingMethod.asKnown().getOrNull()?.validity() ?: 0) +
- (if (signatureText.asKnown().isPresent) 1 else 0) +
+ (signature.asKnown().getOrNull()?.validity() ?: 0) +
(trackingUpdates.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0)
/** Details for where Increase will mail the check. */
@@ -5085,6 +5073,225 @@ private constructor(
override fun toString() = value.toString()
}
+ /** The signature that will appear on the check. */
+ class Signature
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val imageFileId: JsonField,
+ private val text: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("image_file_id")
+ @ExcludeMissing
+ imageFileId: JsonField = JsonMissing.of(),
+ @JsonProperty("text") @ExcludeMissing text: JsonField = JsonMissing.of(),
+ ) : this(imageFileId, text, mutableMapOf())
+
+ /**
+ * The ID of a File containing a PNG of the signature.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
+ */
+ fun imageFileId(): Optional = imageFileId.getOptional("image_file_id")
+
+ /**
+ * The text that will appear as the signature on the check in cursive font.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
+ */
+ fun text(): Optional = text.getOptional("text")
+
+ /**
+ * Returns the raw JSON value of [imageFileId].
+ *
+ * Unlike [imageFileId], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("image_file_id")
+ @ExcludeMissing
+ fun _imageFileId(): JsonField = imageFileId
+
+ /**
+ * Returns the raw JSON value of [text].
+ *
+ * Unlike [text], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("text") @ExcludeMissing fun _text(): JsonField = text
+
+ @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 [Signature].
+ *
+ * The following fields are required:
+ * ```java
+ * .imageFileId()
+ * .text()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [Signature]. */
+ class Builder internal constructor() {
+
+ private var imageFileId: JsonField? = null
+ private var text: JsonField? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(signature: Signature) = apply {
+ imageFileId = signature.imageFileId
+ text = signature.text
+ additionalProperties = signature.additionalProperties.toMutableMap()
+ }
+
+ /** The ID of a File containing a PNG of the signature. */
+ fun imageFileId(imageFileId: String?) =
+ imageFileId(JsonField.ofNullable(imageFileId))
+
+ /** Alias for calling [Builder.imageFileId] with `imageFileId.orElse(null)`. */
+ fun imageFileId(imageFileId: Optional) =
+ imageFileId(imageFileId.getOrNull())
+
+ /**
+ * Sets [Builder.imageFileId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.imageFileId] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun imageFileId(imageFileId: JsonField) = apply {
+ this.imageFileId = imageFileId
+ }
+
+ /** The text that will appear as the signature on the check in cursive font. */
+ fun text(text: String?) = text(JsonField.ofNullable(text))
+
+ /** Alias for calling [Builder.text] with `text.orElse(null)`. */
+ fun text(text: Optional) = text(text.getOrNull())
+
+ /**
+ * Sets [Builder.text] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.text] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun text(text: JsonField) = apply { this.text = text }
+
+ 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 [Signature].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .imageFileId()
+ * .text()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): Signature =
+ Signature(
+ checkRequired("imageFileId", imageFileId),
+ checkRequired("text", text),
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): Signature = apply {
+ if (validated) {
+ return@apply
+ }
+
+ imageFileId()
+ text()
+ 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 (imageFileId.asKnown().isPresent) 1 else 0) +
+ (if (text.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Signature &&
+ imageFileId == other.imageFileId &&
+ text == other.text &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(imageFileId, text, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Signature{imageFileId=$imageFileId, text=$text, additionalProperties=$additionalProperties}"
+ }
+
class TrackingUpdate
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
@@ -5543,7 +5750,7 @@ private constructor(
recipientName == other.recipientName &&
returnAddress == other.returnAddress &&
shippingMethod == other.shippingMethod &&
- signatureText == other.signatureText &&
+ signature == other.signature &&
trackingUpdates == other.trackingUpdates &&
additionalProperties == other.additionalProperties
}
@@ -5559,7 +5766,7 @@ private constructor(
recipientName,
returnAddress,
shippingMethod,
- signatureText,
+ signature,
trackingUpdates,
additionalProperties,
)
@@ -5568,7 +5775,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "PhysicalCheck{attachmentFileId=$attachmentFileId, checkVoucherImageFileId=$checkVoucherImageFileId, mailingAddress=$mailingAddress, memo=$memo, note=$note, payer=$payer, recipientName=$recipientName, returnAddress=$returnAddress, shippingMethod=$shippingMethod, signatureText=$signatureText, trackingUpdates=$trackingUpdates, additionalProperties=$additionalProperties}"
+ "PhysicalCheck{attachmentFileId=$attachmentFileId, checkVoucherImageFileId=$checkVoucherImageFileId, mailingAddress=$mailingAddress, memo=$memo, note=$note, payer=$payer, recipientName=$recipientName, returnAddress=$returnAddress, shippingMethod=$shippingMethod, signature=$signature, trackingUpdates=$trackingUpdates, additionalProperties=$additionalProperties}"
}
/** The lifecycle status of the transfer. */
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransferCreateParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransferCreateParams.kt
index 46a32103f..6f4ee131c 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransferCreateParams.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/checktransfers/CheckTransferCreateParams.kt
@@ -1487,7 +1487,7 @@ private constructor(
private val payer: JsonField>,
private val returnAddress: JsonField,
private val shippingMethod: JsonField,
- private val signatureText: JsonField,
+ private val signature: JsonField,
private val additionalProperties: MutableMap,
) {
@@ -1514,9 +1514,9 @@ private constructor(
@JsonProperty("shipping_method")
@ExcludeMissing
shippingMethod: JsonField = JsonMissing.of(),
- @JsonProperty("signature_text")
+ @JsonProperty("signature")
@ExcludeMissing
- signatureText: JsonField = JsonMissing.of(),
+ signature: JsonField = JsonMissing.of(),
) : this(
mailingAddress,
memo,
@@ -1527,7 +1527,7 @@ private constructor(
payer,
returnAddress,
shippingMethod,
- signatureText,
+ signature,
mutableMapOf(),
)
@@ -1615,13 +1615,13 @@ private constructor(
shippingMethod.getOptional("shipping_method")
/**
- * The text that will appear as the signature on the check in cursive font. If not provided,
- * the check will be printed with 'No signature required'.
+ * The signature that will appear on the check. If not provided, the check will be printed
+ * with 'No Signature Required'. At most one of `text` and `image_file_id` may be provided.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
*/
- fun signatureText(): Optional = signatureText.getOptional("signature_text")
+ fun signature(): Optional = signature.getOptional("signature")
/**
* Returns the raw JSON value of [mailingAddress].
@@ -1705,14 +1705,13 @@ private constructor(
fun _shippingMethod(): JsonField = shippingMethod
/**
- * Returns the raw JSON value of [signatureText].
+ * Returns the raw JSON value of [signature].
*
- * Unlike [signatureText], this method doesn't throw if the JSON field has an unexpected
- * type.
+ * Unlike [signature], this method doesn't throw if the JSON field has an unexpected type.
*/
- @JsonProperty("signature_text")
+ @JsonProperty("signature")
@ExcludeMissing
- fun _signatureText(): JsonField = signatureText
+ fun _signature(): JsonField = signature
@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
@@ -1753,7 +1752,7 @@ private constructor(
private var payer: JsonField>? = null
private var returnAddress: JsonField = JsonMissing.of()
private var shippingMethod: JsonField = JsonMissing.of()
- private var signatureText: JsonField = JsonMissing.of()
+ private var signature: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@JvmSynthetic
@@ -1767,7 +1766,7 @@ private constructor(
payer = physicalCheck.payer.map { it.toMutableList() }
returnAddress = physicalCheck.returnAddress
shippingMethod = physicalCheck.shippingMethod
- signatureText = physicalCheck.signatureText
+ signature = physicalCheck.signature
additionalProperties = physicalCheck.additionalProperties.toMutableMap()
}
@@ -1929,21 +1928,20 @@ private constructor(
}
/**
- * The text that will appear as the signature on the check in cursive font. If not
- * provided, the check will be printed with 'No signature required'.
+ * The signature that will appear on the check. If not provided, the check will be
+ * printed with 'No Signature Required'. At most one of `text` and `image_file_id` may
+ * be provided.
*/
- fun signatureText(signatureText: String) = signatureText(JsonField.of(signatureText))
+ fun signature(signature: Signature) = signature(JsonField.of(signature))
/**
- * Sets [Builder.signatureText] to an arbitrary JSON value.
+ * Sets [Builder.signature] to an arbitrary JSON value.
*
- * You should usually call [Builder.signatureText] with a well-typed [String] value
+ * You should usually call [Builder.signature] with a well-typed [Signature] value
* instead. This method is primarily for setting the field to an undocumented or not yet
* supported value.
*/
- fun signatureText(signatureText: JsonField) = apply {
- this.signatureText = signatureText
- }
+ fun signature(signature: JsonField) = apply { this.signature = signature }
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
@@ -1989,7 +1987,7 @@ private constructor(
(payer ?: JsonMissing.of()).map { it.toImmutable() },
returnAddress,
shippingMethod,
- signatureText,
+ signature,
additionalProperties.toMutableMap(),
)
}
@@ -2010,7 +2008,7 @@ private constructor(
payer().ifPresent { it.forEach { it.validate() } }
returnAddress().ifPresent { it.validate() }
shippingMethod().ifPresent { it.validate() }
- signatureText()
+ signature().ifPresent { it.validate() }
validated = true
}
@@ -2039,7 +2037,7 @@ private constructor(
(payer.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
(returnAddress.asKnown().getOrNull()?.validity() ?: 0) +
(shippingMethod.asKnown().getOrNull()?.validity() ?: 0) +
- (if (signatureText.asKnown().isPresent) 1 else 0)
+ (signature.asKnown().getOrNull()?.validity() ?: 0)
/** Details for where Increase will mail the check. */
class MailingAddress
@@ -3175,6 +3173,204 @@ private constructor(
override fun toString() = value.toString()
}
+ /**
+ * The signature that will appear on the check. If not provided, the check will be printed
+ * with 'No Signature Required'. At most one of `text` and `image_file_id` may be provided.
+ */
+ class Signature
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val imageFileId: JsonField,
+ private val text: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("image_file_id")
+ @ExcludeMissing
+ imageFileId: JsonField = JsonMissing.of(),
+ @JsonProperty("text") @ExcludeMissing text: JsonField = JsonMissing.of(),
+ ) : this(imageFileId, text, mutableMapOf())
+
+ /**
+ * The ID of a File containing a PNG of the signature. This must have `purpose:
+ * check_signature` and be a 1320x120 pixel PNG.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
+ */
+ fun imageFileId(): Optional = imageFileId.getOptional("image_file_id")
+
+ /**
+ * The text that will appear as the signature on the check in cursive font.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g.
+ * if the server responded with an unexpected value).
+ */
+ fun text(): Optional = text.getOptional("text")
+
+ /**
+ * Returns the raw JSON value of [imageFileId].
+ *
+ * Unlike [imageFileId], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("image_file_id")
+ @ExcludeMissing
+ fun _imageFileId(): JsonField = imageFileId
+
+ /**
+ * Returns the raw JSON value of [text].
+ *
+ * Unlike [text], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("text") @ExcludeMissing fun _text(): JsonField = text
+
+ @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 [Signature]. */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [Signature]. */
+ class Builder internal constructor() {
+
+ private var imageFileId: JsonField = JsonMissing.of()
+ private var text: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(signature: Signature) = apply {
+ imageFileId = signature.imageFileId
+ text = signature.text
+ additionalProperties = signature.additionalProperties.toMutableMap()
+ }
+
+ /**
+ * The ID of a File containing a PNG of the signature. This must have `purpose:
+ * check_signature` and be a 1320x120 pixel PNG.
+ */
+ fun imageFileId(imageFileId: String) = imageFileId(JsonField.of(imageFileId))
+
+ /**
+ * Sets [Builder.imageFileId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.imageFileId] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun imageFileId(imageFileId: JsonField) = apply {
+ this.imageFileId = imageFileId
+ }
+
+ /** The text that will appear as the signature on the check in cursive font. */
+ fun text(text: String) = text(JsonField.of(text))
+
+ /**
+ * Sets [Builder.text] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.text] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun text(text: JsonField) = apply { this.text = text }
+
+ 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 [Signature].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): Signature =
+ Signature(imageFileId, text, additionalProperties.toMutableMap())
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): Signature = apply {
+ if (validated) {
+ return@apply
+ }
+
+ imageFileId()
+ text()
+ 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 (imageFileId.asKnown().isPresent) 1 else 0) +
+ (if (text.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Signature &&
+ imageFileId == other.imageFileId &&
+ text == other.text &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(imageFileId, text, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Signature{imageFileId=$imageFileId, text=$text, additionalProperties=$additionalProperties}"
+ }
+
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
@@ -3190,7 +3386,7 @@ private constructor(
payer == other.payer &&
returnAddress == other.returnAddress &&
shippingMethod == other.shippingMethod &&
- signatureText == other.signatureText &&
+ signature == other.signature &&
additionalProperties == other.additionalProperties
}
@@ -3205,7 +3401,7 @@ private constructor(
payer,
returnAddress,
shippingMethod,
- signatureText,
+ signature,
additionalProperties,
)
}
@@ -3213,7 +3409,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "PhysicalCheck{mailingAddress=$mailingAddress, memo=$memo, recipientName=$recipientName, attachmentFileId=$attachmentFileId, checkVoucherImageFileId=$checkVoucherImageFileId, note=$note, payer=$payer, returnAddress=$returnAddress, shippingMethod=$shippingMethod, signatureText=$signatureText, additionalProperties=$additionalProperties}"
+ "PhysicalCheck{mailingAddress=$mailingAddress, memo=$memo, recipientName=$recipientName, attachmentFileId=$attachmentFileId, checkVoucherImageFileId=$checkVoucherImageFileId, note=$note, payer=$payer, returnAddress=$returnAddress, shippingMethod=$shippingMethod, signature=$signature, additionalProperties=$additionalProperties}"
}
/**
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/files/File.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/files/File.kt
index 89b9273f7..ddcfc8626 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/files/File.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/files/File.kt
@@ -689,6 +689,9 @@ private constructor(
*/
@JvmField val CHECK_VOUCHER_IMAGE = of("check_voucher_image")
+ /** A signature image to be printed on a check. This must be a 1320x120 pixel PNG. */
+ @JvmField val CHECK_SIGNATURE = of("check_signature")
+
/** A scanned mail item sent to Increase. */
@JvmField val INBOUND_MAIL_ITEM = of("inbound_mail_item")
@@ -816,6 +819,8 @@ private constructor(
* trifold area of a check. This must be a 2550x1100 pixel PNG.
*/
CHECK_VOUCHER_IMAGE,
+ /** A signature image to be printed on a check. This must be a 1320x120 pixel PNG. */
+ CHECK_SIGNATURE,
/** A scanned mail item sent to Increase. */
INBOUND_MAIL_ITEM,
/** IRS Form 1099-INT. */
@@ -920,6 +925,8 @@ private constructor(
* trifold area of a check. This must be a 2550x1100 pixel PNG.
*/
CHECK_VOUCHER_IMAGE,
+ /** A signature image to be printed on a check. This must be a 1320x120 pixel PNG. */
+ CHECK_SIGNATURE,
/** A scanned mail item sent to Increase. */
INBOUND_MAIL_ITEM,
/** IRS Form 1099-INT. */
@@ -1004,6 +1011,7 @@ private constructor(
MAILED_CHECK_IMAGE -> Value.MAILED_CHECK_IMAGE
CHECK_ATTACHMENT -> Value.CHECK_ATTACHMENT
CHECK_VOUCHER_IMAGE -> Value.CHECK_VOUCHER_IMAGE
+ CHECK_SIGNATURE -> Value.CHECK_SIGNATURE
INBOUND_MAIL_ITEM -> Value.INBOUND_MAIL_ITEM
FORM_1099_INT -> Value.FORM_1099_INT
FORM_1099_MISC -> Value.FORM_1099_MISC
@@ -1052,6 +1060,7 @@ private constructor(
MAILED_CHECK_IMAGE -> Known.MAILED_CHECK_IMAGE
CHECK_ATTACHMENT -> Known.CHECK_ATTACHMENT
CHECK_VOUCHER_IMAGE -> Known.CHECK_VOUCHER_IMAGE
+ CHECK_SIGNATURE -> Known.CHECK_SIGNATURE
INBOUND_MAIL_ITEM -> Known.INBOUND_MAIL_ITEM
FORM_1099_INT -> Known.FORM_1099_INT
FORM_1099_MISC -> Known.FORM_1099_MISC
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/files/FileCreateParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/files/FileCreateParams.kt
index eff84a772..b78623c23 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/files/FileCreateParams.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/files/FileCreateParams.kt
@@ -619,6 +619,9 @@ private constructor(
*/
@JvmField val CHECK_VOUCHER_IMAGE = of("check_voucher_image")
+ /** A signature image to be printed on a check. This must be a 1320x120 pixel PNG. */
+ @JvmField val CHECK_SIGNATURE = of("check_signature")
+
/** IRS Form SS-4. */
@JvmField val FORM_SS_4 = of("form_ss_4")
@@ -702,6 +705,8 @@ private constructor(
* trifold area of a check. This must be a 2550x1100 pixel PNG.
*/
CHECK_VOUCHER_IMAGE,
+ /** A signature image to be printed on a check. This must be a 1320x120 pixel PNG. */
+ CHECK_SIGNATURE,
/** IRS Form SS-4. */
FORM_SS_4,
/** An image of a government-issued ID. */
@@ -774,6 +779,8 @@ private constructor(
* trifold area of a check. This must be a 2550x1100 pixel PNG.
*/
CHECK_VOUCHER_IMAGE,
+ /** A signature image to be printed on a check. This must be a 1320x120 pixel PNG. */
+ CHECK_SIGNATURE,
/** IRS Form SS-4. */
FORM_SS_4,
/** An image of a government-issued ID. */
@@ -834,6 +841,7 @@ private constructor(
MAILED_CHECK_IMAGE -> Value.MAILED_CHECK_IMAGE
CHECK_ATTACHMENT -> Value.CHECK_ATTACHMENT
CHECK_VOUCHER_IMAGE -> Value.CHECK_VOUCHER_IMAGE
+ CHECK_SIGNATURE -> Value.CHECK_SIGNATURE
FORM_SS_4 -> Value.FORM_SS_4
IDENTITY_DOCUMENT -> Value.IDENTITY_DOCUMENT
LOAN_APPLICATION_SUPPLEMENTAL_DOCUMENT ->
@@ -869,6 +877,7 @@ private constructor(
MAILED_CHECK_IMAGE -> Known.MAILED_CHECK_IMAGE
CHECK_ATTACHMENT -> Known.CHECK_ATTACHMENT
CHECK_VOUCHER_IMAGE -> Known.CHECK_VOUCHER_IMAGE
+ CHECK_SIGNATURE -> Known.CHECK_SIGNATURE
FORM_SS_4 -> Known.FORM_SS_4
IDENTITY_DOCUMENT -> Known.IDENTITY_DOCUMENT
LOAN_APPLICATION_SUPPLEMENTAL_DOCUMENT ->
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/files/FileListParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/files/FileListParams.kt
index dba7537d2..e3de02762 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/files/FileListParams.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/files/FileListParams.kt
@@ -622,6 +622,11 @@ private constructor(
*/
@JvmField val CHECK_VOUCHER_IMAGE = of("check_voucher_image")
+ /**
+ * A signature image to be printed on a check. This must be a 1320x120 pixel PNG.
+ */
+ @JvmField val CHECK_SIGNATURE = of("check_signature")
+
/** A scanned mail item sent to Increase. */
@JvmField val INBOUND_MAIL_ITEM = of("inbound_mail_item")
@@ -749,6 +754,10 @@ private constructor(
* the trifold area of a check. This must be a 2550x1100 pixel PNG.
*/
CHECK_VOUCHER_IMAGE,
+ /**
+ * A signature image to be printed on a check. This must be a 1320x120 pixel PNG.
+ */
+ CHECK_SIGNATURE,
/** A scanned mail item sent to Increase. */
INBOUND_MAIL_ITEM,
/** IRS Form 1099-INT. */
@@ -853,6 +862,10 @@ private constructor(
* the trifold area of a check. This must be a 2550x1100 pixel PNG.
*/
CHECK_VOUCHER_IMAGE,
+ /**
+ * A signature image to be printed on a check. This must be a 1320x120 pixel PNG.
+ */
+ CHECK_SIGNATURE,
/** A scanned mail item sent to Increase. */
INBOUND_MAIL_ITEM,
/** IRS Form 1099-INT. */
@@ -937,6 +950,7 @@ private constructor(
MAILED_CHECK_IMAGE -> Value.MAILED_CHECK_IMAGE
CHECK_ATTACHMENT -> Value.CHECK_ATTACHMENT
CHECK_VOUCHER_IMAGE -> Value.CHECK_VOUCHER_IMAGE
+ CHECK_SIGNATURE -> Value.CHECK_SIGNATURE
INBOUND_MAIL_ITEM -> Value.INBOUND_MAIL_ITEM
FORM_1099_INT -> Value.FORM_1099_INT
FORM_1099_MISC -> Value.FORM_1099_MISC
@@ -985,6 +999,7 @@ private constructor(
MAILED_CHECK_IMAGE -> Known.MAILED_CHECK_IMAGE
CHECK_ATTACHMENT -> Known.CHECK_ATTACHMENT
CHECK_VOUCHER_IMAGE -> Known.CHECK_VOUCHER_IMAGE
+ CHECK_SIGNATURE -> Known.CHECK_SIGNATURE
INBOUND_MAIL_ITEM -> Known.INBOUND_MAIL_ITEM
FORM_1099_INT -> Known.FORM_1099_INT
FORM_1099_MISC -> Known.FORM_1099_MISC
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferCreateParamsTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferCreateParamsTest.kt
index 43751b33b..cb6387ffd 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferCreateParamsTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferCreateParamsTest.kt
@@ -54,7 +54,12 @@ internal class CheckTransferCreateParamsTest {
.shippingMethod(
CheckTransferCreateParams.PhysicalCheck.ShippingMethod.USPS_FIRST_CLASS
)
- .signatureText("Ian Crease")
+ .signature(
+ CheckTransferCreateParams.PhysicalCheck.Signature.builder()
+ .imageFileId("image_file_id")
+ .text("Ian Crease")
+ .build()
+ )
.build()
)
.requireApproval(true)
@@ -110,7 +115,12 @@ internal class CheckTransferCreateParamsTest {
.shippingMethod(
CheckTransferCreateParams.PhysicalCheck.ShippingMethod.USPS_FIRST_CLASS
)
- .signatureText("Ian Crease")
+ .signature(
+ CheckTransferCreateParams.PhysicalCheck.Signature.builder()
+ .imageFileId("image_file_id")
+ .text("Ian Crease")
+ .build()
+ )
.build()
)
.requireApproval(true)
@@ -167,7 +177,12 @@ internal class CheckTransferCreateParamsTest {
.shippingMethod(
CheckTransferCreateParams.PhysicalCheck.ShippingMethod.USPS_FIRST_CLASS
)
- .signatureText("Ian Crease")
+ .signature(
+ CheckTransferCreateParams.PhysicalCheck.Signature.builder()
+ .imageFileId("image_file_id")
+ .text("Ian Crease")
+ .build()
+ )
.build()
)
assertThat(body.requireApproval()).contains(true)
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferListPageResponseTest.kt
index 18d73cda8..475e36872 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferListPageResponseTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferListPageResponseTest.kt
@@ -108,7 +108,12 @@ internal class CheckTransferListPageResponseTest {
.build()
)
.shippingMethod(null)
- .signatureText(null)
+ .signature(
+ CheckTransfer.PhysicalCheck.Signature.builder()
+ .imageFileId(null)
+ .text("Ian Crease")
+ .build()
+ )
.addTrackingUpdate(
CheckTransfer.PhysicalCheck.TrackingUpdate.builder()
.category(
@@ -261,7 +266,12 @@ internal class CheckTransferListPageResponseTest {
.build()
)
.shippingMethod(null)
- .signatureText(null)
+ .signature(
+ CheckTransfer.PhysicalCheck.Signature.builder()
+ .imageFileId(null)
+ .text("Ian Crease")
+ .build()
+ )
.addTrackingUpdate(
CheckTransfer.PhysicalCheck.TrackingUpdate.builder()
.category(
@@ -414,7 +424,12 @@ internal class CheckTransferListPageResponseTest {
.build()
)
.shippingMethod(null)
- .signatureText(null)
+ .signature(
+ CheckTransfer.PhysicalCheck.Signature.builder()
+ .imageFileId(null)
+ .text("Ian Crease")
+ .build()
+ )
.addTrackingUpdate(
CheckTransfer.PhysicalCheck.TrackingUpdate.builder()
.category(
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferTest.kt
index 9a7c259f1..6012ec011 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/checktransfers/CheckTransferTest.kt
@@ -102,7 +102,12 @@ internal class CheckTransferTest {
.build()
)
.shippingMethod(null)
- .signatureText(null)
+ .signature(
+ CheckTransfer.PhysicalCheck.Signature.builder()
+ .imageFileId(null)
+ .text("Ian Crease")
+ .build()
+ )
.addTrackingUpdate(
CheckTransfer.PhysicalCheck.TrackingUpdate.builder()
.category(
@@ -245,7 +250,12 @@ internal class CheckTransferTest {
.build()
)
.shippingMethod(null)
- .signatureText(null)
+ .signature(
+ CheckTransfer.PhysicalCheck.Signature.builder()
+ .imageFileId(null)
+ .text("Ian Crease")
+ .build()
+ )
.addTrackingUpdate(
CheckTransfer.PhysicalCheck.TrackingUpdate.builder()
.category(
@@ -387,7 +397,12 @@ internal class CheckTransferTest {
.build()
)
.shippingMethod(null)
- .signatureText(null)
+ .signature(
+ CheckTransfer.PhysicalCheck.Signature.builder()
+ .imageFileId(null)
+ .text("Ian Crease")
+ .build()
+ )
.addTrackingUpdate(
CheckTransfer.PhysicalCheck.TrackingUpdate.builder()
.category(
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CheckTransferServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CheckTransferServiceAsyncTest.kt
index db2d3ec70..2e20f45a6 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/CheckTransferServiceAsyncTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/CheckTransferServiceAsyncTest.kt
@@ -69,7 +69,12 @@ internal class CheckTransferServiceAsyncTest {
CheckTransferCreateParams.PhysicalCheck.ShippingMethod
.USPS_FIRST_CLASS
)
- .signatureText("Ian Crease")
+ .signature(
+ CheckTransferCreateParams.PhysicalCheck.Signature.builder()
+ .imageFileId("image_file_id")
+ .text("Ian Crease")
+ .build()
+ )
.build()
)
.requireApproval(true)
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CheckTransferServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CheckTransferServiceTest.kt
index 68e50c46b..bc38a023d 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CheckTransferServiceTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/CheckTransferServiceTest.kt
@@ -69,7 +69,12 @@ internal class CheckTransferServiceTest {
CheckTransferCreateParams.PhysicalCheck.ShippingMethod
.USPS_FIRST_CLASS
)
- .signatureText("Ian Crease")
+ .signature(
+ CheckTransferCreateParams.PhysicalCheck.Signature.builder()
+ .imageFileId("image_file_id")
+ .text("Ian Crease")
+ .build()
+ )
.build()
)
.requireApproval(true)