diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 9bd53bbf4..f1401f154 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.289.1"
+ ".": "0.290.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 0b576c5e5..be347cd13 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 215
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-289025fcb79a47841395734231b11fd75ad3d80dec533e0eb4533e6afaf82cdf.yml
-openapi_spec_hash: 511ad2e7d8c798641f073775ccdab523
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ce8ac7ef645ad6089e9730ae2b44492a6a958a2abcc8bb50130c5ebd7ba1a390.yml
+openapi_spec_hash: 90a27266ac1eeab3464f6825d8fd8650
config_hash: 0b0a2503208283b283fc5bc6df6a07a5
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4858ae4ea..26df191a4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
# Changelog
+## 0.290.0 (2025-08-20)
+
+Full Changelog: [v0.289.1...v0.290.0](https://github.com/Increase/increase-java/compare/v0.289.1...v0.290.0)
+
+### Features
+
+* **api:** api update ([ff83c2c](https://github.com/Increase/increase-java/commit/ff83c2c62538dc51e0a3146baf8f0ec7c2a4ae85))
+* **api:** api update ([af3edfe](https://github.com/Increase/increase-java/commit/af3edfe48c5025350f70e05d9cabe6f0531a19cc))
+
## 0.289.1 (2025-08-20)
Full Changelog: [v0.289.0...v0.289.1](https://github.com/Increase/increase-java/compare/v0.289.0...v0.289.1)
diff --git a/README.md b/README.md
index 51cddacbb..da74a8c91 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.289.1)
-[](https://javadoc.io/doc/com.increase.api/increase-java/0.289.1)
+[](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.290.0)
+[](https://javadoc.io/doc/com.increase.api/increase-java/0.290.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.289.1).
+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.290.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.289.1")
+implementation("com.increase.api:increase-java:0.290.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.289.1")
com.increase.api
increase-java
- 0.289.1
+ 0.290.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 4aa9210c4..a68533e5e 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.increase.api"
- version = "0.289.1" // x-release-please-version
+ version = "0.290.0" // x-release-please-version
}
subprojects {
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotification.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotification.kt
index 71773e6c1..986f54596 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotification.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotification.kt
@@ -28,6 +28,7 @@ import kotlin.jvm.optionals.getOrNull
class AchPrenotification
private constructor(
private val id: JsonField,
+ private val accountId: JsonField,
private val accountNumber: JsonField,
private val addendum: JsonField,
private val companyDescriptiveDate: JsonField,
@@ -38,9 +39,12 @@ private constructor(
private val creditDebitIndicator: JsonField,
private val effectiveDate: JsonField,
private val idempotencyKey: JsonField,
+ private val individualId: JsonField,
+ private val individualName: JsonField,
private val notificationsOfChange: JsonField>,
private val prenotificationReturn: JsonField,
private val routingNumber: JsonField,
+ private val standardEntryClassCode: JsonField,
private val status: JsonField,
private val type: JsonField,
private val additionalProperties: MutableMap,
@@ -49,6 +53,7 @@ private constructor(
@JsonCreator
private constructor(
@JsonProperty("id") @ExcludeMissing id: JsonField = JsonMissing.of(),
+ @JsonProperty("account_id") @ExcludeMissing accountId: JsonField = JsonMissing.of(),
@JsonProperty("account_number")
@ExcludeMissing
accountNumber: JsonField = JsonMissing.of(),
@@ -77,6 +82,12 @@ private constructor(
@JsonProperty("idempotency_key")
@ExcludeMissing
idempotencyKey: JsonField = JsonMissing.of(),
+ @JsonProperty("individual_id")
+ @ExcludeMissing
+ individualId: JsonField = JsonMissing.of(),
+ @JsonProperty("individual_name")
+ @ExcludeMissing
+ individualName: JsonField = JsonMissing.of(),
@JsonProperty("notifications_of_change")
@ExcludeMissing
notificationsOfChange: JsonField> = JsonMissing.of(),
@@ -86,10 +97,14 @@ private constructor(
@JsonProperty("routing_number")
@ExcludeMissing
routingNumber: JsonField = JsonMissing.of(),
+ @JsonProperty("standard_entry_class_code")
+ @ExcludeMissing
+ standardEntryClassCode: JsonField = JsonMissing.of(),
@JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(),
@JsonProperty("type") @ExcludeMissing type: JsonField = JsonMissing.of(),
) : this(
id,
+ accountId,
accountNumber,
addendum,
companyDescriptiveDate,
@@ -100,9 +115,12 @@ private constructor(
creditDebitIndicator,
effectiveDate,
idempotencyKey,
+ individualId,
+ individualName,
notificationsOfChange,
prenotificationReturn,
routingNumber,
+ standardEntryClassCode,
status,
type,
mutableMapOf(),
@@ -116,6 +134,14 @@ private constructor(
*/
fun id(): String = id.getRequired("id")
+ /**
+ * The account that sent the ACH Prenotification.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun accountId(): Optional = accountId.getOptional("account_id")
+
/**
* The destination account number.
*
@@ -203,6 +229,23 @@ private constructor(
*/
fun idempotencyKey(): Optional = idempotencyKey.getOptional("idempotency_key")
+ /**
+ * Your identifier for the recipient.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun individualId(): Optional = individualId.getOptional("individual_id")
+
+ /**
+ * The name of the recipient. This value is informational and not verified by the recipient's
+ * bank.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun individualName(): Optional = individualName.getOptional("individual_name")
+
/**
* If the receiving bank notifies that future transfers should use different details, this will
* contain those details.
@@ -230,6 +273,15 @@ private constructor(
*/
fun routingNumber(): String = routingNumber.getRequired("routing_number")
+ /**
+ * The Standard Entry Class (SEC) code to use for the ACH Prenotification.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun standardEntryClassCode(): Optional =
+ standardEntryClassCode.getOptional("standard_entry_class_code")
+
/**
* The lifecycle status of the ACH Prenotification.
*
@@ -254,6 +306,13 @@ 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 [accountNumber].
*
@@ -346,6 +405,24 @@ private constructor(
@ExcludeMissing
fun _idempotencyKey(): JsonField = idempotencyKey
+ /**
+ * Returns the raw JSON value of [individualId].
+ *
+ * Unlike [individualId], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("individual_id")
+ @ExcludeMissing
+ fun _individualId(): JsonField = individualId
+
+ /**
+ * Returns the raw JSON value of [individualName].
+ *
+ * Unlike [individualName], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("individual_name")
+ @ExcludeMissing
+ fun _individualName(): JsonField = individualName
+
/**
* Returns the raw JSON value of [notificationsOfChange].
*
@@ -375,6 +452,16 @@ private constructor(
@ExcludeMissing
fun _routingNumber(): JsonField = routingNumber
+ /**
+ * Returns the raw JSON value of [standardEntryClassCode].
+ *
+ * Unlike [standardEntryClassCode], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("standard_entry_class_code")
+ @ExcludeMissing
+ fun _standardEntryClassCode(): JsonField = standardEntryClassCode
+
/**
* Returns the raw JSON value of [status].
*
@@ -409,6 +496,7 @@ private constructor(
* The following fields are required:
* ```java
* .id()
+ * .accountId()
* .accountNumber()
* .addendum()
* .companyDescriptiveDate()
@@ -419,9 +507,12 @@ private constructor(
* .creditDebitIndicator()
* .effectiveDate()
* .idempotencyKey()
+ * .individualId()
+ * .individualName()
* .notificationsOfChange()
* .prenotificationReturn()
* .routingNumber()
+ * .standardEntryClassCode()
* .status()
* .type()
* ```
@@ -433,6 +524,7 @@ private constructor(
class Builder internal constructor() {
private var id: JsonField? = null
+ private var accountId: JsonField? = null
private var accountNumber: JsonField? = null
private var addendum: JsonField? = null
private var companyDescriptiveDate: JsonField? = null
@@ -443,9 +535,12 @@ private constructor(
private var creditDebitIndicator: JsonField? = null
private var effectiveDate: JsonField? = null
private var idempotencyKey: JsonField? = null
+ private var individualId: JsonField? = null
+ private var individualName: JsonField? = null
private var notificationsOfChange: JsonField>? = null
private var prenotificationReturn: JsonField? = null
private var routingNumber: JsonField? = null
+ private var standardEntryClassCode: JsonField? = null
private var status: JsonField? = null
private var type: JsonField? = null
private var additionalProperties: MutableMap = mutableMapOf()
@@ -453,6 +548,7 @@ private constructor(
@JvmSynthetic
internal fun from(achPrenotification: AchPrenotification) = apply {
id = achPrenotification.id
+ accountId = achPrenotification.accountId
accountNumber = achPrenotification.accountNumber
addendum = achPrenotification.addendum
companyDescriptiveDate = achPrenotification.companyDescriptiveDate
@@ -463,10 +559,13 @@ private constructor(
creditDebitIndicator = achPrenotification.creditDebitIndicator
effectiveDate = achPrenotification.effectiveDate
idempotencyKey = achPrenotification.idempotencyKey
+ individualId = achPrenotification.individualId
+ individualName = achPrenotification.individualName
notificationsOfChange =
achPrenotification.notificationsOfChange.map { it.toMutableList() }
prenotificationReturn = achPrenotification.prenotificationReturn
routingNumber = achPrenotification.routingNumber
+ standardEntryClassCode = achPrenotification.standardEntryClassCode
status = achPrenotification.status
type = achPrenotification.type
additionalProperties = achPrenotification.additionalProperties.toMutableMap()
@@ -483,6 +582,21 @@ private constructor(
*/
fun id(id: JsonField) = apply { this.id = id }
+ /** The account that sent the ACH Prenotification. */
+ fun accountId(accountId: String?) = accountId(JsonField.ofNullable(accountId))
+
+ /** Alias for calling [Builder.accountId] with `accountId.orElse(null)`. */
+ fun accountId(accountId: Optional) = accountId(accountId.getOrNull())
+
+ /**
+ * 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.
+ */
+ fun accountId(accountId: JsonField) = apply { this.accountId = accountId }
+
/** The destination account number. */
fun accountNumber(accountNumber: String) = accountNumber(JsonField.of(accountNumber))
@@ -671,6 +785,45 @@ private constructor(
this.idempotencyKey = idempotencyKey
}
+ /** Your identifier for the recipient. */
+ fun individualId(individualId: String?) = individualId(JsonField.ofNullable(individualId))
+
+ /** Alias for calling [Builder.individualId] with `individualId.orElse(null)`. */
+ fun individualId(individualId: Optional) = individualId(individualId.getOrNull())
+
+ /**
+ * Sets [Builder.individualId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.individualId] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun individualId(individualId: JsonField) = apply {
+ this.individualId = individualId
+ }
+
+ /**
+ * The name of the recipient. This value is informational and not verified by the
+ * recipient's bank.
+ */
+ fun individualName(individualName: String?) =
+ individualName(JsonField.ofNullable(individualName))
+
+ /** Alias for calling [Builder.individualName] with `individualName.orElse(null)`. */
+ fun individualName(individualName: Optional) =
+ individualName(individualName.getOrNull())
+
+ /**
+ * Sets [Builder.individualName] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.individualName] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun individualName(individualName: JsonField) = apply {
+ this.individualName = individualName
+ }
+
/**
* If the receiving bank notifies that future transfers should use different details, this
* will contain those details.
@@ -738,6 +891,29 @@ private constructor(
this.routingNumber = routingNumber
}
+ /** The Standard Entry Class (SEC) code to use for the ACH Prenotification. */
+ fun standardEntryClassCode(standardEntryClassCode: StandardEntryClassCode?) =
+ standardEntryClassCode(JsonField.ofNullable(standardEntryClassCode))
+
+ /**
+ * Alias for calling [Builder.standardEntryClassCode] with
+ * `standardEntryClassCode.orElse(null)`.
+ */
+ fun standardEntryClassCode(standardEntryClassCode: Optional) =
+ standardEntryClassCode(standardEntryClassCode.getOrNull())
+
+ /**
+ * Sets [Builder.standardEntryClassCode] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.standardEntryClassCode] with a well-typed
+ * [StandardEntryClassCode] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun standardEntryClassCode(standardEntryClassCode: JsonField) =
+ apply {
+ this.standardEntryClassCode = standardEntryClassCode
+ }
+
/** The lifecycle status of the ACH Prenotification. */
fun status(status: Status) = status(JsonField.of(status))
@@ -790,6 +966,7 @@ private constructor(
* The following fields are required:
* ```java
* .id()
+ * .accountId()
* .accountNumber()
* .addendum()
* .companyDescriptiveDate()
@@ -800,9 +977,12 @@ private constructor(
* .creditDebitIndicator()
* .effectiveDate()
* .idempotencyKey()
+ * .individualId()
+ * .individualName()
* .notificationsOfChange()
* .prenotificationReturn()
* .routingNumber()
+ * .standardEntryClassCode()
* .status()
* .type()
* ```
@@ -812,6 +992,7 @@ private constructor(
fun build(): AchPrenotification =
AchPrenotification(
checkRequired("id", id),
+ checkRequired("accountId", accountId),
checkRequired("accountNumber", accountNumber),
checkRequired("addendum", addendum),
checkRequired("companyDescriptiveDate", companyDescriptiveDate),
@@ -822,11 +1003,14 @@ private constructor(
checkRequired("creditDebitIndicator", creditDebitIndicator),
checkRequired("effectiveDate", effectiveDate),
checkRequired("idempotencyKey", idempotencyKey),
+ checkRequired("individualId", individualId),
+ checkRequired("individualName", individualName),
checkRequired("notificationsOfChange", notificationsOfChange).map {
it.toImmutable()
},
checkRequired("prenotificationReturn", prenotificationReturn),
checkRequired("routingNumber", routingNumber),
+ checkRequired("standardEntryClassCode", standardEntryClassCode),
checkRequired("status", status),
checkRequired("type", type),
additionalProperties.toMutableMap(),
@@ -841,6 +1025,7 @@ private constructor(
}
id()
+ accountId()
accountNumber()
addendum()
companyDescriptiveDate()
@@ -851,9 +1036,12 @@ private constructor(
creditDebitIndicator().ifPresent { it.validate() }
effectiveDate()
idempotencyKey()
+ individualId()
+ individualName()
notificationsOfChange().forEach { it.validate() }
prenotificationReturn().ifPresent { it.validate() }
routingNumber()
+ standardEntryClassCode().ifPresent { it.validate() }
status().validate()
type().validate()
validated = true
@@ -875,6 +1063,7 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(if (id.asKnown().isPresent) 1 else 0) +
+ (if (accountId.asKnown().isPresent) 1 else 0) +
(if (accountNumber.asKnown().isPresent) 1 else 0) +
(if (addendum.asKnown().isPresent) 1 else 0) +
(if (companyDescriptiveDate.asKnown().isPresent) 1 else 0) +
@@ -885,9 +1074,12 @@ private constructor(
(creditDebitIndicator.asKnown().getOrNull()?.validity() ?: 0) +
(if (effectiveDate.asKnown().isPresent) 1 else 0) +
(if (idempotencyKey.asKnown().isPresent) 1 else 0) +
+ (if (individualId.asKnown().isPresent) 1 else 0) +
+ (if (individualName.asKnown().isPresent) 1 else 0) +
(notificationsOfChange.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
(prenotificationReturn.asKnown().getOrNull()?.validity() ?: 0) +
(if (routingNumber.asKnown().isPresent) 1 else 0) +
+ (standardEntryClassCode.asKnown().getOrNull()?.validity() ?: 0) +
(status.asKnown().getOrNull()?.validity() ?: 0) +
(type.asKnown().getOrNull()?.validity() ?: 0)
@@ -3151,6 +3343,165 @@ private constructor(
"PrenotificationReturn{createdAt=$createdAt, returnReasonCode=$returnReasonCode, additionalProperties=$additionalProperties}"
}
+ /** The Standard Entry Class (SEC) code to use for the ACH Prenotification. */
+ class StandardEntryClassCode
+ @JsonCreator
+ private constructor(private val value: JsonField) : 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 = value
+
+ companion object {
+
+ /** Corporate Credit and Debit (CCD). */
+ @JvmField val CORPORATE_CREDIT_OR_DEBIT = of("corporate_credit_or_debit")
+
+ /** Corporate Trade Exchange (CTX). */
+ @JvmField val CORPORATE_TRADE_EXCHANGE = of("corporate_trade_exchange")
+
+ /** Prearranged Payments and Deposits (PPD). */
+ @JvmField val PREARRANGED_PAYMENTS_AND_DEPOSIT = of("prearranged_payments_and_deposit")
+
+ /** Internet Initiated (WEB). */
+ @JvmField val INTERNET_INITIATED = of("internet_initiated")
+
+ @JvmStatic fun of(value: String) = StandardEntryClassCode(JsonField.of(value))
+ }
+
+ /** An enum containing [StandardEntryClassCode]'s known values. */
+ enum class Known {
+ /** Corporate Credit and Debit (CCD). */
+ CORPORATE_CREDIT_OR_DEBIT,
+ /** Corporate Trade Exchange (CTX). */
+ CORPORATE_TRADE_EXCHANGE,
+ /** Prearranged Payments and Deposits (PPD). */
+ PREARRANGED_PAYMENTS_AND_DEPOSIT,
+ /** Internet Initiated (WEB). */
+ INTERNET_INITIATED,
+ }
+
+ /**
+ * An enum containing [StandardEntryClassCode]'s known values, as well as an [_UNKNOWN]
+ * member.
+ *
+ * An instance of [StandardEntryClassCode] 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 {
+ /** Corporate Credit and Debit (CCD). */
+ CORPORATE_CREDIT_OR_DEBIT,
+ /** Corporate Trade Exchange (CTX). */
+ CORPORATE_TRADE_EXCHANGE,
+ /** Prearranged Payments and Deposits (PPD). */
+ PREARRANGED_PAYMENTS_AND_DEPOSIT,
+ /** Internet Initiated (WEB). */
+ INTERNET_INITIATED,
+ /**
+ * An enum member indicating that [StandardEntryClassCode] 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) {
+ CORPORATE_CREDIT_OR_DEBIT -> Value.CORPORATE_CREDIT_OR_DEBIT
+ CORPORATE_TRADE_EXCHANGE -> Value.CORPORATE_TRADE_EXCHANGE
+ PREARRANGED_PAYMENTS_AND_DEPOSIT -> Value.PREARRANGED_PAYMENTS_AND_DEPOSIT
+ INTERNET_INITIATED -> Value.INTERNET_INITIATED
+ 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) {
+ CORPORATE_CREDIT_OR_DEBIT -> Known.CORPORATE_CREDIT_OR_DEBIT
+ CORPORATE_TRADE_EXCHANGE -> Known.CORPORATE_TRADE_EXCHANGE
+ PREARRANGED_PAYMENTS_AND_DEPOSIT -> Known.PREARRANGED_PAYMENTS_AND_DEPOSIT
+ INTERNET_INITIATED -> Known.INTERNET_INITIATED
+ else -> throw IncreaseInvalidDataException("Unknown StandardEntryClassCode: $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(): StandardEntryClassCode = 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 StandardEntryClassCode && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
/** The lifecycle status of the ACH Prenotification. */
class Status @JsonCreator private constructor(private val value: JsonField) : Enum {
@@ -3435,6 +3786,7 @@ private constructor(
return other is AchPrenotification &&
id == other.id &&
+ accountId == other.accountId &&
accountNumber == other.accountNumber &&
addendum == other.addendum &&
companyDescriptiveDate == other.companyDescriptiveDate &&
@@ -3445,9 +3797,12 @@ private constructor(
creditDebitIndicator == other.creditDebitIndicator &&
effectiveDate == other.effectiveDate &&
idempotencyKey == other.idempotencyKey &&
+ individualId == other.individualId &&
+ individualName == other.individualName &&
notificationsOfChange == other.notificationsOfChange &&
prenotificationReturn == other.prenotificationReturn &&
routingNumber == other.routingNumber &&
+ standardEntryClassCode == other.standardEntryClassCode &&
status == other.status &&
type == other.type &&
additionalProperties == other.additionalProperties
@@ -3456,6 +3811,7 @@ private constructor(
private val hashCode: Int by lazy {
Objects.hash(
id,
+ accountId,
accountNumber,
addendum,
companyDescriptiveDate,
@@ -3466,9 +3822,12 @@ private constructor(
creditDebitIndicator,
effectiveDate,
idempotencyKey,
+ individualId,
+ individualName,
notificationsOfChange,
prenotificationReturn,
routingNumber,
+ standardEntryClassCode,
status,
type,
additionalProperties,
@@ -3478,5 +3837,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "AchPrenotification{id=$id, accountNumber=$accountNumber, addendum=$addendum, companyDescriptiveDate=$companyDescriptiveDate, companyDiscretionaryData=$companyDiscretionaryData, companyEntryDescription=$companyEntryDescription, companyName=$companyName, createdAt=$createdAt, creditDebitIndicator=$creditDebitIndicator, effectiveDate=$effectiveDate, idempotencyKey=$idempotencyKey, notificationsOfChange=$notificationsOfChange, prenotificationReturn=$prenotificationReturn, routingNumber=$routingNumber, status=$status, type=$type, additionalProperties=$additionalProperties}"
+ "AchPrenotification{id=$id, accountId=$accountId, accountNumber=$accountNumber, addendum=$addendum, companyDescriptiveDate=$companyDescriptiveDate, companyDiscretionaryData=$companyDiscretionaryData, companyEntryDescription=$companyEntryDescription, companyName=$companyName, createdAt=$createdAt, creditDebitIndicator=$creditDebitIndicator, effectiveDate=$effectiveDate, idempotencyKey=$idempotencyKey, individualId=$individualId, individualName=$individualName, notificationsOfChange=$notificationsOfChange, prenotificationReturn=$prenotificationReturn, routingNumber=$routingNumber, standardEntryClassCode=$standardEntryClassCode, status=$status, type=$type, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationCreateParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationCreateParams.kt
index a97cd4249..eaef7f743 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationCreateParams.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationCreateParams.kt
@@ -31,7 +31,7 @@ private constructor(
) : Params {
/**
- * The Increase identifier for the account that will send the transfer.
+ * The Increase identifier for the account that will send the ACH Prenotification.
*
* @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).
@@ -64,7 +64,7 @@ private constructor(
fun addendum(): Optional = body.addendum()
/**
- * The description of the date of the transfer.
+ * The description of the date of the ACH Prenotification.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -72,7 +72,7 @@ private constructor(
fun companyDescriptiveDate(): Optional = body.companyDescriptiveDate()
/**
- * The data you choose to associate with the transfer.
+ * The data you choose to associate with the ACH Prenotification.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -80,7 +80,7 @@ private constructor(
fun companyDiscretionaryData(): Optional = body.companyDiscretionaryData()
/**
- * The description of the transfer you wish to be shown to the recipient.
+ * The description you wish to be shown to the recipient.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -104,7 +104,8 @@ private constructor(
fun creditDebitIndicator(): Optional = body.creditDebitIndicator()
/**
- * The transfer effective date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
+ * The ACH Prenotification effective date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
+ * format.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -112,7 +113,7 @@ private constructor(
fun effectiveDate(): Optional = body.effectiveDate()
/**
- * Your identifier for the transfer recipient.
+ * Your identifier for the recipient.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -120,8 +121,8 @@ private constructor(
fun individualId(): Optional = body.individualId()
/**
- * The name of the transfer recipient. This value is information and not verified by the
- * recipient's bank.
+ * The name of therecipient. This value is informational and not verified by the recipient's
+ * bank.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -287,7 +288,7 @@ private constructor(
*/
fun body(body: Body) = apply { this.body = body.toBuilder() }
- /** The Increase identifier for the account that will send the transfer. */
+ /** The Increase identifier for the account that will send the ACH Prenotification. */
fun accountId(accountId: String) = apply { body.accountId(accountId) }
/**
@@ -341,7 +342,7 @@ private constructor(
*/
fun addendum(addendum: JsonField) = apply { body.addendum(addendum) }
- /** The description of the date of the transfer. */
+ /** The description of the date of the ACH Prenotification. */
fun companyDescriptiveDate(companyDescriptiveDate: String) = apply {
body.companyDescriptiveDate(companyDescriptiveDate)
}
@@ -357,7 +358,7 @@ private constructor(
body.companyDescriptiveDate(companyDescriptiveDate)
}
- /** The data you choose to associate with the transfer. */
+ /** The data you choose to associate with the ACH Prenotification. */
fun companyDiscretionaryData(companyDiscretionaryData: String) = apply {
body.companyDiscretionaryData(companyDiscretionaryData)
}
@@ -373,7 +374,7 @@ private constructor(
body.companyDiscretionaryData(companyDiscretionaryData)
}
- /** The description of the transfer you wish to be shown to the recipient. */
+ /** The description you wish to be shown to the recipient. */
fun companyEntryDescription(companyEntryDescription: String) = apply {
body.companyEntryDescription(companyEntryDescription)
}
@@ -418,7 +419,8 @@ private constructor(
}
/**
- * The transfer effective date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
+ * The ACH Prenotification effective date in
+ * [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
*/
fun effectiveDate(effectiveDate: LocalDate) = apply { body.effectiveDate(effectiveDate) }
@@ -433,7 +435,7 @@ private constructor(
body.effectiveDate(effectiveDate)
}
- /** Your identifier for the transfer recipient. */
+ /** Your identifier for the recipient. */
fun individualId(individualId: String) = apply { body.individualId(individualId) }
/**
@@ -448,8 +450,8 @@ private constructor(
}
/**
- * The name of the transfer recipient. This value is information and not verified by the
- * recipient's bank.
+ * The name of therecipient. This value is informational and not verified by the recipient's
+ * bank.
*/
fun individualName(individualName: String) = apply { body.individualName(individualName) }
@@ -703,7 +705,7 @@ private constructor(
)
/**
- * The Increase identifier for the account that will send the transfer.
+ * The Increase identifier for the account that will send the ACH Prenotification.
*
* @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).
@@ -736,7 +738,7 @@ private constructor(
fun addendum(): Optional = addendum.getOptional("addendum")
/**
- * The description of the date of the transfer.
+ * The description of the date of the ACH Prenotification.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
@@ -745,7 +747,7 @@ private constructor(
companyDescriptiveDate.getOptional("company_descriptive_date")
/**
- * The data you choose to associate with the transfer.
+ * The data you choose to associate with the ACH Prenotification.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
@@ -754,7 +756,7 @@ private constructor(
companyDiscretionaryData.getOptional("company_discretionary_data")
/**
- * The description of the transfer you wish to be shown to the recipient.
+ * The description you wish to be shown to the recipient.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
@@ -780,7 +782,8 @@ private constructor(
creditDebitIndicator.getOptional("credit_debit_indicator")
/**
- * The transfer effective date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
+ * The ACH Prenotification effective date in
+ * [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
@@ -788,7 +791,7 @@ private constructor(
fun effectiveDate(): Optional = effectiveDate.getOptional("effective_date")
/**
- * Your identifier for the transfer recipient.
+ * Your identifier for the recipient.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
@@ -796,8 +799,8 @@ private constructor(
fun individualId(): Optional = individualId.getOptional("individual_id")
/**
- * The name of the transfer recipient. This value is information and not verified by the
- * recipient's bank.
+ * The name of therecipient. This value is informational and not verified by the recipient's
+ * bank.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
* the server responded with an unexpected value).
@@ -999,7 +1002,7 @@ private constructor(
additionalProperties = body.additionalProperties.toMutableMap()
}
- /** The Increase identifier for the account that will send the transfer. */
+ /** The Increase identifier for the account that will send the ACH Prenotification. */
fun accountId(accountId: String) = accountId(JsonField.of(accountId))
/**
@@ -1054,7 +1057,7 @@ private constructor(
*/
fun addendum(addendum: JsonField) = apply { this.addendum = addendum }
- /** The description of the date of the transfer. */
+ /** The description of the date of the ACH Prenotification. */
fun companyDescriptiveDate(companyDescriptiveDate: String) =
companyDescriptiveDate(JsonField.of(companyDescriptiveDate))
@@ -1069,7 +1072,7 @@ private constructor(
this.companyDescriptiveDate = companyDescriptiveDate
}
- /** The data you choose to associate with the transfer. */
+ /** The data you choose to associate with the ACH Prenotification. */
fun companyDiscretionaryData(companyDiscretionaryData: String) =
companyDiscretionaryData(JsonField.of(companyDiscretionaryData))
@@ -1084,7 +1087,7 @@ private constructor(
this.companyDiscretionaryData = companyDiscretionaryData
}
- /** The description of the transfer you wish to be shown to the recipient. */
+ /** The description you wish to be shown to the recipient. */
fun companyEntryDescription(companyEntryDescription: String) =
companyEntryDescription(JsonField.of(companyEntryDescription))
@@ -1130,8 +1133,8 @@ private constructor(
}
/**
- * The transfer effective date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
- * format.
+ * The ACH Prenotification effective date in
+ * [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
*/
fun effectiveDate(effectiveDate: LocalDate) = effectiveDate(JsonField.of(effectiveDate))
@@ -1146,7 +1149,7 @@ private constructor(
this.effectiveDate = effectiveDate
}
- /** Your identifier for the transfer recipient. */
+ /** Your identifier for the recipient. */
fun individualId(individualId: String) = individualId(JsonField.of(individualId))
/**
@@ -1161,7 +1164,7 @@ private constructor(
}
/**
- * The name of the transfer recipient. This value is information and not verified by the
+ * The name of therecipient. This value is informational and not verified by the
* recipient's bank.
*/
fun individualName(individualName: String) =
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 d1ae169b3..70f9850d0 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
@@ -28,6 +28,7 @@ private constructor(
private val id: JsonField,
private val acceptance: JsonField,
private val accountId: JsonField,
+ private val cardTokenId: JsonField,
private val cardholderFirstName: JsonField,
private val cardholderLastName: JsonField,
private val cardholderMiddleName: JsonField,
@@ -55,6 +56,9 @@ private constructor(
@ExcludeMissing
acceptance: JsonField = JsonMissing.of(),
@JsonProperty("account_id") @ExcludeMissing accountId: JsonField = JsonMissing.of(),
+ @JsonProperty("card_token_id")
+ @ExcludeMissing
+ cardTokenId: JsonField = JsonMissing.of(),
@JsonProperty("cardholder_first_name")
@ExcludeMissing
cardholderFirstName: JsonField = JsonMissing.of(),
@@ -104,6 +108,7 @@ private constructor(
id,
acceptance,
accountId,
+ cardTokenId,
cardholderFirstName,
cardholderLastName,
cardholderMiddleName,
@@ -148,6 +153,14 @@ private constructor(
*/
fun accountId(): String = accountId.getRequired("account_id")
+ /**
+ * The ID of the Card Token that was used to validate the card.
+ *
+ * @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 cardTokenId(): String = cardTokenId.getRequired("card_token_id")
+
/**
* The cardholder's first name.
*
@@ -319,6 +332,15 @@ private constructor(
*/
@JsonProperty("account_id") @ExcludeMissing fun _accountId(): JsonField = accountId
+ /**
+ * Returns the raw JSON value of [cardTokenId].
+ *
+ * Unlike [cardTokenId], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("card_token_id")
+ @ExcludeMissing
+ fun _cardTokenId(): JsonField = cardTokenId
+
/**
* Returns the raw JSON value of [cardholderFirstName].
*
@@ -494,6 +516,7 @@ private constructor(
* .id()
* .acceptance()
* .accountId()
+ * .cardTokenId()
* .cardholderFirstName()
* .cardholderLastName()
* .cardholderMiddleName()
@@ -522,6 +545,7 @@ private constructor(
private var id: JsonField? = null
private var acceptance: JsonField? = null
private var accountId: JsonField? = null
+ private var cardTokenId: JsonField? = null
private var cardholderFirstName: JsonField? = null
private var cardholderLastName: JsonField? = null
private var cardholderMiddleName: JsonField? = null
@@ -546,6 +570,7 @@ private constructor(
id = cardValidation.id
acceptance = cardValidation.acceptance
accountId = cardValidation.accountId
+ cardTokenId = cardValidation.cardTokenId
cardholderFirstName = cardValidation.cardholderFirstName
cardholderLastName = cardValidation.cardholderLastName
cardholderMiddleName = cardValidation.cardholderMiddleName
@@ -607,6 +632,18 @@ private constructor(
*/
fun accountId(accountId: JsonField) = apply { this.accountId = accountId }
+ /** The ID of the Card Token that was used to validate the card. */
+ fun cardTokenId(cardTokenId: String) = cardTokenId(JsonField.of(cardTokenId))
+
+ /**
+ * Sets [Builder.cardTokenId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.cardTokenId] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun cardTokenId(cardTokenId: JsonField) = apply { this.cardTokenId = cardTokenId }
+
/** The cardholder's first name. */
fun cardholderFirstName(cardholderFirstName: String?) =
cardholderFirstName(JsonField.ofNullable(cardholderFirstName))
@@ -936,6 +973,7 @@ private constructor(
* .id()
* .acceptance()
* .accountId()
+ * .cardTokenId()
* .cardholderFirstName()
* .cardholderLastName()
* .cardholderMiddleName()
@@ -962,6 +1000,7 @@ private constructor(
checkRequired("id", id),
checkRequired("acceptance", acceptance),
checkRequired("accountId", accountId),
+ checkRequired("cardTokenId", cardTokenId),
checkRequired("cardholderFirstName", cardholderFirstName),
checkRequired("cardholderLastName", cardholderLastName),
checkRequired("cardholderMiddleName", cardholderMiddleName),
@@ -993,6 +1032,7 @@ private constructor(
id()
acceptance().ifPresent { it.validate() }
accountId()
+ cardTokenId()
cardholderFirstName()
cardholderLastName()
cardholderMiddleName()
@@ -1031,6 +1071,7 @@ private constructor(
(if (id.asKnown().isPresent) 1 else 0) +
(acceptance.asKnown().getOrNull()?.validity() ?: 0) +
(if (accountId.asKnown().isPresent) 1 else 0) +
+ (if (cardTokenId.asKnown().isPresent) 1 else 0) +
(if (cardholderFirstName.asKnown().isPresent) 1 else 0) +
(if (cardholderLastName.asKnown().isPresent) 1 else 0) +
(if (cardholderMiddleName.asKnown().isPresent) 1 else 0) +
@@ -5204,6 +5245,7 @@ private constructor(
id == other.id &&
acceptance == other.acceptance &&
accountId == other.accountId &&
+ cardTokenId == other.cardTokenId &&
cardholderFirstName == other.cardholderFirstName &&
cardholderLastName == other.cardholderLastName &&
cardholderMiddleName == other.cardholderMiddleName &&
@@ -5229,6 +5271,7 @@ private constructor(
id,
acceptance,
accountId,
+ cardTokenId,
cardholderFirstName,
cardholderLastName,
cardholderMiddleName,
@@ -5253,5 +5296,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "CardValidation{id=$id, acceptance=$acceptance, accountId=$accountId, cardholderFirstName=$cardholderFirstName, cardholderLastName=$cardholderLastName, cardholderMiddleName=$cardholderMiddleName, cardholderPostalCode=$cardholderPostalCode, cardholderStreetAddress=$cardholderStreetAddress, createdAt=$createdAt, createdBy=$createdBy, decline=$decline, idempotencyKey=$idempotencyKey, merchantCategoryCode=$merchantCategoryCode, merchantCityName=$merchantCityName, merchantName=$merchantName, merchantPostalCode=$merchantPostalCode, merchantState=$merchantState, status=$status, submission=$submission, type=$type, additionalProperties=$additionalProperties}"
+ "CardValidation{id=$id, acceptance=$acceptance, accountId=$accountId, cardTokenId=$cardTokenId, cardholderFirstName=$cardholderFirstName, cardholderLastName=$cardholderLastName, cardholderMiddleName=$cardholderMiddleName, cardholderPostalCode=$cardholderPostalCode, cardholderStreetAddress=$cardholderStreetAddress, createdAt=$createdAt, createdBy=$createdBy, decline=$decline, idempotencyKey=$idempotencyKey, merchantCategoryCode=$merchantCategoryCode, merchantCityName=$merchantCityName, merchantName=$merchantName, merchantPostalCode=$merchantPostalCode, merchantState=$merchantState, status=$status, submission=$submission, type=$type, additionalProperties=$additionalProperties}"
}
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 b3bf90cc7..fb1b3b9c4 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
@@ -30,6 +30,7 @@ private constructor(
private val amount: JsonField,
private val approval: JsonField,
private val approvedInboundCheckDepositId: JsonField,
+ private val balanceCheck: JsonField,
private val cancellation: JsonField,
private val checkNumber: JsonField,
private val createdAt: JsonField,
@@ -62,6 +63,9 @@ private constructor(
@JsonProperty("approved_inbound_check_deposit_id")
@ExcludeMissing
approvedInboundCheckDepositId: JsonField = JsonMissing.of(),
+ @JsonProperty("balance_check")
+ @ExcludeMissing
+ balanceCheck: JsonField = JsonMissing.of(),
@JsonProperty("cancellation")
@ExcludeMissing
cancellation: JsonField = JsonMissing.of(),
@@ -112,6 +116,7 @@ private constructor(
amount,
approval,
approvedInboundCheckDepositId,
+ balanceCheck,
cancellation,
checkNumber,
createdAt,
@@ -183,6 +188,14 @@ private constructor(
fun approvedInboundCheckDepositId(): Optional =
approvedInboundCheckDepositId.getOptional("approved_inbound_check_deposit_id")
+ /**
+ * How the account's available balance should be checked.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun balanceCheck(): Optional = balanceCheck.getOptional("balance_check")
+
/**
* If your account requires approvals for transfers and the transfer was not approved, this will
* contain details of the cancellation.
@@ -379,6 +392,15 @@ private constructor(
@ExcludeMissing
fun _approvedInboundCheckDepositId(): JsonField = approvedInboundCheckDepositId
+ /**
+ * Returns the raw JSON value of [balanceCheck].
+ *
+ * Unlike [balanceCheck], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("balance_check")
+ @ExcludeMissing
+ fun _balanceCheck(): JsonField = balanceCheck
+
/**
* Returns the raw JSON value of [cancellation].
*
@@ -551,6 +573,7 @@ private constructor(
* .amount()
* .approval()
* .approvedInboundCheckDepositId()
+ * .balanceCheck()
* .cancellation()
* .checkNumber()
* .createdAt()
@@ -582,6 +605,7 @@ private constructor(
private var amount: JsonField? = null
private var approval: JsonField? = null
private var approvedInboundCheckDepositId: JsonField? = null
+ private var balanceCheck: JsonField? = null
private var cancellation: JsonField? = null
private var checkNumber: JsonField? = null
private var createdAt: JsonField? = null
@@ -609,6 +633,7 @@ private constructor(
amount = checkTransfer.amount
approval = checkTransfer.approval
approvedInboundCheckDepositId = checkTransfer.approvedInboundCheckDepositId
+ balanceCheck = checkTransfer.balanceCheck
cancellation = checkTransfer.cancellation
checkNumber = checkTransfer.checkNumber
createdAt = checkTransfer.createdAt
@@ -721,6 +746,25 @@ private constructor(
this.approvedInboundCheckDepositId = approvedInboundCheckDepositId
}
+ /** How the account's available balance should be checked. */
+ fun balanceCheck(balanceCheck: BalanceCheck?) =
+ balanceCheck(JsonField.ofNullable(balanceCheck))
+
+ /** Alias for calling [Builder.balanceCheck] with `balanceCheck.orElse(null)`. */
+ fun balanceCheck(balanceCheck: Optional) =
+ balanceCheck(balanceCheck.getOrNull())
+
+ /**
+ * Sets [Builder.balanceCheck] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.balanceCheck] with a well-typed [BalanceCheck] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun balanceCheck(balanceCheck: JsonField) = apply {
+ this.balanceCheck = balanceCheck
+ }
+
/**
* If your account requires approvals for transfers and the transfer was not approved, this
* will contain details of the cancellation.
@@ -1050,6 +1094,7 @@ private constructor(
* .amount()
* .approval()
* .approvedInboundCheckDepositId()
+ * .balanceCheck()
* .cancellation()
* .checkNumber()
* .createdAt()
@@ -1079,6 +1124,7 @@ private constructor(
checkRequired("amount", amount),
checkRequired("approval", approval),
checkRequired("approvedInboundCheckDepositId", approvedInboundCheckDepositId),
+ checkRequired("balanceCheck", balanceCheck),
checkRequired("cancellation", cancellation),
checkRequired("checkNumber", checkNumber),
checkRequired("createdAt", createdAt),
@@ -1113,6 +1159,7 @@ private constructor(
amount()
approval().ifPresent { it.validate() }
approvedInboundCheckDepositId()
+ balanceCheck().ifPresent { it.validate() }
cancellation().ifPresent { it.validate() }
checkNumber()
createdAt()
@@ -1154,6 +1201,7 @@ private constructor(
(if (amount.asKnown().isPresent) 1 else 0) +
(approval.asKnown().getOrNull()?.validity() ?: 0) +
(if (approvedInboundCheckDepositId.asKnown().isPresent) 1 else 0) +
+ (balanceCheck.asKnown().getOrNull()?.validity() ?: 0) +
(cancellation.asKnown().getOrNull()?.validity() ?: 0) +
(if (checkNumber.asKnown().isPresent) 1 else 0) +
(if (createdAt.asKnown().isPresent) 1 else 0) +
@@ -1395,6 +1443,158 @@ private constructor(
"Approval{approvedAt=$approvedAt, approvedBy=$approvedBy, additionalProperties=$additionalProperties}"
}
+ /** How the account's available balance should be checked. */
+ class BalanceCheck @JsonCreator private constructor(private val value: JsonField) :
+ 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 = value
+
+ companion object {
+
+ /**
+ * The available balance of the account must be at least the amount of the check, and a
+ * Pending Transaction will be created for the full amount.
+ */
+ @JvmField val FULL = of("full")
+
+ /**
+ * No balance check will performed; a zero-dollar Pending Transaction will be created.
+ */
+ @JvmField val NONE = of("none")
+
+ @JvmStatic fun of(value: String) = BalanceCheck(JsonField.of(value))
+ }
+
+ /** An enum containing [BalanceCheck]'s known values. */
+ enum class Known {
+ /**
+ * The available balance of the account must be at least the amount of the check, and a
+ * Pending Transaction will be created for the full amount.
+ */
+ FULL,
+ /**
+ * No balance check will performed; a zero-dollar Pending Transaction will be created.
+ */
+ NONE,
+ }
+
+ /**
+ * An enum containing [BalanceCheck]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [BalanceCheck] 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 available balance of the account must be at least the amount of the check, and a
+ * Pending Transaction will be created for the full amount.
+ */
+ FULL,
+ /**
+ * No balance check will performed; a zero-dollar Pending Transaction will be created.
+ */
+ NONE,
+ /**
+ * An enum member indicating that [BalanceCheck] 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) {
+ FULL -> Value.FULL
+ NONE -> Value.NONE
+ 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) {
+ FULL -> Known.FULL
+ NONE -> Known.NONE
+ else -> throw IncreaseInvalidDataException("Unknown BalanceCheck: $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(): BalanceCheck = 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 BalanceCheck && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
/**
* If your account requires approvals for transfers and the transfer was not approved, this will
* contain details of the cancellation.
@@ -7185,6 +7385,7 @@ private constructor(
amount == other.amount &&
approval == other.approval &&
approvedInboundCheckDepositId == other.approvedInboundCheckDepositId &&
+ balanceCheck == other.balanceCheck &&
cancellation == other.cancellation &&
checkNumber == other.checkNumber &&
createdAt == other.createdAt &&
@@ -7213,6 +7414,7 @@ private constructor(
amount,
approval,
approvedInboundCheckDepositId,
+ balanceCheck,
cancellation,
checkNumber,
createdAt,
@@ -7237,5 +7439,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "CheckTransfer{id=$id, accountId=$accountId, accountNumber=$accountNumber, amount=$amount, approval=$approval, approvedInboundCheckDepositId=$approvedInboundCheckDepositId, cancellation=$cancellation, checkNumber=$checkNumber, createdAt=$createdAt, createdBy=$createdBy, currency=$currency, fulfillmentMethod=$fulfillmentMethod, idempotencyKey=$idempotencyKey, mailing=$mailing, pendingTransactionId=$pendingTransactionId, physicalCheck=$physicalCheck, routingNumber=$routingNumber, sourceAccountNumberId=$sourceAccountNumberId, status=$status, stopPaymentRequest=$stopPaymentRequest, submission=$submission, thirdParty=$thirdParty, type=$type, additionalProperties=$additionalProperties}"
+ "CheckTransfer{id=$id, accountId=$accountId, accountNumber=$accountNumber, amount=$amount, approval=$approval, approvedInboundCheckDepositId=$approvedInboundCheckDepositId, balanceCheck=$balanceCheck, cancellation=$cancellation, checkNumber=$checkNumber, createdAt=$createdAt, createdBy=$createdBy, currency=$currency, fulfillmentMethod=$fulfillmentMethod, idempotencyKey=$idempotencyKey, mailing=$mailing, pendingTransactionId=$pendingTransactionId, physicalCheck=$physicalCheck, routingNumber=$routingNumber, sourceAccountNumberId=$sourceAccountNumberId, status=$status, stopPaymentRequest=$stopPaymentRequest, submission=$submission, thirdParty=$thirdParty, type=$type, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/exports/Export.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/exports/Export.kt
index d72aa259b..1ede50cda 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/exports/Export.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/exports/Export.kt
@@ -497,6 +497,12 @@ private constructor(
*/
@JvmField val ACCOUNT_STATEMENT_OFX = of("account_statement_ofx")
+ /**
+ * Export a BAI2 file of transactions and balances for a given date and optional
+ * Account.
+ */
+ @JvmField val ACCOUNT_STATEMENT_BAI2 = of("account_statement_bai2")
+
/** Export a CSV of all transactions for a given time range. */
@JvmField val TRANSACTION_CSV = of("transaction_csv")
@@ -528,6 +534,11 @@ private constructor(
* time range and Account.
*/
ACCOUNT_STATEMENT_OFX,
+ /**
+ * Export a BAI2 file of transactions and balances for a given date and optional
+ * Account.
+ */
+ ACCOUNT_STATEMENT_BAI2,
/** Export a CSV of all transactions for a given time range. */
TRANSACTION_CSV,
/** Export a CSV of account balances for the dates in a given range. */
@@ -560,6 +571,11 @@ private constructor(
* time range and Account.
*/
ACCOUNT_STATEMENT_OFX,
+ /**
+ * Export a BAI2 file of transactions and balances for a given date and optional
+ * Account.
+ */
+ ACCOUNT_STATEMENT_BAI2,
/** Export a CSV of all transactions for a given time range. */
TRANSACTION_CSV,
/** Export a CSV of account balances for the dates in a given range. */
@@ -589,6 +605,7 @@ private constructor(
fun value(): Value =
when (this) {
ACCOUNT_STATEMENT_OFX -> Value.ACCOUNT_STATEMENT_OFX
+ ACCOUNT_STATEMENT_BAI2 -> Value.ACCOUNT_STATEMENT_BAI2
TRANSACTION_CSV -> Value.TRANSACTION_CSV
BALANCE_CSV -> Value.BALANCE_CSV
BOOKKEEPING_ACCOUNT_BALANCE_CSV -> Value.BOOKKEEPING_ACCOUNT_BALANCE_CSV
@@ -610,6 +627,7 @@ private constructor(
fun known(): Known =
when (this) {
ACCOUNT_STATEMENT_OFX -> Known.ACCOUNT_STATEMENT_OFX
+ ACCOUNT_STATEMENT_BAI2 -> Known.ACCOUNT_STATEMENT_BAI2
TRANSACTION_CSV -> Known.TRANSACTION_CSV
BALANCE_CSV -> Known.BALANCE_CSV
BOOKKEEPING_ACCOUNT_BALANCE_CSV -> Known.BOOKKEEPING_ACCOUNT_BALANCE_CSV
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportCreateParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportCreateParams.kt
index c741d7474..f19bcc730 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportCreateParams.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportCreateParams.kt
@@ -18,6 +18,7 @@ import com.increase.api.core.http.Headers
import com.increase.api.core.http.QueryParams
import com.increase.api.core.toImmutable
import com.increase.api.errors.IncreaseInvalidDataException
+import java.time.LocalDate
import java.time.OffsetDateTime
import java.util.Collections
import java.util.Objects
@@ -40,6 +41,14 @@ private constructor(
*/
fun category(): Category = body.category()
+ /**
+ * Options for the created export. Required if `category` is equal to `account_statement_bai2`.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun accountStatementBai2(): Optional = body.accountStatementBai2()
+
/**
* Options for the created export. Required if `category` is equal to `account_statement_ofx`.
*
@@ -92,6 +101,14 @@ private constructor(
*/
fun _category(): JsonField = body._category()
+ /**
+ * Returns the raw JSON value of [accountStatementBai2].
+ *
+ * Unlike [accountStatementBai2], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ fun _accountStatementBai2(): JsonField = body._accountStatementBai2()
+
/**
* Returns the raw JSON value of [accountStatementOfx].
*
@@ -173,10 +190,10 @@ private constructor(
* This is generally only useful if you are already constructing the body separately.
* Otherwise, it's more convenient to use the top-level setters instead:
* - [category]
+ * - [accountStatementBai2]
* - [accountStatementOfx]
* - [balanceCsv]
* - [bookkeepingAccountBalanceCsv]
- * - [entityCsv]
* - etc.
*/
fun body(body: Body) = apply { this.body = body.toBuilder() }
@@ -193,6 +210,25 @@ private constructor(
*/
fun category(category: JsonField) = apply { body.category(category) }
+ /**
+ * Options for the created export. Required if `category` is equal to
+ * `account_statement_bai2`.
+ */
+ fun accountStatementBai2(accountStatementBai2: AccountStatementBai2) = apply {
+ body.accountStatementBai2(accountStatementBai2)
+ }
+
+ /**
+ * Sets [Builder.accountStatementBai2] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.accountStatementBai2] with a well-typed
+ * [AccountStatementBai2] value instead. This method is primarily for setting the field to
+ * an undocumented or not yet supported value.
+ */
+ fun accountStatementBai2(accountStatementBai2: JsonField) = apply {
+ body.accountStatementBai2(accountStatementBai2)
+ }
+
/**
* Options for the created export. Required if `category` is equal to
* `account_statement_ofx`.
@@ -420,6 +456,7 @@ private constructor(
class Body
private constructor(
private val category: JsonField,
+ private val accountStatementBai2: JsonField,
private val accountStatementOfx: JsonField,
private val balanceCsv: JsonField,
private val bookkeepingAccountBalanceCsv: JsonField,
@@ -434,6 +471,9 @@ private constructor(
@JsonProperty("category")
@ExcludeMissing
category: JsonField = JsonMissing.of(),
+ @JsonProperty("account_statement_bai2")
+ @ExcludeMissing
+ accountStatementBai2: JsonField = JsonMissing.of(),
@JsonProperty("account_statement_ofx")
@ExcludeMissing
accountStatementOfx: JsonField = JsonMissing.of(),
@@ -453,6 +493,7 @@ private constructor(
@JsonProperty("vendor_csv") @ExcludeMissing vendorCsv: JsonValue = JsonMissing.of(),
) : this(
category,
+ accountStatementBai2,
accountStatementOfx,
balanceCsv,
bookkeepingAccountBalanceCsv,
@@ -470,6 +511,16 @@ private constructor(
*/
fun category(): Category = category.getRequired("category")
+ /**
+ * Options for the created export. Required if `category` is equal to
+ * `account_statement_bai2`.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun accountStatementBai2(): Optional =
+ accountStatementBai2.getOptional("account_statement_bai2")
+
/**
* Options for the created export. Required if `category` is equal to
* `account_statement_ofx`.
@@ -525,6 +576,16 @@ private constructor(
*/
@JsonProperty("category") @ExcludeMissing fun _category(): JsonField = category
+ /**
+ * Returns the raw JSON value of [accountStatementBai2].
+ *
+ * Unlike [accountStatementBai2], this method doesn't throw if the JSON field has an
+ * unexpected type.
+ */
+ @JsonProperty("account_statement_bai2")
+ @ExcludeMissing
+ fun _accountStatementBai2(): JsonField = accountStatementBai2
+
/**
* Returns the raw JSON value of [accountStatementOfx].
*
@@ -603,6 +664,7 @@ private constructor(
class Builder internal constructor() {
private var category: JsonField? = null
+ private var accountStatementBai2: JsonField = JsonMissing.of()
private var accountStatementOfx: JsonField = JsonMissing.of()
private var balanceCsv: JsonField = JsonMissing.of()
private var bookkeepingAccountBalanceCsv: JsonField =
@@ -615,6 +677,7 @@ private constructor(
@JvmSynthetic
internal fun from(body: Body) = apply {
category = body.category
+ accountStatementBai2 = body.accountStatementBai2
accountStatementOfx = body.accountStatementOfx
balanceCsv = body.balanceCsv
bookkeepingAccountBalanceCsv = body.bookkeepingAccountBalanceCsv
@@ -636,6 +699,25 @@ private constructor(
*/
fun category(category: JsonField) = apply { this.category = category }
+ /**
+ * Options for the created export. Required if `category` is equal to
+ * `account_statement_bai2`.
+ */
+ fun accountStatementBai2(accountStatementBai2: AccountStatementBai2) =
+ accountStatementBai2(JsonField.of(accountStatementBai2))
+
+ /**
+ * Sets [Builder.accountStatementBai2] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.accountStatementBai2] with a well-typed
+ * [AccountStatementBai2] value instead. This method is primarily for setting the field
+ * to an undocumented or not yet supported value.
+ */
+ fun accountStatementBai2(accountStatementBai2: JsonField) =
+ apply {
+ this.accountStatementBai2 = accountStatementBai2
+ }
+
/**
* Options for the created export. Required if `category` is equal to
* `account_statement_ofx`.
@@ -753,6 +835,7 @@ private constructor(
fun build(): Body =
Body(
checkRequired("category", category),
+ accountStatementBai2,
accountStatementOfx,
balanceCsv,
bookkeepingAccountBalanceCsv,
@@ -771,6 +854,7 @@ private constructor(
}
category().validate()
+ accountStatementBai2().ifPresent { it.validate() }
accountStatementOfx().ifPresent { it.validate() }
balanceCsv().ifPresent { it.validate() }
bookkeepingAccountBalanceCsv().ifPresent { it.validate() }
@@ -796,6 +880,7 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(category.asKnown().getOrNull()?.validity() ?: 0) +
+ (accountStatementBai2.asKnown().getOrNull()?.validity() ?: 0) +
(accountStatementOfx.asKnown().getOrNull()?.validity() ?: 0) +
(balanceCsv.asKnown().getOrNull()?.validity() ?: 0) +
(bookkeepingAccountBalanceCsv.asKnown().getOrNull()?.validity() ?: 0) +
@@ -809,6 +894,7 @@ private constructor(
return other is Body &&
category == other.category &&
+ accountStatementBai2 == other.accountStatementBai2 &&
accountStatementOfx == other.accountStatementOfx &&
balanceCsv == other.balanceCsv &&
bookkeepingAccountBalanceCsv == other.bookkeepingAccountBalanceCsv &&
@@ -821,6 +907,7 @@ private constructor(
private val hashCode: Int by lazy {
Objects.hash(
category,
+ accountStatementBai2,
accountStatementOfx,
balanceCsv,
bookkeepingAccountBalanceCsv,
@@ -834,7 +921,7 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "Body{category=$category, accountStatementOfx=$accountStatementOfx, balanceCsv=$balanceCsv, bookkeepingAccountBalanceCsv=$bookkeepingAccountBalanceCsv, entityCsv=$entityCsv, transactionCsv=$transactionCsv, vendorCsv=$vendorCsv, additionalProperties=$additionalProperties}"
+ "Body{category=$category, accountStatementBai2=$accountStatementBai2, accountStatementOfx=$accountStatementOfx, balanceCsv=$balanceCsv, bookkeepingAccountBalanceCsv=$bookkeepingAccountBalanceCsv, entityCsv=$entityCsv, transactionCsv=$transactionCsv, vendorCsv=$vendorCsv, additionalProperties=$additionalProperties}"
}
/** The type of Export to create. */
@@ -858,6 +945,12 @@ private constructor(
*/
@JvmField val ACCOUNT_STATEMENT_OFX = of("account_statement_ofx")
+ /**
+ * Export a BAI2 file of transactions and balances for a given date and optional
+ * Account.
+ */
+ @JvmField val ACCOUNT_STATEMENT_BAI2 = of("account_statement_bai2")
+
/** Export a CSV of all transactions for a given time range. */
@JvmField val TRANSACTION_CSV = of("transaction_csv")
@@ -883,6 +976,11 @@ private constructor(
* time range and Account.
*/
ACCOUNT_STATEMENT_OFX,
+ /**
+ * Export a BAI2 file of transactions and balances for a given date and optional
+ * Account.
+ */
+ ACCOUNT_STATEMENT_BAI2,
/** Export a CSV of all transactions for a given time range. */
TRANSACTION_CSV,
/** Export a CSV of account balances for the dates in a given range. */
@@ -910,6 +1008,11 @@ private constructor(
* time range and Account.
*/
ACCOUNT_STATEMENT_OFX,
+ /**
+ * Export a BAI2 file of transactions and balances for a given date and optional
+ * Account.
+ */
+ ACCOUNT_STATEMENT_BAI2,
/** Export a CSV of all transactions for a given time range. */
TRANSACTION_CSV,
/** Export a CSV of account balances for the dates in a given range. */
@@ -934,6 +1037,7 @@ private constructor(
fun value(): Value =
when (this) {
ACCOUNT_STATEMENT_OFX -> Value.ACCOUNT_STATEMENT_OFX
+ ACCOUNT_STATEMENT_BAI2 -> Value.ACCOUNT_STATEMENT_BAI2
TRANSACTION_CSV -> Value.TRANSACTION_CSV
BALANCE_CSV -> Value.BALANCE_CSV
BOOKKEEPING_ACCOUNT_BALANCE_CSV -> Value.BOOKKEEPING_ACCOUNT_BALANCE_CSV
@@ -954,6 +1058,7 @@ private constructor(
fun known(): Known =
when (this) {
ACCOUNT_STATEMENT_OFX -> Known.ACCOUNT_STATEMENT_OFX
+ ACCOUNT_STATEMENT_BAI2 -> Known.ACCOUNT_STATEMENT_BAI2
TRANSACTION_CSV -> Known.TRANSACTION_CSV
BALANCE_CSV -> Known.BALANCE_CSV
BOOKKEEPING_ACCOUNT_BALANCE_CSV -> Known.BOOKKEEPING_ACCOUNT_BALANCE_CSV
@@ -1016,6 +1121,207 @@ private constructor(
override fun toString() = value.toString()
}
+ /**
+ * Options for the created export. Required if `category` is equal to `account_statement_bai2`.
+ */
+ class AccountStatementBai2
+ private constructor(
+ private val accountId: JsonField,
+ private val effectiveDate: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("account_id")
+ @ExcludeMissing
+ accountId: JsonField = JsonMissing.of(),
+ @JsonProperty("effective_date")
+ @ExcludeMissing
+ effectiveDate: JsonField = JsonMissing.of(),
+ ) : this(accountId, effectiveDate, mutableMapOf())
+
+ /**
+ * The Account to create a BAI2 report for. If not provided, all open accounts will be
+ * included.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun accountId(): Optional = accountId.getOptional("account_id")
+
+ /**
+ * The date to create a BAI2 report for. If not provided, the current date will be used. The
+ * timezone is UTC. If the current date is used, the report will include intraday balances,
+ * otherwise it will include end-of-day balances for the provided date.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun effectiveDate(): Optional = effectiveDate.getOptional("effective_date")
+
+ /**
+ * 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 [effectiveDate].
+ *
+ * Unlike [effectiveDate], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("effective_date")
+ @ExcludeMissing
+ fun _effectiveDate(): JsonField = effectiveDate
+
+ @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 [AccountStatementBai2]. */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [AccountStatementBai2]. */
+ class Builder internal constructor() {
+
+ private var accountId: JsonField = JsonMissing.of()
+ private var effectiveDate: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(accountStatementBai2: AccountStatementBai2) = apply {
+ accountId = accountStatementBai2.accountId
+ effectiveDate = accountStatementBai2.effectiveDate
+ additionalProperties = accountStatementBai2.additionalProperties.toMutableMap()
+ }
+
+ /**
+ * The Account to create a BAI2 report for. If not provided, all open accounts will be
+ * included.
+ */
+ 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.
+ */
+ fun accountId(accountId: JsonField) = apply { this.accountId = accountId }
+
+ /**
+ * The date to create a BAI2 report for. If not provided, the current date will be used.
+ * The timezone is UTC. If the current date is used, the report will include intraday
+ * balances, otherwise it will include end-of-day balances for the provided date.
+ */
+ fun effectiveDate(effectiveDate: LocalDate) = effectiveDate(JsonField.of(effectiveDate))
+
+ /**
+ * Sets [Builder.effectiveDate] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.effectiveDate] with a well-typed [LocalDate] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun effectiveDate(effectiveDate: JsonField) = apply {
+ this.effectiveDate = effectiveDate
+ }
+
+ 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 [AccountStatementBai2].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): AccountStatementBai2 =
+ AccountStatementBai2(accountId, effectiveDate, additionalProperties.toMutableMap())
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): AccountStatementBai2 = apply {
+ if (validated) {
+ return@apply
+ }
+
+ accountId()
+ effectiveDate()
+ 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 (accountId.asKnown().isPresent) 1 else 0) +
+ (if (effectiveDate.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is AccountStatementBai2 &&
+ accountId == other.accountId &&
+ effectiveDate == other.effectiveDate &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(accountId, effectiveDate, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "AccountStatementBai2{accountId=$accountId, effectiveDate=$effectiveDate, additionalProperties=$additionalProperties}"
+ }
+
/**
* Options for the created export. Required if `category` is equal to `account_statement_ofx`.
*/
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportListParams.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportListParams.kt
index 0175013e9..7a99a2ef6 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportListParams.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/exports/ExportListParams.kt
@@ -434,6 +434,12 @@ private constructor(
*/
@JvmField val ACCOUNT_STATEMENT_OFX = of("account_statement_ofx")
+ /**
+ * Export a BAI2 file of transactions and balances for a given date and optional
+ * Account.
+ */
+ @JvmField val ACCOUNT_STATEMENT_BAI2 = of("account_statement_bai2")
+
/** Export a CSV of all transactions for a given time range. */
@JvmField val TRANSACTION_CSV = of("transaction_csv")
@@ -466,6 +472,11 @@ private constructor(
* given time range and Account.
*/
ACCOUNT_STATEMENT_OFX,
+ /**
+ * Export a BAI2 file of transactions and balances for a given date and optional
+ * Account.
+ */
+ ACCOUNT_STATEMENT_BAI2,
/** Export a CSV of all transactions for a given time range. */
TRANSACTION_CSV,
/** Export a CSV of account balances for the dates in a given range. */
@@ -498,6 +509,11 @@ private constructor(
* given time range and Account.
*/
ACCOUNT_STATEMENT_OFX,
+ /**
+ * Export a BAI2 file of transactions and balances for a given date and optional
+ * Account.
+ */
+ ACCOUNT_STATEMENT_BAI2,
/** Export a CSV of all transactions for a given time range. */
TRANSACTION_CSV,
/** Export a CSV of account balances for the dates in a given range. */
@@ -527,6 +543,7 @@ private constructor(
fun value(): Value =
when (this) {
ACCOUNT_STATEMENT_OFX -> Value.ACCOUNT_STATEMENT_OFX
+ ACCOUNT_STATEMENT_BAI2 -> Value.ACCOUNT_STATEMENT_BAI2
TRANSACTION_CSV -> Value.TRANSACTION_CSV
BALANCE_CSV -> Value.BALANCE_CSV
BOOKKEEPING_ACCOUNT_BALANCE_CSV -> Value.BOOKKEEPING_ACCOUNT_BALANCE_CSV
@@ -548,6 +565,7 @@ private constructor(
fun known(): Known =
when (this) {
ACCOUNT_STATEMENT_OFX -> Known.ACCOUNT_STATEMENT_OFX
+ ACCOUNT_STATEMENT_BAI2 -> Known.ACCOUNT_STATEMENT_BAI2
TRANSACTION_CSV -> Known.TRANSACTION_CSV
BALANCE_CSV -> Known.BALANCE_CSV
BOOKKEEPING_ACCOUNT_BALANCE_CSV -> Known.BOOKKEEPING_ACCOUNT_BALANCE_CSV
diff --git a/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollment.kt b/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollment.kt
index 519359cc3..7a75c5316 100644
--- a/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollment.kt
+++ b/increase-java-core/src/main/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollment.kt
@@ -31,6 +31,7 @@ private constructor(
private val id: JsonField,
private val accountId: JsonField,
private val createdAt: JsonField,
+ private val emailAddress: JsonField,
private val idempotencyKey: JsonField,
private val intrafiId: JsonField,
private val status: JsonField,
@@ -45,13 +46,26 @@ private constructor(
@JsonProperty("created_at")
@ExcludeMissing
createdAt: JsonField = JsonMissing.of(),
+ @JsonProperty("email_address")
+ @ExcludeMissing
+ emailAddress: JsonField = JsonMissing.of(),
@JsonProperty("idempotency_key")
@ExcludeMissing
idempotencyKey: JsonField = JsonMissing.of(),
@JsonProperty("intrafi_id") @ExcludeMissing intrafiId: JsonField = JsonMissing.of(),
@JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(),
@JsonProperty("type") @ExcludeMissing type: JsonField = JsonMissing.of(),
- ) : this(id, accountId, createdAt, idempotencyKey, intrafiId, status, type, mutableMapOf())
+ ) : this(
+ id,
+ accountId,
+ createdAt,
+ emailAddress,
+ idempotencyKey,
+ intrafiId,
+ status,
+ type,
+ mutableMapOf(),
+ )
/**
* The identifier of this enrollment at IntraFi.
@@ -78,6 +92,14 @@ private constructor(
*/
fun createdAt(): OffsetDateTime = createdAt.getRequired("created_at")
+ /**
+ * The contact email for the account owner, to be shared with IntraFi.
+ *
+ * @throws IncreaseInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun emailAddress(): Optional = emailAddress.getOptional("email_address")
+
/**
* The idempotency key you chose for this object. This value is unique across Increase and is
* used to ensure that a request is only processed once. Learn more about
@@ -138,6 +160,15 @@ private constructor(
@ExcludeMissing
fun _createdAt(): JsonField = createdAt
+ /**
+ * Returns the raw JSON value of [emailAddress].
+ *
+ * Unlike [emailAddress], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("email_address")
+ @ExcludeMissing
+ fun _emailAddress(): JsonField = emailAddress
+
/**
* Returns the raw JSON value of [idempotencyKey].
*
@@ -190,6 +221,7 @@ private constructor(
* .id()
* .accountId()
* .createdAt()
+ * .emailAddress()
* .idempotencyKey()
* .intrafiId()
* .status()
@@ -205,6 +237,7 @@ private constructor(
private var id: JsonField? = null
private var accountId: JsonField? = null
private var createdAt: JsonField? = null
+ private var emailAddress: JsonField? = null
private var idempotencyKey: JsonField? = null
private var intrafiId: JsonField? = null
private var status: JsonField? = null
@@ -216,6 +249,7 @@ private constructor(
id = intrafiAccountEnrollment.id
accountId = intrafiAccountEnrollment.accountId
createdAt = intrafiAccountEnrollment.createdAt
+ emailAddress = intrafiAccountEnrollment.emailAddress
idempotencyKey = intrafiAccountEnrollment.idempotencyKey
intrafiId = intrafiAccountEnrollment.intrafiId
status = intrafiAccountEnrollment.status
@@ -261,6 +295,23 @@ private constructor(
*/
fun createdAt(createdAt: JsonField) = apply { this.createdAt = createdAt }
+ /** The contact email for the account owner, to be shared with IntraFi. */
+ fun emailAddress(emailAddress: String?) = emailAddress(JsonField.ofNullable(emailAddress))
+
+ /** Alias for calling [Builder.emailAddress] with `emailAddress.orElse(null)`. */
+ fun emailAddress(emailAddress: Optional) = emailAddress(emailAddress.getOrNull())
+
+ /**
+ * Sets [Builder.emailAddress] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.emailAddress] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun emailAddress(emailAddress: JsonField) = apply {
+ this.emailAddress = emailAddress
+ }
+
/**
* The idempotency key you chose for this object. This value is unique across Increase and
* is used to ensure that a request is only processed once. Learn more about
@@ -356,6 +407,7 @@ private constructor(
* .id()
* .accountId()
* .createdAt()
+ * .emailAddress()
* .idempotencyKey()
* .intrafiId()
* .status()
@@ -369,6 +421,7 @@ private constructor(
checkRequired("id", id),
checkRequired("accountId", accountId),
checkRequired("createdAt", createdAt),
+ checkRequired("emailAddress", emailAddress),
checkRequired("idempotencyKey", idempotencyKey),
checkRequired("intrafiId", intrafiId),
checkRequired("status", status),
@@ -387,6 +440,7 @@ private constructor(
id()
accountId()
createdAt()
+ emailAddress()
idempotencyKey()
intrafiId()
status().validate()
@@ -412,6 +466,7 @@ private constructor(
(if (id.asKnown().isPresent) 1 else 0) +
(if (accountId.asKnown().isPresent) 1 else 0) +
(if (createdAt.asKnown().isPresent) 1 else 0) +
+ (if (emailAddress.asKnown().isPresent) 1 else 0) +
(if (idempotencyKey.asKnown().isPresent) 1 else 0) +
(if (intrafiId.asKnown().isPresent) 1 else 0) +
(status.asKnown().getOrNull()?.validity() ?: 0) +
@@ -715,6 +770,7 @@ private constructor(
id == other.id &&
accountId == other.accountId &&
createdAt == other.createdAt &&
+ emailAddress == other.emailAddress &&
idempotencyKey == other.idempotencyKey &&
intrafiId == other.intrafiId &&
status == other.status &&
@@ -727,6 +783,7 @@ private constructor(
id,
accountId,
createdAt,
+ emailAddress,
idempotencyKey,
intrafiId,
status,
@@ -738,5 +795,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "IntrafiAccountEnrollment{id=$id, accountId=$accountId, createdAt=$createdAt, idempotencyKey=$idempotencyKey, intrafiId=$intrafiId, status=$status, type=$type, additionalProperties=$additionalProperties}"
+ "IntrafiAccountEnrollment{id=$id, accountId=$accountId, createdAt=$createdAt, emailAddress=$emailAddress, idempotencyKey=$idempotencyKey, intrafiId=$intrafiId, status=$status, type=$type, additionalProperties=$additionalProperties}"
}
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPageResponseTest.kt
index 223c2942b..d7bbbce4a 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPageResponseTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationListPageResponseTest.kt
@@ -17,6 +17,7 @@ internal class AchPrenotificationListPageResponseTest {
.addData(
AchPrenotification.builder()
.id("ach_prenotification_ubjf9qqsxl3obbcn1u34")
+ .accountId(null)
.accountNumber("987654321")
.addendum(null)
.companyDescriptiveDate(null)
@@ -27,6 +28,8 @@ internal class AchPrenotificationListPageResponseTest {
.creditDebitIndicator(null)
.effectiveDate(null)
.idempotencyKey(null)
+ .individualId(null)
+ .individualName(null)
.addNotificationsOfChange(
AchPrenotification.NotificationsOfChange.builder()
.changeCode(
@@ -47,6 +50,7 @@ internal class AchPrenotificationListPageResponseTest {
.build()
)
.routingNumber("101050001")
+ .standardEntryClassCode(null)
.status(AchPrenotification.Status.SUBMITTED)
.type(AchPrenotification.Type.ACH_PRENOTIFICATION)
.build()
@@ -58,6 +62,7 @@ internal class AchPrenotificationListPageResponseTest {
.containsExactly(
AchPrenotification.builder()
.id("ach_prenotification_ubjf9qqsxl3obbcn1u34")
+ .accountId(null)
.accountNumber("987654321")
.addendum(null)
.companyDescriptiveDate(null)
@@ -68,6 +73,8 @@ internal class AchPrenotificationListPageResponseTest {
.creditDebitIndicator(null)
.effectiveDate(null)
.idempotencyKey(null)
+ .individualId(null)
+ .individualName(null)
.addNotificationsOfChange(
AchPrenotification.NotificationsOfChange.builder()
.changeCode(
@@ -88,6 +95,7 @@ internal class AchPrenotificationListPageResponseTest {
.build()
)
.routingNumber("101050001")
+ .standardEntryClassCode(null)
.status(AchPrenotification.Status.SUBMITTED)
.type(AchPrenotification.Type.ACH_PRENOTIFICATION)
.build()
@@ -103,6 +111,7 @@ internal class AchPrenotificationListPageResponseTest {
.addData(
AchPrenotification.builder()
.id("ach_prenotification_ubjf9qqsxl3obbcn1u34")
+ .accountId(null)
.accountNumber("987654321")
.addendum(null)
.companyDescriptiveDate(null)
@@ -113,6 +122,8 @@ internal class AchPrenotificationListPageResponseTest {
.creditDebitIndicator(null)
.effectiveDate(null)
.idempotencyKey(null)
+ .individualId(null)
+ .individualName(null)
.addNotificationsOfChange(
AchPrenotification.NotificationsOfChange.builder()
.changeCode(
@@ -133,6 +144,7 @@ internal class AchPrenotificationListPageResponseTest {
.build()
)
.routingNumber("101050001")
+ .standardEntryClassCode(null)
.status(AchPrenotification.Status.SUBMITTED)
.type(AchPrenotification.Type.ACH_PRENOTIFICATION)
.build()
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationTest.kt
index af300b443..e742e13c0 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/achprenotifications/AchPrenotificationTest.kt
@@ -15,6 +15,7 @@ internal class AchPrenotificationTest {
val achPrenotification =
AchPrenotification.builder()
.id("ach_prenotification_ubjf9qqsxl3obbcn1u34")
+ .accountId(null)
.accountNumber("987654321")
.addendum(null)
.companyDescriptiveDate(null)
@@ -25,6 +26,8 @@ internal class AchPrenotificationTest {
.creditDebitIndicator(null)
.effectiveDate(null)
.idempotencyKey(null)
+ .individualId(null)
+ .individualName(null)
.addNotificationsOfChange(
AchPrenotification.NotificationsOfChange.builder()
.changeCode(
@@ -45,11 +48,13 @@ internal class AchPrenotificationTest {
.build()
)
.routingNumber("101050001")
+ .standardEntryClassCode(null)
.status(AchPrenotification.Status.SUBMITTED)
.type(AchPrenotification.Type.ACH_PRENOTIFICATION)
.build()
assertThat(achPrenotification.id()).isEqualTo("ach_prenotification_ubjf9qqsxl3obbcn1u34")
+ assertThat(achPrenotification.accountId()).isEmpty
assertThat(achPrenotification.accountNumber()).isEqualTo("987654321")
assertThat(achPrenotification.addendum()).isEmpty
assertThat(achPrenotification.companyDescriptiveDate()).isEmpty
@@ -61,6 +66,8 @@ internal class AchPrenotificationTest {
assertThat(achPrenotification.creditDebitIndicator()).isEmpty
assertThat(achPrenotification.effectiveDate()).isEmpty
assertThat(achPrenotification.idempotencyKey()).isEmpty
+ assertThat(achPrenotification.individualId()).isEmpty
+ assertThat(achPrenotification.individualName()).isEmpty
assertThat(achPrenotification.notificationsOfChange())
.containsExactly(
AchPrenotification.NotificationsOfChange.builder()
@@ -82,6 +89,7 @@ internal class AchPrenotificationTest {
.build()
)
assertThat(achPrenotification.routingNumber()).isEqualTo("101050001")
+ assertThat(achPrenotification.standardEntryClassCode()).isEmpty
assertThat(achPrenotification.status()).isEqualTo(AchPrenotification.Status.SUBMITTED)
assertThat(achPrenotification.type()).isEqualTo(AchPrenotification.Type.ACH_PRENOTIFICATION)
}
@@ -92,6 +100,7 @@ internal class AchPrenotificationTest {
val achPrenotification =
AchPrenotification.builder()
.id("ach_prenotification_ubjf9qqsxl3obbcn1u34")
+ .accountId(null)
.accountNumber("987654321")
.addendum(null)
.companyDescriptiveDate(null)
@@ -102,6 +111,8 @@ internal class AchPrenotificationTest {
.creditDebitIndicator(null)
.effectiveDate(null)
.idempotencyKey(null)
+ .individualId(null)
+ .individualName(null)
.addNotificationsOfChange(
AchPrenotification.NotificationsOfChange.builder()
.changeCode(
@@ -122,6 +133,7 @@ internal class AchPrenotificationTest {
.build()
)
.routingNumber("101050001")
+ .standardEntryClassCode(null)
.status(AchPrenotification.Status.SUBMITTED)
.type(AchPrenotification.Type.ACH_PRENOTIFICATION)
.build()
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardvalidations/CardValidationListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardvalidations/CardValidationListPageResponseTest.kt
index ffe7cb111..7c2f9b5e9 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardvalidations/CardValidationListPageResponseTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardvalidations/CardValidationListPageResponseTest.kt
@@ -32,6 +32,7 @@ internal class CardValidationListPageResponseTest {
.build()
)
.accountId("account_in71c4amph0vgo2qllky")
+ .cardTokenId("outbound_card_token_zlt0ml6youq3q7vcdlg0")
.cardholderFirstName("Dee")
.cardholderLastName("Hock")
.cardholderMiddleName("Ward")
@@ -107,6 +108,7 @@ internal class CardValidationListPageResponseTest {
.build()
)
.accountId("account_in71c4amph0vgo2qllky")
+ .cardTokenId("outbound_card_token_zlt0ml6youq3q7vcdlg0")
.cardholderFirstName("Dee")
.cardholderLastName("Hock")
.cardholderMiddleName("Ward")
@@ -186,6 +188,7 @@ internal class CardValidationListPageResponseTest {
.build()
)
.accountId("account_in71c4amph0vgo2qllky")
+ .cardTokenId("outbound_card_token_zlt0ml6youq3q7vcdlg0")
.cardholderFirstName("Dee")
.cardholderLastName("Hock")
.cardholderMiddleName("Ward")
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/cardvalidations/CardValidationTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/cardvalidations/CardValidationTest.kt
index 2b9ac7ab2..ea4e92986 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/cardvalidations/CardValidationTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/cardvalidations/CardValidationTest.kt
@@ -30,6 +30,7 @@ internal class CardValidationTest {
.build()
)
.accountId("account_in71c4amph0vgo2qllky")
+ .cardTokenId("outbound_card_token_zlt0ml6youq3q7vcdlg0")
.cardholderFirstName("Dee")
.cardholderLastName("Hock")
.cardholderMiddleName("Ward")
@@ -97,6 +98,8 @@ internal class CardValidationTest {
.build()
)
assertThat(cardValidation.accountId()).isEqualTo("account_in71c4amph0vgo2qllky")
+ assertThat(cardValidation.cardTokenId())
+ .isEqualTo("outbound_card_token_zlt0ml6youq3q7vcdlg0")
assertThat(cardValidation.cardholderFirstName()).contains("Dee")
assertThat(cardValidation.cardholderLastName()).contains("Hock")
assertThat(cardValidation.cardholderMiddleName()).contains("Ward")
@@ -164,6 +167,7 @@ internal class CardValidationTest {
.build()
)
.accountId("account_in71c4amph0vgo2qllky")
+ .cardTokenId("outbound_card_token_zlt0ml6youq3q7vcdlg0")
.cardholderFirstName("Dee")
.cardholderLastName("Hock")
.cardholderMiddleName("Ward")
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 9a94f823a..c39086b24 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
@@ -27,6 +27,7 @@ internal class CheckTransferListPageResponseTest {
.build()
)
.approvedInboundCheckDepositId("inbound_check_deposit_zoshvqybq0cjjm31mra")
+ .balanceCheck(null)
.cancellation(
CheckTransfer.Cancellation.builder()
.canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
@@ -178,6 +179,7 @@ internal class CheckTransferListPageResponseTest {
.build()
)
.approvedInboundCheckDepositId("inbound_check_deposit_zoshvqybq0cjjm31mra")
+ .balanceCheck(null)
.cancellation(
CheckTransfer.Cancellation.builder()
.canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
@@ -329,6 +331,7 @@ internal class CheckTransferListPageResponseTest {
.build()
)
.approvedInboundCheckDepositId("inbound_check_deposit_zoshvqybq0cjjm31mra")
+ .balanceCheck(null)
.cancellation(
CheckTransfer.Cancellation.builder()
.canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
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 5fd54a67d..050942014 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
@@ -25,6 +25,7 @@ internal class CheckTransferTest {
.build()
)
.approvedInboundCheckDepositId("inbound_check_deposit_zoshvqybq0cjjm31mra")
+ .balanceCheck(null)
.cancellation(
CheckTransfer.Cancellation.builder()
.canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
@@ -163,6 +164,7 @@ internal class CheckTransferTest {
)
assertThat(checkTransfer.approvedInboundCheckDepositId())
.contains("inbound_check_deposit_zoshvqybq0cjjm31mra")
+ assertThat(checkTransfer.balanceCheck()).isEmpty
assertThat(checkTransfer.cancellation())
.contains(
CheckTransfer.Cancellation.builder()
@@ -306,6 +308,7 @@ internal class CheckTransferTest {
.build()
)
.approvedInboundCheckDepositId("inbound_check_deposit_zoshvqybq0cjjm31mra")
+ .balanceCheck(null)
.cancellation(
CheckTransfer.Cancellation.builder()
.canceledAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/exports/ExportCreateParamsTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/exports/ExportCreateParamsTest.kt
index 36cf386d3..5eabcccec 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/exports/ExportCreateParamsTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/exports/ExportCreateParamsTest.kt
@@ -3,6 +3,7 @@
package com.increase.api.models.exports
import com.increase.api.core.JsonValue
+import java.time.LocalDate
import java.time.OffsetDateTime
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
@@ -13,6 +14,12 @@ internal class ExportCreateParamsTest {
fun create() {
ExportCreateParams.builder()
.category(ExportCreateParams.Category.TRANSACTION_CSV)
+ .accountStatementBai2(
+ ExportCreateParams.AccountStatementBai2.builder()
+ .accountId("account_id")
+ .effectiveDate(LocalDate.parse("2019-12-27"))
+ .build()
+ )
.accountStatementOfx(
ExportCreateParams.AccountStatementOfx.builder()
.accountId("account_id")
@@ -85,6 +92,12 @@ internal class ExportCreateParamsTest {
val params =
ExportCreateParams.builder()
.category(ExportCreateParams.Category.TRANSACTION_CSV)
+ .accountStatementBai2(
+ ExportCreateParams.AccountStatementBai2.builder()
+ .accountId("account_id")
+ .effectiveDate(LocalDate.parse("2019-12-27"))
+ .build()
+ )
.accountStatementOfx(
ExportCreateParams.AccountStatementOfx.builder()
.accountId("account_id")
@@ -154,6 +167,13 @@ internal class ExportCreateParamsTest {
val body = params._body()
assertThat(body.category()).isEqualTo(ExportCreateParams.Category.TRANSACTION_CSV)
+ assertThat(body.accountStatementBai2())
+ .contains(
+ ExportCreateParams.AccountStatementBai2.builder()
+ .accountId("account_id")
+ .effectiveDate(LocalDate.parse("2019-12-27"))
+ .build()
+ )
assertThat(body.accountStatementOfx())
.contains(
ExportCreateParams.AccountStatementOfx.builder()
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListPageResponseTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListPageResponseTest.kt
index 3ff94cb7b..0f1859214 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListPageResponseTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentListPageResponseTest.kt
@@ -19,6 +19,7 @@ internal class IntrafiAccountEnrollmentListPageResponseTest {
.id("intrafi_account_enrollment_w8l97znzreopkwf2tg75")
.accountId("account_in71c4amph0vgo2qllky")
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
+ .emailAddress(null)
.idempotencyKey(null)
.intrafiId("01234abcd")
.status(IntrafiAccountEnrollment.Status.PENDING_ENROLLING)
@@ -34,6 +35,7 @@ internal class IntrafiAccountEnrollmentListPageResponseTest {
.id("intrafi_account_enrollment_w8l97znzreopkwf2tg75")
.accountId("account_in71c4amph0vgo2qllky")
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
+ .emailAddress(null)
.idempotencyKey(null)
.intrafiId("01234abcd")
.status(IntrafiAccountEnrollment.Status.PENDING_ENROLLING)
@@ -53,6 +55,7 @@ internal class IntrafiAccountEnrollmentListPageResponseTest {
.id("intrafi_account_enrollment_w8l97znzreopkwf2tg75")
.accountId("account_in71c4amph0vgo2qllky")
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
+ .emailAddress(null)
.idempotencyKey(null)
.intrafiId("01234abcd")
.status(IntrafiAccountEnrollment.Status.PENDING_ENROLLING)
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentTest.kt
index a0a04f365..cbf1fd446 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/models/intrafiaccountenrollments/IntrafiAccountEnrollmentTest.kt
@@ -17,6 +17,7 @@ internal class IntrafiAccountEnrollmentTest {
.id("intrafi_account_enrollment_w8l97znzreopkwf2tg75")
.accountId("account_in71c4amph0vgo2qllky")
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
+ .emailAddress(null)
.idempotencyKey(null)
.intrafiId("01234abcd")
.status(IntrafiAccountEnrollment.Status.PENDING_ENROLLING)
@@ -28,6 +29,7 @@ internal class IntrafiAccountEnrollmentTest {
assertThat(intrafiAccountEnrollment.accountId()).isEqualTo("account_in71c4amph0vgo2qllky")
assertThat(intrafiAccountEnrollment.createdAt())
.isEqualTo(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
+ assertThat(intrafiAccountEnrollment.emailAddress()).isEmpty
assertThat(intrafiAccountEnrollment.idempotencyKey()).isEmpty
assertThat(intrafiAccountEnrollment.intrafiId()).isEqualTo("01234abcd")
assertThat(intrafiAccountEnrollment.status())
@@ -44,6 +46,7 @@ internal class IntrafiAccountEnrollmentTest {
.id("intrafi_account_enrollment_w8l97znzreopkwf2tg75")
.accountId("account_in71c4amph0vgo2qllky")
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
+ .emailAddress(null)
.idempotencyKey(null)
.intrafiId("01234abcd")
.status(IntrafiAccountEnrollment.Status.PENDING_ENROLLING)
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/async/ExportServiceAsyncTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/async/ExportServiceAsyncTest.kt
index aa7fef4c6..3275f3c89 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/services/async/ExportServiceAsyncTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/services/async/ExportServiceAsyncTest.kt
@@ -6,6 +6,7 @@ import com.increase.api.TestServerExtension
import com.increase.api.client.okhttp.IncreaseOkHttpClientAsync
import com.increase.api.core.JsonValue
import com.increase.api.models.exports.ExportCreateParams
+import java.time.LocalDate
import java.time.OffsetDateTime
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
@@ -26,6 +27,12 @@ internal class ExportServiceAsyncTest {
exportServiceAsync.create(
ExportCreateParams.builder()
.category(ExportCreateParams.Category.TRANSACTION_CSV)
+ .accountStatementBai2(
+ ExportCreateParams.AccountStatementBai2.builder()
+ .accountId("account_id")
+ .effectiveDate(LocalDate.parse("2019-12-27"))
+ .build()
+ )
.accountStatementOfx(
ExportCreateParams.AccountStatementOfx.builder()
.accountId("account_id")
diff --git a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/ExportServiceTest.kt b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/ExportServiceTest.kt
index 5001bfa43..b60876bca 100644
--- a/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/ExportServiceTest.kt
+++ b/increase-java-core/src/test/kotlin/com/increase/api/services/blocking/ExportServiceTest.kt
@@ -6,6 +6,7 @@ import com.increase.api.TestServerExtension
import com.increase.api.client.okhttp.IncreaseOkHttpClient
import com.increase.api.core.JsonValue
import com.increase.api.models.exports.ExportCreateParams
+import java.time.LocalDate
import java.time.OffsetDateTime
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
@@ -26,6 +27,12 @@ internal class ExportServiceTest {
exportService.create(
ExportCreateParams.builder()
.category(ExportCreateParams.Category.TRANSACTION_CSV)
+ .accountStatementBai2(
+ ExportCreateParams.AccountStatementBai2.builder()
+ .accountId("account_id")
+ .effectiveDate(LocalDate.parse("2019-12-27"))
+ .build()
+ )
.accountStatementOfx(
ExportCreateParams.AccountStatementOfx.builder()
.accountId("account_id")