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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 155
configured_endpoints: 156
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ private constructor(
private val externalBankAccountToken: JsonField<String>,
private val creditProductToken: JsonField<String>,
private val tier: JsonField<String>,
private val isSpendBlocked: JsonField<Boolean>,
private val financialAccountState: JsonField<FinancialAccountState>,
private val chargedOffReason: JsonField<ChargedOffReason>,
private val additionalProperties: Map<String, JsonValue>,
) {

Expand All @@ -277,10 +279,16 @@ private constructor(
/** Tier assigned to the financial account */
fun tier(): Optional<String> = Optional.ofNullable(tier.getNullable("tier"))

fun isSpendBlocked(): Boolean = isSpendBlocked.getRequired("is_spend_blocked")

/** State of the financial account */
fun financialAccountState(): Optional<FinancialAccountState> =
Optional.ofNullable(financialAccountState.getNullable("financial_account_state"))

/** Reason for the financial account being marked as Charged Off */
fun chargedOffReason(): Optional<ChargedOffReason> =
Optional.ofNullable(chargedOffReason.getNullable("charged_off_reason"))

@JsonProperty("credit_limit") @ExcludeMissing fun _creditLimit() = creditLimit

@JsonProperty("external_bank_account_token")
Expand All @@ -295,11 +303,18 @@ private constructor(
/** Tier assigned to the financial account */
@JsonProperty("tier") @ExcludeMissing fun _tier() = tier

@JsonProperty("is_spend_blocked") @ExcludeMissing fun _isSpendBlocked() = isSpendBlocked

/** State of the financial account */
@JsonProperty("financial_account_state")
@ExcludeMissing
fun _financialAccountState() = financialAccountState

/** Reason for the financial account being marked as Charged Off */
@JsonProperty("charged_off_reason")
@ExcludeMissing
fun _chargedOffReason() = chargedOffReason

@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map<String, JsonValue> = additionalProperties
Expand All @@ -310,7 +325,9 @@ private constructor(
externalBankAccountToken()
creditProductToken()
tier()
isSpendBlocked()
financialAccountState()
chargedOffReason()
validated = true
}
}
Expand All @@ -328,7 +345,9 @@ private constructor(
private var externalBankAccountToken: JsonField<String> = JsonMissing.of()
private var creditProductToken: JsonField<String> = JsonMissing.of()
private var tier: JsonField<String> = JsonMissing.of()
private var isSpendBlocked: JsonField<Boolean> = JsonMissing.of()
private var financialAccountState: JsonField<FinancialAccountState> = JsonMissing.of()
private var chargedOffReason: JsonField<ChargedOffReason> = JsonMissing.of()
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()

@JvmSynthetic
Expand All @@ -338,7 +357,9 @@ private constructor(
financialAccountCreditConfig.externalBankAccountToken
this.creditProductToken = financialAccountCreditConfig.creditProductToken
this.tier = financialAccountCreditConfig.tier
this.isSpendBlocked = financialAccountCreditConfig.isSpendBlocked
this.financialAccountState = financialAccountCreditConfig.financialAccountState
this.chargedOffReason = financialAccountCreditConfig.chargedOffReason
additionalProperties(financialAccountCreditConfig.additionalProperties)
}

Expand Down Expand Up @@ -376,6 +397,15 @@ private constructor(
@ExcludeMissing
fun tier(tier: JsonField<String>) = apply { this.tier = tier }

fun isSpendBlocked(isSpendBlocked: Boolean) =
isSpendBlocked(JsonField.of(isSpendBlocked))

@JsonProperty("is_spend_blocked")
@ExcludeMissing
fun isSpendBlocked(isSpendBlocked: JsonField<Boolean>) = apply {
this.isSpendBlocked = isSpendBlocked
}

/** State of the financial account */
fun financialAccountState(financialAccountState: FinancialAccountState) =
financialAccountState(JsonField.of(financialAccountState))
Expand All @@ -388,6 +418,17 @@ private constructor(
this.financialAccountState = financialAccountState
}

/** Reason for the financial account being marked as Charged Off */
fun chargedOffReason(chargedOffReason: ChargedOffReason) =
chargedOffReason(JsonField.of(chargedOffReason))

/** Reason for the financial account being marked as Charged Off */
@JsonProperty("charged_off_reason")
@ExcludeMissing
fun chargedOffReason(chargedOffReason: JsonField<ChargedOffReason>) = apply {
this.chargedOffReason = chargedOffReason
}

fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
this.additionalProperties.clear()
this.additionalProperties.putAll(additionalProperties)
Expand All @@ -408,11 +449,70 @@ private constructor(
externalBankAccountToken,
creditProductToken,
tier,
isSpendBlocked,
financialAccountState,
chargedOffReason,
additionalProperties.toUnmodifiable(),
)
}

class ChargedOffReason
@JsonCreator
private constructor(
private val value: JsonField<String>,
) : Enum {

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value

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

return /* spotless:off */ other is ChargedOffReason && this.value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()

companion object {

@JvmField val DELINQUENT = ChargedOffReason(JsonField.of("DELINQUENT"))

@JvmField val FRAUD = ChargedOffReason(JsonField.of("FRAUD"))

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

enum class Known {
DELINQUENT,
FRAUD,
}

enum class Value {
DELINQUENT,
FRAUD,
_UNKNOWN,
}

fun value(): Value =
when (this) {
DELINQUENT -> Value.DELINQUENT
FRAUD -> Value.FRAUD
else -> Value._UNKNOWN
}

fun known(): Known =
when (this) {
DELINQUENT -> Known.DELINQUENT
FRAUD -> Known.FRAUD
else -> throw LithicInvalidDataException("Unknown ChargedOffReason: $value")
}

fun asString(): String = _value().asStringOrThrow()
}

class FinancialAccountState
@JsonCreator
private constructor(
Expand Down Expand Up @@ -441,19 +541,23 @@ private constructor(

@JvmField val DELINQUENT = FinancialAccountState(JsonField.of("DELINQUENT"))

@JvmField val CHARGED_OFF = FinancialAccountState(JsonField.of("CHARGED_OFF"))

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

enum class Known {
PENDING,
CURRENT,
DELINQUENT,
CHARGED_OFF,
}

enum class Value {
PENDING,
CURRENT,
DELINQUENT,
CHARGED_OFF,
_UNKNOWN,
}

Expand All @@ -462,6 +566,7 @@ private constructor(
PENDING -> Value.PENDING
CURRENT -> Value.CURRENT
DELINQUENT -> Value.DELINQUENT
CHARGED_OFF -> Value.CHARGED_OFF
else -> Value._UNKNOWN
}

Expand All @@ -470,6 +575,7 @@ private constructor(
PENDING -> Known.PENDING
CURRENT -> Known.CURRENT
DELINQUENT -> Known.DELINQUENT
CHARGED_OFF -> Known.CHARGED_OFF
else ->
throw LithicInvalidDataException("Unknown FinancialAccountState: $value")
}
Expand All @@ -482,20 +588,20 @@ private constructor(
return true
}

return /* spotless:off */ other is FinancialAccountCreditConfig && this.creditLimit == other.creditLimit && this.externalBankAccountToken == other.externalBankAccountToken && this.creditProductToken == other.creditProductToken && this.tier == other.tier && this.financialAccountState == other.financialAccountState && this.additionalProperties == other.additionalProperties /* spotless:on */
return /* spotless:off */ other is FinancialAccountCreditConfig && this.creditLimit == other.creditLimit && this.externalBankAccountToken == other.externalBankAccountToken && this.creditProductToken == other.creditProductToken && this.tier == other.tier && this.isSpendBlocked == other.isSpendBlocked && this.financialAccountState == other.financialAccountState && this.chargedOffReason == other.chargedOffReason && this.additionalProperties == other.additionalProperties /* spotless:on */
}

private var hashCode: Int = 0

override fun hashCode(): Int {
if (hashCode == 0) {
hashCode = /* spotless:off */ Objects.hash(creditLimit, externalBankAccountToken, creditProductToken, tier, financialAccountState, additionalProperties) /* spotless:on */
hashCode = /* spotless:off */ Objects.hash(creditLimit, externalBankAccountToken, creditProductToken, tier, isSpendBlocked, financialAccountState, chargedOffReason, additionalProperties) /* spotless:on */
}
return hashCode
}

override fun toString() =
"FinancialAccountCreditConfig{creditLimit=$creditLimit, externalBankAccountToken=$externalBankAccountToken, creditProductToken=$creditProductToken, tier=$tier, financialAccountState=$financialAccountState, additionalProperties=$additionalProperties}"
"FinancialAccountCreditConfig{creditLimit=$creditLimit, externalBankAccountToken=$externalBankAccountToken, creditProductToken=$creditProductToken, tier=$tier, isSpendBlocked=$isSpendBlocked, financialAccountState=$financialAccountState, chargedOffReason=$chargedOffReason, additionalProperties=$additionalProperties}"
}

class Type
Expand Down
Loading