Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.355.0"
".": "0.356.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 228
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-029ea9e6c4067d483991aa9c3f62773ffaf56ac0b765749983afc182074e834d.yml
openapi_spec_hash: 4b3f58b1324441e24b4c2b4dfa391d74
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0cbadaf8bea9237be21194a1039047af135bbcec657db6fc9d6b6697a17c2e37.yml
openapi_spec_hash: dbffc2b4874015f957526d1086861435
config_hash: eb2035151c7b49c2f12caf55469b8f9a
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.356.0 (2025-11-07)

Full Changelog: [v0.355.0...v0.356.0](https://github.com/Increase/increase-java/compare/v0.355.0...v0.356.0)

### Features

* **api:** api update ([ede9159](https://github.com/Increase/increase-java/commit/ede9159b3ee898ef71ec407192cdfa9ade3339bb))

## 0.355.0 (2025-11-07)

Full Changelog: [v0.354.0...v0.355.0](https://github.com/Increase/increase-java/compare/v0.354.0...v0.355.0)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<!-- x-release-please-start-version -->

[![Maven Central](https://img.shields.io/maven-central/v/com.increase.api/increase-java)](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.355.0)
[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.355.0/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-java/0.355.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.increase.api/increase-java)](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.356.0)
[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.356.0/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-java/0.356.0)

<!-- x-release-please-end -->

Expand All @@ -13,7 +13,7 @@ The Increase Java SDK is similar to the Increase Kotlin SDK but with minor diffe

<!-- x-release-please-start-version -->

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.355.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.356.0).

<!-- x-release-please-end -->

Expand All @@ -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.355.0")
implementation("com.increase.api:increase-java:0.356.0")
```

### Maven
Expand All @@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.355.0")
<dependency>
<groupId>com.increase.api</groupId>
<artifactId>increase-java</artifactId>
<version>0.355.0</version>
<version>0.356.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {

allprojects {
group = "com.increase.api"
version = "0.355.0" // x-release-please-version
version = "0.356.0" // x-release-please-version
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ private constructor(
private val backFileId: JsonField<String>,
private val checkDepositId: JsonField<String>,
private val frontFileId: JsonField<String>,
private val status: JsonField<Status>,
private val additionalProperties: MutableMap<String, JsonValue>,
) {

Expand All @@ -538,7 +539,8 @@ private constructor(
@JsonProperty("front_file_id")
@ExcludeMissing
frontFileId: JsonField<String> = JsonMissing.of(),
) : this(amount, backFileId, checkDepositId, frontFileId, mutableMapOf())
@JsonProperty("status") @ExcludeMissing status: JsonField<Status> = JsonMissing.of(),
) : this(amount, backFileId, checkDepositId, frontFileId, status, mutableMapOf())

/**
* The amount of the check.
Expand Down Expand Up @@ -572,6 +574,14 @@ private constructor(
*/
fun frontFileId(): Optional<String> = frontFileId.getOptional("front_file_id")

/**
* The status of the Inbound Mail Item Check.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
*/
fun status(): Optional<Status> = status.getOptional("status")

/**
* Returns the raw JSON value of [amount].
*
Expand Down Expand Up @@ -607,6 +617,13 @@ private constructor(
@ExcludeMissing
fun _frontFileId(): JsonField<String> = frontFileId

/**
* Returns the raw JSON value of [status].
*
* Unlike [status], this method doesn't throw if the JSON field has an unexpected type.
*/
@JsonProperty("status") @ExcludeMissing fun _status(): JsonField<Status> = status

@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
Expand All @@ -630,6 +647,7 @@ private constructor(
* .backFileId()
* .checkDepositId()
* .frontFileId()
* .status()
* ```
*/
@JvmStatic fun builder() = Builder()
Expand All @@ -642,6 +660,7 @@ private constructor(
private var backFileId: JsonField<String>? = null
private var checkDepositId: JsonField<String>? = null
private var frontFileId: JsonField<String>? = null
private var status: JsonField<Status>? = null
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()

@JvmSynthetic
Expand All @@ -650,6 +669,7 @@ private constructor(
backFileId = check.backFileId
checkDepositId = check.checkDepositId
frontFileId = check.frontFileId
status = check.status
additionalProperties = check.additionalProperties.toMutableMap()
}

Expand Down Expand Up @@ -716,6 +736,21 @@ private constructor(
this.frontFileId = frontFileId
}

/** The status of the Inbound Mail Item Check. */
fun status(status: Status?) = status(JsonField.ofNullable(status))

/** Alias for calling [Builder.status] with `status.orElse(null)`. */
fun status(status: Optional<Status>) = status(status.getOrNull())

/**
* 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<Status>) = apply { this.status = status }

fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
Expand Down Expand Up @@ -746,6 +781,7 @@ private constructor(
* .backFileId()
* .checkDepositId()
* .frontFileId()
* .status()
* ```
*
* @throws IllegalStateException if any required field is unset.
Expand All @@ -756,6 +792,7 @@ private constructor(
checkRequired("backFileId", backFileId),
checkRequired("checkDepositId", checkDepositId),
checkRequired("frontFileId", frontFileId),
checkRequired("status", status),
additionalProperties.toMutableMap(),
)
}
Expand All @@ -771,6 +808,7 @@ private constructor(
backFileId()
checkDepositId()
frontFileId()
status().ifPresent { it.validate() }
validated = true
}

Expand All @@ -793,7 +831,153 @@ private constructor(
(if (amount.asKnown().isPresent) 1 else 0) +
(if (backFileId.asKnown().isPresent) 1 else 0) +
(if (checkDepositId.asKnown().isPresent) 1 else 0) +
(if (frontFileId.asKnown().isPresent) 1 else 0)
(if (frontFileId.asKnown().isPresent) 1 else 0) +
(status.asKnown().getOrNull()?.validity() ?: 0)

/** The status of the Inbound Mail Item Check. */
class Status @JsonCreator private constructor(private val value: JsonField<String>) : Enum {

/**
* Returns this class instance's raw value.
*
* This is usually only useful if this instance was deserialized from data that doesn't
* match any known member, and you want to know that value. 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.
*/
@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value

companion object {

/** The check is pending processing. */
@JvmField val PENDING = of("pending")

/** The check has been deposited. */
@JvmField val DEPOSITED = of("deposited")

/** The check has been ignored. */
@JvmField val IGNORED = of("ignored")

@JvmStatic fun of(value: String) = Status(JsonField.of(value))
}

/** An enum containing [Status]'s known values. */
enum class Known {
/** The check is pending processing. */
PENDING,
/** The check has been deposited. */
DEPOSITED,
/** The check has been ignored. */
IGNORED,
}

/**
* An enum containing [Status]'s known values, as well as an [_UNKNOWN] member.
*
* 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 {
/** The check is pending processing. */
PENDING,
/** The check has been deposited. */
DEPOSITED,
/** The check has been ignored. */
IGNORED,
/**
* An enum member indicating that [Status] was instantiated with an unknown value.
*/
_UNKNOWN,
}

/**
* Returns an enum member corresponding to this class instance's value, or
* [Value._UNKNOWN] if the class was instantiated with an unknown value.
*
* Use the [known] method instead if you're certain the value is always known or if you
* want to throw for the unknown case.
*/
fun value(): Value =
when (this) {
PENDING -> Value.PENDING
DEPOSITED -> Value.DEPOSITED
IGNORED -> Value.IGNORED
else -> Value._UNKNOWN
}

/**
* Returns an enum member corresponding to this class instance's value.
*
* Use the [value] method instead if you're uncertain the value is always known and
* don't want to throw for the unknown case.
*
* @throws IncreaseInvalidDataException if this class instance's value is a not a known
* member.
*/
fun known(): Known =
when (this) {
PENDING -> Known.PENDING
DEPOSITED -> Known.DEPOSITED
IGNORED -> Known.IGNORED
else -> throw IncreaseInvalidDataException("Unknown Status: $value")
}

/**
* Returns this class instance's primitive wire representation.
*
* This differs from the [toString] method because that method is primarily for
* debugging and generally doesn't throw.
*
* @throws IncreaseInvalidDataException if this class instance's value does not have the
* expected primitive type.
*/
fun asString(): String =
_value().asString().orElseThrow {
IncreaseInvalidDataException("Value is not a String")
}

private var validated: Boolean = false

fun validate(): Status = apply {
if (validated) {
return@apply
}

known()
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 (value() == Value._UNKNOWN) 0 else 1

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return other is Status && value == other.value
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()
}

override fun equals(other: Any?): Boolean {
if (this === other) {
Expand All @@ -805,17 +989,25 @@ private constructor(
backFileId == other.backFileId &&
checkDepositId == other.checkDepositId &&
frontFileId == other.frontFileId &&
status == other.status &&
additionalProperties == other.additionalProperties
}

private val hashCode: Int by lazy {
Objects.hash(amount, backFileId, checkDepositId, frontFileId, additionalProperties)
Objects.hash(
amount,
backFileId,
checkDepositId,
frontFileId,
status,
additionalProperties,
)
}

override fun hashCode(): Int = hashCode

override fun toString() =
"Check{amount=$amount, backFileId=$backFileId, checkDepositId=$checkDepositId, frontFileId=$frontFileId, additionalProperties=$additionalProperties}"
"Check{amount=$amount, backFileId=$backFileId, checkDepositId=$checkDepositId, frontFileId=$frontFileId, status=$status, additionalProperties=$additionalProperties}"
}

/** If the mail item has been rejected, why it was rejected. */
Expand Down
Loading
Loading