diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bd34dce09..3e05ae562 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.107.0" + ".": "0.108.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 890e2adb5..13cfc26b6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 170 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-1a0e3a42c88b88140af0f9ad05ab0026fc87f0a500d6879c86b93dfa7f923810.yml -openapi_spec_hash: 2b4db6185c6e4ab3626461a448c97d4b -config_hash: 7a6a0c0bab3306093c6c171cd7407a45 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-b1839661d8405911184d5cb7230f16e626a616e5b744634bd7f0bb4e730bf899.yml +openapi_spec_hash: c1c2c5a5c2a4067a714b35f873e3846f +config_hash: 98214f2eab6804b5c0048331e32c08e3 diff --git a/CHANGELOG.md b/CHANGELOG.md index a70ccacb5..332f39e8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.108.0 (2025-10-08) + +Full Changelog: [v0.107.0...v0.108.0](https://github.com/lithic-com/lithic-java/compare/v0.107.0...v0.108.0) + +### Features + +* **api:** adds support for Auto-Collections ([bb9d1ec](https://github.com/lithic-com/lithic-java/commit/bb9d1ec1dd0d6af1a14d60c13504722d7f4d49fe)) + ## 0.107.0 (2025-09-30) Full Changelog: [v0.106.0...v0.107.0](https://github.com/lithic-com/lithic-java/compare/v0.106.0...v0.107.0) diff --git a/README.md b/README.md index 368dce0a3..968f5f15f 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.lithic.api/lithic-java)](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.107.0) -[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.107.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.107.0) +[![Maven Central](https://img.shields.io/maven-central/v/com.lithic.api/lithic-java)](https://central.sonatype.com/artifact/com.lithic.api/lithic-java/0.108.0) +[![javadoc](https://javadoc.io/badge2/com.lithic.api/lithic-java/0.108.0/javadoc.svg)](https://javadoc.io/doc/com.lithic.api/lithic-java/0.108.0) @@ -13,7 +13,7 @@ The Lithic Java SDK is similar to the Lithic Kotlin SDK but with minor differenc -The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-java/0.107.0). +The REST API documentation can be found on [docs.lithic.com](https://docs.lithic.com). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.lithic.api/lithic-java/0.108.0). @@ -24,7 +24,7 @@ The REST API documentation can be found on [docs.lithic.com](https://docs.lithic ### Gradle ```kotlin -implementation("com.lithic.api:lithic-java:0.107.0") +implementation("com.lithic.api:lithic-java:0.108.0") ``` ### Maven @@ -33,7 +33,7 @@ implementation("com.lithic.api:lithic-java:0.107.0") com.lithic.api lithic-java - 0.107.0 + 0.108.0 ``` diff --git a/build.gradle.kts b/build.gradle.kts index af84497a9..49e10140c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.lithic.api" - version = "0.107.0" // x-release-please-version + version = "0.108.0" // x-release-please-version } subprojects { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListParams.kt index 821c4fe1d..94d194022 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListParams.kt @@ -390,6 +390,16 @@ private constructor( @JvmField val BALANCE_OR_FUNDING = of("BALANCE_OR_FUNDING") + @JvmField val FEE = of("FEE") + + @JvmField val REWARD = of("REWARD") + + @JvmField val ADJUSTMENT = of("ADJUSTMENT") + + @JvmField val DERECOGNITION = of("DERECOGNITION") + + @JvmField val DISPUTE = of("DISPUTE") + @JvmField val CARD = of("CARD") @JvmField val EXTERNAL_ACH = of("EXTERNAL_ACH") @@ -419,6 +429,11 @@ private constructor( enum class Known { ACH, BALANCE_OR_FUNDING, + FEE, + REWARD, + ADJUSTMENT, + DERECOGNITION, + DISPUTE, CARD, EXTERNAL_ACH, EXTERNAL_CHECK, @@ -444,6 +459,11 @@ private constructor( enum class Value { ACH, BALANCE_OR_FUNDING, + FEE, + REWARD, + ADJUSTMENT, + DERECOGNITION, + DISPUTE, CARD, EXTERNAL_ACH, EXTERNAL_CHECK, @@ -473,6 +493,11 @@ private constructor( when (this) { ACH -> Value.ACH BALANCE_OR_FUNDING -> Value.BALANCE_OR_FUNDING + FEE -> Value.FEE + REWARD -> Value.REWARD + ADJUSTMENT -> Value.ADJUSTMENT + DERECOGNITION -> Value.DERECOGNITION + DISPUTE -> Value.DISPUTE CARD -> Value.CARD EXTERNAL_ACH -> Value.EXTERNAL_ACH EXTERNAL_CHECK -> Value.EXTERNAL_CHECK @@ -500,6 +525,11 @@ private constructor( when (this) { ACH -> Known.ACH BALANCE_OR_FUNDING -> Known.BALANCE_OR_FUNDING + FEE -> Known.FEE + REWARD -> Known.REWARD + ADJUSTMENT -> Known.ADJUSTMENT + DERECOGNITION -> Known.DERECOGNITION + DISPUTE -> Known.DISPUTE CARD -> Known.CARD EXTERNAL_ACH -> Known.EXTERNAL_ACH EXTERNAL_CHECK -> Known.EXTERNAL_CHECK diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListResponse.kt index df0e85ddd..62ad82e20 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityListResponse.kt @@ -1058,6 +1058,16 @@ private constructor( @JvmField val BALANCE_OR_FUNDING = of("BALANCE_OR_FUNDING") + @JvmField val FEE = of("FEE") + + @JvmField val REWARD = of("REWARD") + + @JvmField val ADJUSTMENT = of("ADJUSTMENT") + + @JvmField val DERECOGNITION = of("DERECOGNITION") + + @JvmField val DISPUTE = of("DISPUTE") + @JvmField val CARD = of("CARD") @JvmField val EXTERNAL_ACH = of("EXTERNAL_ACH") @@ -1087,6 +1097,11 @@ private constructor( enum class Known { ACH, BALANCE_OR_FUNDING, + FEE, + REWARD, + ADJUSTMENT, + DERECOGNITION, + DISPUTE, CARD, EXTERNAL_ACH, EXTERNAL_CHECK, @@ -1114,6 +1129,11 @@ private constructor( enum class Value { ACH, BALANCE_OR_FUNDING, + FEE, + REWARD, + ADJUSTMENT, + DERECOGNITION, + DISPUTE, CARD, EXTERNAL_ACH, EXTERNAL_CHECK, @@ -1143,6 +1163,11 @@ private constructor( when (this) { ACH -> Value.ACH BALANCE_OR_FUNDING -> Value.BALANCE_OR_FUNDING + FEE -> Value.FEE + REWARD -> Value.REWARD + ADJUSTMENT -> Value.ADJUSTMENT + DERECOGNITION -> Value.DERECOGNITION + DISPUTE -> Value.DISPUTE CARD -> Value.CARD EXTERNAL_ACH -> Value.EXTERNAL_ACH EXTERNAL_CHECK -> Value.EXTERNAL_CHECK @@ -1170,6 +1195,11 @@ private constructor( when (this) { ACH -> Known.ACH BALANCE_OR_FUNDING -> Known.BALANCE_OR_FUNDING + FEE -> Known.FEE + REWARD -> Known.REWARD + ADJUSTMENT -> Known.ADJUSTMENT + DERECOGNITION -> Known.DERECOGNITION + DISPUTE -> Known.DISPUTE CARD -> Known.CARD EXTERNAL_ACH -> Known.EXTERNAL_ACH EXTERNAL_CHECK -> Known.EXTERNAL_CHECK @@ -1679,6 +1709,8 @@ private constructor( @JvmField val ACH_ORIGINATION_RELEASED = of("ACH_ORIGINATION_RELEASED") + @JvmField val ACH_ORIGINATION_REJECTED = of("ACH_ORIGINATION_REJECTED") + @JvmField val ACH_ORIGINATION_REVIEWED = of("ACH_ORIGINATION_REVIEWED") @JvmField val ACH_ORIGINATION_SETTLED = of("ACH_ORIGINATION_SETTLED") @@ -1691,6 +1723,8 @@ private constructor( @JvmField val ACH_RETURN_PROCESSED = of("ACH_RETURN_PROCESSED") + @JvmField val ACH_RETURN_REJECTED = of("ACH_RETURN_REJECTED") + @JvmField val ACH_RETURN_SETTLED = of("ACH_RETURN_SETTLED") @JvmField val AUTHORIZATION = of("AUTHORIZATION") @@ -1817,12 +1851,14 @@ private constructor( ACH_ORIGINATION_INITIATED, ACH_ORIGINATION_PROCESSED, ACH_ORIGINATION_RELEASED, + ACH_ORIGINATION_REJECTED, ACH_ORIGINATION_REVIEWED, ACH_ORIGINATION_SETTLED, ACH_RECEIPT_PROCESSED, ACH_RECEIPT_SETTLED, ACH_RETURN_INITIATED, ACH_RETURN_PROCESSED, + ACH_RETURN_REJECTED, ACH_RETURN_SETTLED, AUTHORIZATION, AUTHORIZATION_ADVICE, @@ -1899,12 +1935,14 @@ private constructor( ACH_ORIGINATION_INITIATED, ACH_ORIGINATION_PROCESSED, ACH_ORIGINATION_RELEASED, + ACH_ORIGINATION_REJECTED, ACH_ORIGINATION_REVIEWED, ACH_ORIGINATION_SETTLED, ACH_RECEIPT_PROCESSED, ACH_RECEIPT_SETTLED, ACH_RETURN_INITIATED, ACH_RETURN_PROCESSED, + ACH_RETURN_REJECTED, ACH_RETURN_SETTLED, AUTHORIZATION, AUTHORIZATION_ADVICE, @@ -1983,12 +2021,14 @@ private constructor( ACH_ORIGINATION_INITIATED -> Value.ACH_ORIGINATION_INITIATED ACH_ORIGINATION_PROCESSED -> Value.ACH_ORIGINATION_PROCESSED ACH_ORIGINATION_RELEASED -> Value.ACH_ORIGINATION_RELEASED + ACH_ORIGINATION_REJECTED -> Value.ACH_ORIGINATION_REJECTED ACH_ORIGINATION_REVIEWED -> Value.ACH_ORIGINATION_REVIEWED ACH_ORIGINATION_SETTLED -> Value.ACH_ORIGINATION_SETTLED ACH_RECEIPT_PROCESSED -> Value.ACH_RECEIPT_PROCESSED ACH_RECEIPT_SETTLED -> Value.ACH_RECEIPT_SETTLED ACH_RETURN_INITIATED -> Value.ACH_RETURN_INITIATED ACH_RETURN_PROCESSED -> Value.ACH_RETURN_PROCESSED + ACH_RETURN_REJECTED -> Value.ACH_RETURN_REJECTED ACH_RETURN_SETTLED -> Value.ACH_RETURN_SETTLED AUTHORIZATION -> Value.AUTHORIZATION AUTHORIZATION_ADVICE -> Value.AUTHORIZATION_ADVICE @@ -2065,12 +2105,14 @@ private constructor( ACH_ORIGINATION_INITIATED -> Known.ACH_ORIGINATION_INITIATED ACH_ORIGINATION_PROCESSED -> Known.ACH_ORIGINATION_PROCESSED ACH_ORIGINATION_RELEASED -> Known.ACH_ORIGINATION_RELEASED + ACH_ORIGINATION_REJECTED -> Known.ACH_ORIGINATION_REJECTED ACH_ORIGINATION_REVIEWED -> Known.ACH_ORIGINATION_REVIEWED ACH_ORIGINATION_SETTLED -> Known.ACH_ORIGINATION_SETTLED ACH_RECEIPT_PROCESSED -> Known.ACH_RECEIPT_PROCESSED ACH_RECEIPT_SETTLED -> Known.ACH_RECEIPT_SETTLED ACH_RETURN_INITIATED -> Known.ACH_RETURN_INITIATED ACH_RETURN_PROCESSED -> Known.ACH_RETURN_PROCESSED + ACH_RETURN_REJECTED -> Known.ACH_RETURN_REJECTED ACH_RETURN_SETTLED -> Known.ACH_RETURN_SETTLED AUTHORIZATION -> Known.AUTHORIZATION AUTHORIZATION_ADVICE -> Known.AUTHORIZATION_ADVICE @@ -2708,7 +2750,7 @@ private constructor( @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( private val token: JsonField, - private val category: JsonField, + private val category: JsonField, private val created: JsonField, private val currency: JsonField, private val events: JsonField>, @@ -2731,7 +2773,7 @@ private constructor( @JsonProperty("token") @ExcludeMissing token: JsonField = JsonMissing.of(), @JsonProperty("category") @ExcludeMissing - category: JsonField = JsonMissing.of(), + category: JsonField = JsonMissing.of(), @JsonProperty("created") @ExcludeMissing created: JsonField = JsonMissing.of(), @@ -2806,7 +2848,7 @@ private constructor( * @throws LithicInvalidDataException 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 category(): TransactionCategory = category.getRequired("category") + fun category(): BookTransferCategory = category.getRequired("category") /** * ISO 8601 timestamp of when the transaction was created @@ -2932,7 +2974,7 @@ private constructor( */ @JsonProperty("category") @ExcludeMissing - fun _category(): JsonField = category + fun _category(): JsonField = category /** * Returns the raw JSON value of [created]. @@ -3097,7 +3139,7 @@ private constructor( class Builder internal constructor() { private var token: JsonField? = null - private var category: JsonField? = null + private var category: JsonField? = null private var created: JsonField? = null private var currency: JsonField? = null private var events: JsonField>? = null @@ -3147,16 +3189,16 @@ private constructor( */ fun token(token: JsonField) = apply { this.token = token } - fun category(category: TransactionCategory) = category(JsonField.of(category)) + fun category(category: BookTransferCategory) = category(JsonField.of(category)) /** * Sets [Builder.category] to an arbitrary JSON value. * - * You should usually call [Builder.category] with a well-typed [TransactionCategory] + * You should usually call [Builder.category] with a well-typed [BookTransferCategory] * value instead. This method is primarily for setting the field to an undocumented or * not yet supported value. */ - fun category(category: JsonField) = apply { + fun category(category: JsonField) = apply { this.category = category } @@ -3491,7 +3533,7 @@ private constructor( (externalResource.asKnown().getOrNull()?.validity() ?: 0) + (transactionSeries.asKnown().getOrNull()?.validity() ?: 0) - class TransactionCategory + class BookTransferCategory @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -3507,57 +3549,45 @@ private constructor( companion object { - @JvmField val ACH = of("ACH") + @JvmField val ADJUSTMENT = of("ADJUSTMENT") @JvmField val BALANCE_OR_FUNDING = of("BALANCE_OR_FUNDING") - @JvmField val CARD = of("CARD") - - @JvmField val EXTERNAL_ACH = of("EXTERNAL_ACH") - - @JvmField val EXTERNAL_CHECK = of("EXTERNAL_CHECK") - - @JvmField val EXTERNAL_TRANSFER = of("EXTERNAL_TRANSFER") - - @JvmField val EXTERNAL_WIRE = of("EXTERNAL_WIRE") - - @JvmField val MANAGEMENT_ADJUSTMENT = of("MANAGEMENT_ADJUSTMENT") + @JvmField val DERECOGNITION = of("DERECOGNITION") - @JvmField val MANAGEMENT_DISPUTE = of("MANAGEMENT_DISPUTE") + @JvmField val DISPUTE = of("DISPUTE") - @JvmField val MANAGEMENT_FEE = of("MANAGEMENT_FEE") + @JvmField val FEE = of("FEE") - @JvmField val MANAGEMENT_REWARD = of("MANAGEMENT_REWARD") + @JvmField val INTERNAL = of("INTERNAL") - @JvmField val MANAGEMENT_DISBURSEMENT = of("MANAGEMENT_DISBURSEMENT") + @JvmField val REWARD = of("REWARD") @JvmField val PROGRAM_FUNDING = of("PROGRAM_FUNDING") - @JvmStatic fun of(value: String) = TransactionCategory(JsonField.of(value)) + @JvmField val TRANSFER = of("TRANSFER") + + @JvmStatic fun of(value: String) = BookTransferCategory(JsonField.of(value)) } - /** An enum containing [TransactionCategory]'s known values. */ + /** An enum containing [BookTransferCategory]'s known values. */ enum class Known { - ACH, + ADJUSTMENT, BALANCE_OR_FUNDING, - CARD, - EXTERNAL_ACH, - EXTERNAL_CHECK, - EXTERNAL_TRANSFER, - EXTERNAL_WIRE, - MANAGEMENT_ADJUSTMENT, - MANAGEMENT_DISPUTE, - MANAGEMENT_FEE, - MANAGEMENT_REWARD, - MANAGEMENT_DISBURSEMENT, + DERECOGNITION, + DISPUTE, + FEE, + INTERNAL, + REWARD, PROGRAM_FUNDING, + TRANSFER, } /** - * An enum containing [TransactionCategory]'s known values, as well as an [_UNKNOWN] + * An enum containing [BookTransferCategory]'s known values, as well as an [_UNKNOWN] * member. * - * An instance of [TransactionCategory] can contain an unknown value in a couple of + * An instance of [BookTransferCategory] 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 @@ -3565,21 +3595,17 @@ private constructor( * - It was constructed with an arbitrary value using the [of] method. */ enum class Value { - ACH, + ADJUSTMENT, BALANCE_OR_FUNDING, - CARD, - EXTERNAL_ACH, - EXTERNAL_CHECK, - EXTERNAL_TRANSFER, - EXTERNAL_WIRE, - MANAGEMENT_ADJUSTMENT, - MANAGEMENT_DISPUTE, - MANAGEMENT_FEE, - MANAGEMENT_REWARD, - MANAGEMENT_DISBURSEMENT, + DERECOGNITION, + DISPUTE, + FEE, + INTERNAL, + REWARD, PROGRAM_FUNDING, + TRANSFER, /** - * An enum member indicating that [TransactionCategory] was instantiated with an + * An enum member indicating that [BookTransferCategory] was instantiated with an * unknown value. */ _UNKNOWN, @@ -3594,19 +3620,15 @@ private constructor( */ fun value(): Value = when (this) { - ACH -> Value.ACH + ADJUSTMENT -> Value.ADJUSTMENT BALANCE_OR_FUNDING -> Value.BALANCE_OR_FUNDING - CARD -> Value.CARD - EXTERNAL_ACH -> Value.EXTERNAL_ACH - EXTERNAL_CHECK -> Value.EXTERNAL_CHECK - EXTERNAL_TRANSFER -> Value.EXTERNAL_TRANSFER - EXTERNAL_WIRE -> Value.EXTERNAL_WIRE - MANAGEMENT_ADJUSTMENT -> Value.MANAGEMENT_ADJUSTMENT - MANAGEMENT_DISPUTE -> Value.MANAGEMENT_DISPUTE - MANAGEMENT_FEE -> Value.MANAGEMENT_FEE - MANAGEMENT_REWARD -> Value.MANAGEMENT_REWARD - MANAGEMENT_DISBURSEMENT -> Value.MANAGEMENT_DISBURSEMENT + DERECOGNITION -> Value.DERECOGNITION + DISPUTE -> Value.DISPUTE + FEE -> Value.FEE + INTERNAL -> Value.INTERNAL + REWARD -> Value.REWARD PROGRAM_FUNDING -> Value.PROGRAM_FUNDING + TRANSFER -> Value.TRANSFER else -> Value._UNKNOWN } @@ -3621,20 +3643,16 @@ private constructor( */ fun known(): Known = when (this) { - ACH -> Known.ACH + ADJUSTMENT -> Known.ADJUSTMENT BALANCE_OR_FUNDING -> Known.BALANCE_OR_FUNDING - CARD -> Known.CARD - EXTERNAL_ACH -> Known.EXTERNAL_ACH - EXTERNAL_CHECK -> Known.EXTERNAL_CHECK - EXTERNAL_TRANSFER -> Known.EXTERNAL_TRANSFER - EXTERNAL_WIRE -> Known.EXTERNAL_WIRE - MANAGEMENT_ADJUSTMENT -> Known.MANAGEMENT_ADJUSTMENT - MANAGEMENT_DISPUTE -> Known.MANAGEMENT_DISPUTE - MANAGEMENT_FEE -> Known.MANAGEMENT_FEE - MANAGEMENT_REWARD -> Known.MANAGEMENT_REWARD - MANAGEMENT_DISBURSEMENT -> Known.MANAGEMENT_DISBURSEMENT + DERECOGNITION -> Known.DERECOGNITION + DISPUTE -> Known.DISPUTE + FEE -> Known.FEE + INTERNAL -> Known.INTERNAL + REWARD -> Known.REWARD PROGRAM_FUNDING -> Known.PROGRAM_FUNDING - else -> throw LithicInvalidDataException("Unknown TransactionCategory: $value") + TRANSFER -> Known.TRANSFER + else -> throw LithicInvalidDataException("Unknown BookTransferCategory: $value") } /** @@ -3653,7 +3671,7 @@ private constructor( private var validated: Boolean = false - fun validate(): TransactionCategory = apply { + fun validate(): BookTransferCategory = apply { if (validated) { return@apply } @@ -3683,7 +3701,7 @@ private constructor( return true } - return other is TransactionCategory && value == other.value + return other is BookTransferCategory && value == other.value } override fun hashCode() = value.hashCode() @@ -4423,6 +4441,8 @@ private constructor( companion object { + @JvmField val ATM_BALANCE_INQUIRY = of("ATM_BALANCE_INQUIRY") + @JvmField val ATM_WITHDRAWAL = of("ATM_WITHDRAWAL") @JvmField val ATM_DECLINE = of("ATM_DECLINE") @@ -4496,6 +4516,7 @@ private constructor( /** An enum containing [BookTransferType]'s known values. */ enum class Known { + ATM_BALANCE_INQUIRY, ATM_WITHDRAWAL, ATM_DECLINE, INTERNATIONAL_ATM_WITHDRAWAL, @@ -4544,6 +4565,7 @@ private constructor( * - It was constructed with an arbitrary value using the [of] method. */ enum class Value { + ATM_BALANCE_INQUIRY, ATM_WITHDRAWAL, ATM_DECLINE, INTERNATIONAL_ATM_WITHDRAWAL, @@ -4594,6 +4616,7 @@ private constructor( */ fun value(): Value = when (this) { + ATM_BALANCE_INQUIRY -> Value.ATM_BALANCE_INQUIRY ATM_WITHDRAWAL -> Value.ATM_WITHDRAWAL ATM_DECLINE -> Value.ATM_DECLINE INTERNATIONAL_ATM_WITHDRAWAL -> Value.INTERNATIONAL_ATM_WITHDRAWAL @@ -4642,6 +4665,7 @@ private constructor( */ fun known(): Known = when (this) { + ATM_BALANCE_INQUIRY -> Known.ATM_BALANCE_INQUIRY ATM_WITHDRAWAL -> Known.ATM_WITHDRAWAL ATM_DECLINE -> Known.ATM_DECLINE INTERNATIONAL_ATM_WITHDRAWAL -> Known.INTERNATIONAL_ATM_WITHDRAWAL @@ -5553,6 +5577,7 @@ private constructor( private val cardToken: JsonField, private val cardholderAuthentication: JsonField, private val created: JsonField, + private val financialAccountToken: JsonField, private val merchant: JsonField, private val merchantAmount: JsonField, private val merchantAuthorizationAmount: JsonField, @@ -5603,6 +5628,9 @@ private constructor( @JsonProperty("created") @ExcludeMissing created: JsonField = JsonMissing.of(), + @JsonProperty("financial_account_token") + @ExcludeMissing + financialAccountToken: JsonField = JsonMissing.of(), @JsonProperty("merchant") @ExcludeMissing merchant: JsonField = JsonMissing.of(), @@ -5656,6 +5684,7 @@ private constructor( cardToken, cardholderAuthentication, created, + financialAccountToken, merchant, merchantAmount, merchantAuthorizationAmount, @@ -5687,6 +5716,7 @@ private constructor( .cardToken(cardToken) .cardholderAuthentication(cardholderAuthentication) .created(created) + .financialAccountToken(financialAccountToken) .merchant(merchant) .merchantAmount(merchantAmount) .merchantAuthorizationAmount(merchantAuthorizationAmount) @@ -5805,6 +5835,13 @@ private constructor( */ fun created(): OffsetDateTime = created.getRequired("created") + /** + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun financialAccountToken(): Optional = + financialAccountToken.getOptional("financial_account_token") + /** * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -6023,6 +6060,16 @@ private constructor( */ @JsonProperty("created") @ExcludeMissing fun _created(): JsonField = created + /** + * Returns the raw JSON value of [financialAccountToken]. + * + * Unlike [financialAccountToken], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun _financialAccountToken(): JsonField = financialAccountToken + /** * Returns the raw JSON value of [merchant]. * @@ -6185,6 +6232,7 @@ private constructor( * .cardToken() * .cardholderAuthentication() * .created() + * .financialAccountToken() * .merchant() * .merchantAmount() * .merchantAuthorizationAmount() @@ -6219,6 +6267,7 @@ private constructor( private var cardholderAuthentication: JsonField? = null private var created: JsonField? = null + private var financialAccountToken: JsonField? = null private var merchant: JsonField? = null private var merchantAmount: JsonField? = null private var merchantAuthorizationAmount: JsonField? = null @@ -6249,6 +6298,7 @@ private constructor( cardToken = cardTransaction.cardToken cardholderAuthentication = cardTransaction.cardholderAuthentication created = cardTransaction.created + financialAccountToken = cardTransaction.financialAccountToken merchant = cardTransaction.merchant merchantAmount = cardTransaction.merchantAmount merchantAuthorizationAmount = cardTransaction.merchantAuthorizationAmount @@ -6498,6 +6548,27 @@ private constructor( */ fun created(created: JsonField) = apply { this.created = created } + fun financialAccountToken(financialAccountToken: String?) = + financialAccountToken(JsonField.ofNullable(financialAccountToken)) + + /** + * Alias for calling [Builder.financialAccountToken] with + * `financialAccountToken.orElse(null)`. + */ + fun financialAccountToken(financialAccountToken: Optional) = + financialAccountToken(financialAccountToken.getOrNull()) + + /** + * Sets [Builder.financialAccountToken] to an arbitrary JSON value. + * + * You should usually call [Builder.financialAccountToken] with a well-typed [String] + * value instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun financialAccountToken(financialAccountToken: JsonField) = apply { + this.financialAccountToken = financialAccountToken + } + fun merchant(merchant: Transaction.Merchant) = merchant(JsonField.of(merchant)) /** @@ -6800,6 +6871,7 @@ private constructor( * .cardToken() * .cardholderAuthentication() * .created() + * .financialAccountToken() * .merchant() * .merchantAmount() * .merchantAuthorizationAmount() @@ -6831,6 +6903,7 @@ private constructor( checkRequired("cardToken", cardToken), checkRequired("cardholderAuthentication", cardholderAuthentication), checkRequired("created", created), + checkRequired("financialAccountToken", financialAccountToken), checkRequired("merchant", merchant), checkRequired("merchantAmount", merchantAmount), checkRequired("merchantAuthorizationAmount", merchantAuthorizationAmount), @@ -6868,6 +6941,7 @@ private constructor( cardToken() cardholderAuthentication().ifPresent { it.validate() } created() + financialAccountToken() merchant().validate() merchantAmount() merchantAuthorizationAmount() @@ -6913,6 +6987,7 @@ private constructor( (if (cardToken.asKnown().isPresent) 1 else 0) + (cardholderAuthentication.asKnown().getOrNull()?.validity() ?: 0) + (if (created.asKnown().isPresent) 1 else 0) + + (if (financialAccountToken.asKnown().isPresent) 1 else 0) + (merchant.asKnown().getOrNull()?.validity() ?: 0) + (if (merchantAmount.asKnown().isPresent) 1 else 0) + (if (merchantAuthorizationAmount.asKnown().isPresent) 1 else 0) + @@ -7257,6 +7332,7 @@ private constructor( cardToken == other.cardToken && cardholderAuthentication == other.cardholderAuthentication && created == other.created && + financialAccountToken == other.financialAccountToken && merchant == other.merchant && merchantAmount == other.merchantAmount && merchantAuthorizationAmount == other.merchantAuthorizationAmount && @@ -7288,6 +7364,7 @@ private constructor( cardToken, cardholderAuthentication, created, + financialAccountToken, merchant, merchantAmount, merchantAuthorizationAmount, @@ -7309,7 +7386,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "CardTransaction{token=$token, accountToken=$accountToken, acquirerFee=$acquirerFee, acquirerReferenceNumber=$acquirerReferenceNumber, amount=$amount, amounts=$amounts, authorizationAmount=$authorizationAmount, authorizationCode=$authorizationCode, avs=$avs, cardToken=$cardToken, cardholderAuthentication=$cardholderAuthentication, created=$created, merchant=$merchant, merchantAmount=$merchantAmount, merchantAuthorizationAmount=$merchantAuthorizationAmount, merchantCurrency=$merchantCurrency, network=$network, networkRiskScore=$networkRiskScore, pos=$pos, result=$result, settledAmount=$settledAmount, status=$status, tokenInfo=$tokenInfo, updated=$updated, events=$events, family=$family, additionalProperties=$additionalProperties}" + "CardTransaction{token=$token, accountToken=$accountToken, acquirerFee=$acquirerFee, acquirerReferenceNumber=$acquirerReferenceNumber, amount=$amount, amounts=$amounts, authorizationAmount=$authorizationAmount, authorizationCode=$authorizationCode, avs=$avs, cardToken=$cardToken, cardholderAuthentication=$cardholderAuthentication, created=$created, financialAccountToken=$financialAccountToken, merchant=$merchant, merchantAmount=$merchantAmount, merchantAuthorizationAmount=$merchantAuthorizationAmount, merchantCurrency=$merchantCurrency, network=$network, networkRiskScore=$networkRiskScore, pos=$pos, result=$result, settledAmount=$settledAmount, status=$status, tokenInfo=$tokenInfo, updated=$updated, events=$events, family=$family, additionalProperties=$additionalProperties}" } /** Payment transaction */ @@ -8380,6 +8457,16 @@ private constructor( @JvmField val BALANCE_OR_FUNDING = of("BALANCE_OR_FUNDING") + @JvmField val FEE = of("FEE") + + @JvmField val REWARD = of("REWARD") + + @JvmField val ADJUSTMENT = of("ADJUSTMENT") + + @JvmField val DERECOGNITION = of("DERECOGNITION") + + @JvmField val DISPUTE = of("DISPUTE") + @JvmField val CARD = of("CARD") @JvmField val EXTERNAL_ACH = of("EXTERNAL_ACH") @@ -8409,6 +8496,11 @@ private constructor( enum class Known { ACH, BALANCE_OR_FUNDING, + FEE, + REWARD, + ADJUSTMENT, + DERECOGNITION, + DISPUTE, CARD, EXTERNAL_ACH, EXTERNAL_CHECK, @@ -8436,6 +8528,11 @@ private constructor( enum class Value { ACH, BALANCE_OR_FUNDING, + FEE, + REWARD, + ADJUSTMENT, + DERECOGNITION, + DISPUTE, CARD, EXTERNAL_ACH, EXTERNAL_CHECK, @@ -8465,6 +8562,11 @@ private constructor( when (this) { ACH -> Value.ACH BALANCE_OR_FUNDING -> Value.BALANCE_OR_FUNDING + FEE -> Value.FEE + REWARD -> Value.REWARD + ADJUSTMENT -> Value.ADJUSTMENT + DERECOGNITION -> Value.DERECOGNITION + DISPUTE -> Value.DISPUTE CARD -> Value.CARD EXTERNAL_ACH -> Value.EXTERNAL_ACH EXTERNAL_CHECK -> Value.EXTERNAL_CHECK @@ -8492,6 +8594,11 @@ private constructor( when (this) { ACH -> Known.ACH BALANCE_OR_FUNDING -> Known.BALANCE_OR_FUNDING + FEE -> Known.FEE + REWARD -> Known.REWARD + ADJUSTMENT -> Known.ADJUSTMENT + DERECOGNITION -> Known.DERECOGNITION + DISPUTE -> Known.DISPUTE CARD -> Known.CARD EXTERNAL_ACH -> Known.EXTERNAL_ACH EXTERNAL_CHECK -> Known.EXTERNAL_CHECK diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponse.kt index cd452c7b5..2ea504d60 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponse.kt @@ -1088,6 +1088,16 @@ private constructor( @JvmField val BALANCE_OR_FUNDING = of("BALANCE_OR_FUNDING") + @JvmField val FEE = of("FEE") + + @JvmField val REWARD = of("REWARD") + + @JvmField val ADJUSTMENT = of("ADJUSTMENT") + + @JvmField val DERECOGNITION = of("DERECOGNITION") + + @JvmField val DISPUTE = of("DISPUTE") + @JvmField val CARD = of("CARD") @JvmField val EXTERNAL_ACH = of("EXTERNAL_ACH") @@ -1117,6 +1127,11 @@ private constructor( enum class Known { ACH, BALANCE_OR_FUNDING, + FEE, + REWARD, + ADJUSTMENT, + DERECOGNITION, + DISPUTE, CARD, EXTERNAL_ACH, EXTERNAL_CHECK, @@ -1144,6 +1159,11 @@ private constructor( enum class Value { ACH, BALANCE_OR_FUNDING, + FEE, + REWARD, + ADJUSTMENT, + DERECOGNITION, + DISPUTE, CARD, EXTERNAL_ACH, EXTERNAL_CHECK, @@ -1173,6 +1193,11 @@ private constructor( when (this) { ACH -> Value.ACH BALANCE_OR_FUNDING -> Value.BALANCE_OR_FUNDING + FEE -> Value.FEE + REWARD -> Value.REWARD + ADJUSTMENT -> Value.ADJUSTMENT + DERECOGNITION -> Value.DERECOGNITION + DISPUTE -> Value.DISPUTE CARD -> Value.CARD EXTERNAL_ACH -> Value.EXTERNAL_ACH EXTERNAL_CHECK -> Value.EXTERNAL_CHECK @@ -1200,6 +1225,11 @@ private constructor( when (this) { ACH -> Known.ACH BALANCE_OR_FUNDING -> Known.BALANCE_OR_FUNDING + FEE -> Known.FEE + REWARD -> Known.REWARD + ADJUSTMENT -> Known.ADJUSTMENT + DERECOGNITION -> Known.DERECOGNITION + DISPUTE -> Known.DISPUTE CARD -> Known.CARD EXTERNAL_ACH -> Known.EXTERNAL_ACH EXTERNAL_CHECK -> Known.EXTERNAL_CHECK @@ -1709,6 +1739,8 @@ private constructor( @JvmField val ACH_ORIGINATION_RELEASED = of("ACH_ORIGINATION_RELEASED") + @JvmField val ACH_ORIGINATION_REJECTED = of("ACH_ORIGINATION_REJECTED") + @JvmField val ACH_ORIGINATION_REVIEWED = of("ACH_ORIGINATION_REVIEWED") @JvmField val ACH_ORIGINATION_SETTLED = of("ACH_ORIGINATION_SETTLED") @@ -1721,6 +1753,8 @@ private constructor( @JvmField val ACH_RETURN_PROCESSED = of("ACH_RETURN_PROCESSED") + @JvmField val ACH_RETURN_REJECTED = of("ACH_RETURN_REJECTED") + @JvmField val ACH_RETURN_SETTLED = of("ACH_RETURN_SETTLED") @JvmField val AUTHORIZATION = of("AUTHORIZATION") @@ -1847,12 +1881,14 @@ private constructor( ACH_ORIGINATION_INITIATED, ACH_ORIGINATION_PROCESSED, ACH_ORIGINATION_RELEASED, + ACH_ORIGINATION_REJECTED, ACH_ORIGINATION_REVIEWED, ACH_ORIGINATION_SETTLED, ACH_RECEIPT_PROCESSED, ACH_RECEIPT_SETTLED, ACH_RETURN_INITIATED, ACH_RETURN_PROCESSED, + ACH_RETURN_REJECTED, ACH_RETURN_SETTLED, AUTHORIZATION, AUTHORIZATION_ADVICE, @@ -1929,12 +1965,14 @@ private constructor( ACH_ORIGINATION_INITIATED, ACH_ORIGINATION_PROCESSED, ACH_ORIGINATION_RELEASED, + ACH_ORIGINATION_REJECTED, ACH_ORIGINATION_REVIEWED, ACH_ORIGINATION_SETTLED, ACH_RECEIPT_PROCESSED, ACH_RECEIPT_SETTLED, ACH_RETURN_INITIATED, ACH_RETURN_PROCESSED, + ACH_RETURN_REJECTED, ACH_RETURN_SETTLED, AUTHORIZATION, AUTHORIZATION_ADVICE, @@ -2013,12 +2051,14 @@ private constructor( ACH_ORIGINATION_INITIATED -> Value.ACH_ORIGINATION_INITIATED ACH_ORIGINATION_PROCESSED -> Value.ACH_ORIGINATION_PROCESSED ACH_ORIGINATION_RELEASED -> Value.ACH_ORIGINATION_RELEASED + ACH_ORIGINATION_REJECTED -> Value.ACH_ORIGINATION_REJECTED ACH_ORIGINATION_REVIEWED -> Value.ACH_ORIGINATION_REVIEWED ACH_ORIGINATION_SETTLED -> Value.ACH_ORIGINATION_SETTLED ACH_RECEIPT_PROCESSED -> Value.ACH_RECEIPT_PROCESSED ACH_RECEIPT_SETTLED -> Value.ACH_RECEIPT_SETTLED ACH_RETURN_INITIATED -> Value.ACH_RETURN_INITIATED ACH_RETURN_PROCESSED -> Value.ACH_RETURN_PROCESSED + ACH_RETURN_REJECTED -> Value.ACH_RETURN_REJECTED ACH_RETURN_SETTLED -> Value.ACH_RETURN_SETTLED AUTHORIZATION -> Value.AUTHORIZATION AUTHORIZATION_ADVICE -> Value.AUTHORIZATION_ADVICE @@ -2095,12 +2135,14 @@ private constructor( ACH_ORIGINATION_INITIATED -> Known.ACH_ORIGINATION_INITIATED ACH_ORIGINATION_PROCESSED -> Known.ACH_ORIGINATION_PROCESSED ACH_ORIGINATION_RELEASED -> Known.ACH_ORIGINATION_RELEASED + ACH_ORIGINATION_REJECTED -> Known.ACH_ORIGINATION_REJECTED ACH_ORIGINATION_REVIEWED -> Known.ACH_ORIGINATION_REVIEWED ACH_ORIGINATION_SETTLED -> Known.ACH_ORIGINATION_SETTLED ACH_RECEIPT_PROCESSED -> Known.ACH_RECEIPT_PROCESSED ACH_RECEIPT_SETTLED -> Known.ACH_RECEIPT_SETTLED ACH_RETURN_INITIATED -> Known.ACH_RETURN_INITIATED ACH_RETURN_PROCESSED -> Known.ACH_RETURN_PROCESSED + ACH_RETURN_REJECTED -> Known.ACH_RETURN_REJECTED ACH_RETURN_SETTLED -> Known.ACH_RETURN_SETTLED AUTHORIZATION -> Known.AUTHORIZATION AUTHORIZATION_ADVICE -> Known.AUTHORIZATION_ADVICE @@ -2738,7 +2780,7 @@ private constructor( @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( private val token: JsonField, - private val category: JsonField, + private val category: JsonField, private val created: JsonField, private val currency: JsonField, private val events: JsonField>, @@ -2761,7 +2803,7 @@ private constructor( @JsonProperty("token") @ExcludeMissing token: JsonField = JsonMissing.of(), @JsonProperty("category") @ExcludeMissing - category: JsonField = JsonMissing.of(), + category: JsonField = JsonMissing.of(), @JsonProperty("created") @ExcludeMissing created: JsonField = JsonMissing.of(), @@ -2836,7 +2878,7 @@ private constructor( * @throws LithicInvalidDataException 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 category(): TransactionCategory = category.getRequired("category") + fun category(): BookTransferCategory = category.getRequired("category") /** * ISO 8601 timestamp of when the transaction was created @@ -2962,7 +3004,7 @@ private constructor( */ @JsonProperty("category") @ExcludeMissing - fun _category(): JsonField = category + fun _category(): JsonField = category /** * Returns the raw JSON value of [created]. @@ -3127,7 +3169,7 @@ private constructor( class Builder internal constructor() { private var token: JsonField? = null - private var category: JsonField? = null + private var category: JsonField? = null private var created: JsonField? = null private var currency: JsonField? = null private var events: JsonField>? = null @@ -3177,16 +3219,16 @@ private constructor( */ fun token(token: JsonField) = apply { this.token = token } - fun category(category: TransactionCategory) = category(JsonField.of(category)) + fun category(category: BookTransferCategory) = category(JsonField.of(category)) /** * Sets [Builder.category] to an arbitrary JSON value. * - * You should usually call [Builder.category] with a well-typed [TransactionCategory] + * You should usually call [Builder.category] with a well-typed [BookTransferCategory] * value instead. This method is primarily for setting the field to an undocumented or * not yet supported value. */ - fun category(category: JsonField) = apply { + fun category(category: JsonField) = apply { this.category = category } @@ -3521,7 +3563,7 @@ private constructor( (externalResource.asKnown().getOrNull()?.validity() ?: 0) + (transactionSeries.asKnown().getOrNull()?.validity() ?: 0) - class TransactionCategory + class BookTransferCategory @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -3537,57 +3579,45 @@ private constructor( companion object { - @JvmField val ACH = of("ACH") + @JvmField val ADJUSTMENT = of("ADJUSTMENT") @JvmField val BALANCE_OR_FUNDING = of("BALANCE_OR_FUNDING") - @JvmField val CARD = of("CARD") - - @JvmField val EXTERNAL_ACH = of("EXTERNAL_ACH") - - @JvmField val EXTERNAL_CHECK = of("EXTERNAL_CHECK") - - @JvmField val EXTERNAL_TRANSFER = of("EXTERNAL_TRANSFER") - - @JvmField val EXTERNAL_WIRE = of("EXTERNAL_WIRE") - - @JvmField val MANAGEMENT_ADJUSTMENT = of("MANAGEMENT_ADJUSTMENT") + @JvmField val DERECOGNITION = of("DERECOGNITION") - @JvmField val MANAGEMENT_DISPUTE = of("MANAGEMENT_DISPUTE") + @JvmField val DISPUTE = of("DISPUTE") - @JvmField val MANAGEMENT_FEE = of("MANAGEMENT_FEE") + @JvmField val FEE = of("FEE") - @JvmField val MANAGEMENT_REWARD = of("MANAGEMENT_REWARD") + @JvmField val INTERNAL = of("INTERNAL") - @JvmField val MANAGEMENT_DISBURSEMENT = of("MANAGEMENT_DISBURSEMENT") + @JvmField val REWARD = of("REWARD") @JvmField val PROGRAM_FUNDING = of("PROGRAM_FUNDING") - @JvmStatic fun of(value: String) = TransactionCategory(JsonField.of(value)) + @JvmField val TRANSFER = of("TRANSFER") + + @JvmStatic fun of(value: String) = BookTransferCategory(JsonField.of(value)) } - /** An enum containing [TransactionCategory]'s known values. */ + /** An enum containing [BookTransferCategory]'s known values. */ enum class Known { - ACH, + ADJUSTMENT, BALANCE_OR_FUNDING, - CARD, - EXTERNAL_ACH, - EXTERNAL_CHECK, - EXTERNAL_TRANSFER, - EXTERNAL_WIRE, - MANAGEMENT_ADJUSTMENT, - MANAGEMENT_DISPUTE, - MANAGEMENT_FEE, - MANAGEMENT_REWARD, - MANAGEMENT_DISBURSEMENT, + DERECOGNITION, + DISPUTE, + FEE, + INTERNAL, + REWARD, PROGRAM_FUNDING, + TRANSFER, } /** - * An enum containing [TransactionCategory]'s known values, as well as an [_UNKNOWN] + * An enum containing [BookTransferCategory]'s known values, as well as an [_UNKNOWN] * member. * - * An instance of [TransactionCategory] can contain an unknown value in a couple of + * An instance of [BookTransferCategory] 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 @@ -3595,21 +3625,17 @@ private constructor( * - It was constructed with an arbitrary value using the [of] method. */ enum class Value { - ACH, + ADJUSTMENT, BALANCE_OR_FUNDING, - CARD, - EXTERNAL_ACH, - EXTERNAL_CHECK, - EXTERNAL_TRANSFER, - EXTERNAL_WIRE, - MANAGEMENT_ADJUSTMENT, - MANAGEMENT_DISPUTE, - MANAGEMENT_FEE, - MANAGEMENT_REWARD, - MANAGEMENT_DISBURSEMENT, + DERECOGNITION, + DISPUTE, + FEE, + INTERNAL, + REWARD, PROGRAM_FUNDING, + TRANSFER, /** - * An enum member indicating that [TransactionCategory] was instantiated with an + * An enum member indicating that [BookTransferCategory] was instantiated with an * unknown value. */ _UNKNOWN, @@ -3624,19 +3650,15 @@ private constructor( */ fun value(): Value = when (this) { - ACH -> Value.ACH + ADJUSTMENT -> Value.ADJUSTMENT BALANCE_OR_FUNDING -> Value.BALANCE_OR_FUNDING - CARD -> Value.CARD - EXTERNAL_ACH -> Value.EXTERNAL_ACH - EXTERNAL_CHECK -> Value.EXTERNAL_CHECK - EXTERNAL_TRANSFER -> Value.EXTERNAL_TRANSFER - EXTERNAL_WIRE -> Value.EXTERNAL_WIRE - MANAGEMENT_ADJUSTMENT -> Value.MANAGEMENT_ADJUSTMENT - MANAGEMENT_DISPUTE -> Value.MANAGEMENT_DISPUTE - MANAGEMENT_FEE -> Value.MANAGEMENT_FEE - MANAGEMENT_REWARD -> Value.MANAGEMENT_REWARD - MANAGEMENT_DISBURSEMENT -> Value.MANAGEMENT_DISBURSEMENT + DERECOGNITION -> Value.DERECOGNITION + DISPUTE -> Value.DISPUTE + FEE -> Value.FEE + INTERNAL -> Value.INTERNAL + REWARD -> Value.REWARD PROGRAM_FUNDING -> Value.PROGRAM_FUNDING + TRANSFER -> Value.TRANSFER else -> Value._UNKNOWN } @@ -3651,20 +3673,16 @@ private constructor( */ fun known(): Known = when (this) { - ACH -> Known.ACH + ADJUSTMENT -> Known.ADJUSTMENT BALANCE_OR_FUNDING -> Known.BALANCE_OR_FUNDING - CARD -> Known.CARD - EXTERNAL_ACH -> Known.EXTERNAL_ACH - EXTERNAL_CHECK -> Known.EXTERNAL_CHECK - EXTERNAL_TRANSFER -> Known.EXTERNAL_TRANSFER - EXTERNAL_WIRE -> Known.EXTERNAL_WIRE - MANAGEMENT_ADJUSTMENT -> Known.MANAGEMENT_ADJUSTMENT - MANAGEMENT_DISPUTE -> Known.MANAGEMENT_DISPUTE - MANAGEMENT_FEE -> Known.MANAGEMENT_FEE - MANAGEMENT_REWARD -> Known.MANAGEMENT_REWARD - MANAGEMENT_DISBURSEMENT -> Known.MANAGEMENT_DISBURSEMENT + DERECOGNITION -> Known.DERECOGNITION + DISPUTE -> Known.DISPUTE + FEE -> Known.FEE + INTERNAL -> Known.INTERNAL + REWARD -> Known.REWARD PROGRAM_FUNDING -> Known.PROGRAM_FUNDING - else -> throw LithicInvalidDataException("Unknown TransactionCategory: $value") + TRANSFER -> Known.TRANSFER + else -> throw LithicInvalidDataException("Unknown BookTransferCategory: $value") } /** @@ -3683,7 +3701,7 @@ private constructor( private var validated: Boolean = false - fun validate(): TransactionCategory = apply { + fun validate(): BookTransferCategory = apply { if (validated) { return@apply } @@ -3713,7 +3731,7 @@ private constructor( return true } - return other is TransactionCategory && value == other.value + return other is BookTransferCategory && value == other.value } override fun hashCode() = value.hashCode() @@ -4453,6 +4471,8 @@ private constructor( companion object { + @JvmField val ATM_BALANCE_INQUIRY = of("ATM_BALANCE_INQUIRY") + @JvmField val ATM_WITHDRAWAL = of("ATM_WITHDRAWAL") @JvmField val ATM_DECLINE = of("ATM_DECLINE") @@ -4526,6 +4546,7 @@ private constructor( /** An enum containing [BookTransferType]'s known values. */ enum class Known { + ATM_BALANCE_INQUIRY, ATM_WITHDRAWAL, ATM_DECLINE, INTERNATIONAL_ATM_WITHDRAWAL, @@ -4574,6 +4595,7 @@ private constructor( * - It was constructed with an arbitrary value using the [of] method. */ enum class Value { + ATM_BALANCE_INQUIRY, ATM_WITHDRAWAL, ATM_DECLINE, INTERNATIONAL_ATM_WITHDRAWAL, @@ -4624,6 +4646,7 @@ private constructor( */ fun value(): Value = when (this) { + ATM_BALANCE_INQUIRY -> Value.ATM_BALANCE_INQUIRY ATM_WITHDRAWAL -> Value.ATM_WITHDRAWAL ATM_DECLINE -> Value.ATM_DECLINE INTERNATIONAL_ATM_WITHDRAWAL -> Value.INTERNATIONAL_ATM_WITHDRAWAL @@ -4672,6 +4695,7 @@ private constructor( */ fun known(): Known = when (this) { + ATM_BALANCE_INQUIRY -> Known.ATM_BALANCE_INQUIRY ATM_WITHDRAWAL -> Known.ATM_WITHDRAWAL ATM_DECLINE -> Known.ATM_DECLINE INTERNATIONAL_ATM_WITHDRAWAL -> Known.INTERNATIONAL_ATM_WITHDRAWAL @@ -5583,6 +5607,7 @@ private constructor( private val cardToken: JsonField, private val cardholderAuthentication: JsonField, private val created: JsonField, + private val financialAccountToken: JsonField, private val merchant: JsonField, private val merchantAmount: JsonField, private val merchantAuthorizationAmount: JsonField, @@ -5633,6 +5658,9 @@ private constructor( @JsonProperty("created") @ExcludeMissing created: JsonField = JsonMissing.of(), + @JsonProperty("financial_account_token") + @ExcludeMissing + financialAccountToken: JsonField = JsonMissing.of(), @JsonProperty("merchant") @ExcludeMissing merchant: JsonField = JsonMissing.of(), @@ -5686,6 +5714,7 @@ private constructor( cardToken, cardholderAuthentication, created, + financialAccountToken, merchant, merchantAmount, merchantAuthorizationAmount, @@ -5717,6 +5746,7 @@ private constructor( .cardToken(cardToken) .cardholderAuthentication(cardholderAuthentication) .created(created) + .financialAccountToken(financialAccountToken) .merchant(merchant) .merchantAmount(merchantAmount) .merchantAuthorizationAmount(merchantAuthorizationAmount) @@ -5835,6 +5865,13 @@ private constructor( */ fun created(): OffsetDateTime = created.getRequired("created") + /** + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun financialAccountToken(): Optional = + financialAccountToken.getOptional("financial_account_token") + /** * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -6053,6 +6090,16 @@ private constructor( */ @JsonProperty("created") @ExcludeMissing fun _created(): JsonField = created + /** + * Returns the raw JSON value of [financialAccountToken]. + * + * Unlike [financialAccountToken], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun _financialAccountToken(): JsonField = financialAccountToken + /** * Returns the raw JSON value of [merchant]. * @@ -6215,6 +6262,7 @@ private constructor( * .cardToken() * .cardholderAuthentication() * .created() + * .financialAccountToken() * .merchant() * .merchantAmount() * .merchantAuthorizationAmount() @@ -6249,6 +6297,7 @@ private constructor( private var cardholderAuthentication: JsonField? = null private var created: JsonField? = null + private var financialAccountToken: JsonField? = null private var merchant: JsonField? = null private var merchantAmount: JsonField? = null private var merchantAuthorizationAmount: JsonField? = null @@ -6279,6 +6328,7 @@ private constructor( cardToken = cardTransaction.cardToken cardholderAuthentication = cardTransaction.cardholderAuthentication created = cardTransaction.created + financialAccountToken = cardTransaction.financialAccountToken merchant = cardTransaction.merchant merchantAmount = cardTransaction.merchantAmount merchantAuthorizationAmount = cardTransaction.merchantAuthorizationAmount @@ -6528,6 +6578,27 @@ private constructor( */ fun created(created: JsonField) = apply { this.created = created } + fun financialAccountToken(financialAccountToken: String?) = + financialAccountToken(JsonField.ofNullable(financialAccountToken)) + + /** + * Alias for calling [Builder.financialAccountToken] with + * `financialAccountToken.orElse(null)`. + */ + fun financialAccountToken(financialAccountToken: Optional) = + financialAccountToken(financialAccountToken.getOrNull()) + + /** + * Sets [Builder.financialAccountToken] to an arbitrary JSON value. + * + * You should usually call [Builder.financialAccountToken] with a well-typed [String] + * value instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun financialAccountToken(financialAccountToken: JsonField) = apply { + this.financialAccountToken = financialAccountToken + } + fun merchant(merchant: Transaction.Merchant) = merchant(JsonField.of(merchant)) /** @@ -6830,6 +6901,7 @@ private constructor( * .cardToken() * .cardholderAuthentication() * .created() + * .financialAccountToken() * .merchant() * .merchantAmount() * .merchantAuthorizationAmount() @@ -6861,6 +6933,7 @@ private constructor( checkRequired("cardToken", cardToken), checkRequired("cardholderAuthentication", cardholderAuthentication), checkRequired("created", created), + checkRequired("financialAccountToken", financialAccountToken), checkRequired("merchant", merchant), checkRequired("merchantAmount", merchantAmount), checkRequired("merchantAuthorizationAmount", merchantAuthorizationAmount), @@ -6898,6 +6971,7 @@ private constructor( cardToken() cardholderAuthentication().ifPresent { it.validate() } created() + financialAccountToken() merchant().validate() merchantAmount() merchantAuthorizationAmount() @@ -6943,6 +7017,7 @@ private constructor( (if (cardToken.asKnown().isPresent) 1 else 0) + (cardholderAuthentication.asKnown().getOrNull()?.validity() ?: 0) + (if (created.asKnown().isPresent) 1 else 0) + + (if (financialAccountToken.asKnown().isPresent) 1 else 0) + (merchant.asKnown().getOrNull()?.validity() ?: 0) + (if (merchantAmount.asKnown().isPresent) 1 else 0) + (if (merchantAuthorizationAmount.asKnown().isPresent) 1 else 0) + @@ -7287,6 +7362,7 @@ private constructor( cardToken == other.cardToken && cardholderAuthentication == other.cardholderAuthentication && created == other.created && + financialAccountToken == other.financialAccountToken && merchant == other.merchant && merchantAmount == other.merchantAmount && merchantAuthorizationAmount == other.merchantAuthorizationAmount && @@ -7318,6 +7394,7 @@ private constructor( cardToken, cardholderAuthentication, created, + financialAccountToken, merchant, merchantAmount, merchantAuthorizationAmount, @@ -7339,7 +7416,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "CardTransaction{token=$token, accountToken=$accountToken, acquirerFee=$acquirerFee, acquirerReferenceNumber=$acquirerReferenceNumber, amount=$amount, amounts=$amounts, authorizationAmount=$authorizationAmount, authorizationCode=$authorizationCode, avs=$avs, cardToken=$cardToken, cardholderAuthentication=$cardholderAuthentication, created=$created, merchant=$merchant, merchantAmount=$merchantAmount, merchantAuthorizationAmount=$merchantAuthorizationAmount, merchantCurrency=$merchantCurrency, network=$network, networkRiskScore=$networkRiskScore, pos=$pos, result=$result, settledAmount=$settledAmount, status=$status, tokenInfo=$tokenInfo, updated=$updated, events=$events, family=$family, additionalProperties=$additionalProperties}" + "CardTransaction{token=$token, accountToken=$accountToken, acquirerFee=$acquirerFee, acquirerReferenceNumber=$acquirerReferenceNumber, amount=$amount, amounts=$amounts, authorizationAmount=$authorizationAmount, authorizationCode=$authorizationCode, avs=$avs, cardToken=$cardToken, cardholderAuthentication=$cardholderAuthentication, created=$created, financialAccountToken=$financialAccountToken, merchant=$merchant, merchantAmount=$merchantAmount, merchantAuthorizationAmount=$merchantAuthorizationAmount, merchantCurrency=$merchantCurrency, network=$network, networkRiskScore=$networkRiskScore, pos=$pos, result=$result, settledAmount=$settledAmount, status=$status, tokenInfo=$tokenInfo, updated=$updated, events=$events, family=$family, additionalProperties=$additionalProperties}" } /** Payment transaction */ @@ -8410,6 +8487,16 @@ private constructor( @JvmField val BALANCE_OR_FUNDING = of("BALANCE_OR_FUNDING") + @JvmField val FEE = of("FEE") + + @JvmField val REWARD = of("REWARD") + + @JvmField val ADJUSTMENT = of("ADJUSTMENT") + + @JvmField val DERECOGNITION = of("DERECOGNITION") + + @JvmField val DISPUTE = of("DISPUTE") + @JvmField val CARD = of("CARD") @JvmField val EXTERNAL_ACH = of("EXTERNAL_ACH") @@ -8439,6 +8526,11 @@ private constructor( enum class Known { ACH, BALANCE_OR_FUNDING, + FEE, + REWARD, + ADJUSTMENT, + DERECOGNITION, + DISPUTE, CARD, EXTERNAL_ACH, EXTERNAL_CHECK, @@ -8466,6 +8558,11 @@ private constructor( enum class Value { ACH, BALANCE_OR_FUNDING, + FEE, + REWARD, + ADJUSTMENT, + DERECOGNITION, + DISPUTE, CARD, EXTERNAL_ACH, EXTERNAL_CHECK, @@ -8495,6 +8592,11 @@ private constructor( when (this) { ACH -> Value.ACH BALANCE_OR_FUNDING -> Value.BALANCE_OR_FUNDING + FEE -> Value.FEE + REWARD -> Value.REWARD + ADJUSTMENT -> Value.ADJUSTMENT + DERECOGNITION -> Value.DERECOGNITION + DISPUTE -> Value.DISPUTE CARD -> Value.CARD EXTERNAL_ACH -> Value.EXTERNAL_ACH EXTERNAL_CHECK -> Value.EXTERNAL_CHECK @@ -8522,6 +8624,11 @@ private constructor( when (this) { ACH -> Known.ACH BALANCE_OR_FUNDING -> Known.BALANCE_OR_FUNDING + FEE -> Known.FEE + REWARD -> Known.REWARD + ADJUSTMENT -> Known.ADJUSTMENT + DERECOGNITION -> Known.DERECOGNITION + DISPUTE -> Known.DISPUTE CARD -> Known.CARD EXTERNAL_ACH -> Known.EXTERNAL_ACH EXTERNAL_CHECK -> Known.EXTERNAL_CHECK diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2UpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2UpdateParams.kt index f5ef400d9..d4d97eb7b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2UpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2UpdateParams.kt @@ -97,11 +97,9 @@ private constructor( fun body(body: Body) = apply { this.body = body } - /** Alias for calling [body] with `Body.ofUnionMember0(unionMember0)`. */ - fun body(unionMember0: Body.UnionMember0) = body(Body.ofUnionMember0(unionMember0)) - - /** Alias for calling [body] with `Body.ofUnionMember1(unionMember1)`. */ - fun body(unionMember1: Body.UnionMember1) = body(Body.ofUnionMember1(unionMember1)) + /** Alias for calling [body] with `Body.ofAccountLevelRule(accountLevelRule)`. */ + fun body(accountLevelRule: Body.AccountLevelRule) = + body(Body.ofAccountLevelRule(accountLevelRule)) /** Alias for calling [body] with `Body.ofCardLevelRule(cardLevelRule)`. */ fun body(cardLevelRule: Body.CardLevelRule) = body(Body.ofCardLevelRule(cardLevelRule)) @@ -245,32 +243,25 @@ private constructor( @JsonSerialize(using = Body.Serializer::class) class Body private constructor( - private val unionMember0: UnionMember0? = null, - private val unionMember1: UnionMember1? = null, + private val accountLevelRule: AccountLevelRule? = null, private val cardLevelRule: CardLevelRule? = null, private val programLevelRule: ProgramLevelRule? = null, private val _json: JsonValue? = null, ) { - fun unionMember0(): Optional = Optional.ofNullable(unionMember0) - - fun unionMember1(): Optional = Optional.ofNullable(unionMember1) + fun accountLevelRule(): Optional = Optional.ofNullable(accountLevelRule) fun cardLevelRule(): Optional = Optional.ofNullable(cardLevelRule) fun programLevelRule(): Optional = Optional.ofNullable(programLevelRule) - fun isUnionMember0(): Boolean = unionMember0 != null - - fun isUnionMember1(): Boolean = unionMember1 != null + fun isAccountLevelRule(): Boolean = accountLevelRule != null fun isCardLevelRule(): Boolean = cardLevelRule != null fun isProgramLevelRule(): Boolean = programLevelRule != null - fun asUnionMember0(): UnionMember0 = unionMember0.getOrThrow("unionMember0") - - fun asUnionMember1(): UnionMember1 = unionMember1.getOrThrow("unionMember1") + fun asAccountLevelRule(): AccountLevelRule = accountLevelRule.getOrThrow("accountLevelRule") fun asCardLevelRule(): CardLevelRule = cardLevelRule.getOrThrow("cardLevelRule") @@ -280,8 +271,7 @@ private constructor( fun accept(visitor: Visitor): T = when { - unionMember0 != null -> visitor.visitUnionMember0(unionMember0) - unionMember1 != null -> visitor.visitUnionMember1(unionMember1) + accountLevelRule != null -> visitor.visitAccountLevelRule(accountLevelRule) cardLevelRule != null -> visitor.visitCardLevelRule(cardLevelRule) programLevelRule != null -> visitor.visitProgramLevelRule(programLevelRule) else -> visitor.unknown(_json) @@ -296,12 +286,8 @@ private constructor( accept( object : Visitor { - override fun visitUnionMember0(unionMember0: UnionMember0) { - unionMember0.validate() - } - - override fun visitUnionMember1(unionMember1: UnionMember1) { - unionMember1.validate() + override fun visitAccountLevelRule(accountLevelRule: AccountLevelRule) { + accountLevelRule.validate() } override fun visitCardLevelRule(cardLevelRule: CardLevelRule) { @@ -334,11 +320,8 @@ private constructor( internal fun validity(): Int = accept( object : Visitor { - override fun visitUnionMember0(unionMember0: UnionMember0) = - unionMember0.validity() - - override fun visitUnionMember1(unionMember1: UnionMember1) = - unionMember1.validity() + override fun visitAccountLevelRule(accountLevelRule: AccountLevelRule) = + accountLevelRule.validity() override fun visitCardLevelRule(cardLevelRule: CardLevelRule) = cardLevelRule.validity() @@ -356,19 +339,17 @@ private constructor( } return other is Body && - unionMember0 == other.unionMember0 && - unionMember1 == other.unionMember1 && + accountLevelRule == other.accountLevelRule && cardLevelRule == other.cardLevelRule && programLevelRule == other.programLevelRule } override fun hashCode(): Int = - Objects.hash(unionMember0, unionMember1, cardLevelRule, programLevelRule) + Objects.hash(accountLevelRule, cardLevelRule, programLevelRule) override fun toString(): String = when { - unionMember0 != null -> "Body{unionMember0=$unionMember0}" - unionMember1 != null -> "Body{unionMember1=$unionMember1}" + accountLevelRule != null -> "Body{accountLevelRule=$accountLevelRule}" cardLevelRule != null -> "Body{cardLevelRule=$cardLevelRule}" programLevelRule != null -> "Body{programLevelRule=$programLevelRule}" _json != null -> "Body{_unknown=$_json}" @@ -378,10 +359,8 @@ private constructor( companion object { @JvmStatic - fun ofUnionMember0(unionMember0: UnionMember0) = Body(unionMember0 = unionMember0) - - @JvmStatic - fun ofUnionMember1(unionMember1: UnionMember1) = Body(unionMember1 = unionMember1) + fun ofAccountLevelRule(accountLevelRule: AccountLevelRule) = + Body(accountLevelRule = accountLevelRule) @JvmStatic fun ofCardLevelRule(cardLevelRule: CardLevelRule) = Body(cardLevelRule = cardLevelRule) @@ -394,9 +373,7 @@ private constructor( /** An interface that defines how to map each variant of [Body] to a value of type [T]. */ interface Visitor { - fun visitUnionMember0(unionMember0: UnionMember0): T - - fun visitUnionMember1(unionMember1: UnionMember1): T + fun visitAccountLevelRule(accountLevelRule: AccountLevelRule): T fun visitCardLevelRule(cardLevelRule: CardLevelRule): T @@ -423,11 +400,8 @@ private constructor( val bestMatches = sequenceOf( - tryDeserialize(node, jacksonTypeRef())?.let { - Body(unionMember0 = it, _json = json) - }, - tryDeserialize(node, jacksonTypeRef())?.let { - Body(unionMember1 = it, _json = json) + tryDeserialize(node, jacksonTypeRef())?.let { + Body(accountLevelRule = it, _json = json) }, tryDeserialize(node, jacksonTypeRef())?.let { Body(cardLevelRule = it, _json = json) @@ -460,8 +434,7 @@ private constructor( provider: SerializerProvider, ) { when { - value.unionMember0 != null -> generator.writeObject(value.unionMember0) - value.unionMember1 != null -> generator.writeObject(value.unionMember1) + value.accountLevelRule != null -> generator.writeObject(value.accountLevelRule) value.cardLevelRule != null -> generator.writeObject(value.cardLevelRule) value.programLevelRule != null -> generator.writeObject(value.programLevelRule) value._json != null -> generator.writeObject(value._json) @@ -470,9 +443,11 @@ private constructor( } } - class UnionMember0 + class AccountLevelRule @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( + private val accountTokens: JsonField>, + private val businessAccountTokens: JsonField>, private val name: JsonField, private val state: JsonField, private val additionalProperties: MutableMap, @@ -480,9 +455,33 @@ private constructor( @JsonCreator private constructor( + @JsonProperty("account_tokens") + @ExcludeMissing + accountTokens: JsonField> = JsonMissing.of(), + @JsonProperty("business_account_tokens") + @ExcludeMissing + businessAccountTokens: JsonField> = JsonMissing.of(), @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), @JsonProperty("state") @ExcludeMissing state: JsonField = JsonMissing.of(), - ) : this(name, state, mutableMapOf()) + ) : this(accountTokens, businessAccountTokens, name, state, mutableMapOf()) + + /** + * Account tokens to which the Auth Rule applies. + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun accountTokens(): Optional> = + accountTokens.getOptional("account_tokens") + + /** + * Business Account tokens to which the Auth Rule applies. + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if + * the server responded with an unexpected value). + */ + fun businessAccountTokens(): Optional> = + businessAccountTokens.getOptional("business_account_tokens") /** * Auth Rule Name @@ -504,6 +503,26 @@ private constructor( */ fun state(): Optional = state.getOptional("state") + /** + * Returns the raw JSON value of [accountTokens]. + * + * Unlike [accountTokens], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("account_tokens") + @ExcludeMissing + fun _accountTokens(): JsonField> = accountTokens + + /** + * Returns the raw JSON value of [businessAccountTokens]. + * + * Unlike [businessAccountTokens], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("business_account_tokens") + @ExcludeMissing + fun _businessAccountTokens(): JsonField> = businessAccountTokens + /** * Returns the raw JSON value of [name]. * @@ -532,348 +551,81 @@ private constructor( companion object { - /** Returns a mutable builder for constructing an instance of [UnionMember0]. */ + /** Returns a mutable builder for constructing an instance of [AccountLevelRule]. */ @JvmStatic fun builder() = Builder() } - /** A builder for [UnionMember0]. */ + /** A builder for [AccountLevelRule]. */ class Builder internal constructor() { + private var accountTokens: JsonField>? = null + private var businessAccountTokens: JsonField>? = null private var name: JsonField = JsonMissing.of() private var state: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(unionMember0: UnionMember0) = apply { - name = unionMember0.name - state = unionMember0.state - additionalProperties = unionMember0.additionalProperties.toMutableMap() - } - - /** Auth Rule Name */ - fun name(name: String?) = name(JsonField.ofNullable(name)) - - /** Alias for calling [Builder.name] with `name.orElse(null)`. */ - fun name(name: Optional) = name(name.getOrNull()) - - /** - * Sets [Builder.name] to an arbitrary JSON value. - * - * You should usually call [Builder.name] with a well-typed [String] value instead. - * This method is primarily for setting the field to an undocumented or not yet - * supported value. - */ - fun name(name: JsonField) = apply { this.name = name } - - /** - * The desired state of the Auth Rule. - * - * Note that only deactivating an Auth Rule through this endpoint is supported at - * this time. If you need to (re-)activate an Auth Rule the /promote endpoint should - * be used to promote a draft to the currently active version. - */ - fun state(state: State) = state(JsonField.of(state)) - - /** - * Sets [Builder.state] to an arbitrary JSON value. - * - * You should usually call [Builder.state] with a well-typed [State] value instead. - * This method is primarily for setting the field to an undocumented or not yet - * supported value. - */ - fun state(state: JsonField) = apply { this.state = state } - - 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) + internal fun from(accountLevelRule: AccountLevelRule) = apply { + accountTokens = accountLevelRule.accountTokens.map { it.toMutableList() } + businessAccountTokens = + accountLevelRule.businessAccountTokens.map { it.toMutableList() } + name = accountLevelRule.name + state = accountLevelRule.state + additionalProperties = accountLevelRule.additionalProperties.toMutableMap() } - fun removeAllAdditionalProperties(keys: Set) = apply { - keys.forEach(::removeAdditionalProperty) - } + /** Account tokens to which the Auth Rule applies. */ + fun accountTokens(accountTokens: List) = + accountTokens(JsonField.of(accountTokens)) /** - * Returns an immutable instance of [UnionMember0]. + * Sets [Builder.accountTokens] to an arbitrary JSON value. * - * Further updates to this [Builder] will not mutate the returned instance. - */ - fun build(): UnionMember0 = - UnionMember0(name, state, additionalProperties.toMutableMap()) - } - - private var validated: Boolean = false - - fun validate(): UnionMember0 = apply { - if (validated) { - return@apply - } - - name() - state().ifPresent { it.validate() } - validated = true - } - - fun isValid(): Boolean = - try { - validate() - true - } catch (e: LithicInvalidDataException) { - 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 (name.asKnown().isPresent) 1 else 0) + - (state.asKnown().getOrNull()?.validity() ?: 0) - - /** - * The desired state of the Auth Rule. - * - * Note that only deactivating an Auth Rule through this endpoint is supported at this - * time. If you need to (re-)activate an Auth Rule the /promote endpoint should be used - * to promote a draft to the currently active version. - */ - class State @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. + * You should usually call [Builder.accountTokens] with a well-typed `List` + * value instead. This method is primarily for setting the field to an undocumented + * or not yet supported value. */ - @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value - - companion object { - - @JvmField val INACTIVE = of("INACTIVE") - - @JvmStatic fun of(value: String) = State(JsonField.of(value)) - } - - /** An enum containing [State]'s known values. */ - enum class Known { - INACTIVE + fun accountTokens(accountTokens: JsonField>) = apply { + this.accountTokens = accountTokens.map { it.toMutableList() } } /** - * An enum containing [State]'s known values, as well as an [_UNKNOWN] member. + * Adds a single [String] to [accountTokens]. * - * An instance of [State] 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. + * @throws IllegalStateException if the field was previously set to a non-list. */ - enum class Value { - INACTIVE, - /** - * An enum member indicating that [State] was instantiated with an unknown - * value. - */ - _UNKNOWN, + fun addAccountToken(accountToken: String) = apply { + accountTokens = + (accountTokens ?: JsonField.of(mutableListOf())).also { + checkKnown("accountTokens", it).add(accountToken) + } } - /** - * 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) { - INACTIVE -> Value.INACTIVE - else -> Value._UNKNOWN - } + /** Business Account tokens to which the Auth Rule applies. */ + fun businessAccountTokens(businessAccountTokens: List) = + businessAccountTokens(JsonField.of(businessAccountTokens)) /** - * 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. + * Sets [Builder.businessAccountTokens] to an arbitrary JSON value. * - * @throws LithicInvalidDataException if this class instance's value is a not a - * known member. - */ - fun known(): Known = - when (this) { - INACTIVE -> Known.INACTIVE - else -> throw LithicInvalidDataException("Unknown State: $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 LithicInvalidDataException if this class instance's value does not have - * the expected primitive type. + * You should usually call [Builder.businessAccountTokens] with a well-typed + * `List` value instead. This method is primarily for setting the field to + * an undocumented or not yet supported value. */ - fun asString(): String = - _value().asString().orElseThrow { - LithicInvalidDataException("Value is not a String") - } - - private var validated: Boolean = false - - fun validate(): State = apply { - if (validated) { - return@apply - } - - known() - validated = true + fun businessAccountTokens(businessAccountTokens: JsonField>) = apply { + this.businessAccountTokens = businessAccountTokens.map { it.toMutableList() } } - fun isValid(): Boolean = - try { - validate() - true - } catch (e: LithicInvalidDataException) { - false - } - /** - * Returns a score indicating how many valid values are contained in this object - * recursively. + * Adds a single [String] to [businessAccountTokens]. * - * Used for best match union deserialization. + * @throws IllegalStateException if the field was previously set to a non-list. */ - @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 State && value == other.value - } - - override fun hashCode() = value.hashCode() - - override fun toString() = value.toString() - } - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is UnionMember0 && - name == other.name && - state == other.state && - additionalProperties == other.additionalProperties - } - - private val hashCode: Int by lazy { Objects.hash(name, state, additionalProperties) } - - override fun hashCode(): Int = hashCode - - override fun toString() = - "UnionMember0{name=$name, state=$state, additionalProperties=$additionalProperties}" - } - - class UnionMember1 - @JsonCreator(mode = JsonCreator.Mode.DISABLED) - private constructor( - private val name: JsonField, - private val state: JsonField, - private val additionalProperties: MutableMap, - ) { - - @JsonCreator - private constructor( - @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), - @JsonProperty("state") @ExcludeMissing state: JsonField = JsonMissing.of(), - ) : this(name, state, mutableMapOf()) - - /** - * Auth Rule Name - * - * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if - * the server responded with an unexpected value). - */ - fun name(): Optional = name.getOptional("name") - - /** - * The desired state of the Auth Rule. - * - * Note that only deactivating an Auth Rule through this endpoint is supported at this - * time. If you need to (re-)activate an Auth Rule the /promote endpoint should be used - * to promote a draft to the currently active version. - * - * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if - * the server responded with an unexpected value). - */ - fun state(): Optional = state.getOptional("state") - - /** - * Returns the raw JSON value of [name]. - * - * Unlike [name], this method doesn't throw if the JSON field has an unexpected type. - */ - @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name - - /** - * Returns the raw JSON value of [state]. - * - * Unlike [state], this method doesn't throw if the JSON field has an unexpected type. - */ - @JsonProperty("state") @ExcludeMissing fun _state(): JsonField = state - - @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 [UnionMember1]. */ - @JvmStatic fun builder() = Builder() - } - - /** A builder for [UnionMember1]. */ - class Builder internal constructor() { - - private var name: JsonField = JsonMissing.of() - private var state: JsonField = JsonMissing.of() - private var additionalProperties: MutableMap = mutableMapOf() - - @JvmSynthetic - internal fun from(unionMember1: UnionMember1) = apply { - name = unionMember1.name - state = unionMember1.state - additionalProperties = unionMember1.additionalProperties.toMutableMap() + fun addBusinessAccountToken(businessAccountToken: String) = apply { + businessAccountTokens = + (businessAccountTokens ?: JsonField.of(mutableListOf())).also { + checkKnown("businessAccountTokens", it).add(businessAccountToken) + } } /** Auth Rule Name */ @@ -932,21 +684,29 @@ private constructor( } /** - * Returns an immutable instance of [UnionMember1]. + * Returns an immutable instance of [AccountLevelRule]. * * Further updates to this [Builder] will not mutate the returned instance. */ - fun build(): UnionMember1 = - UnionMember1(name, state, additionalProperties.toMutableMap()) + fun build(): AccountLevelRule = + AccountLevelRule( + (accountTokens ?: JsonMissing.of()).map { it.toImmutable() }, + (businessAccountTokens ?: JsonMissing.of()).map { it.toImmutable() }, + name, + state, + additionalProperties.toMutableMap(), + ) } private var validated: Boolean = false - fun validate(): UnionMember1 = apply { + fun validate(): AccountLevelRule = apply { if (validated) { return@apply } + accountTokens() + businessAccountTokens() name() state().ifPresent { it.validate() } validated = true @@ -968,7 +728,9 @@ private constructor( */ @JvmSynthetic internal fun validity(): Int = - (if (name.asKnown().isPresent) 1 else 0) + + (accountTokens.asKnown().getOrNull()?.size ?: 0) + + (businessAccountTokens.asKnown().getOrNull()?.size ?: 0) + + (if (name.asKnown().isPresent) 1 else 0) + (state.asKnown().getOrNull()?.validity() ?: 0) /** @@ -1108,18 +870,28 @@ private constructor( return true } - return other is UnionMember1 && + return other is AccountLevelRule && + accountTokens == other.accountTokens && + businessAccountTokens == other.businessAccountTokens && name == other.name && state == other.state && additionalProperties == other.additionalProperties } - private val hashCode: Int by lazy { Objects.hash(name, state, additionalProperties) } + private val hashCode: Int by lazy { + Objects.hash( + accountTokens, + businessAccountTokens, + name, + state, + additionalProperties, + ) + } override fun hashCode(): Int = hashCode override fun toString() = - "UnionMember1{name=$name, state=$state, additionalProperties=$additionalProperties}" + "AccountLevelRule{accountTokens=$accountTokens, businessAccountTokens=$businessAccountTokens, name=$name, state=$state, additionalProperties=$additionalProperties}" } class CardLevelRule diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt index d7a285328..5c137b6e9 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt @@ -39,8 +39,6 @@ private constructor( fun amount(): Long = body.amount() /** - * Category of the book transfer - * * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ @@ -255,7 +253,6 @@ private constructor( */ fun amount(amount: JsonField) = apply { body.amount(amount) } - /** Category of the book transfer */ fun category(category: BookTransferCategory) = apply { body.category(category) } /** @@ -593,8 +590,6 @@ private constructor( fun amount(): Long = amount.getRequired("amount") /** - * Category of the book transfer - * * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ @@ -829,7 +824,6 @@ private constructor( */ fun amount(amount: JsonField) = apply { this.amount = amount } - /** Category of the book transfer */ fun category(category: BookTransferCategory) = category(JsonField.of(category)) /** @@ -1097,7 +1091,6 @@ private constructor( "CreateBookTransferRequest{amount=$amount, category=$category, fromFinancialAccountToken=$fromFinancialAccountToken, subtype=$subtype, toFinancialAccountToken=$toFinancialAccountToken, type=$type, token=$token, externalId=$externalId, memo=$memo, onClosedAccount=$onClosedAccount, additionalProperties=$additionalProperties}" } - /** Category of the book transfer */ class BookTransferCategory @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -1124,8 +1117,12 @@ private constructor( @JvmField val FEE = of("FEE") + @JvmField val INTERNAL = of("INTERNAL") + @JvmField val REWARD = of("REWARD") + @JvmField val PROGRAM_FUNDING = of("PROGRAM_FUNDING") + @JvmField val TRANSFER = of("TRANSFER") @JvmStatic fun of(value: String) = BookTransferCategory(JsonField.of(value)) @@ -1138,7 +1135,9 @@ private constructor( DERECOGNITION, DISPUTE, FEE, + INTERNAL, REWARD, + PROGRAM_FUNDING, TRANSFER, } @@ -1158,7 +1157,9 @@ private constructor( DERECOGNITION, DISPUTE, FEE, + INTERNAL, REWARD, + PROGRAM_FUNDING, TRANSFER, /** * An enum member indicating that [BookTransferCategory] was instantiated with an @@ -1181,7 +1182,9 @@ private constructor( DERECOGNITION -> Value.DERECOGNITION DISPUTE -> Value.DISPUTE FEE -> Value.FEE + INTERNAL -> Value.INTERNAL REWARD -> Value.REWARD + PROGRAM_FUNDING -> Value.PROGRAM_FUNDING TRANSFER -> Value.TRANSFER else -> Value._UNKNOWN } @@ -1202,7 +1205,9 @@ private constructor( DERECOGNITION -> Known.DERECOGNITION DISPUTE -> Known.DISPUTE FEE -> Known.FEE + INTERNAL -> Known.INTERNAL REWARD -> Known.REWARD + PROGRAM_FUNDING -> Known.PROGRAM_FUNDING TRANSFER -> Known.TRANSFER else -> throw LithicInvalidDataException("Unknown BookTransferCategory: $value") } @@ -1275,6 +1280,8 @@ private constructor( companion object { + @JvmField val ATM_BALANCE_INQUIRY = of("ATM_BALANCE_INQUIRY") + @JvmField val ATM_WITHDRAWAL = of("ATM_WITHDRAWAL") @JvmField val ATM_DECLINE = of("ATM_DECLINE") @@ -1348,6 +1355,7 @@ private constructor( /** An enum containing [BookTransferType]'s known values. */ enum class Known { + ATM_BALANCE_INQUIRY, ATM_WITHDRAWAL, ATM_DECLINE, INTERNATIONAL_ATM_WITHDRAWAL, @@ -1394,6 +1402,7 @@ private constructor( * - It was constructed with an arbitrary value using the [of] method. */ enum class Value { + ATM_BALANCE_INQUIRY, ATM_WITHDRAWAL, ATM_DECLINE, INTERNATIONAL_ATM_WITHDRAWAL, @@ -1444,6 +1453,7 @@ private constructor( */ fun value(): Value = when (this) { + ATM_BALANCE_INQUIRY -> Value.ATM_BALANCE_INQUIRY ATM_WITHDRAWAL -> Value.ATM_WITHDRAWAL ATM_DECLINE -> Value.ATM_DECLINE INTERNATIONAL_ATM_WITHDRAWAL -> Value.INTERNATIONAL_ATM_WITHDRAWAL @@ -1492,6 +1502,7 @@ private constructor( */ fun known(): Known = when (this) { + ATM_BALANCE_INQUIRY -> Known.ATM_BALANCE_INQUIRY ATM_WITHDRAWAL -> Known.ATM_WITHDRAWAL ATM_DECLINE -> Known.ATM_DECLINE INTERNATIONAL_ATM_WITHDRAWAL -> Known.INTERNATIONAL_ATM_WITHDRAWAL diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt index b1b0fd379..874693b3c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt @@ -21,7 +21,7 @@ private constructor( private val accountToken: String?, private val begin: OffsetDateTime?, private val businessAccountToken: String?, - private val category: Category?, + private val category: BookTransferCategory?, private val end: OffsetDateTime?, private val endingBefore: String?, private val financialAccountToken: String?, @@ -44,7 +44,7 @@ private constructor( fun businessAccountToken(): Optional = Optional.ofNullable(businessAccountToken) /** Book Transfer category to be returned. */ - fun category(): Optional = Optional.ofNullable(category) + fun category(): Optional = Optional.ofNullable(category) /** * Date string in RFC 3339 format. Only entries created before the specified time will be @@ -101,7 +101,7 @@ private constructor( private var accountToken: String? = null private var begin: OffsetDateTime? = null private var businessAccountToken: String? = null - private var category: Category? = null + private var category: BookTransferCategory? = null private var end: OffsetDateTime? = null private var endingBefore: String? = null private var financialAccountToken: String? = null @@ -155,10 +155,10 @@ private constructor( businessAccountToken(businessAccountToken.getOrNull()) /** Book Transfer category to be returned. */ - fun category(category: Category?) = apply { this.category = category } + fun category(category: BookTransferCategory?) = apply { this.category = category } /** Alias for calling [Builder.category] with `category.orElse(null)`. */ - fun category(category: Optional) = category(category.getOrNull()) + fun category(category: Optional) = category(category.getOrNull()) /** * Date string in RFC 3339 format. Only entries created before the specified time will be @@ -370,7 +370,9 @@ private constructor( .build() /** Book Transfer category to be returned. */ - class Category @JsonCreator private constructor(private val value: JsonField) : Enum { + class BookTransferCategory + @JsonCreator + private constructor(private val value: JsonField) : Enum { /** * Returns this class instance's raw value. @@ -384,52 +386,64 @@ private constructor( companion object { - @JvmField val BALANCE_OR_FUNDING = of("BALANCE_OR_FUNDING") - - @JvmField val FEE = of("FEE") - - @JvmField val REWARD = of("REWARD") - @JvmField val ADJUSTMENT = of("ADJUSTMENT") + @JvmField val BALANCE_OR_FUNDING = of("BALANCE_OR_FUNDING") + @JvmField val DERECOGNITION = of("DERECOGNITION") @JvmField val DISPUTE = of("DISPUTE") + @JvmField val FEE = of("FEE") + @JvmField val INTERNAL = of("INTERNAL") - @JvmStatic fun of(value: String) = Category(JsonField.of(value)) + @JvmField val REWARD = of("REWARD") + + @JvmField val PROGRAM_FUNDING = of("PROGRAM_FUNDING") + + @JvmField val TRANSFER = of("TRANSFER") + + @JvmStatic fun of(value: String) = BookTransferCategory(JsonField.of(value)) } - /** An enum containing [Category]'s known values. */ + /** An enum containing [BookTransferCategory]'s known values. */ enum class Known { - BALANCE_OR_FUNDING, - FEE, - REWARD, ADJUSTMENT, + BALANCE_OR_FUNDING, DERECOGNITION, DISPUTE, + FEE, INTERNAL, + REWARD, + PROGRAM_FUNDING, + TRANSFER, } /** - * An enum containing [Category]'s known values, as well as an [_UNKNOWN] member. + * An enum containing [BookTransferCategory]'s known values, as well as an [_UNKNOWN] + * member. * - * An instance of [Category] can contain an unknown value in a couple of cases: + * An instance of [BookTransferCategory] 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 { - BALANCE_OR_FUNDING, - FEE, - REWARD, ADJUSTMENT, + BALANCE_OR_FUNDING, DERECOGNITION, DISPUTE, + FEE, INTERNAL, - /** An enum member indicating that [Category] was instantiated with an unknown value. */ + REWARD, + PROGRAM_FUNDING, + TRANSFER, + /** + * An enum member indicating that [BookTransferCategory] was instantiated with an + * unknown value. + */ _UNKNOWN, } @@ -442,13 +456,15 @@ private constructor( */ fun value(): Value = when (this) { - BALANCE_OR_FUNDING -> Value.BALANCE_OR_FUNDING - FEE -> Value.FEE - REWARD -> Value.REWARD ADJUSTMENT -> Value.ADJUSTMENT + BALANCE_OR_FUNDING -> Value.BALANCE_OR_FUNDING DERECOGNITION -> Value.DERECOGNITION DISPUTE -> Value.DISPUTE + FEE -> Value.FEE INTERNAL -> Value.INTERNAL + REWARD -> Value.REWARD + PROGRAM_FUNDING -> Value.PROGRAM_FUNDING + TRANSFER -> Value.TRANSFER else -> Value._UNKNOWN } @@ -463,14 +479,16 @@ private constructor( */ fun known(): Known = when (this) { - BALANCE_OR_FUNDING -> Known.BALANCE_OR_FUNDING - FEE -> Known.FEE - REWARD -> Known.REWARD ADJUSTMENT -> Known.ADJUSTMENT + BALANCE_OR_FUNDING -> Known.BALANCE_OR_FUNDING DERECOGNITION -> Known.DERECOGNITION DISPUTE -> Known.DISPUTE + FEE -> Known.FEE INTERNAL -> Known.INTERNAL - else -> throw LithicInvalidDataException("Unknown Category: $value") + REWARD -> Known.REWARD + PROGRAM_FUNDING -> Known.PROGRAM_FUNDING + TRANSFER -> Known.TRANSFER + else -> throw LithicInvalidDataException("Unknown BookTransferCategory: $value") } /** @@ -487,7 +505,7 @@ private constructor( private var validated: Boolean = false - fun validate(): Category = apply { + fun validate(): BookTransferCategory = apply { if (validated) { return@apply } @@ -517,7 +535,7 @@ private constructor( return true } - return other is Category && value == other.value + return other is BookTransferCategory && value == other.value } override fun hashCode() = value.hashCode() diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferResponse.kt index 10841dfc1..4c619f4e2 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferResponse.kt @@ -112,8 +112,6 @@ private constructor( fun token(): String = token.getRequired("token") /** - * Category of the book transfer - * * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). */ @@ -452,7 +450,6 @@ private constructor( */ fun token(token: JsonField) = apply { this.token = token } - /** Category of the book transfer */ fun category(category: BookTransferCategory) = category(JsonField.of(category)) /** @@ -800,7 +797,6 @@ private constructor( (transactionSeries.asKnown().getOrNull()?.validity() ?: 0) + (if (updated.asKnown().isPresent) 1 else 0) - /** Category of the book transfer */ class BookTransferCategory @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -827,8 +823,12 @@ private constructor( @JvmField val FEE = of("FEE") + @JvmField val INTERNAL = of("INTERNAL") + @JvmField val REWARD = of("REWARD") + @JvmField val PROGRAM_FUNDING = of("PROGRAM_FUNDING") + @JvmField val TRANSFER = of("TRANSFER") @JvmStatic fun of(value: String) = BookTransferCategory(JsonField.of(value)) @@ -841,7 +841,9 @@ private constructor( DERECOGNITION, DISPUTE, FEE, + INTERNAL, REWARD, + PROGRAM_FUNDING, TRANSFER, } @@ -861,7 +863,9 @@ private constructor( DERECOGNITION, DISPUTE, FEE, + INTERNAL, REWARD, + PROGRAM_FUNDING, TRANSFER, /** * An enum member indicating that [BookTransferCategory] was instantiated with an @@ -884,7 +888,9 @@ private constructor( DERECOGNITION -> Value.DERECOGNITION DISPUTE -> Value.DISPUTE FEE -> Value.FEE + INTERNAL -> Value.INTERNAL REWARD -> Value.REWARD + PROGRAM_FUNDING -> Value.PROGRAM_FUNDING TRANSFER -> Value.TRANSFER else -> Value._UNKNOWN } @@ -905,7 +911,9 @@ private constructor( DERECOGNITION -> Known.DERECOGNITION DISPUTE -> Known.DISPUTE FEE -> Known.FEE + INTERNAL -> Known.INTERNAL REWARD -> Known.REWARD + PROGRAM_FUNDING -> Known.PROGRAM_FUNDING TRANSFER -> Known.TRANSFER else -> throw LithicInvalidDataException("Unknown BookTransferCategory: $value") } @@ -1673,6 +1681,8 @@ private constructor( companion object { + @JvmField val ATM_BALANCE_INQUIRY = of("ATM_BALANCE_INQUIRY") + @JvmField val ATM_WITHDRAWAL = of("ATM_WITHDRAWAL") @JvmField val ATM_DECLINE = of("ATM_DECLINE") @@ -1746,6 +1756,7 @@ private constructor( /** An enum containing [BookTransferType]'s known values. */ enum class Known { + ATM_BALANCE_INQUIRY, ATM_WITHDRAWAL, ATM_DECLINE, INTERNATIONAL_ATM_WITHDRAWAL, @@ -1793,6 +1804,7 @@ private constructor( * - It was constructed with an arbitrary value using the [of] method. */ enum class Value { + ATM_BALANCE_INQUIRY, ATM_WITHDRAWAL, ATM_DECLINE, INTERNATIONAL_ATM_WITHDRAWAL, @@ -1843,6 +1855,7 @@ private constructor( */ fun value(): Value = when (this) { + ATM_BALANCE_INQUIRY -> Value.ATM_BALANCE_INQUIRY ATM_WITHDRAWAL -> Value.ATM_WITHDRAWAL ATM_DECLINE -> Value.ATM_DECLINE INTERNATIONAL_ATM_WITHDRAWAL -> Value.INTERNATIONAL_ATM_WITHDRAWAL @@ -1891,6 +1904,7 @@ private constructor( */ fun known(): Known = when (this) { + ATM_BALANCE_INQUIRY -> Known.ATM_BALANCE_INQUIRY ATM_WITHDRAWAL -> Known.ATM_WITHDRAWAL ATM_DECLINE -> Known.ATM_DECLINE INTERNATIONAL_ATM_WITHDRAWAL -> Known.INTERNATIONAL_ATM_WITHDRAWAL diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt index cb315bb54..21e8c0110 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt @@ -623,6 +623,7 @@ private constructor( private val financialAccountState: JsonField, private val isSpendBlocked: JsonField, private val tier: JsonField, + private val autoCollectionConfiguration: JsonField, private val additionalProperties: MutableMap, ) { @@ -647,6 +648,10 @@ private constructor( @ExcludeMissing isSpendBlocked: JsonField = JsonMissing.of(), @JsonProperty("tier") @ExcludeMissing tier: JsonField = JsonMissing.of(), + @JsonProperty("auto_collection_configuration") + @ExcludeMissing + autoCollectionConfiguration: JsonField = + JsonMissing.of(), ) : this( chargedOffReason, creditLimit, @@ -655,6 +660,7 @@ private constructor( financialAccountState, isSpendBlocked, tier, + autoCollectionConfiguration, mutableMapOf(), ) @@ -712,6 +718,13 @@ private constructor( */ fun tier(): Optional = tier.getOptional("tier") + /** + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun autoCollectionConfiguration(): Optional = + autoCollectionConfiguration.getOptional("auto_collection_configuration") + /** * Returns the raw JSON value of [chargedOffReason]. * @@ -778,6 +791,17 @@ private constructor( */ @JsonProperty("tier") @ExcludeMissing fun _tier(): JsonField = tier + /** + * Returns the raw JSON value of [autoCollectionConfiguration]. + * + * Unlike [autoCollectionConfiguration], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("auto_collection_configuration") + @ExcludeMissing + fun _autoCollectionConfiguration(): JsonField = + autoCollectionConfiguration + @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { additionalProperties.put(key, value) @@ -820,6 +844,9 @@ private constructor( private var financialAccountState: JsonField? = null private var isSpendBlocked: JsonField? = null private var tier: JsonField? = null + private var autoCollectionConfiguration: + JsonField = + JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -831,6 +858,8 @@ private constructor( financialAccountState = financialAccountCreditConfig.financialAccountState isSpendBlocked = financialAccountCreditConfig.isSpendBlocked tier = financialAccountCreditConfig.tier + autoCollectionConfiguration = + financialAccountCreditConfig.autoCollectionConfiguration additionalProperties = financialAccountCreditConfig.additionalProperties.toMutableMap() } @@ -972,6 +1001,21 @@ private constructor( */ fun tier(tier: JsonField) = apply { this.tier = tier } + fun autoCollectionConfiguration( + autoCollectionConfiguration: AutoCollectionConfigurationResponse + ) = autoCollectionConfiguration(JsonField.of(autoCollectionConfiguration)) + + /** + * Sets [Builder.autoCollectionConfiguration] to an arbitrary JSON value. + * + * You should usually call [Builder.autoCollectionConfiguration] with a well-typed + * [AutoCollectionConfigurationResponse] value instead. This method is primarily for + * setting the field to an undocumented or not yet supported value. + */ + fun autoCollectionConfiguration( + autoCollectionConfiguration: JsonField + ) = apply { this.autoCollectionConfiguration = autoCollectionConfiguration } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -1018,6 +1062,7 @@ private constructor( checkRequired("financialAccountState", financialAccountState), checkRequired("isSpendBlocked", isSpendBlocked), checkRequired("tier", tier), + autoCollectionConfiguration, additionalProperties.toMutableMap(), ) } @@ -1036,6 +1081,7 @@ private constructor( financialAccountState().ifPresent { it.validate() } isSpendBlocked() tier() + autoCollectionConfiguration().ifPresent { it.validate() } validated = true } @@ -1061,7 +1107,8 @@ private constructor( (if (externalBankAccountToken.asKnown().isPresent) 1 else 0) + (financialAccountState.asKnown().getOrNull()?.validity() ?: 0) + (if (isSpendBlocked.asKnown().isPresent) 1 else 0) + - (if (tier.asKnown().isPresent) 1 else 0) + (if (tier.asKnown().isPresent) 1 else 0) + + (autoCollectionConfiguration.asKnown().getOrNull()?.validity() ?: 0) /** Reason for the financial account being marked as Charged Off */ class ChargedOffReason @@ -1345,6 +1392,186 @@ private constructor( override fun toString() = value.toString() } + class AutoCollectionConfigurationResponse + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val autoCollectionEnabled: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("auto_collection_enabled") + @ExcludeMissing + autoCollectionEnabled: JsonField = JsonMissing.of() + ) : this(autoCollectionEnabled, mutableMapOf()) + + /** + * If auto collection is enabled for this account + * + * @throws LithicInvalidDataException 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 autoCollectionEnabled(): Boolean = + autoCollectionEnabled.getRequired("auto_collection_enabled") + + /** + * Returns the raw JSON value of [autoCollectionEnabled]. + * + * Unlike [autoCollectionEnabled], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("auto_collection_enabled") + @ExcludeMissing + fun _autoCollectionEnabled(): JsonField = autoCollectionEnabled + + @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 + * [AutoCollectionConfigurationResponse]. + * + * The following fields are required: + * ```java + * .autoCollectionEnabled() + * ``` + */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [AutoCollectionConfigurationResponse]. */ + class Builder internal constructor() { + + private var autoCollectionEnabled: JsonField? = null + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from( + autoCollectionConfigurationResponse: AutoCollectionConfigurationResponse + ) = apply { + autoCollectionEnabled = + autoCollectionConfigurationResponse.autoCollectionEnabled + additionalProperties = + autoCollectionConfigurationResponse.additionalProperties.toMutableMap() + } + + /** If auto collection is enabled for this account */ + fun autoCollectionEnabled(autoCollectionEnabled: Boolean) = + autoCollectionEnabled(JsonField.of(autoCollectionEnabled)) + + /** + * Sets [Builder.autoCollectionEnabled] to an arbitrary JSON value. + * + * You should usually call [Builder.autoCollectionEnabled] with a well-typed + * [Boolean] value instead. This method is primarily for setting the field to an + * undocumented or not yet supported value. + */ + fun autoCollectionEnabled(autoCollectionEnabled: JsonField) = apply { + this.autoCollectionEnabled = autoCollectionEnabled + } + + 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 [AutoCollectionConfigurationResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .autoCollectionEnabled() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ + fun build(): AutoCollectionConfigurationResponse = + AutoCollectionConfigurationResponse( + checkRequired("autoCollectionEnabled", autoCollectionEnabled), + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): AutoCollectionConfigurationResponse = apply { + if (validated) { + return@apply + } + + autoCollectionEnabled() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: LithicInvalidDataException) { + 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 (autoCollectionEnabled.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is AutoCollectionConfigurationResponse && + autoCollectionEnabled == other.autoCollectionEnabled && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(autoCollectionEnabled, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "AutoCollectionConfigurationResponse{autoCollectionEnabled=$autoCollectionEnabled, additionalProperties=$additionalProperties}" + } + override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -1358,6 +1585,7 @@ private constructor( financialAccountState == other.financialAccountState && isSpendBlocked == other.isSpendBlocked && tier == other.tier && + autoCollectionConfiguration == other.autoCollectionConfiguration && additionalProperties == other.additionalProperties } @@ -1370,6 +1598,7 @@ private constructor( financialAccountState, isSpendBlocked, tier, + autoCollectionConfiguration, additionalProperties, ) } @@ -1377,7 +1606,7 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "FinancialAccountCreditConfig{chargedOffReason=$chargedOffReason, creditLimit=$creditLimit, creditProductToken=$creditProductToken, externalBankAccountToken=$externalBankAccountToken, financialAccountState=$financialAccountState, isSpendBlocked=$isSpendBlocked, tier=$tier, additionalProperties=$additionalProperties}" + "FinancialAccountCreditConfig{chargedOffReason=$chargedOffReason, creditLimit=$creditLimit, creditProductToken=$creditProductToken, externalBankAccountToken=$externalBankAccountToken, financialAccountState=$financialAccountState, isSpendBlocked=$isSpendBlocked, tier=$tier, autoCollectionConfiguration=$autoCollectionConfiguration, additionalProperties=$additionalProperties}" } /** Status of the financial account */ diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfig.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfig.kt index 5134a3b74..0e2165be6 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfig.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfig.kt @@ -22,6 +22,7 @@ class FinancialAccountCreditConfig @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( private val accountToken: JsonField, + private val autoCollectionConfiguration: JsonField, private val chargedOffReason: JsonField, private val creditLimit: JsonField, private val creditProductToken: JsonField, @@ -37,6 +38,10 @@ private constructor( @JsonProperty("account_token") @ExcludeMissing accountToken: JsonField = JsonMissing.of(), + @JsonProperty("auto_collection_configuration") + @ExcludeMissing + autoCollectionConfiguration: JsonField = + JsonMissing.of(), @JsonProperty("charged_off_reason") @ExcludeMissing chargedOffReason: JsonField = JsonMissing.of(), @@ -58,6 +63,7 @@ private constructor( @JsonProperty("tier") @ExcludeMissing tier: JsonField = JsonMissing.of(), ) : this( accountToken, + autoCollectionConfiguration, chargedOffReason, creditLimit, creditProductToken, @@ -76,6 +82,13 @@ private constructor( */ fun accountToken(): String = accountToken.getRequired("account_token") + /** + * @throws LithicInvalidDataException 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 autoCollectionConfiguration(): AutoCollectionConfigurationResponse = + autoCollectionConfiguration.getRequired("auto_collection_configuration") + /** * Reason for the financial account being marked as Charged Off * @@ -139,6 +152,17 @@ private constructor( @ExcludeMissing fun _accountToken(): JsonField = accountToken + /** + * Returns the raw JSON value of [autoCollectionConfiguration]. + * + * Unlike [autoCollectionConfiguration], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("auto_collection_configuration") + @ExcludeMissing + fun _autoCollectionConfiguration(): JsonField = + autoCollectionConfiguration + /** * Returns the raw JSON value of [chargedOffReason]. * @@ -222,6 +246,7 @@ private constructor( * The following fields are required: * ```java * .accountToken() + * .autoCollectionConfiguration() * .chargedOffReason() * .creditLimit() * .creditProductToken() @@ -238,6 +263,8 @@ private constructor( class Builder internal constructor() { private var accountToken: JsonField? = null + private var autoCollectionConfiguration: JsonField? = + null private var chargedOffReason: JsonField? = null private var creditLimit: JsonField? = null private var creditProductToken: JsonField? = null @@ -250,6 +277,7 @@ private constructor( @JvmSynthetic internal fun from(financialAccountCreditConfig: FinancialAccountCreditConfig) = apply { accountToken = financialAccountCreditConfig.accountToken + autoCollectionConfiguration = financialAccountCreditConfig.autoCollectionConfiguration chargedOffReason = financialAccountCreditConfig.chargedOffReason creditLimit = financialAccountCreditConfig.creditLimit creditProductToken = financialAccountCreditConfig.creditProductToken @@ -274,6 +302,21 @@ private constructor( this.accountToken = accountToken } + fun autoCollectionConfiguration( + autoCollectionConfiguration: AutoCollectionConfigurationResponse + ) = autoCollectionConfiguration(JsonField.of(autoCollectionConfiguration)) + + /** + * Sets [Builder.autoCollectionConfiguration] to an arbitrary JSON value. + * + * You should usually call [Builder.autoCollectionConfiguration] with a well-typed + * [AutoCollectionConfigurationResponse] value instead. This method is primarily for setting + * the field to an undocumented or not yet supported value. + */ + fun autoCollectionConfiguration( + autoCollectionConfiguration: JsonField + ) = apply { this.autoCollectionConfiguration = autoCollectionConfiguration } + /** Reason for the financial account being marked as Charged Off */ fun chargedOffReason(chargedOffReason: ChargedOffReason?) = chargedOffReason(JsonField.ofNullable(chargedOffReason)) @@ -425,6 +468,7 @@ private constructor( * The following fields are required: * ```java * .accountToken() + * .autoCollectionConfiguration() * .chargedOffReason() * .creditLimit() * .creditProductToken() @@ -439,6 +483,7 @@ private constructor( fun build(): FinancialAccountCreditConfig = FinancialAccountCreditConfig( checkRequired("accountToken", accountToken), + checkRequired("autoCollectionConfiguration", autoCollectionConfiguration), checkRequired("chargedOffReason", chargedOffReason), checkRequired("creditLimit", creditLimit), checkRequired("creditProductToken", creditProductToken), @@ -458,6 +503,7 @@ private constructor( } accountToken() + autoCollectionConfiguration().validate() chargedOffReason().ifPresent { it.validate() } creditLimit() creditProductToken() @@ -484,6 +530,7 @@ private constructor( @JvmSynthetic internal fun validity(): Int = (if (accountToken.asKnown().isPresent) 1 else 0) + + (autoCollectionConfiguration.asKnown().getOrNull()?.validity() ?: 0) + (chargedOffReason.asKnown().getOrNull()?.validity() ?: 0) + (if (creditLimit.asKnown().isPresent) 1 else 0) + (if (creditProductToken.asKnown().isPresent) 1 else 0) + @@ -492,6 +539,181 @@ private constructor( (if (isSpendBlocked.asKnown().isPresent) 1 else 0) + (if (tier.asKnown().isPresent) 1 else 0) + class AutoCollectionConfigurationResponse + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val autoCollectionEnabled: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("auto_collection_enabled") + @ExcludeMissing + autoCollectionEnabled: JsonField = JsonMissing.of() + ) : this(autoCollectionEnabled, mutableMapOf()) + + /** + * If auto collection is enabled for this account + * + * @throws LithicInvalidDataException 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 autoCollectionEnabled(): Boolean = + autoCollectionEnabled.getRequired("auto_collection_enabled") + + /** + * Returns the raw JSON value of [autoCollectionEnabled]. + * + * Unlike [autoCollectionEnabled], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("auto_collection_enabled") + @ExcludeMissing + fun _autoCollectionEnabled(): JsonField = autoCollectionEnabled + + @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 + * [AutoCollectionConfigurationResponse]. + * + * The following fields are required: + * ```java + * .autoCollectionEnabled() + * ``` + */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [AutoCollectionConfigurationResponse]. */ + class Builder internal constructor() { + + private var autoCollectionEnabled: JsonField? = null + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from( + autoCollectionConfigurationResponse: AutoCollectionConfigurationResponse + ) = apply { + autoCollectionEnabled = autoCollectionConfigurationResponse.autoCollectionEnabled + additionalProperties = + autoCollectionConfigurationResponse.additionalProperties.toMutableMap() + } + + /** If auto collection is enabled for this account */ + fun autoCollectionEnabled(autoCollectionEnabled: Boolean) = + autoCollectionEnabled(JsonField.of(autoCollectionEnabled)) + + /** + * Sets [Builder.autoCollectionEnabled] to an arbitrary JSON value. + * + * You should usually call [Builder.autoCollectionEnabled] with a well-typed [Boolean] + * value instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun autoCollectionEnabled(autoCollectionEnabled: JsonField) = apply { + this.autoCollectionEnabled = autoCollectionEnabled + } + + 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 [AutoCollectionConfigurationResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```java + * .autoCollectionEnabled() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ + fun build(): AutoCollectionConfigurationResponse = + AutoCollectionConfigurationResponse( + checkRequired("autoCollectionEnabled", autoCollectionEnabled), + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): AutoCollectionConfigurationResponse = apply { + if (validated) { + return@apply + } + + autoCollectionEnabled() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: LithicInvalidDataException) { + 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 (autoCollectionEnabled.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is AutoCollectionConfigurationResponse && + autoCollectionEnabled == other.autoCollectionEnabled && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(autoCollectionEnabled, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "AutoCollectionConfigurationResponse{autoCollectionEnabled=$autoCollectionEnabled, additionalProperties=$additionalProperties}" + } + /** Reason for the financial account being marked as Charged Off */ class ChargedOffReason @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -773,6 +995,7 @@ private constructor( return other is FinancialAccountCreditConfig && accountToken == other.accountToken && + autoCollectionConfiguration == other.autoCollectionConfiguration && chargedOffReason == other.chargedOffReason && creditLimit == other.creditLimit && creditProductToken == other.creditProductToken && @@ -786,6 +1009,7 @@ private constructor( private val hashCode: Int by lazy { Objects.hash( accountToken, + autoCollectionConfiguration, chargedOffReason, creditLimit, creditProductToken, @@ -800,5 +1024,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "FinancialAccountCreditConfig{accountToken=$accountToken, chargedOffReason=$chargedOffReason, creditLimit=$creditLimit, creditProductToken=$creditProductToken, externalBankAccountToken=$externalBankAccountToken, financialAccountState=$financialAccountState, isSpendBlocked=$isSpendBlocked, tier=$tier, additionalProperties=$additionalProperties}" + "FinancialAccountCreditConfig{accountToken=$accountToken, autoCollectionConfiguration=$autoCollectionConfiguration, chargedOffReason=$chargedOffReason, creditLimit=$creditLimit, creditProductToken=$creditProductToken, externalBankAccountToken=$externalBankAccountToken, financialAccountState=$financialAccountState, isSpendBlocked=$isSpendBlocked, tier=$tier, additionalProperties=$additionalProperties}" } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfigurationUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfigurationUpdateParams.kt index b0ffa8f84..66e496368 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfigurationUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfigurationUpdateParams.kt @@ -30,6 +30,13 @@ private constructor( fun financialAccountToken(): Optional = Optional.ofNullable(financialAccountToken) + /** + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun autoCollectionConfiguration(): Optional = + body.autoCollectionConfiguration() + /** * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -58,6 +65,15 @@ private constructor( */ fun tier(): Optional = body.tier() + /** + * Returns the raw JSON value of [autoCollectionConfiguration]. + * + * Unlike [autoCollectionConfiguration], this method doesn't throw if the JSON field has an + * unexpected type. + */ + fun _autoCollectionConfiguration(): JsonField = + body._autoCollectionConfiguration() + /** * Returns the raw JSON value of [creditLimit]. * @@ -148,13 +164,30 @@ 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: + * - [autoCollectionConfiguration] * - [creditLimit] * - [creditProductToken] * - [externalBankAccountToken] * - [tier] + * - etc. */ fun body(body: FinancialAccountCreditConfigRequest) = apply { this.body = body.toBuilder() } + fun autoCollectionConfiguration( + autoCollectionConfiguration: AutoCollectionConfigurationRequest + ) = apply { body.autoCollectionConfiguration(autoCollectionConfiguration) } + + /** + * Sets [Builder.autoCollectionConfiguration] to an arbitrary JSON value. + * + * You should usually call [Builder.autoCollectionConfiguration] with a well-typed + * [AutoCollectionConfigurationRequest] value instead. This method is primarily for setting + * the field to an undocumented or not yet supported value. + */ + fun autoCollectionConfiguration( + autoCollectionConfiguration: JsonField + ) = apply { body.autoCollectionConfiguration(autoCollectionConfiguration) } + fun creditLimit(creditLimit: Long) = apply { body.creditLimit(creditLimit) } /** @@ -354,6 +387,7 @@ private constructor( class FinancialAccountCreditConfigRequest @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( + private val autoCollectionConfiguration: JsonField, private val creditLimit: JsonField, private val creditProductToken: JsonField, private val externalBankAccountToken: JsonField, @@ -363,6 +397,10 @@ private constructor( @JsonCreator private constructor( + @JsonProperty("auto_collection_configuration") + @ExcludeMissing + autoCollectionConfiguration: JsonField = + JsonMissing.of(), @JsonProperty("credit_limit") @ExcludeMissing creditLimit: JsonField = JsonMissing.of(), @@ -373,7 +411,21 @@ private constructor( @ExcludeMissing externalBankAccountToken: JsonField = JsonMissing.of(), @JsonProperty("tier") @ExcludeMissing tier: JsonField = JsonMissing.of(), - ) : this(creditLimit, creditProductToken, externalBankAccountToken, tier, mutableMapOf()) + ) : this( + autoCollectionConfiguration, + creditLimit, + creditProductToken, + externalBankAccountToken, + tier, + mutableMapOf(), + ) + + /** + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun autoCollectionConfiguration(): Optional = + autoCollectionConfiguration.getOptional("auto_collection_configuration") /** * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -405,6 +457,17 @@ private constructor( */ fun tier(): Optional = tier.getOptional("tier") + /** + * Returns the raw JSON value of [autoCollectionConfiguration]. + * + * Unlike [autoCollectionConfiguration], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("auto_collection_configuration") + @ExcludeMissing + fun _autoCollectionConfiguration(): JsonField = + autoCollectionConfiguration + /** * Returns the raw JSON value of [creditLimit]. * @@ -465,6 +528,8 @@ private constructor( /** A builder for [FinancialAccountCreditConfigRequest]. */ class Builder internal constructor() { + private var autoCollectionConfiguration: JsonField = + JsonMissing.of() private var creditLimit: JsonField = JsonMissing.of() private var creditProductToken: JsonField = JsonMissing.of() private var externalBankAccountToken: JsonField = JsonMissing.of() @@ -475,6 +540,8 @@ private constructor( internal fun from( financialAccountCreditConfigRequest: FinancialAccountCreditConfigRequest ) = apply { + autoCollectionConfiguration = + financialAccountCreditConfigRequest.autoCollectionConfiguration creditLimit = financialAccountCreditConfigRequest.creditLimit creditProductToken = financialAccountCreditConfigRequest.creditProductToken externalBankAccountToken = @@ -484,6 +551,21 @@ private constructor( financialAccountCreditConfigRequest.additionalProperties.toMutableMap() } + fun autoCollectionConfiguration( + autoCollectionConfiguration: AutoCollectionConfigurationRequest + ) = autoCollectionConfiguration(JsonField.of(autoCollectionConfiguration)) + + /** + * Sets [Builder.autoCollectionConfiguration] to an arbitrary JSON value. + * + * You should usually call [Builder.autoCollectionConfiguration] with a well-typed + * [AutoCollectionConfigurationRequest] value instead. This method is primarily for + * setting the field to an undocumented or not yet supported value. + */ + fun autoCollectionConfiguration( + autoCollectionConfiguration: JsonField + ) = apply { this.autoCollectionConfiguration = autoCollectionConfiguration } + fun creditLimit(creditLimit: Long) = creditLimit(JsonField.of(creditLimit)) /** @@ -562,6 +644,7 @@ private constructor( */ fun build(): FinancialAccountCreditConfigRequest = FinancialAccountCreditConfigRequest( + autoCollectionConfiguration, creditLimit, creditProductToken, externalBankAccountToken, @@ -577,6 +660,7 @@ private constructor( return@apply } + autoCollectionConfiguration().ifPresent { it.validate() } creditLimit() creditProductToken() externalBankAccountToken() @@ -600,7 +684,8 @@ private constructor( */ @JvmSynthetic internal fun validity(): Int = - (if (creditLimit.asKnown().isPresent) 1 else 0) + + (autoCollectionConfiguration.asKnown().getOrNull()?.validity() ?: 0) + + (if (creditLimit.asKnown().isPresent) 1 else 0) + (if (creditProductToken.asKnown().isPresent) 1 else 0) + (if (externalBankAccountToken.asKnown().isPresent) 1 else 0) + (if (tier.asKnown().isPresent) 1 else 0) @@ -611,6 +696,7 @@ private constructor( } return other is FinancialAccountCreditConfigRequest && + autoCollectionConfiguration == other.autoCollectionConfiguration && creditLimit == other.creditLimit && creditProductToken == other.creditProductToken && externalBankAccountToken == other.externalBankAccountToken && @@ -620,6 +706,7 @@ private constructor( private val hashCode: Int by lazy { Objects.hash( + autoCollectionConfiguration, creditLimit, creditProductToken, externalBankAccountToken, @@ -631,7 +718,170 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "FinancialAccountCreditConfigRequest{creditLimit=$creditLimit, creditProductToken=$creditProductToken, externalBankAccountToken=$externalBankAccountToken, tier=$tier, additionalProperties=$additionalProperties}" + "FinancialAccountCreditConfigRequest{autoCollectionConfiguration=$autoCollectionConfiguration, creditLimit=$creditLimit, creditProductToken=$creditProductToken, externalBankAccountToken=$externalBankAccountToken, tier=$tier, additionalProperties=$additionalProperties}" + } + + class AutoCollectionConfigurationRequest + @JsonCreator(mode = JsonCreator.Mode.DISABLED) + private constructor( + private val autoCollectionEnabled: JsonField, + private val additionalProperties: MutableMap, + ) { + + @JsonCreator + private constructor( + @JsonProperty("auto_collection_enabled") + @ExcludeMissing + autoCollectionEnabled: JsonField = JsonMissing.of() + ) : this(autoCollectionEnabled, mutableMapOf()) + + /** + * If auto collection is enabled for this account + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun autoCollectionEnabled(): Optional = + autoCollectionEnabled.getOptional("auto_collection_enabled") + + /** + * Returns the raw JSON value of [autoCollectionEnabled]. + * + * Unlike [autoCollectionEnabled], this method doesn't throw if the JSON field has an + * unexpected type. + */ + @JsonProperty("auto_collection_enabled") + @ExcludeMissing + fun _autoCollectionEnabled(): JsonField = autoCollectionEnabled + + @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 + * [AutoCollectionConfigurationRequest]. + */ + @JvmStatic fun builder() = Builder() + } + + /** A builder for [AutoCollectionConfigurationRequest]. */ + class Builder internal constructor() { + + private var autoCollectionEnabled: JsonField = JsonMissing.of() + private var additionalProperties: MutableMap = mutableMapOf() + + @JvmSynthetic + internal fun from( + autoCollectionConfigurationRequest: AutoCollectionConfigurationRequest + ) = apply { + autoCollectionEnabled = autoCollectionConfigurationRequest.autoCollectionEnabled + additionalProperties = + autoCollectionConfigurationRequest.additionalProperties.toMutableMap() + } + + /** If auto collection is enabled for this account */ + fun autoCollectionEnabled(autoCollectionEnabled: Boolean) = + autoCollectionEnabled(JsonField.of(autoCollectionEnabled)) + + /** + * Sets [Builder.autoCollectionEnabled] to an arbitrary JSON value. + * + * You should usually call [Builder.autoCollectionEnabled] with a well-typed [Boolean] + * value instead. This method is primarily for setting the field to an undocumented or + * not yet supported value. + */ + fun autoCollectionEnabled(autoCollectionEnabled: JsonField) = apply { + this.autoCollectionEnabled = autoCollectionEnabled + } + + 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 [AutoCollectionConfigurationRequest]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ + fun build(): AutoCollectionConfigurationRequest = + AutoCollectionConfigurationRequest( + autoCollectionEnabled, + additionalProperties.toMutableMap(), + ) + } + + private var validated: Boolean = false + + fun validate(): AutoCollectionConfigurationRequest = apply { + if (validated) { + return@apply + } + + autoCollectionEnabled() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: LithicInvalidDataException) { + 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 (autoCollectionEnabled.asKnown().isPresent) 1 else 0) + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is AutoCollectionConfigurationRequest && + autoCollectionEnabled == other.autoCollectionEnabled && + additionalProperties == other.additionalProperties + } + + private val hashCode: Int by lazy { + Objects.hash(autoCollectionEnabled, additionalProperties) + } + + override fun hashCode(): Int = hashCode + + override fun toString() = + "AutoCollectionConfigurationRequest{autoCollectionEnabled=$autoCollectionEnabled, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransaction.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransaction.kt index 2300e2ad7..3b197901c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransaction.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransaction.kt @@ -1185,6 +1185,8 @@ private constructor( @JvmField val ACH_ORIGINATION_RELEASED = of("ACH_ORIGINATION_RELEASED") + @JvmField val ACH_ORIGINATION_REJECTED = of("ACH_ORIGINATION_REJECTED") + @JvmField val ACH_ORIGINATION_REVIEWED = of("ACH_ORIGINATION_REVIEWED") @JvmField val ACH_ORIGINATION_SETTLED = of("ACH_ORIGINATION_SETTLED") @@ -1197,6 +1199,8 @@ private constructor( @JvmField val ACH_RETURN_PROCESSED = of("ACH_RETURN_PROCESSED") + @JvmField val ACH_RETURN_REJECTED = of("ACH_RETURN_REJECTED") + @JvmField val ACH_RETURN_SETTLED = of("ACH_RETURN_SETTLED") @JvmField val AUTHORIZATION = of("AUTHORIZATION") @@ -1322,12 +1326,14 @@ private constructor( ACH_ORIGINATION_INITIATED, ACH_ORIGINATION_PROCESSED, ACH_ORIGINATION_RELEASED, + ACH_ORIGINATION_REJECTED, ACH_ORIGINATION_REVIEWED, ACH_ORIGINATION_SETTLED, ACH_RECEIPT_PROCESSED, ACH_RECEIPT_SETTLED, ACH_RETURN_INITIATED, ACH_RETURN_PROCESSED, + ACH_RETURN_REJECTED, ACH_RETURN_SETTLED, AUTHORIZATION, AUTHORIZATION_ADVICE, @@ -1404,12 +1410,14 @@ private constructor( ACH_ORIGINATION_INITIATED, ACH_ORIGINATION_PROCESSED, ACH_ORIGINATION_RELEASED, + ACH_ORIGINATION_REJECTED, ACH_ORIGINATION_REVIEWED, ACH_ORIGINATION_SETTLED, ACH_RECEIPT_PROCESSED, ACH_RECEIPT_SETTLED, ACH_RETURN_INITIATED, ACH_RETURN_PROCESSED, + ACH_RETURN_REJECTED, ACH_RETURN_SETTLED, AUTHORIZATION, AUTHORIZATION_ADVICE, @@ -1488,12 +1496,14 @@ private constructor( ACH_ORIGINATION_INITIATED -> Value.ACH_ORIGINATION_INITIATED ACH_ORIGINATION_PROCESSED -> Value.ACH_ORIGINATION_PROCESSED ACH_ORIGINATION_RELEASED -> Value.ACH_ORIGINATION_RELEASED + ACH_ORIGINATION_REJECTED -> Value.ACH_ORIGINATION_REJECTED ACH_ORIGINATION_REVIEWED -> Value.ACH_ORIGINATION_REVIEWED ACH_ORIGINATION_SETTLED -> Value.ACH_ORIGINATION_SETTLED ACH_RECEIPT_PROCESSED -> Value.ACH_RECEIPT_PROCESSED ACH_RECEIPT_SETTLED -> Value.ACH_RECEIPT_SETTLED ACH_RETURN_INITIATED -> Value.ACH_RETURN_INITIATED ACH_RETURN_PROCESSED -> Value.ACH_RETURN_PROCESSED + ACH_RETURN_REJECTED -> Value.ACH_RETURN_REJECTED ACH_RETURN_SETTLED -> Value.ACH_RETURN_SETTLED AUTHORIZATION -> Value.AUTHORIZATION AUTHORIZATION_ADVICE -> Value.AUTHORIZATION_ADVICE @@ -1570,12 +1580,14 @@ private constructor( ACH_ORIGINATION_INITIATED -> Known.ACH_ORIGINATION_INITIATED ACH_ORIGINATION_PROCESSED -> Known.ACH_ORIGINATION_PROCESSED ACH_ORIGINATION_RELEASED -> Known.ACH_ORIGINATION_RELEASED + ACH_ORIGINATION_REJECTED -> Known.ACH_ORIGINATION_REJECTED ACH_ORIGINATION_REVIEWED -> Known.ACH_ORIGINATION_REVIEWED ACH_ORIGINATION_SETTLED -> Known.ACH_ORIGINATION_SETTLED ACH_RECEIPT_PROCESSED -> Known.ACH_RECEIPT_PROCESSED ACH_RECEIPT_SETTLED -> Known.ACH_RECEIPT_SETTLED ACH_RETURN_INITIATED -> Known.ACH_RETURN_INITIATED ACH_RETURN_PROCESSED -> Known.ACH_RETURN_PROCESSED + ACH_RETURN_REJECTED -> Known.ACH_RETURN_REJECTED ACH_RETURN_SETTLED -> Known.ACH_RETURN_SETTLED AUTHORIZATION -> Known.AUTHORIZATION AUTHORIZATION_ADVICE -> Known.AUTHORIZATION_ADVICE diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementDetail.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementDetail.kt index a33b8b130..d0eb9c223 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementDetail.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementDetail.kt @@ -137,7 +137,7 @@ private constructor( fun token(): String = token.getRequired("token") /** - * The most granular ID the network settles with (e.g., ICA for Mastercard, FTSRE for Visa). + * Globally unique identifier denoting the account that the associated transaction occurred on. * * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -145,7 +145,7 @@ private constructor( fun accountToken(): String = accountToken.getRequired("account_token") /** - * Globally unique identifier denoting the card program that the associated Transaction occurred + * Globally unique identifier denoting the card program that the associated transaction occurred * on. * * @throws LithicInvalidDataException if the JSON field has an unexpected type or is @@ -154,7 +154,7 @@ private constructor( fun cardProgramToken(): String = cardProgramToken.getRequired("card_program_token") /** - * Globally unique identifier denoting the card that the associated Transaction occurred on. + * Globally unique identifier denoting the card that the associated transaction occurred on. * * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -590,7 +590,8 @@ private constructor( fun token(token: JsonField) = apply { this.token = token } /** - * The most granular ID the network settles with (e.g., ICA for Mastercard, FTSRE for Visa). + * Globally unique identifier denoting the account that the associated transaction occurred + * on. */ fun accountToken(accountToken: String) = accountToken(JsonField.of(accountToken)) @@ -606,7 +607,7 @@ private constructor( } /** - * Globally unique identifier denoting the card program that the associated Transaction + * Globally unique identifier denoting the card program that the associated transaction * occurred on. */ fun cardProgramToken(cardProgramToken: String) = @@ -624,7 +625,7 @@ private constructor( } /** - * Globally unique identifier denoting the card that the associated Transaction occurred on. + * Globally unique identifier denoting the card that the associated transaction occurred on. */ fun cardToken(cardToken: String) = cardToken(JsonField.of(cardToken)) diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementLineItems.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementLineItems.kt index a6ed5e8b2..6e0106d11 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementLineItems.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementLineItems.kt @@ -830,6 +830,16 @@ private constructor( @JvmField val BALANCE_OR_FUNDING = of("BALANCE_OR_FUNDING") + @JvmField val FEE = of("FEE") + + @JvmField val REWARD = of("REWARD") + + @JvmField val ADJUSTMENT = of("ADJUSTMENT") + + @JvmField val DERECOGNITION = of("DERECOGNITION") + + @JvmField val DISPUTE = of("DISPUTE") + @JvmField val CARD = of("CARD") @JvmField val EXTERNAL_ACH = of("EXTERNAL_ACH") @@ -859,6 +869,11 @@ private constructor( enum class Known { ACH, BALANCE_OR_FUNDING, + FEE, + REWARD, + ADJUSTMENT, + DERECOGNITION, + DISPUTE, CARD, EXTERNAL_ACH, EXTERNAL_CHECK, @@ -886,6 +901,11 @@ private constructor( enum class Value { ACH, BALANCE_OR_FUNDING, + FEE, + REWARD, + ADJUSTMENT, + DERECOGNITION, + DISPUTE, CARD, EXTERNAL_ACH, EXTERNAL_CHECK, @@ -915,6 +935,11 @@ private constructor( when (this) { ACH -> Value.ACH BALANCE_OR_FUNDING -> Value.BALANCE_OR_FUNDING + FEE -> Value.FEE + REWARD -> Value.REWARD + ADJUSTMENT -> Value.ADJUSTMENT + DERECOGNITION -> Value.DERECOGNITION + DISPUTE -> Value.DISPUTE CARD -> Value.CARD EXTERNAL_ACH -> Value.EXTERNAL_ACH EXTERNAL_CHECK -> Value.EXTERNAL_CHECK @@ -942,6 +967,11 @@ private constructor( when (this) { ACH -> Known.ACH BALANCE_OR_FUNDING -> Known.BALANCE_OR_FUNDING + FEE -> Known.FEE + REWARD -> Known.REWARD + ADJUSTMENT -> Known.ADJUSTMENT + DERECOGNITION -> Known.DERECOGNITION + DISPUTE -> Known.DISPUTE CARD -> Known.CARD EXTERNAL_ACH -> Known.EXTERNAL_ACH EXTERNAL_CHECK -> Known.EXTERNAL_CHECK @@ -1034,6 +1064,8 @@ private constructor( @JvmField val ACH_ORIGINATION_RELEASED = of("ACH_ORIGINATION_RELEASED") + @JvmField val ACH_ORIGINATION_REJECTED = of("ACH_ORIGINATION_REJECTED") + @JvmField val ACH_ORIGINATION_REVIEWED = of("ACH_ORIGINATION_REVIEWED") @JvmField val ACH_ORIGINATION_SETTLED = of("ACH_ORIGINATION_SETTLED") @@ -1046,6 +1078,8 @@ private constructor( @JvmField val ACH_RETURN_PROCESSED = of("ACH_RETURN_PROCESSED") + @JvmField val ACH_RETURN_REJECTED = of("ACH_RETURN_REJECTED") + @JvmField val ACH_RETURN_SETTLED = of("ACH_RETURN_SETTLED") @JvmField val AUTHORIZATION = of("AUTHORIZATION") @@ -1171,12 +1205,14 @@ private constructor( ACH_ORIGINATION_INITIATED, ACH_ORIGINATION_PROCESSED, ACH_ORIGINATION_RELEASED, + ACH_ORIGINATION_REJECTED, ACH_ORIGINATION_REVIEWED, ACH_ORIGINATION_SETTLED, ACH_RECEIPT_PROCESSED, ACH_RECEIPT_SETTLED, ACH_RETURN_INITIATED, ACH_RETURN_PROCESSED, + ACH_RETURN_REJECTED, ACH_RETURN_SETTLED, AUTHORIZATION, AUTHORIZATION_ADVICE, @@ -1253,12 +1289,14 @@ private constructor( ACH_ORIGINATION_INITIATED, ACH_ORIGINATION_PROCESSED, ACH_ORIGINATION_RELEASED, + ACH_ORIGINATION_REJECTED, ACH_ORIGINATION_REVIEWED, ACH_ORIGINATION_SETTLED, ACH_RECEIPT_PROCESSED, ACH_RECEIPT_SETTLED, ACH_RETURN_INITIATED, ACH_RETURN_PROCESSED, + ACH_RETURN_REJECTED, ACH_RETURN_SETTLED, AUTHORIZATION, AUTHORIZATION_ADVICE, @@ -1337,12 +1375,14 @@ private constructor( ACH_ORIGINATION_INITIATED -> Value.ACH_ORIGINATION_INITIATED ACH_ORIGINATION_PROCESSED -> Value.ACH_ORIGINATION_PROCESSED ACH_ORIGINATION_RELEASED -> Value.ACH_ORIGINATION_RELEASED + ACH_ORIGINATION_REJECTED -> Value.ACH_ORIGINATION_REJECTED ACH_ORIGINATION_REVIEWED -> Value.ACH_ORIGINATION_REVIEWED ACH_ORIGINATION_SETTLED -> Value.ACH_ORIGINATION_SETTLED ACH_RECEIPT_PROCESSED -> Value.ACH_RECEIPT_PROCESSED ACH_RECEIPT_SETTLED -> Value.ACH_RECEIPT_SETTLED ACH_RETURN_INITIATED -> Value.ACH_RETURN_INITIATED ACH_RETURN_PROCESSED -> Value.ACH_RETURN_PROCESSED + ACH_RETURN_REJECTED -> Value.ACH_RETURN_REJECTED ACH_RETURN_SETTLED -> Value.ACH_RETURN_SETTLED AUTHORIZATION -> Value.AUTHORIZATION AUTHORIZATION_ADVICE -> Value.AUTHORIZATION_ADVICE @@ -1419,12 +1459,14 @@ private constructor( ACH_ORIGINATION_INITIATED -> Known.ACH_ORIGINATION_INITIATED ACH_ORIGINATION_PROCESSED -> Known.ACH_ORIGINATION_PROCESSED ACH_ORIGINATION_RELEASED -> Known.ACH_ORIGINATION_RELEASED + ACH_ORIGINATION_REJECTED -> Known.ACH_ORIGINATION_REJECTED ACH_ORIGINATION_REVIEWED -> Known.ACH_ORIGINATION_REVIEWED ACH_ORIGINATION_SETTLED -> Known.ACH_ORIGINATION_SETTLED ACH_RECEIPT_PROCESSED -> Known.ACH_RECEIPT_PROCESSED ACH_RECEIPT_SETTLED -> Known.ACH_RECEIPT_SETTLED ACH_RETURN_INITIATED -> Known.ACH_RETURN_INITIATED ACH_RETURN_PROCESSED -> Known.ACH_RETURN_PROCESSED + ACH_RETURN_REJECTED -> Known.ACH_RETURN_REJECTED ACH_RETURN_SETTLED -> Known.ACH_RETURN_SETTLED AUTHORIZATION -> Known.AUTHORIZATION AUTHORIZATION_ADVICE -> Known.AUTHORIZATION_ADVICE diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Tokenization.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Tokenization.kt index dc13c147a..419d989ca 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Tokenization.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Tokenization.kt @@ -28,6 +28,7 @@ private constructor( private val accountToken: JsonField, private val cardToken: JsonField, private val createdAt: JsonField, + private val deviceId: JsonField, private val dpan: JsonField, private val status: JsonField, private val tokenRequestorName: JsonField, @@ -50,6 +51,7 @@ private constructor( @JsonProperty("created_at") @ExcludeMissing createdAt: JsonField = JsonMissing.of(), + @JsonProperty("device_id") @ExcludeMissing deviceId: JsonField = JsonMissing.of(), @JsonProperty("dpan") @ExcludeMissing dpan: JsonField = JsonMissing.of(), @JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(), @JsonProperty("token_requestor_name") @@ -78,6 +80,7 @@ private constructor( accountToken, cardToken, createdAt, + deviceId, dpan, status, tokenRequestorName, @@ -122,6 +125,14 @@ private constructor( */ fun createdAt(): OffsetDateTime = createdAt.getRequired("created_at") + /** + * The device identifier associated with the tokenization. + * + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun deviceId(): Optional = deviceId.getOptional("device_id") + /** * The dynamic pan assigned to the token by the network. * @@ -232,6 +243,13 @@ private constructor( @ExcludeMissing fun _createdAt(): JsonField = createdAt + /** + * Returns the raw JSON value of [deviceId]. + * + * Unlike [deviceId], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("device_id") @ExcludeMissing fun _deviceId(): JsonField = deviceId + /** * Returns the raw JSON value of [dpan]. * @@ -337,6 +355,7 @@ private constructor( * .accountToken() * .cardToken() * .createdAt() + * .deviceId() * .dpan() * .status() * .tokenRequestorName() @@ -355,6 +374,7 @@ private constructor( private var accountToken: JsonField? = null private var cardToken: JsonField? = null private var createdAt: JsonField? = null + private var deviceId: JsonField? = null private var dpan: JsonField? = null private var status: JsonField? = null private var tokenRequestorName: JsonField? = null @@ -372,6 +392,7 @@ private constructor( accountToken = tokenization.accountToken cardToken = tokenization.cardToken createdAt = tokenization.createdAt + deviceId = tokenization.deviceId dpan = tokenization.dpan status = tokenization.status tokenRequestorName = tokenization.tokenRequestorName @@ -433,6 +454,20 @@ private constructor( */ fun createdAt(createdAt: JsonField) = apply { this.createdAt = createdAt } + /** The device identifier associated with the tokenization. */ + fun deviceId(deviceId: String?) = deviceId(JsonField.ofNullable(deviceId)) + + /** Alias for calling [Builder.deviceId] with `deviceId.orElse(null)`. */ + fun deviceId(deviceId: Optional) = deviceId(deviceId.getOrNull()) + + /** + * Sets [Builder.deviceId] to an arbitrary JSON value. + * + * You should usually call [Builder.deviceId] with a well-typed [String] value instead. This + * method is primarily for setting the field to an undocumented or not yet supported value. + */ + fun deviceId(deviceId: JsonField) = apply { this.deviceId = deviceId } + /** The dynamic pan assigned to the token by the network. */ fun dpan(dpan: String?) = dpan(JsonField.ofNullable(dpan)) @@ -613,6 +648,7 @@ private constructor( * .accountToken() * .cardToken() * .createdAt() + * .deviceId() * .dpan() * .status() * .tokenRequestorName() @@ -629,6 +665,7 @@ private constructor( checkRequired("accountToken", accountToken), checkRequired("cardToken", cardToken), checkRequired("createdAt", createdAt), + checkRequired("deviceId", deviceId), checkRequired("dpan", dpan), checkRequired("status", status), checkRequired("tokenRequestorName", tokenRequestorName), @@ -653,6 +690,7 @@ private constructor( accountToken() cardToken() createdAt() + deviceId() dpan() status().validate() tokenRequestorName().validate() @@ -684,6 +722,7 @@ private constructor( (if (accountToken.asKnown().isPresent) 1 else 0) + (if (cardToken.asKnown().isPresent) 1 else 0) + (if (createdAt.asKnown().isPresent) 1 else 0) + + (if (deviceId.asKnown().isPresent) 1 else 0) + (if (dpan.asKnown().isPresent) 1 else 0) + (status.asKnown().getOrNull()?.validity() ?: 0) + (tokenRequestorName.asKnown().getOrNull()?.validity() ?: 0) + @@ -1767,6 +1806,7 @@ private constructor( accountToken == other.accountToken && cardToken == other.cardToken && createdAt == other.createdAt && + deviceId == other.deviceId && dpan == other.dpan && status == other.status && tokenRequestorName == other.tokenRequestorName && @@ -1785,6 +1825,7 @@ private constructor( accountToken, cardToken, createdAt, + deviceId, dpan, status, tokenRequestorName, @@ -1801,5 +1842,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "Tokenization{token=$token, accountToken=$accountToken, cardToken=$cardToken, createdAt=$createdAt, dpan=$dpan, status=$status, tokenRequestorName=$tokenRequestorName, tokenUniqueReference=$tokenUniqueReference, tokenizationChannel=$tokenizationChannel, updatedAt=$updatedAt, digitalCardArtToken=$digitalCardArtToken, events=$events, paymentAccountReferenceId=$paymentAccountReferenceId, additionalProperties=$additionalProperties}" + "Tokenization{token=$token, accountToken=$accountToken, cardToken=$cardToken, createdAt=$createdAt, deviceId=$deviceId, dpan=$dpan, status=$status, tokenRequestorName=$tokenRequestorName, tokenUniqueReference=$tokenUniqueReference, tokenizationChannel=$tokenizationChannel, updatedAt=$updatedAt, digitalCardArtToken=$digitalCardArtToken, events=$events, paymentAccountReferenceId=$paymentAccountReferenceId, additionalProperties=$additionalProperties}" } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transaction.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transaction.kt index cf7b91997..b02ff7c36 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transaction.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transaction.kt @@ -36,6 +36,7 @@ private constructor( private val cardToken: JsonField, private val cardholderAuthentication: JsonField, private val created: JsonField, + private val financialAccountToken: JsonField, private val merchant: JsonField, private val merchantAmount: JsonField, private val merchantAuthorizationAmount: JsonField, @@ -82,6 +83,9 @@ private constructor( @JsonProperty("created") @ExcludeMissing created: JsonField = JsonMissing.of(), + @JsonProperty("financial_account_token") + @ExcludeMissing + financialAccountToken: JsonField = JsonMissing.of(), @JsonProperty("merchant") @ExcludeMissing merchant: JsonField = JsonMissing.of(), @JsonProperty("merchant_amount") @ExcludeMissing @@ -124,6 +128,7 @@ private constructor( cardToken, cardholderAuthentication, created, + financialAccountToken, merchant, merchantAmount, merchantAuthorizationAmount, @@ -242,6 +247,13 @@ private constructor( */ fun created(): OffsetDateTime = created.getRequired("created") + /** + * @throws LithicInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun financialAccountToken(): Optional = + financialAccountToken.getOptional("financial_account_token") + /** * @throws LithicInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -448,6 +460,16 @@ private constructor( */ @JsonProperty("created") @ExcludeMissing fun _created(): JsonField = created + /** + * Returns the raw JSON value of [financialAccountToken]. + * + * Unlike [financialAccountToken], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("financial_account_token") + @ExcludeMissing + fun _financialAccountToken(): JsonField = financialAccountToken + /** * Returns the raw JSON value of [merchant]. * @@ -589,6 +611,7 @@ private constructor( * .cardToken() * .cardholderAuthentication() * .created() + * .financialAccountToken() * .merchant() * .merchantAmount() * .merchantAuthorizationAmount() @@ -621,6 +644,7 @@ private constructor( private var cardToken: JsonField? = null private var cardholderAuthentication: JsonField? = null private var created: JsonField? = null + private var financialAccountToken: JsonField? = null private var merchant: JsonField? = null private var merchantAmount: JsonField? = null private var merchantAuthorizationAmount: JsonField? = null @@ -650,6 +674,7 @@ private constructor( cardToken = transaction.cardToken cardholderAuthentication = transaction.cardholderAuthentication created = transaction.created + financialAccountToken = transaction.financialAccountToken merchant = transaction.merchant merchantAmount = transaction.merchantAmount merchantAuthorizationAmount = transaction.merchantAuthorizationAmount @@ -886,6 +911,27 @@ private constructor( */ fun created(created: JsonField) = apply { this.created = created } + fun financialAccountToken(financialAccountToken: String?) = + financialAccountToken(JsonField.ofNullable(financialAccountToken)) + + /** + * Alias for calling [Builder.financialAccountToken] with + * `financialAccountToken.orElse(null)`. + */ + fun financialAccountToken(financialAccountToken: Optional) = + financialAccountToken(financialAccountToken.getOrNull()) + + /** + * Sets [Builder.financialAccountToken] to an arbitrary JSON value. + * + * You should usually call [Builder.financialAccountToken] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun financialAccountToken(financialAccountToken: JsonField) = apply { + this.financialAccountToken = financialAccountToken + } + fun merchant(merchant: Merchant) = merchant(JsonField.of(merchant)) /** @@ -1163,6 +1209,7 @@ private constructor( * .cardToken() * .cardholderAuthentication() * .created() + * .financialAccountToken() * .merchant() * .merchantAmount() * .merchantAuthorizationAmount() @@ -1193,6 +1240,7 @@ private constructor( checkRequired("cardToken", cardToken), checkRequired("cardholderAuthentication", cardholderAuthentication), checkRequired("created", created), + checkRequired("financialAccountToken", financialAccountToken), checkRequired("merchant", merchant), checkRequired("merchantAmount", merchantAmount), checkRequired("merchantAuthorizationAmount", merchantAuthorizationAmount), @@ -1229,6 +1277,7 @@ private constructor( cardToken() cardholderAuthentication().ifPresent { it.validate() } created() + financialAccountToken() merchant().validate() merchantAmount() merchantAuthorizationAmount() @@ -1272,6 +1321,7 @@ private constructor( (if (cardToken.asKnown().isPresent) 1 else 0) + (cardholderAuthentication.asKnown().getOrNull()?.validity() ?: 0) + (if (created.asKnown().isPresent) 1 else 0) + + (if (financialAccountToken.asKnown().isPresent) 1 else 0) + (merchant.asKnown().getOrNull()?.validity() ?: 0) + (if (merchantAmount.asKnown().isPresent) 1 else 0) + (if (merchantAuthorizationAmount.asKnown().isPresent) 1 else 0) + @@ -7066,6 +7116,8 @@ private constructor( @JvmField val IGNORED_TTL_EXPIRY = of("IGNORED_TTL_EXPIRY") + @JvmField val SUSPECTED_FRAUD = of("SUSPECTED_FRAUD") + @JvmField val INACTIVE_ACCOUNT = of("INACTIVE_ACCOUNT") @JvmField val INCORRECT_PIN = of("INCORRECT_PIN") @@ -7109,6 +7161,7 @@ private constructor( DECLINED, FRAUD_ADVICE, IGNORED_TTL_EXPIRY, + SUSPECTED_FRAUD, INACTIVE_ACCOUNT, INCORRECT_PIN, INVALID_CARD_DETAILS, @@ -7145,6 +7198,7 @@ private constructor( DECLINED, FRAUD_ADVICE, IGNORED_TTL_EXPIRY, + SUSPECTED_FRAUD, INACTIVE_ACCOUNT, INCORRECT_PIN, INVALID_CARD_DETAILS, @@ -7185,6 +7239,7 @@ private constructor( DECLINED -> Value.DECLINED FRAUD_ADVICE -> Value.FRAUD_ADVICE IGNORED_TTL_EXPIRY -> Value.IGNORED_TTL_EXPIRY + SUSPECTED_FRAUD -> Value.SUSPECTED_FRAUD INACTIVE_ACCOUNT -> Value.INACTIVE_ACCOUNT INCORRECT_PIN -> Value.INCORRECT_PIN INVALID_CARD_DETAILS -> Value.INVALID_CARD_DETAILS @@ -7223,6 +7278,7 @@ private constructor( DECLINED -> Known.DECLINED FRAUD_ADVICE -> Known.FRAUD_ADVICE IGNORED_TTL_EXPIRY -> Known.IGNORED_TTL_EXPIRY + SUSPECTED_FRAUD -> Known.SUSPECTED_FRAUD INACTIVE_ACCOUNT -> Known.INACTIVE_ACCOUNT INCORRECT_PIN -> Known.INCORRECT_PIN INVALID_CARD_DETAILS -> Known.INVALID_CARD_DETAILS @@ -9528,6 +9584,8 @@ private constructor( @JvmField val SINGLE_USE_CARD_REATTEMPTED = of("SINGLE_USE_CARD_REATTEMPTED") + @JvmField val SUSPECTED_FRAUD = of("SUSPECTED_FRAUD") + @JvmField val TRANSACTION_INVALID = of("TRANSACTION_INVALID") @JvmField @@ -9597,6 +9655,7 @@ private constructor( REVERSAL_UNMATCHED, SECURITY_VIOLATION, SINGLE_USE_CARD_REATTEMPTED, + SUSPECTED_FRAUD, TRANSACTION_INVALID, TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL, TRANSACTION_NOT_PERMITTED_TO_ISSUER_OR_CARDHOLDER, @@ -9662,6 +9721,7 @@ private constructor( REVERSAL_UNMATCHED, SECURITY_VIOLATION, SINGLE_USE_CARD_REATTEMPTED, + SUSPECTED_FRAUD, TRANSACTION_INVALID, TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL, TRANSACTION_NOT_PERMITTED_TO_ISSUER_OR_CARDHOLDER, @@ -9734,6 +9794,7 @@ private constructor( REVERSAL_UNMATCHED -> Value.REVERSAL_UNMATCHED SECURITY_VIOLATION -> Value.SECURITY_VIOLATION SINGLE_USE_CARD_REATTEMPTED -> Value.SINGLE_USE_CARD_REATTEMPTED + SUSPECTED_FRAUD -> Value.SUSPECTED_FRAUD TRANSACTION_INVALID -> Value.TRANSACTION_INVALID TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL -> Value.TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL @@ -9806,6 +9867,7 @@ private constructor( REVERSAL_UNMATCHED -> Known.REVERSAL_UNMATCHED SECURITY_VIOLATION -> Known.SECURITY_VIOLATION SINGLE_USE_CARD_REATTEMPTED -> Known.SINGLE_USE_CARD_REATTEMPTED + SUSPECTED_FRAUD -> Known.SUSPECTED_FRAUD TRANSACTION_INVALID -> Known.TRANSACTION_INVALID TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL -> Known.TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL @@ -11485,6 +11547,8 @@ private constructor( @JvmField val IGNORED_TTL_EXPIRY = of("IGNORED_TTL_EXPIRY") + @JvmField val SUSPECTED_FRAUD = of("SUSPECTED_FRAUD") + @JvmField val INACTIVE_ACCOUNT = of("INACTIVE_ACCOUNT") @JvmField val INCORRECT_PIN = of("INCORRECT_PIN") @@ -11528,6 +11592,7 @@ private constructor( DECLINED, FRAUD_ADVICE, IGNORED_TTL_EXPIRY, + SUSPECTED_FRAUD, INACTIVE_ACCOUNT, INCORRECT_PIN, INVALID_CARD_DETAILS, @@ -11564,6 +11629,7 @@ private constructor( DECLINED, FRAUD_ADVICE, IGNORED_TTL_EXPIRY, + SUSPECTED_FRAUD, INACTIVE_ACCOUNT, INCORRECT_PIN, INVALID_CARD_DETAILS, @@ -11604,6 +11670,7 @@ private constructor( DECLINED -> Value.DECLINED FRAUD_ADVICE -> Value.FRAUD_ADVICE IGNORED_TTL_EXPIRY -> Value.IGNORED_TTL_EXPIRY + SUSPECTED_FRAUD -> Value.SUSPECTED_FRAUD INACTIVE_ACCOUNT -> Value.INACTIVE_ACCOUNT INCORRECT_PIN -> Value.INCORRECT_PIN INVALID_CARD_DETAILS -> Value.INVALID_CARD_DETAILS @@ -11642,6 +11709,7 @@ private constructor( DECLINED -> Known.DECLINED FRAUD_ADVICE -> Known.FRAUD_ADVICE IGNORED_TTL_EXPIRY -> Known.IGNORED_TTL_EXPIRY + SUSPECTED_FRAUD -> Known.SUSPECTED_FRAUD INACTIVE_ACCOUNT -> Known.INACTIVE_ACCOUNT INCORRECT_PIN -> Known.INCORRECT_PIN INVALID_CARD_DETAILS -> Known.INVALID_CARD_DETAILS @@ -12131,6 +12199,8 @@ private constructor( @JvmField val SINGLE_USE_CARD_REATTEMPTED = of("SINGLE_USE_CARD_REATTEMPTED") + @JvmField val SUSPECTED_FRAUD = of("SUSPECTED_FRAUD") + @JvmField val TRANSACTION_INVALID = of("TRANSACTION_INVALID") @JvmField @@ -12200,6 +12270,7 @@ private constructor( REVERSAL_UNMATCHED, SECURITY_VIOLATION, SINGLE_USE_CARD_REATTEMPTED, + SUSPECTED_FRAUD, TRANSACTION_INVALID, TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL, TRANSACTION_NOT_PERMITTED_TO_ISSUER_OR_CARDHOLDER, @@ -12267,6 +12338,7 @@ private constructor( REVERSAL_UNMATCHED, SECURITY_VIOLATION, SINGLE_USE_CARD_REATTEMPTED, + SUSPECTED_FRAUD, TRANSACTION_INVALID, TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL, TRANSACTION_NOT_PERMITTED_TO_ISSUER_OR_CARDHOLDER, @@ -12342,6 +12414,7 @@ private constructor( REVERSAL_UNMATCHED -> Value.REVERSAL_UNMATCHED SECURITY_VIOLATION -> Value.SECURITY_VIOLATION SINGLE_USE_CARD_REATTEMPTED -> Value.SINGLE_USE_CARD_REATTEMPTED + SUSPECTED_FRAUD -> Value.SUSPECTED_FRAUD TRANSACTION_INVALID -> Value.TRANSACTION_INVALID TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL -> Value.TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL @@ -12417,6 +12490,7 @@ private constructor( REVERSAL_UNMATCHED -> Known.REVERSAL_UNMATCHED SECURITY_VIOLATION -> Known.SECURITY_VIOLATION SINGLE_USE_CARD_REATTEMPTED -> Known.SINGLE_USE_CARD_REATTEMPTED + SUSPECTED_FRAUD -> Known.SUSPECTED_FRAUD TRANSACTION_INVALID -> Known.TRANSACTION_INVALID TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL -> Known.TRANSACTION_NOT_PERMITTED_TO_ACQUIRER_OR_TERMINAL @@ -13917,6 +13991,7 @@ private constructor( cardToken == other.cardToken && cardholderAuthentication == other.cardholderAuthentication && created == other.created && + financialAccountToken == other.financialAccountToken && merchant == other.merchant && merchantAmount == other.merchantAmount && merchantAuthorizationAmount == other.merchantAuthorizationAmount && @@ -13947,6 +14022,7 @@ private constructor( cardToken, cardholderAuthentication, created, + financialAccountToken, merchant, merchantAmount, merchantAuthorizationAmount, @@ -13967,5 +14043,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "Transaction{token=$token, accountToken=$accountToken, acquirerFee=$acquirerFee, acquirerReferenceNumber=$acquirerReferenceNumber, amount=$amount, amounts=$amounts, authorizationAmount=$authorizationAmount, authorizationCode=$authorizationCode, avs=$avs, cardToken=$cardToken, cardholderAuthentication=$cardholderAuthentication, created=$created, merchant=$merchant, merchantAmount=$merchantAmount, merchantAuthorizationAmount=$merchantAuthorizationAmount, merchantCurrency=$merchantCurrency, network=$network, networkRiskScore=$networkRiskScore, pos=$pos, result=$result, settledAmount=$settledAmount, status=$status, tokenInfo=$tokenInfo, updated=$updated, events=$events, additionalProperties=$additionalProperties}" + "Transaction{token=$token, accountToken=$accountToken, acquirerFee=$acquirerFee, acquirerReferenceNumber=$acquirerReferenceNumber, amount=$amount, amounts=$amounts, authorizationAmount=$authorizationAmount, authorizationCode=$authorizationCode, avs=$avs, cardToken=$cardToken, cardholderAuthentication=$cardholderAuthentication, created=$created, financialAccountToken=$financialAccountToken, merchant=$merchant, merchantAmount=$merchantAmount, merchantAuthorizationAmount=$merchantAuthorizationAmount, merchantCurrency=$merchantCurrency, network=$network, networkRiskScore=$networkRiskScore, pos=$pos, result=$result, settledAmount=$settledAmount, status=$status, tokenInfo=$tokenInfo, updated=$updated, events=$events, additionalProperties=$additionalProperties}" } diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transfer.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transfer.kt index 4df316b9c..efba3688b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transfer.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transfer.kt @@ -1224,6 +1224,8 @@ private constructor( @JvmField val ACH_ORIGINATION_RELEASED = of("ACH_ORIGINATION_RELEASED") + @JvmField val ACH_ORIGINATION_REJECTED = of("ACH_ORIGINATION_REJECTED") + @JvmField val ACH_ORIGINATION_REVIEWED = of("ACH_ORIGINATION_REVIEWED") @JvmField val ACH_ORIGINATION_SETTLED = of("ACH_ORIGINATION_SETTLED") @@ -1236,6 +1238,8 @@ private constructor( @JvmField val ACH_RETURN_PROCESSED = of("ACH_RETURN_PROCESSED") + @JvmField val ACH_RETURN_REJECTED = of("ACH_RETURN_REJECTED") + @JvmField val ACH_RETURN_SETTLED = of("ACH_RETURN_SETTLED") @JvmField val AUTHORIZATION = of("AUTHORIZATION") @@ -1361,12 +1365,14 @@ private constructor( ACH_ORIGINATION_INITIATED, ACH_ORIGINATION_PROCESSED, ACH_ORIGINATION_RELEASED, + ACH_ORIGINATION_REJECTED, ACH_ORIGINATION_REVIEWED, ACH_ORIGINATION_SETTLED, ACH_RECEIPT_PROCESSED, ACH_RECEIPT_SETTLED, ACH_RETURN_INITIATED, ACH_RETURN_PROCESSED, + ACH_RETURN_REJECTED, ACH_RETURN_SETTLED, AUTHORIZATION, AUTHORIZATION_ADVICE, @@ -1443,12 +1449,14 @@ private constructor( ACH_ORIGINATION_INITIATED, ACH_ORIGINATION_PROCESSED, ACH_ORIGINATION_RELEASED, + ACH_ORIGINATION_REJECTED, ACH_ORIGINATION_REVIEWED, ACH_ORIGINATION_SETTLED, ACH_RECEIPT_PROCESSED, ACH_RECEIPT_SETTLED, ACH_RETURN_INITIATED, ACH_RETURN_PROCESSED, + ACH_RETURN_REJECTED, ACH_RETURN_SETTLED, AUTHORIZATION, AUTHORIZATION_ADVICE, @@ -1527,12 +1535,14 @@ private constructor( ACH_ORIGINATION_INITIATED -> Value.ACH_ORIGINATION_INITIATED ACH_ORIGINATION_PROCESSED -> Value.ACH_ORIGINATION_PROCESSED ACH_ORIGINATION_RELEASED -> Value.ACH_ORIGINATION_RELEASED + ACH_ORIGINATION_REJECTED -> Value.ACH_ORIGINATION_REJECTED ACH_ORIGINATION_REVIEWED -> Value.ACH_ORIGINATION_REVIEWED ACH_ORIGINATION_SETTLED -> Value.ACH_ORIGINATION_SETTLED ACH_RECEIPT_PROCESSED -> Value.ACH_RECEIPT_PROCESSED ACH_RECEIPT_SETTLED -> Value.ACH_RECEIPT_SETTLED ACH_RETURN_INITIATED -> Value.ACH_RETURN_INITIATED ACH_RETURN_PROCESSED -> Value.ACH_RETURN_PROCESSED + ACH_RETURN_REJECTED -> Value.ACH_RETURN_REJECTED ACH_RETURN_SETTLED -> Value.ACH_RETURN_SETTLED AUTHORIZATION -> Value.AUTHORIZATION AUTHORIZATION_ADVICE -> Value.AUTHORIZATION_ADVICE @@ -1609,12 +1619,14 @@ private constructor( ACH_ORIGINATION_INITIATED -> Known.ACH_ORIGINATION_INITIATED ACH_ORIGINATION_PROCESSED -> Known.ACH_ORIGINATION_PROCESSED ACH_ORIGINATION_RELEASED -> Known.ACH_ORIGINATION_RELEASED + ACH_ORIGINATION_REJECTED -> Known.ACH_ORIGINATION_REJECTED ACH_ORIGINATION_REVIEWED -> Known.ACH_ORIGINATION_REVIEWED ACH_ORIGINATION_SETTLED -> Known.ACH_ORIGINATION_SETTLED ACH_RECEIPT_PROCESSED -> Known.ACH_RECEIPT_PROCESSED ACH_RECEIPT_SETTLED -> Known.ACH_RECEIPT_SETTLED ACH_RETURN_INITIATED -> Known.ACH_RETURN_INITIATED ACH_RETURN_PROCESSED -> Known.ACH_RETURN_PROCESSED + ACH_RETURN_REJECTED -> Known.ACH_RETURN_REJECTED ACH_RETURN_SETTLED -> Known.ACH_RETURN_SETTLED AUTHORIZATION -> Known.AUTHORIZATION AUTHORIZATION_ADVICE -> Known.AUTHORIZATION_ADVICE diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityListResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityListResponseTest.kt index dcb332064..b0ee4b5c5 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityListResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityListResponseTest.kt @@ -125,7 +125,8 @@ internal class AccountActivityListResponseTest { AccountActivityListResponse.BookTransferTransaction.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .category( - AccountActivityListResponse.BookTransferTransaction.TransactionCategory.ACH + AccountActivityListResponse.BookTransferTransaction.BookTransferCategory + .ADJUSTMENT ) .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .currency("USD") @@ -149,7 +150,7 @@ internal class AccountActivityListResponseTest { .type( AccountActivityListResponse.BookTransferTransaction.BookTransferEvent .BookTransferType - .ATM_WITHDRAWAL + .ATM_BALANCE_INQUIRY ) .build() ) @@ -204,7 +205,8 @@ internal class AccountActivityListResponseTest { AccountActivityListResponse.BookTransferTransaction.builder() .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .category( - AccountActivityListResponse.BookTransferTransaction.TransactionCategory.ACH + AccountActivityListResponse.BookTransferTransaction.BookTransferCategory + .ADJUSTMENT ) .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .currency("USD") @@ -232,7 +234,7 @@ internal class AccountActivityListResponseTest { AccountActivityListResponse.BookTransferTransaction .BookTransferEvent .BookTransferType - .ATM_WITHDRAWAL + .ATM_BALANCE_INQUIRY ) .build() ) @@ -351,6 +353,7 @@ internal class AccountActivityListResponseTest { .build() ) .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .merchant( Transaction.Merchant.builder() .acceptorId("333301802529120") @@ -600,6 +603,7 @@ internal class AccountActivityListResponseTest { .build() ) .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .merchant( Transaction.Merchant.builder() .acceptorId("333301802529120") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponseTest.kt index 8a937d019..56825a8e4 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountActivityRetrieveTransactionResponseTest.kt @@ -158,8 +158,8 @@ internal class AccountActivityRetrieveTransactionResponseTest { .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .category( AccountActivityRetrieveTransactionResponse.BookTransferTransaction - .TransactionCategory - .ACH + .BookTransferCategory + .ADJUSTMENT ) .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .currency("USD") @@ -188,7 +188,7 @@ internal class AccountActivityRetrieveTransactionResponseTest { AccountActivityRetrieveTransactionResponse.BookTransferTransaction .BookTransferEvent .BookTransferType - .ATM_WITHDRAWAL + .ATM_BALANCE_INQUIRY ) .build() ) @@ -255,8 +255,8 @@ internal class AccountActivityRetrieveTransactionResponseTest { .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .category( AccountActivityRetrieveTransactionResponse.BookTransferTransaction - .TransactionCategory - .ACH + .BookTransferCategory + .ADJUSTMENT ) .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .currency("USD") @@ -285,7 +285,7 @@ internal class AccountActivityRetrieveTransactionResponseTest { AccountActivityRetrieveTransactionResponse.BookTransferTransaction .BookTransferEvent .BookTransferType - .ATM_WITHDRAWAL + .ATM_BALANCE_INQUIRY ) .build() ) @@ -409,6 +409,7 @@ internal class AccountActivityRetrieveTransactionResponseTest { .build() ) .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .merchant( Transaction.Merchant.builder() .acceptorId("333301802529120") @@ -664,6 +665,7 @@ internal class AccountActivityRetrieveTransactionResponseTest { .build() ) .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .merchant( Transaction.Merchant.builder() .acceptorId("333301802529120") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/AuthRuleV2UpdateParamsTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/AuthRuleV2UpdateParamsTest.kt index 97ca0baba..d5b7c6293 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/AuthRuleV2UpdateParamsTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/AuthRuleV2UpdateParamsTest.kt @@ -12,9 +12,11 @@ internal class AuthRuleV2UpdateParamsTest { AuthRuleV2UpdateParams.builder() .authRuleToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .body( - AuthRuleV2UpdateParams.Body.UnionMember0.builder() + AuthRuleV2UpdateParams.Body.AccountLevelRule.builder() + .addAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .addBusinessAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .name("name") - .state(AuthRuleV2UpdateParams.Body.UnionMember0.State.INACTIVE) + .state(AuthRuleV2UpdateParams.Body.AccountLevelRule.State.INACTIVE) .build() ) .build() @@ -25,7 +27,7 @@ internal class AuthRuleV2UpdateParamsTest { val params = AuthRuleV2UpdateParams.builder() .authRuleToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .body(AuthRuleV2UpdateParams.Body.UnionMember0.builder().build()) + .body(AuthRuleV2UpdateParams.Body.AccountLevelRule.builder().build()) .build() assertThat(params._pathParam(0)).isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") @@ -39,9 +41,11 @@ internal class AuthRuleV2UpdateParamsTest { AuthRuleV2UpdateParams.builder() .authRuleToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .body( - AuthRuleV2UpdateParams.Body.UnionMember0.builder() + AuthRuleV2UpdateParams.Body.AccountLevelRule.builder() + .addAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .addBusinessAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .name("name") - .state(AuthRuleV2UpdateParams.Body.UnionMember0.State.INACTIVE) + .state(AuthRuleV2UpdateParams.Body.AccountLevelRule.State.INACTIVE) .build() ) .build() @@ -50,10 +54,12 @@ internal class AuthRuleV2UpdateParamsTest { assertThat(body) .isEqualTo( - AuthRuleV2UpdateParams.Body.ofUnionMember0( - AuthRuleV2UpdateParams.Body.UnionMember0.builder() + AuthRuleV2UpdateParams.Body.ofAccountLevelRule( + AuthRuleV2UpdateParams.Body.AccountLevelRule.builder() + .addAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .addBusinessAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .name("name") - .state(AuthRuleV2UpdateParams.Body.UnionMember0.State.INACTIVE) + .state(AuthRuleV2UpdateParams.Body.AccountLevelRule.State.INACTIVE) .build() ) ) @@ -64,15 +70,15 @@ internal class AuthRuleV2UpdateParamsTest { val params = AuthRuleV2UpdateParams.builder() .authRuleToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .body(AuthRuleV2UpdateParams.Body.UnionMember0.builder().build()) + .body(AuthRuleV2UpdateParams.Body.AccountLevelRule.builder().build()) .build() val body = params._body() assertThat(body) .isEqualTo( - AuthRuleV2UpdateParams.Body.ofUnionMember0( - AuthRuleV2UpdateParams.Body.UnionMember0.builder().build() + AuthRuleV2UpdateParams.Body.ofAccountLevelRule( + AuthRuleV2UpdateParams.Body.AccountLevelRule.builder().build() ) ) } diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/BookTransferCreateParamsTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/BookTransferCreateParamsTest.kt index 80adc0934..7455f87cf 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/BookTransferCreateParamsTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/BookTransferCreateParamsTest.kt @@ -15,7 +15,7 @@ internal class BookTransferCreateParamsTest { .fromFinancialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .subtype("subtype") .toFinancialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .type(BookTransferCreateParams.BookTransferType.ATM_WITHDRAWAL) + .type(BookTransferCreateParams.BookTransferType.ATM_BALANCE_INQUIRY) .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .externalId("external_id") .memo("memo") @@ -32,7 +32,7 @@ internal class BookTransferCreateParamsTest { .fromFinancialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .subtype("subtype") .toFinancialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .type(BookTransferCreateParams.BookTransferType.ATM_WITHDRAWAL) + .type(BookTransferCreateParams.BookTransferType.ATM_BALANCE_INQUIRY) .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .externalId("external_id") .memo("memo") @@ -48,7 +48,8 @@ internal class BookTransferCreateParamsTest { .isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(body.subtype()).isEqualTo("subtype") assertThat(body.toFinancialAccountToken()).isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - assertThat(body.type()).isEqualTo(BookTransferCreateParams.BookTransferType.ATM_WITHDRAWAL) + assertThat(body.type()) + .isEqualTo(BookTransferCreateParams.BookTransferType.ATM_BALANCE_INQUIRY) assertThat(body.token()).contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(body.externalId()).contains("external_id") assertThat(body.memo()).contains("memo") @@ -64,7 +65,7 @@ internal class BookTransferCreateParamsTest { .fromFinancialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .subtype("subtype") .toFinancialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .type(BookTransferCreateParams.BookTransferType.ATM_WITHDRAWAL) + .type(BookTransferCreateParams.BookTransferType.ATM_BALANCE_INQUIRY) .build() val body = params._body() @@ -76,6 +77,7 @@ internal class BookTransferCreateParamsTest { .isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(body.subtype()).isEqualTo("subtype") assertThat(body.toFinancialAccountToken()).isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - assertThat(body.type()).isEqualTo(BookTransferCreateParams.BookTransferType.ATM_WITHDRAWAL) + assertThat(body.type()) + .isEqualTo(BookTransferCreateParams.BookTransferType.ATM_BALANCE_INQUIRY) } } diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/BookTransferListPageResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/BookTransferListPageResponseTest.kt index 7134349b9..29208d328 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/BookTransferListPageResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/BookTransferListPageResponseTest.kt @@ -35,7 +35,7 @@ internal class BookTransferListPageResponseTest { .subtype("subtype") .type( BookTransferResponse.BookTransferEvent.BookTransferType - .ATM_WITHDRAWAL + .ATM_BALANCE_INQUIRY ) .build() ) @@ -89,7 +89,7 @@ internal class BookTransferListPageResponseTest { .subtype("subtype") .type( BookTransferResponse.BookTransferEvent.BookTransferType - .ATM_WITHDRAWAL + .ATM_BALANCE_INQUIRY ) .build() ) @@ -146,7 +146,7 @@ internal class BookTransferListPageResponseTest { .subtype("subtype") .type( BookTransferResponse.BookTransferEvent.BookTransferType - .ATM_WITHDRAWAL + .ATM_BALANCE_INQUIRY ) .build() ) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/BookTransferListParamsTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/BookTransferListParamsTest.kt index 7a25d5beb..362b88096 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/BookTransferListParamsTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/BookTransferListParamsTest.kt @@ -15,7 +15,7 @@ internal class BookTransferListParamsTest { .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .begin(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .businessAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .category(BookTransferListParams.Category.BALANCE_OR_FUNDING) + .category(BookTransferListParams.BookTransferCategory.ADJUSTMENT) .end(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .endingBefore("ending_before") .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") @@ -33,7 +33,7 @@ internal class BookTransferListParamsTest { .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .begin(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .businessAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .category(BookTransferListParams.Category.BALANCE_OR_FUNDING) + .category(BookTransferListParams.BookTransferCategory.ADJUSTMENT) .end(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .endingBefore("ending_before") .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") @@ -51,7 +51,7 @@ internal class BookTransferListParamsTest { .put("account_token", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .put("begin", "2019-12-27T18:11:19.117Z") .put("business_account_token", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .put("category", "BALANCE_OR_FUNDING") + .put("category", "ADJUSTMENT") .put("end", "2019-12-27T18:11:19.117Z") .put("ending_before", "ending_before") .put("financial_account_token", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/BookTransferResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/BookTransferResponseTest.kt index 45eb53867..01be7fb4f 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/BookTransferResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/BookTransferResponseTest.kt @@ -31,7 +31,8 @@ internal class BookTransferResponseTest { .result(BookTransferResponse.BookTransferEvent.Result.APPROVED) .subtype("subtype") .type( - BookTransferResponse.BookTransferEvent.BookTransferType.ATM_WITHDRAWAL + BookTransferResponse.BookTransferEvent.BookTransferType + .ATM_BALANCE_INQUIRY ) .build() ) @@ -77,7 +78,9 @@ internal class BookTransferResponseTest { .memo("memo") .result(BookTransferResponse.BookTransferEvent.Result.APPROVED) .subtype("subtype") - .type(BookTransferResponse.BookTransferEvent.BookTransferType.ATM_WITHDRAWAL) + .type( + BookTransferResponse.BookTransferEvent.BookTransferType.ATM_BALANCE_INQUIRY + ) .build() ) assertThat(bookTransferResponse.externalId()).contains("external_id") @@ -132,7 +135,8 @@ internal class BookTransferResponseTest { .result(BookTransferResponse.BookTransferEvent.Result.APPROVED) .subtype("subtype") .type( - BookTransferResponse.BookTransferEvent.BookTransferType.ATM_WITHDRAWAL + BookTransferResponse.BookTransferEvent.BookTransferType + .ATM_BALANCE_INQUIRY ) .build() ) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountCreditConfigTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountCreditConfigTest.kt index 1e6fdfb2d..9f9780a5b 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountCreditConfigTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountCreditConfigTest.kt @@ -14,6 +14,11 @@ internal class FinancialAccountCreditConfigTest { val financialAccountCreditConfig = FinancialAccountCreditConfig.builder() .accountToken("b68b7424-aa69-4cbc-a946-30d90181b621") + .autoCollectionConfiguration( + FinancialAccountCreditConfig.AutoCollectionConfigurationResponse.builder() + .autoCollectionEnabled(true) + .build() + ) .chargedOffReason(FinancialAccountCreditConfig.ChargedOffReason.DELINQUENT) .creditLimit(0L) .creditProductToken("credit_product_token") @@ -25,6 +30,12 @@ internal class FinancialAccountCreditConfigTest { assertThat(financialAccountCreditConfig.accountToken()) .isEqualTo("b68b7424-aa69-4cbc-a946-30d90181b621") + assertThat(financialAccountCreditConfig.autoCollectionConfiguration()) + .isEqualTo( + FinancialAccountCreditConfig.AutoCollectionConfigurationResponse.builder() + .autoCollectionEnabled(true) + .build() + ) assertThat(financialAccountCreditConfig.chargedOffReason()) .contains(FinancialAccountCreditConfig.ChargedOffReason.DELINQUENT) assertThat(financialAccountCreditConfig.creditLimit()).contains(0L) @@ -44,6 +55,11 @@ internal class FinancialAccountCreditConfigTest { val financialAccountCreditConfig = FinancialAccountCreditConfig.builder() .accountToken("b68b7424-aa69-4cbc-a946-30d90181b621") + .autoCollectionConfiguration( + FinancialAccountCreditConfig.AutoCollectionConfigurationResponse.builder() + .autoCollectionEnabled(true) + .build() + ) .chargedOffReason(FinancialAccountCreditConfig.ChargedOffReason.DELINQUENT) .creditLimit(0L) .creditProductToken("credit_product_token") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountCreditConfigurationUpdateParamsTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountCreditConfigurationUpdateParamsTest.kt index 70ad60208..61940c425 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountCreditConfigurationUpdateParamsTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountCreditConfigurationUpdateParamsTest.kt @@ -11,6 +11,12 @@ internal class FinancialAccountCreditConfigurationUpdateParamsTest { fun create() { FinancialAccountCreditConfigurationUpdateParams.builder() .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .autoCollectionConfiguration( + FinancialAccountCreditConfigurationUpdateParams.AutoCollectionConfigurationRequest + .builder() + .autoCollectionEnabled(true) + .build() + ) .creditLimit(0L) .creditProductToken("credit_product_token") .externalBankAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") @@ -35,6 +41,13 @@ internal class FinancialAccountCreditConfigurationUpdateParamsTest { val params = FinancialAccountCreditConfigurationUpdateParams.builder() .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .autoCollectionConfiguration( + FinancialAccountCreditConfigurationUpdateParams + .AutoCollectionConfigurationRequest + .builder() + .autoCollectionEnabled(true) + .build() + ) .creditLimit(0L) .creditProductToken("credit_product_token") .externalBankAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") @@ -43,6 +56,13 @@ internal class FinancialAccountCreditConfigurationUpdateParamsTest { val body = params._body() + assertThat(body.autoCollectionConfiguration()) + .contains( + FinancialAccountCreditConfigurationUpdateParams.AutoCollectionConfigurationRequest + .builder() + .autoCollectionEnabled(true) + .build() + ) assertThat(body.creditLimit()).contains(0L) assertThat(body.creditProductToken()).contains("credit_product_token") assertThat(body.externalBankAccountToken()).contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountListPageResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountListPageResponseTest.kt index 23b697fb1..1fae22055 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountListPageResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountListPageResponseTest.kt @@ -35,6 +35,13 @@ internal class FinancialAccountListPageResponseTest { ) .isSpendBlocked(true) .tier("tier") + .autoCollectionConfiguration( + FinancialAccount.FinancialAccountCreditConfig + .AutoCollectionConfigurationResponse + .builder() + .autoCollectionEnabled(true) + .build() + ) .build() ) .isForBenefitOf(true) @@ -73,6 +80,13 @@ internal class FinancialAccountListPageResponseTest { ) .isSpendBlocked(true) .tier("tier") + .autoCollectionConfiguration( + FinancialAccount.FinancialAccountCreditConfig + .AutoCollectionConfigurationResponse + .builder() + .autoCollectionEnabled(true) + .build() + ) .build() ) .isForBenefitOf(true) @@ -114,6 +128,13 @@ internal class FinancialAccountListPageResponseTest { ) .isSpendBlocked(true) .tier("tier") + .autoCollectionConfiguration( + FinancialAccount.FinancialAccountCreditConfig + .AutoCollectionConfigurationResponse + .builder() + .autoCollectionEnabled(true) + .build() + ) .build() ) .isForBenefitOf(true) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountTest.kt index 01dfa44cb..5cde2dc49 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/FinancialAccountTest.kt @@ -32,6 +32,13 @@ internal class FinancialAccountTest { ) .isSpendBlocked(true) .tier("tier") + .autoCollectionConfiguration( + FinancialAccount.FinancialAccountCreditConfig + .AutoCollectionConfigurationResponse + .builder() + .autoCollectionEnabled(true) + .build() + ) .build() ) .isForBenefitOf(true) @@ -62,6 +69,13 @@ internal class FinancialAccountTest { ) .isSpendBlocked(true) .tier("tier") + .autoCollectionConfiguration( + FinancialAccount.FinancialAccountCreditConfig + .AutoCollectionConfigurationResponse + .builder() + .autoCollectionEnabled(true) + .build() + ) .build() ) assertThat(financialAccount.isForBenefitOf()).isEqualTo(true) @@ -100,6 +114,13 @@ internal class FinancialAccountTest { ) .isSpendBlocked(true) .tier("tier") + .autoCollectionConfiguration( + FinancialAccount.FinancialAccountCreditConfig + .AutoCollectionConfigurationResponse + .builder() + .autoCollectionEnabled(true) + .build() + ) .build() ) .isForBenefitOf(true) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TokenizationListPageResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TokenizationListPageResponseTest.kt index fa0635502..47d4f1a77 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TokenizationListPageResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TokenizationListPageResponseTest.kt @@ -21,6 +21,7 @@ internal class TokenizationListPageResponseTest { .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .deviceId("device_id") .dpan("dpan") .status(Tokenization.Status.ACTIVE) .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) @@ -49,6 +50,7 @@ internal class TokenizationListPageResponseTest { .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .deviceId("device_id") .dpan("dpan") .status(Tokenization.Status.ACTIVE) .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) @@ -81,6 +83,7 @@ internal class TokenizationListPageResponseTest { .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .deviceId("device_id") .dpan("dpan") .status(Tokenization.Status.ACTIVE) .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TokenizationSimulateResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TokenizationSimulateResponseTest.kt index de04e87f1..8e2befbee 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TokenizationSimulateResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TokenizationSimulateResponseTest.kt @@ -21,6 +21,7 @@ internal class TokenizationSimulateResponseTest { .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .deviceId("device_id") .dpan("dpan") .status(Tokenization.Status.ACTIVE) .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) @@ -48,6 +49,7 @@ internal class TokenizationSimulateResponseTest { .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .deviceId("device_id") .dpan("dpan") .status(Tokenization.Status.ACTIVE) .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) @@ -79,6 +81,7 @@ internal class TokenizationSimulateResponseTest { .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .deviceId("device_id") .dpan("dpan") .status(Tokenization.Status.ACTIVE) .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TokenizationTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TokenizationTest.kt index 53f4d27f7..d623ffc60 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TokenizationTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TokenizationTest.kt @@ -19,6 +19,7 @@ internal class TokenizationTest { .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .deviceId("device_id") .dpan("dpan") .status(Tokenization.Status.ACTIVE) .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) @@ -42,6 +43,7 @@ internal class TokenizationTest { assertThat(tokenization.cardToken()).isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(tokenization.createdAt()) .isEqualTo(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + assertThat(tokenization.deviceId()).contains("device_id") assertThat(tokenization.dpan()).contains("dpan") assertThat(tokenization.status()).isEqualTo(Tokenization.Status.ACTIVE) assertThat(tokenization.tokenRequestorName()) @@ -75,6 +77,7 @@ internal class TokenizationTest { .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .deviceId("device_id") .dpan("dpan") .status(Tokenization.Status.ACTIVE) .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TokenizationUpdateDigitalCardArtResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TokenizationUpdateDigitalCardArtResponseTest.kt index 955aa5716..62a06c374 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TokenizationUpdateDigitalCardArtResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TokenizationUpdateDigitalCardArtResponseTest.kt @@ -20,6 +20,7 @@ internal class TokenizationUpdateDigitalCardArtResponseTest { .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .deviceId("device_id") .dpan("dpan") .status(Tokenization.Status.ACTIVE) .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) @@ -47,6 +48,7 @@ internal class TokenizationUpdateDigitalCardArtResponseTest { .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .deviceId("device_id") .dpan("dpan") .status(Tokenization.Status.ACTIVE) .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) @@ -78,6 +80,7 @@ internal class TokenizationUpdateDigitalCardArtResponseTest { .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .cardToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .deviceId("device_id") .dpan("dpan") .status(Tokenization.Status.ACTIVE) .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionListPageResponseTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionListPageResponseTest.kt index 68c73d861..4b20f6dd7 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionListPageResponseTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionListPageResponseTest.kt @@ -89,6 +89,7 @@ internal class TransactionListPageResponseTest { .build() ) .created(OffsetDateTime.parse("2023-09-26T21:14:28.637Z")) + .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .merchant( Transaction.Merchant.builder() .acceptorId("333301802529120") @@ -346,6 +347,7 @@ internal class TransactionListPageResponseTest { .build() ) .created(OffsetDateTime.parse("2023-09-26T21:14:28.637Z")) + .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .merchant( Transaction.Merchant.builder() .acceptorId("333301802529120") @@ -600,6 +602,7 @@ internal class TransactionListPageResponseTest { .build() ) .created(OffsetDateTime.parse("2023-09-26T21:14:28.637Z")) + .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .merchant( Transaction.Merchant.builder() .acceptorId("333301802529120") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionTest.kt index 62512a762..4fd22fc6e 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/models/TransactionTest.kt @@ -81,6 +81,7 @@ internal class TransactionTest { .build() ) .created(OffsetDateTime.parse("2023-09-26T21:14:28.637Z")) + .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .merchant( Transaction.Merchant.builder() .acceptorId("333301802529120") @@ -312,6 +313,8 @@ internal class TransactionTest { ) assertThat(transaction.created()) .isEqualTo(OffsetDateTime.parse("2023-09-26T21:14:28.637Z")) + assertThat(transaction.financialAccountToken()) + .contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(transaction.merchant()) .isEqualTo( Transaction.Merchant.builder() @@ -547,6 +550,7 @@ internal class TransactionTest { .build() ) .created(OffsetDateTime.parse("2023-09-26T21:14:28.637Z")) + .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .merchant( Transaction.Merchant.builder() .acceptorId("333301802529120") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/BookTransferServiceAsyncTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/BookTransferServiceAsyncTest.kt index 05200013a..eb72fefaa 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/BookTransferServiceAsyncTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/BookTransferServiceAsyncTest.kt @@ -29,7 +29,7 @@ internal class BookTransferServiceAsyncTest { .fromFinancialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .subtype("subtype") .toFinancialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .type(BookTransferCreateParams.BookTransferType.ATM_WITHDRAWAL) + .type(BookTransferCreateParams.BookTransferType.ATM_BALANCE_INQUIRY) .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .externalId("external_id") .memo("memo") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/authRules/V2ServiceAsyncTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/authRules/V2ServiceAsyncTest.kt index e2db4cc8c..418f6cdfa 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/authRules/V2ServiceAsyncTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/authRules/V2ServiceAsyncTest.kt @@ -96,9 +96,11 @@ internal class V2ServiceAsyncTest { AuthRuleV2UpdateParams.builder() .authRuleToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .body( - AuthRuleV2UpdateParams.Body.UnionMember0.builder() + AuthRuleV2UpdateParams.Body.AccountLevelRule.builder() + .addAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .addBusinessAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .name("name") - .state(AuthRuleV2UpdateParams.Body.UnionMember0.State.INACTIVE) + .state(AuthRuleV2UpdateParams.Body.AccountLevelRule.State.INACTIVE) .build() ) .build() diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/financialAccounts/CreditConfigurationServiceAsyncTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/financialAccounts/CreditConfigurationServiceAsyncTest.kt index a4b4bad4c..2ef00be7e 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/financialAccounts/CreditConfigurationServiceAsyncTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/services/async/financialAccounts/CreditConfigurationServiceAsyncTest.kt @@ -40,6 +40,13 @@ internal class CreditConfigurationServiceAsyncTest { creditConfigurationServiceAsync.update( FinancialAccountCreditConfigurationUpdateParams.builder() .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .autoCollectionConfiguration( + FinancialAccountCreditConfigurationUpdateParams + .AutoCollectionConfigurationRequest + .builder() + .autoCollectionEnabled(true) + .build() + ) .creditLimit(0L) .creditProductToken("credit_product_token") .externalBankAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/BookTransferServiceTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/BookTransferServiceTest.kt index 6c5a4b0e6..aeaac6a81 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/BookTransferServiceTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/BookTransferServiceTest.kt @@ -29,7 +29,7 @@ internal class BookTransferServiceTest { .fromFinancialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .subtype("subtype") .toFinancialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") - .type(BookTransferCreateParams.BookTransferType.ATM_WITHDRAWAL) + .type(BookTransferCreateParams.BookTransferType.ATM_BALANCE_INQUIRY) .token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .externalId("external_id") .memo("memo") diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/authRules/V2ServiceTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/authRules/V2ServiceTest.kt index ca766cf99..b1973b847 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/authRules/V2ServiceTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/authRules/V2ServiceTest.kt @@ -94,9 +94,11 @@ internal class V2ServiceTest { AuthRuleV2UpdateParams.builder() .authRuleToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .body( - AuthRuleV2UpdateParams.Body.UnionMember0.builder() + AuthRuleV2UpdateParams.Body.AccountLevelRule.builder() + .addAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .addBusinessAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .name("name") - .state(AuthRuleV2UpdateParams.Body.UnionMember0.State.INACTIVE) + .state(AuthRuleV2UpdateParams.Body.AccountLevelRule.State.INACTIVE) .build() ) .build() diff --git a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/financialAccounts/CreditConfigurationServiceTest.kt b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/financialAccounts/CreditConfigurationServiceTest.kt index cfe9d5ecd..00ec6d602 100644 --- a/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/financialAccounts/CreditConfigurationServiceTest.kt +++ b/lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/financialAccounts/CreditConfigurationServiceTest.kt @@ -39,6 +39,13 @@ internal class CreditConfigurationServiceTest { creditConfigurationService.update( FinancialAccountCreditConfigurationUpdateParams.builder() .financialAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .autoCollectionConfiguration( + FinancialAccountCreditConfigurationUpdateParams + .AutoCollectionConfigurationRequest + .builder() + .autoCollectionEnabled(true) + .build() + ) .creditLimit(0L) .creditProductToken("credit_product_token") .externalBankAccountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")