diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Event.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Event.kt index 1191ebe4..d7639339 100644 --- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Event.kt +++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Event.kt @@ -377,6 +377,19 @@ private constructor( val TRANSFER_TRANSACTION_CREATED = EventType(JsonField.of("transfer_transaction.created")) + val TOKENIZATION_APPROVAL_REQUEST = + EventType(JsonField.of("tokenization.approval_request")) + + val TOKENIZATION_RESULT = EventType(JsonField.of("tokenization.result")) + + val TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = + EventType(JsonField.of("tokenization.two_factor_authentication_code")) + + val TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT = + EventType(JsonField.of("tokenization.two_factor_authentication_code_sent")) + + val TOKENIZATION_UPDATED = EventType(JsonField.of("tokenization.updated")) + fun of(value: String) = EventType(JsonField.of(value)) } @@ -404,6 +417,11 @@ private constructor( SETTLEMENT_REPORT_UPDATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, + TOKENIZATION_APPROVAL_REQUEST, + TOKENIZATION_RESULT, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT, + TOKENIZATION_UPDATED, } enum class Value { @@ -430,6 +448,11 @@ private constructor( SETTLEMENT_REPORT_UPDATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, + TOKENIZATION_APPROVAL_REQUEST, + TOKENIZATION_RESULT, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT, + TOKENIZATION_UPDATED, _UNKNOWN, } @@ -461,6 +484,13 @@ private constructor( SETTLEMENT_REPORT_UPDATED -> Value.SETTLEMENT_REPORT_UPDATED THREE_DS_AUTHENTICATION_CREATED -> Value.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Value.TRANSFER_TRANSACTION_CREATED + TOKENIZATION_APPROVAL_REQUEST -> Value.TOKENIZATION_APPROVAL_REQUEST + TOKENIZATION_RESULT -> Value.TOKENIZATION_RESULT + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE -> + Value.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT -> + Value.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT + TOKENIZATION_UPDATED -> Value.TOKENIZATION_UPDATED else -> Value._UNKNOWN } @@ -492,6 +522,13 @@ private constructor( SETTLEMENT_REPORT_UPDATED -> Known.SETTLEMENT_REPORT_UPDATED THREE_DS_AUTHENTICATION_CREATED -> Known.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Known.TRANSFER_TRANSACTION_CREATED + TOKENIZATION_APPROVAL_REQUEST -> Known.TOKENIZATION_APPROVAL_REQUEST + TOKENIZATION_RESULT -> Known.TOKENIZATION_RESULT + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE -> + Known.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT -> + Known.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT + TOKENIZATION_UPDATED -> Known.TOKENIZATION_UPDATED else -> throw LithicInvalidDataException("Unknown EventType: $value") } diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt index da0626dd..03075a8e 100644 --- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt +++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt @@ -327,6 +327,19 @@ constructor( val TRANSFER_TRANSACTION_CREATED = EventType(JsonField.of("transfer_transaction.created")) + val TOKENIZATION_APPROVAL_REQUEST = + EventType(JsonField.of("tokenization.approval_request")) + + val TOKENIZATION_RESULT = EventType(JsonField.of("tokenization.result")) + + val TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = + EventType(JsonField.of("tokenization.two_factor_authentication_code")) + + val TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT = + EventType(JsonField.of("tokenization.two_factor_authentication_code_sent")) + + val TOKENIZATION_UPDATED = EventType(JsonField.of("tokenization.updated")) + fun of(value: String) = EventType(JsonField.of(value)) } @@ -354,6 +367,11 @@ constructor( SETTLEMENT_REPORT_UPDATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, + TOKENIZATION_APPROVAL_REQUEST, + TOKENIZATION_RESULT, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT, + TOKENIZATION_UPDATED, } enum class Value { @@ -380,6 +398,11 @@ constructor( SETTLEMENT_REPORT_UPDATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, + TOKENIZATION_APPROVAL_REQUEST, + TOKENIZATION_RESULT, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT, + TOKENIZATION_UPDATED, _UNKNOWN, } @@ -411,6 +434,13 @@ constructor( SETTLEMENT_REPORT_UPDATED -> Value.SETTLEMENT_REPORT_UPDATED THREE_DS_AUTHENTICATION_CREATED -> Value.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Value.TRANSFER_TRANSACTION_CREATED + TOKENIZATION_APPROVAL_REQUEST -> Value.TOKENIZATION_APPROVAL_REQUEST + TOKENIZATION_RESULT -> Value.TOKENIZATION_RESULT + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE -> + Value.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT -> + Value.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT + TOKENIZATION_UPDATED -> Value.TOKENIZATION_UPDATED else -> Value._UNKNOWN } @@ -442,6 +472,13 @@ constructor( SETTLEMENT_REPORT_UPDATED -> Known.SETTLEMENT_REPORT_UPDATED THREE_DS_AUTHENTICATION_CREATED -> Known.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Known.TRANSFER_TRANSACTION_CREATED + TOKENIZATION_APPROVAL_REQUEST -> Known.TOKENIZATION_APPROVAL_REQUEST + TOKENIZATION_RESULT -> Known.TOKENIZATION_RESULT + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE -> + Known.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT -> + Known.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT + TOKENIZATION_UPDATED -> Known.TOKENIZATION_UPDATED else -> throw LithicInvalidDataException("Unknown EventType: $value") } diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscription.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscription.kt index 3847fc0f..ca97c6eb 100644 --- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscription.kt +++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscription.kt @@ -277,6 +277,19 @@ private constructor( val TRANSFER_TRANSACTION_CREATED = EventType(JsonField.of("transfer_transaction.created")) + val TOKENIZATION_APPROVAL_REQUEST = + EventType(JsonField.of("tokenization.approval_request")) + + val TOKENIZATION_RESULT = EventType(JsonField.of("tokenization.result")) + + val TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = + EventType(JsonField.of("tokenization.two_factor_authentication_code")) + + val TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT = + EventType(JsonField.of("tokenization.two_factor_authentication_code_sent")) + + val TOKENIZATION_UPDATED = EventType(JsonField.of("tokenization.updated")) + fun of(value: String) = EventType(JsonField.of(value)) } @@ -304,6 +317,11 @@ private constructor( SETTLEMENT_REPORT_UPDATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, + TOKENIZATION_APPROVAL_REQUEST, + TOKENIZATION_RESULT, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT, + TOKENIZATION_UPDATED, } enum class Value { @@ -330,6 +348,11 @@ private constructor( SETTLEMENT_REPORT_UPDATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, + TOKENIZATION_APPROVAL_REQUEST, + TOKENIZATION_RESULT, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT, + TOKENIZATION_UPDATED, _UNKNOWN, } @@ -361,6 +384,13 @@ private constructor( SETTLEMENT_REPORT_UPDATED -> Value.SETTLEMENT_REPORT_UPDATED THREE_DS_AUTHENTICATION_CREATED -> Value.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Value.TRANSFER_TRANSACTION_CREATED + TOKENIZATION_APPROVAL_REQUEST -> Value.TOKENIZATION_APPROVAL_REQUEST + TOKENIZATION_RESULT -> Value.TOKENIZATION_RESULT + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE -> + Value.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT -> + Value.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT + TOKENIZATION_UPDATED -> Value.TOKENIZATION_UPDATED else -> Value._UNKNOWN } @@ -392,6 +422,13 @@ private constructor( SETTLEMENT_REPORT_UPDATED -> Known.SETTLEMENT_REPORT_UPDATED THREE_DS_AUTHENTICATION_CREATED -> Known.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Known.TRANSFER_TRANSACTION_CREATED + TOKENIZATION_APPROVAL_REQUEST -> Known.TOKENIZATION_APPROVAL_REQUEST + TOKENIZATION_RESULT -> Known.TOKENIZATION_RESULT + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE -> + Known.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT -> + Known.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT + TOKENIZATION_UPDATED -> Known.TOKENIZATION_UPDATED else -> throw LithicInvalidDataException("Unknown EventType: $value") } diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt index 5e8c3923..ffc53a06 100644 --- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt +++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt @@ -414,6 +414,19 @@ constructor( val TRANSFER_TRANSACTION_CREATED = EventType(JsonField.of("transfer_transaction.created")) + val TOKENIZATION_APPROVAL_REQUEST = + EventType(JsonField.of("tokenization.approval_request")) + + val TOKENIZATION_RESULT = EventType(JsonField.of("tokenization.result")) + + val TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = + EventType(JsonField.of("tokenization.two_factor_authentication_code")) + + val TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT = + EventType(JsonField.of("tokenization.two_factor_authentication_code_sent")) + + val TOKENIZATION_UPDATED = EventType(JsonField.of("tokenization.updated")) + fun of(value: String) = EventType(JsonField.of(value)) } @@ -441,6 +454,11 @@ constructor( SETTLEMENT_REPORT_UPDATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, + TOKENIZATION_APPROVAL_REQUEST, + TOKENIZATION_RESULT, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT, + TOKENIZATION_UPDATED, } enum class Value { @@ -467,6 +485,11 @@ constructor( SETTLEMENT_REPORT_UPDATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, + TOKENIZATION_APPROVAL_REQUEST, + TOKENIZATION_RESULT, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT, + TOKENIZATION_UPDATED, _UNKNOWN, } @@ -498,6 +521,13 @@ constructor( SETTLEMENT_REPORT_UPDATED -> Value.SETTLEMENT_REPORT_UPDATED THREE_DS_AUTHENTICATION_CREATED -> Value.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Value.TRANSFER_TRANSACTION_CREATED + TOKENIZATION_APPROVAL_REQUEST -> Value.TOKENIZATION_APPROVAL_REQUEST + TOKENIZATION_RESULT -> Value.TOKENIZATION_RESULT + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE -> + Value.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT -> + Value.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT + TOKENIZATION_UPDATED -> Value.TOKENIZATION_UPDATED else -> Value._UNKNOWN } @@ -529,6 +559,13 @@ constructor( SETTLEMENT_REPORT_UPDATED -> Known.SETTLEMENT_REPORT_UPDATED THREE_DS_AUTHENTICATION_CREATED -> Known.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Known.TRANSFER_TRANSACTION_CREATED + TOKENIZATION_APPROVAL_REQUEST -> Known.TOKENIZATION_APPROVAL_REQUEST + TOKENIZATION_RESULT -> Known.TOKENIZATION_RESULT + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE -> + Known.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT -> + Known.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT + TOKENIZATION_UPDATED -> Known.TOKENIZATION_UPDATED else -> throw LithicInvalidDataException("Unknown EventType: $value") } diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt index ade4362d..e02d0f63 100644 --- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt +++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt @@ -343,6 +343,19 @@ constructor( val TRANSFER_TRANSACTION_CREATED = EventType(JsonField.of("transfer_transaction.created")) + val TOKENIZATION_APPROVAL_REQUEST = + EventType(JsonField.of("tokenization.approval_request")) + + val TOKENIZATION_RESULT = EventType(JsonField.of("tokenization.result")) + + val TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = + EventType(JsonField.of("tokenization.two_factor_authentication_code")) + + val TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT = + EventType(JsonField.of("tokenization.two_factor_authentication_code_sent")) + + val TOKENIZATION_UPDATED = EventType(JsonField.of("tokenization.updated")) + fun of(value: String) = EventType(JsonField.of(value)) } @@ -370,6 +383,11 @@ constructor( SETTLEMENT_REPORT_UPDATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, + TOKENIZATION_APPROVAL_REQUEST, + TOKENIZATION_RESULT, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT, + TOKENIZATION_UPDATED, } enum class Value { @@ -396,6 +414,11 @@ constructor( SETTLEMENT_REPORT_UPDATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, + TOKENIZATION_APPROVAL_REQUEST, + TOKENIZATION_RESULT, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT, + TOKENIZATION_UPDATED, _UNKNOWN, } @@ -427,6 +450,13 @@ constructor( SETTLEMENT_REPORT_UPDATED -> Value.SETTLEMENT_REPORT_UPDATED THREE_DS_AUTHENTICATION_CREATED -> Value.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Value.TRANSFER_TRANSACTION_CREATED + TOKENIZATION_APPROVAL_REQUEST -> Value.TOKENIZATION_APPROVAL_REQUEST + TOKENIZATION_RESULT -> Value.TOKENIZATION_RESULT + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE -> + Value.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT -> + Value.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT + TOKENIZATION_UPDATED -> Value.TOKENIZATION_UPDATED else -> Value._UNKNOWN } @@ -458,6 +488,13 @@ constructor( SETTLEMENT_REPORT_UPDATED -> Known.SETTLEMENT_REPORT_UPDATED THREE_DS_AUTHENTICATION_CREATED -> Known.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Known.TRANSFER_TRANSACTION_CREATED + TOKENIZATION_APPROVAL_REQUEST -> Known.TOKENIZATION_APPROVAL_REQUEST + TOKENIZATION_RESULT -> Known.TOKENIZATION_RESULT + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE -> + Known.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT -> + Known.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT + TOKENIZATION_UPDATED -> Known.TOKENIZATION_UPDATED else -> throw LithicInvalidDataException("Unknown EventType: $value") } diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt index 9bbc18fe..2d3323cd 100644 --- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt +++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt @@ -435,6 +435,19 @@ constructor( val TRANSFER_TRANSACTION_CREATED = EventType(JsonField.of("transfer_transaction.created")) + val TOKENIZATION_APPROVAL_REQUEST = + EventType(JsonField.of("tokenization.approval_request")) + + val TOKENIZATION_RESULT = EventType(JsonField.of("tokenization.result")) + + val TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE = + EventType(JsonField.of("tokenization.two_factor_authentication_code")) + + val TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT = + EventType(JsonField.of("tokenization.two_factor_authentication_code_sent")) + + val TOKENIZATION_UPDATED = EventType(JsonField.of("tokenization.updated")) + fun of(value: String) = EventType(JsonField.of(value)) } @@ -462,6 +475,11 @@ constructor( SETTLEMENT_REPORT_UPDATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, + TOKENIZATION_APPROVAL_REQUEST, + TOKENIZATION_RESULT, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT, + TOKENIZATION_UPDATED, } enum class Value { @@ -488,6 +506,11 @@ constructor( SETTLEMENT_REPORT_UPDATED, THREE_DS_AUTHENTICATION_CREATED, TRANSFER_TRANSACTION_CREATED, + TOKENIZATION_APPROVAL_REQUEST, + TOKENIZATION_RESULT, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE, + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT, + TOKENIZATION_UPDATED, _UNKNOWN, } @@ -519,6 +542,13 @@ constructor( SETTLEMENT_REPORT_UPDATED -> Value.SETTLEMENT_REPORT_UPDATED THREE_DS_AUTHENTICATION_CREATED -> Value.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Value.TRANSFER_TRANSACTION_CREATED + TOKENIZATION_APPROVAL_REQUEST -> Value.TOKENIZATION_APPROVAL_REQUEST + TOKENIZATION_RESULT -> Value.TOKENIZATION_RESULT + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE -> + Value.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT -> + Value.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT + TOKENIZATION_UPDATED -> Value.TOKENIZATION_UPDATED else -> Value._UNKNOWN } @@ -550,6 +580,13 @@ constructor( SETTLEMENT_REPORT_UPDATED -> Known.SETTLEMENT_REPORT_UPDATED THREE_DS_AUTHENTICATION_CREATED -> Known.THREE_DS_AUTHENTICATION_CREATED TRANSFER_TRANSACTION_CREATED -> Known.TRANSFER_TRANSACTION_CREATED + TOKENIZATION_APPROVAL_REQUEST -> Known.TOKENIZATION_APPROVAL_REQUEST + TOKENIZATION_RESULT -> Known.TOKENIZATION_RESULT + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE -> + Known.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE + TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT -> + Known.TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE_SENT + TOKENIZATION_UPDATED -> Known.TOKENIZATION_UPDATED else -> throw LithicInvalidDataException("Unknown EventType: $value") } diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt index 40ef50f8..dae1fcf2 100644 --- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt +++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt @@ -31,6 +31,7 @@ private constructor( private val token: JsonField, private val type: JsonField, private val updated: JsonField, + private val isForBenefitOf: JsonField, private val additionalProperties: Map, ) { @@ -62,6 +63,9 @@ private constructor( /** Date and time for when the financial account was last updated. */ fun updated(): OffsetDateTime = updated.getRequired("updated") + /** Whether the financial account holds funds for benefit of another party. */ + fun isForBenefitOf(): Boolean = isForBenefitOf.getRequired("is_for_benefit_of") + /** Account number for your Lithic-assigned bank account number, if applicable. */ @JsonProperty("account_number") @ExcludeMissing fun _accountNumber() = accountNumber @@ -86,6 +90,9 @@ private constructor( /** Date and time for when the financial account was last updated. */ @JsonProperty("updated") @ExcludeMissing fun _updated() = updated + /** Whether the financial account holds funds for benefit of another party. */ + @JsonProperty("is_for_benefit_of") @ExcludeMissing fun _isForBenefitOf() = isForBenefitOf + @JsonAnyGetter @ExcludeMissing fun _additionalProperties(): Map = additionalProperties @@ -100,6 +107,7 @@ private constructor( token() type() updated() + isForBenefitOf() validated = true } } @@ -120,6 +128,7 @@ private constructor( this.token == other.token && this.type == other.type && this.updated == other.updated && + this.isForBenefitOf == other.isForBenefitOf && this.additionalProperties == other.additionalProperties } @@ -135,6 +144,7 @@ private constructor( token, type, updated, + isForBenefitOf, additionalProperties, ) } @@ -142,7 +152,7 @@ private constructor( } override fun toString() = - "FinancialAccount{accountNumber=$accountNumber, accountToken=$accountToken, created=$created, nickname=$nickname, routingNumber=$routingNumber, token=$token, type=$type, updated=$updated, additionalProperties=$additionalProperties}" + "FinancialAccount{accountNumber=$accountNumber, accountToken=$accountToken, created=$created, nickname=$nickname, routingNumber=$routingNumber, token=$token, type=$type, updated=$updated, isForBenefitOf=$isForBenefitOf, additionalProperties=$additionalProperties}" companion object { @@ -159,6 +169,7 @@ private constructor( private var token: JsonField = JsonMissing.of() private var type: JsonField = JsonMissing.of() private var updated: JsonField = JsonMissing.of() + private var isForBenefitOf: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() internal fun from(financialAccount: FinancialAccount) = apply { @@ -170,6 +181,7 @@ private constructor( this.token = financialAccount.token this.type = financialAccount.type this.updated = financialAccount.updated + this.isForBenefitOf = financialAccount.isForBenefitOf additionalProperties(financialAccount.additionalProperties) } @@ -243,6 +255,16 @@ private constructor( @ExcludeMissing fun updated(updated: JsonField) = apply { this.updated = updated } + /** Whether the financial account holds funds for benefit of another party. */ + fun isForBenefitOf(isForBenefitOf: Boolean) = isForBenefitOf(JsonField.of(isForBenefitOf)) + + /** Whether the financial account holds funds for benefit of another party. */ + @JsonProperty("is_for_benefit_of") + @ExcludeMissing + fun isForBenefitOf(isForBenefitOf: JsonField) = apply { + this.isForBenefitOf = isForBenefitOf + } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() this.additionalProperties.putAll(additionalProperties) @@ -267,6 +289,7 @@ private constructor( token, type, updated, + isForBenefitOf, additionalProperties.toUnmodifiable(), ) } diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreateParams.kt index 300039b6..8e22e2d0 100644 --- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreateParams.kt +++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreateParams.kt @@ -22,6 +22,7 @@ constructor( private val nickname: String, private val type: Type, private val accountToken: String?, + private val isForBenefitOf: Boolean?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, private val additionalBodyProperties: Map, @@ -33,11 +34,14 @@ constructor( fun accountToken(): String? = accountToken + fun isForBenefitOf(): Boolean? = isForBenefitOf + internal fun getBody(): FinancialAccountCreateBody { return FinancialAccountCreateBody( nickname, type, accountToken, + isForBenefitOf, additionalBodyProperties, ) } @@ -53,6 +57,7 @@ constructor( private val nickname: String?, private val type: Type?, private val accountToken: String?, + private val isForBenefitOf: Boolean?, private val additionalProperties: Map, ) { @@ -64,6 +69,8 @@ constructor( @JsonProperty("account_token") fun accountToken(): String? = accountToken + @JsonProperty("is_for_benefit_of") fun isForBenefitOf(): Boolean? = isForBenefitOf + @JsonAnyGetter @ExcludeMissing fun _additionalProperties(): Map = additionalProperties @@ -79,6 +86,7 @@ constructor( this.nickname == other.nickname && this.type == other.type && this.accountToken == other.accountToken && + this.isForBenefitOf == other.isForBenefitOf && this.additionalProperties == other.additionalProperties } @@ -89,6 +97,7 @@ constructor( nickname, type, accountToken, + isForBenefitOf, additionalProperties, ) } @@ -96,7 +105,7 @@ constructor( } override fun toString() = - "FinancialAccountCreateBody{nickname=$nickname, type=$type, accountToken=$accountToken, additionalProperties=$additionalProperties}" + "FinancialAccountCreateBody{nickname=$nickname, type=$type, accountToken=$accountToken, isForBenefitOf=$isForBenefitOf, additionalProperties=$additionalProperties}" companion object { @@ -108,12 +117,14 @@ constructor( private var nickname: String? = null private var type: Type? = null private var accountToken: String? = null + private var isForBenefitOf: Boolean? = null private var additionalProperties: MutableMap = mutableMapOf() internal fun from(financialAccountCreateBody: FinancialAccountCreateBody) = apply { this.nickname = financialAccountCreateBody.nickname this.type = financialAccountCreateBody.type this.accountToken = financialAccountCreateBody.accountToken + this.isForBenefitOf = financialAccountCreateBody.isForBenefitOf additionalProperties(financialAccountCreateBody.additionalProperties) } @@ -125,6 +136,11 @@ constructor( @JsonProperty("account_token") fun accountToken(accountToken: String) = apply { this.accountToken = accountToken } + @JsonProperty("is_for_benefit_of") + fun isForBenefitOf(isForBenefitOf: Boolean) = apply { + this.isForBenefitOf = isForBenefitOf + } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() this.additionalProperties.putAll(additionalProperties) @@ -144,6 +160,7 @@ constructor( checkNotNull(nickname) { "`nickname` is required but was not set" }, checkNotNull(type) { "`type` is required but was not set" }, accountToken, + isForBenefitOf, additionalProperties.toUnmodifiable(), ) } @@ -164,6 +181,7 @@ constructor( this.nickname == other.nickname && this.type == other.type && this.accountToken == other.accountToken && + this.isForBenefitOf == other.isForBenefitOf && this.additionalQueryParams == other.additionalQueryParams && this.additionalHeaders == other.additionalHeaders && this.additionalBodyProperties == other.additionalBodyProperties @@ -174,6 +192,7 @@ constructor( nickname, type, accountToken, + isForBenefitOf, additionalQueryParams, additionalHeaders, additionalBodyProperties, @@ -181,7 +200,7 @@ constructor( } override fun toString() = - "FinancialAccountCreateParams{nickname=$nickname, type=$type, accountToken=$accountToken, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "FinancialAccountCreateParams{nickname=$nickname, type=$type, accountToken=$accountToken, isForBenefitOf=$isForBenefitOf, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" fun toBuilder() = Builder().from(this) @@ -196,6 +215,7 @@ constructor( private var nickname: String? = null private var type: Type? = null private var accountToken: String? = null + private var isForBenefitOf: Boolean? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() private var additionalBodyProperties: MutableMap = mutableMapOf() @@ -204,6 +224,7 @@ constructor( this.nickname = financialAccountCreateParams.nickname this.type = financialAccountCreateParams.type this.accountToken = financialAccountCreateParams.accountToken + this.isForBenefitOf = financialAccountCreateParams.isForBenefitOf additionalQueryParams(financialAccountCreateParams.additionalQueryParams) additionalHeaders(financialAccountCreateParams.additionalHeaders) additionalBodyProperties(financialAccountCreateParams.additionalBodyProperties) @@ -215,6 +236,8 @@ constructor( fun accountToken(accountToken: String) = apply { this.accountToken = accountToken } + fun isForBenefitOf(isForBenefitOf: Boolean) = apply { this.isForBenefitOf = isForBenefitOf } + fun additionalQueryParams(additionalQueryParams: Map>) = apply { this.additionalQueryParams.clear() putAllQueryParams(additionalQueryParams) @@ -274,6 +297,7 @@ constructor( checkNotNull(nickname) { "`nickname` is required but was not set" }, checkNotNull(type) { "`type` is required but was not set" }, accountToken, + isForBenefitOf, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalBodyProperties.toUnmodifiable(), diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialTransaction.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialTransaction.kt index 24de141b..6e275c29 100644 --- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialTransaction.kt +++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/FinancialTransaction.kt @@ -535,43 +535,33 @@ private constructor( fun token(): String? = token.getNullable("token") /** - * Event types: - * - `ACH_ORIGINATION_INITIATED` - ACH origination received and pending approval/release - * from an ACH hold. - * - `ACH_ORIGINATION_REVIEWED` - ACH origination has completed the review process. - * - `ACH_ORIGINATION_CANCELLED` - ACH origination has been cancelled. - * - `ACH_ORIGINATION_PROCESSED` - ACH origination has been processed and sent to the fed. - * - `ACH_ORIGINATION_SETTLED` - ACH origination has settled. - * - `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to available - * balance. - * - `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving Depository Financial - * Institution. - * - `ACH_RECEIPT_PROCESSED` - ACH receipt pending release from an ACH holder. - * - `ACH_RETURN_INITIATED` - ACH initiated return for a ACH receipt. - * - `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. - * - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available balance. - * - `AUTHORIZATION` - Authorize a card transaction. - * - `AUTHORIZATION_ADVICE` - Advice on a card transaction. - * - `AUTHORIZATION_EXPIRY` - Card Authorization has expired and reversed by Lithic. - * - `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by the merchant. - * - `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 authorization) has occurred - * on a card. - * - `CLEARING` - Card Transaction is settled. - * - `CORRECTION_DEBIT` - Manual card transaction correction (Debit). - * - `CORRECTION_CREDIT` - Manual card transaction correction (Credit). - * - `CREDIT_AUTHORIZATION` - A refund or credit card authorization from a merchant. - * - `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was approved on your behalf - * by the network. - * - `FINANCIAL_AUTHORIZATION` - A request from a merchant to debit card funds without - * additional clearing. - * - `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or credit card - * funds without additional clearing. - * - `RETURN` - A card refund has been processed on the transaction. - * - `RETURN_REVERSAL` - A card refund has been reversed (e.g., when a merchant reverses an - * incorrect refund). - * - `TRANSFER` - Successful internal transfer of funds between financial accounts. - * - `TRANSFER_INSUFFICIENT_FUNDS` - Declined internl transfer of funds due to insufficient - * balance of the sender. + * Event types: _ `ACH_ORIGINATION_INITIATED` - ACH origination received and pending + * approval/release from an ACH hold. _ `ACH_ORIGINATION_REVIEWED` - ACH origination has + * completed the review process. _ `ACH_ORIGINATION_CANCELLED` - ACH origination has been + * cancelled. _ `ACH_ORIGINATION_PROCESSED` - ACH origination has been processed and sent to + * the fed. _ `ACH_ORIGINATION_SETTLED` - ACH origination has settled. _ + * `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to available balance. + * _ `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving Depository Financial + * Institution. _ `ACH_RECEIPT_PROCESSED` - ACH receipt pending release from an ACH holder. + * _ `ACH_RETURN_INITIATED` - ACH initiated return for a ACH receipt. _ + * `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. _ `ACH_RECEIPT_RELEASED` - ACH + * receipt released from pending to available balance. _ `AUTHORIZATION` - Authorize a card + * transaction. _ `AUTHORIZATION_ADVICE` - Advice on a card transaction. _ + * `AUTHORIZATION_EXPIRY` - Card Authorization has expired and reversed by Lithic. _ + * `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by the merchant. _ + * `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 authorization) has occurred on + * a card. _ `CLEARING` - Card Transaction is settled. _ `CORRECTION_DEBIT` - Manual card + * transaction correction (Debit). _ `CORRECTION_CREDIT` - Manual card transaction + * correction (Credit). _ `CREDIT_AUTHORIZATION` - A refund or credit card authorization + * from a merchant. _ `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was + * approved on your behalf by the network. _ `FINANCIAL_AUTHORIZATION` - A request from a + * merchant to debit card funds without additional clearing. _ + * `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or credit card + * funds without additional clearing. _ `RETURN` - A card refund has been processed on the + * transaction. _ `RETURN_REVERSAL` - A card refund has been reversed (e.g., when a merchant + * reverses an incorrect refund). _ `TRANSFER` - Successful internal transfer of funds + * between financial accounts. \* `TRANSFER_INSUFFICIENT_FUNDS` - Declined internal transfer + * of funds due to insufficient balance of the sender. */ fun type(): FinancialEventType? = type.getNullable("type") @@ -594,43 +584,33 @@ private constructor( @JsonProperty("token") @ExcludeMissing fun _token() = token /** - * Event types: - * - `ACH_ORIGINATION_INITIATED` - ACH origination received and pending approval/release - * from an ACH hold. - * - `ACH_ORIGINATION_REVIEWED` - ACH origination has completed the review process. - * - `ACH_ORIGINATION_CANCELLED` - ACH origination has been cancelled. - * - `ACH_ORIGINATION_PROCESSED` - ACH origination has been processed and sent to the fed. - * - `ACH_ORIGINATION_SETTLED` - ACH origination has settled. - * - `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to available - * balance. - * - `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving Depository Financial - * Institution. - * - `ACH_RECEIPT_PROCESSED` - ACH receipt pending release from an ACH holder. - * - `ACH_RETURN_INITIATED` - ACH initiated return for a ACH receipt. - * - `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. - * - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available balance. - * - `AUTHORIZATION` - Authorize a card transaction. - * - `AUTHORIZATION_ADVICE` - Advice on a card transaction. - * - `AUTHORIZATION_EXPIRY` - Card Authorization has expired and reversed by Lithic. - * - `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by the merchant. - * - `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 authorization) has occurred - * on a card. - * - `CLEARING` - Card Transaction is settled. - * - `CORRECTION_DEBIT` - Manual card transaction correction (Debit). - * - `CORRECTION_CREDIT` - Manual card transaction correction (Credit). - * - `CREDIT_AUTHORIZATION` - A refund or credit card authorization from a merchant. - * - `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was approved on your behalf - * by the network. - * - `FINANCIAL_AUTHORIZATION` - A request from a merchant to debit card funds without - * additional clearing. - * - `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or credit card - * funds without additional clearing. - * - `RETURN` - A card refund has been processed on the transaction. - * - `RETURN_REVERSAL` - A card refund has been reversed (e.g., when a merchant reverses an - * incorrect refund). - * - `TRANSFER` - Successful internal transfer of funds between financial accounts. - * - `TRANSFER_INSUFFICIENT_FUNDS` - Declined internl transfer of funds due to insufficient - * balance of the sender. + * Event types: _ `ACH_ORIGINATION_INITIATED` - ACH origination received and pending + * approval/release from an ACH hold. _ `ACH_ORIGINATION_REVIEWED` - ACH origination has + * completed the review process. _ `ACH_ORIGINATION_CANCELLED` - ACH origination has been + * cancelled. _ `ACH_ORIGINATION_PROCESSED` - ACH origination has been processed and sent to + * the fed. _ `ACH_ORIGINATION_SETTLED` - ACH origination has settled. _ + * `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to available balance. + * _ `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving Depository Financial + * Institution. _ `ACH_RECEIPT_PROCESSED` - ACH receipt pending release from an ACH holder. + * _ `ACH_RETURN_INITIATED` - ACH initiated return for a ACH receipt. _ + * `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. _ `ACH_RECEIPT_RELEASED` - ACH + * receipt released from pending to available balance. _ `AUTHORIZATION` - Authorize a card + * transaction. _ `AUTHORIZATION_ADVICE` - Advice on a card transaction. _ + * `AUTHORIZATION_EXPIRY` - Card Authorization has expired and reversed by Lithic. _ + * `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by the merchant. _ + * `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 authorization) has occurred on + * a card. _ `CLEARING` - Card Transaction is settled. _ `CORRECTION_DEBIT` - Manual card + * transaction correction (Debit). _ `CORRECTION_CREDIT` - Manual card transaction + * correction (Credit). _ `CREDIT_AUTHORIZATION` - A refund or credit card authorization + * from a merchant. _ `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was + * approved on your behalf by the network. _ `FINANCIAL_AUTHORIZATION` - A request from a + * merchant to debit card funds without additional clearing. _ + * `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or credit card + * funds without additional clearing. _ `RETURN` - A card refund has been processed on the + * transaction. _ `RETURN_REVERSAL` - A card refund has been reversed (e.g., when a merchant + * reverses an incorrect refund). _ `TRANSFER` - Successful internal transfer of funds + * between financial accounts. \* `TRANSFER_INSUFFICIENT_FUNDS` - Declined internal transfer + * of funds due to insufficient balance of the sender. */ @JsonProperty("type") @ExcludeMissing fun _type() = type @@ -751,86 +731,66 @@ private constructor( fun token(token: JsonField) = apply { this.token = token } /** - * Event types: - * - `ACH_ORIGINATION_INITIATED` - ACH origination received and pending approval/release - * from an ACH hold. - * - `ACH_ORIGINATION_REVIEWED` - ACH origination has completed the review process. - * - `ACH_ORIGINATION_CANCELLED` - ACH origination has been cancelled. - * - `ACH_ORIGINATION_PROCESSED` - ACH origination has been processed and sent to the - * fed. - * - `ACH_ORIGINATION_SETTLED` - ACH origination has settled. - * - `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to available - * balance. - * - `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving Depository - * Financial Institution. - * - `ACH_RECEIPT_PROCESSED` - ACH receipt pending release from an ACH holder. - * - `ACH_RETURN_INITIATED` - ACH initiated return for a ACH receipt. - * - `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. - * - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available balance. - * - `AUTHORIZATION` - Authorize a card transaction. - * - `AUTHORIZATION_ADVICE` - Advice on a card transaction. - * - `AUTHORIZATION_EXPIRY` - Card Authorization has expired and reversed by Lithic. - * - `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by the merchant. - * - `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 authorization) has - * occurred on a card. - * - `CLEARING` - Card Transaction is settled. - * - `CORRECTION_DEBIT` - Manual card transaction correction (Debit). - * - `CORRECTION_CREDIT` - Manual card transaction correction (Credit). - * - `CREDIT_AUTHORIZATION` - A refund or credit card authorization from a merchant. - * - `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was approved on your - * behalf by the network. - * - `FINANCIAL_AUTHORIZATION` - A request from a merchant to debit card funds without - * additional clearing. - * - `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or credit - * card funds without additional clearing. - * - `RETURN` - A card refund has been processed on the transaction. - * - `RETURN_REVERSAL` - A card refund has been reversed (e.g., when a merchant reverses - * an incorrect refund). - * - `TRANSFER` - Successful internal transfer of funds between financial accounts. - * - `TRANSFER_INSUFFICIENT_FUNDS` - Declined internl transfer of funds due to - * insufficient balance of the sender. + * Event types: _ `ACH_ORIGINATION_INITIATED` - ACH origination received and pending + * approval/release from an ACH hold. _ `ACH_ORIGINATION_REVIEWED` - ACH origination has + * completed the review process. _ `ACH_ORIGINATION_CANCELLED` - ACH origination has + * been cancelled. _ `ACH_ORIGINATION_PROCESSED` - ACH origination has been processed + * and sent to the fed. _ `ACH_ORIGINATION_SETTLED` - ACH origination has settled. _ + * `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to available + * balance. _ `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving + * Depository Financial Institution. _ `ACH_RECEIPT_PROCESSED` - ACH receipt pending + * release from an ACH holder. _ `ACH_RETURN_INITIATED` - ACH initiated return for a ACH + * receipt. _ `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. _ + * `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available balance. _ + * `AUTHORIZATION` - Authorize a card transaction. _ `AUTHORIZATION_ADVICE` - Advice on + * a card transaction. _ `AUTHORIZATION_EXPIRY` - Card Authorization has expired and + * reversed by Lithic. _ `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by + * the merchant. _ `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 + * authorization) has occurred on a card. _ `CLEARING` - Card Transaction is settled. _ + * `CORRECTION_DEBIT` - Manual card transaction correction (Debit). _ + * `CORRECTION_CREDIT` - Manual card transaction correction (Credit). _ + * `CREDIT_AUTHORIZATION` - A refund or credit card authorization from a merchant. _ + * `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was approved on your + * behalf by the network. _ `FINANCIAL_AUTHORIZATION` - A request from a merchant to + * debit card funds without additional clearing. _ `FINANCIAL_CREDIT_AUTHORIZATION` - A + * request from a merchant to refund or credit card funds without additional clearing. _ + * `RETURN` - A card refund has been processed on the transaction. _ `RETURN_REVERSAL` - + * A card refund has been reversed (e.g., when a merchant reverses an incorrect refund). + * _ `TRANSFER` - Successful internal transfer of funds between financial accounts. \* + * `TRANSFER_INSUFFICIENT_FUNDS` - Declined internal transfer of funds due to + * insufficient balance of the sender. */ fun type(type: FinancialEventType) = type(JsonField.of(type)) /** - * Event types: - * - `ACH_ORIGINATION_INITIATED` - ACH origination received and pending approval/release - * from an ACH hold. - * - `ACH_ORIGINATION_REVIEWED` - ACH origination has completed the review process. - * - `ACH_ORIGINATION_CANCELLED` - ACH origination has been cancelled. - * - `ACH_ORIGINATION_PROCESSED` - ACH origination has been processed and sent to the - * fed. - * - `ACH_ORIGINATION_SETTLED` - ACH origination has settled. - * - `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to available - * balance. - * - `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving Depository - * Financial Institution. - * - `ACH_RECEIPT_PROCESSED` - ACH receipt pending release from an ACH holder. - * - `ACH_RETURN_INITIATED` - ACH initiated return for a ACH receipt. - * - `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. - * - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available balance. - * - `AUTHORIZATION` - Authorize a card transaction. - * - `AUTHORIZATION_ADVICE` - Advice on a card transaction. - * - `AUTHORIZATION_EXPIRY` - Card Authorization has expired and reversed by Lithic. - * - `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by the merchant. - * - `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 authorization) has - * occurred on a card. - * - `CLEARING` - Card Transaction is settled. - * - `CORRECTION_DEBIT` - Manual card transaction correction (Debit). - * - `CORRECTION_CREDIT` - Manual card transaction correction (Credit). - * - `CREDIT_AUTHORIZATION` - A refund or credit card authorization from a merchant. - * - `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was approved on your - * behalf by the network. - * - `FINANCIAL_AUTHORIZATION` - A request from a merchant to debit card funds without - * additional clearing. - * - `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or credit - * card funds without additional clearing. - * - `RETURN` - A card refund has been processed on the transaction. - * - `RETURN_REVERSAL` - A card refund has been reversed (e.g., when a merchant reverses - * an incorrect refund). - * - `TRANSFER` - Successful internal transfer of funds between financial accounts. - * - `TRANSFER_INSUFFICIENT_FUNDS` - Declined internl transfer of funds due to - * insufficient balance of the sender. + * Event types: _ `ACH_ORIGINATION_INITIATED` - ACH origination received and pending + * approval/release from an ACH hold. _ `ACH_ORIGINATION_REVIEWED` - ACH origination has + * completed the review process. _ `ACH_ORIGINATION_CANCELLED` - ACH origination has + * been cancelled. _ `ACH_ORIGINATION_PROCESSED` - ACH origination has been processed + * and sent to the fed. _ `ACH_ORIGINATION_SETTLED` - ACH origination has settled. _ + * `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to available + * balance. _ `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving + * Depository Financial Institution. _ `ACH_RECEIPT_PROCESSED` - ACH receipt pending + * release from an ACH holder. _ `ACH_RETURN_INITIATED` - ACH initiated return for a ACH + * receipt. _ `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. _ + * `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available balance. _ + * `AUTHORIZATION` - Authorize a card transaction. _ `AUTHORIZATION_ADVICE` - Advice on + * a card transaction. _ `AUTHORIZATION_EXPIRY` - Card Authorization has expired and + * reversed by Lithic. _ `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by + * the merchant. _ `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 + * authorization) has occurred on a card. _ `CLEARING` - Card Transaction is settled. _ + * `CORRECTION_DEBIT` - Manual card transaction correction (Debit). _ + * `CORRECTION_CREDIT` - Manual card transaction correction (Credit). _ + * `CREDIT_AUTHORIZATION` - A refund or credit card authorization from a merchant. _ + * `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was approved on your + * behalf by the network. _ `FINANCIAL_AUTHORIZATION` - A request from a merchant to + * debit card funds without additional clearing. _ `FINANCIAL_CREDIT_AUTHORIZATION` - A + * request from a merchant to refund or credit card funds without additional clearing. _ + * `RETURN` - A card refund has been processed on the transaction. _ `RETURN_REVERSAL` - + * A card refund has been reversed (e.g., when a merchant reverses an incorrect refund). + * _ `TRANSFER` - Successful internal transfer of funds between financial accounts. \* + * `TRANSFER_INSUFFICIENT_FUNDS` - Declined internal transfer of funds due to + * insufficient balance of the sender. */ @JsonProperty("type") @ExcludeMissing diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Tokenization.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Tokenization.kt index 707a7611..01818cc7 100644 --- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Tokenization.kt +++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Tokenization.kt @@ -31,6 +31,7 @@ private constructor( private val token: JsonField, private val tokenRequestorName: JsonField, private val tokenUniqueReference: JsonField, + private val tokenizationChannel: JsonField, private val updatedAt: JsonField, private val additionalProperties: Map, ) { @@ -64,13 +65,17 @@ private constructor( /** Globally unique identifier for a Tokenization */ fun token(): String = token.getRequired("token") - /** The entity that is requested the tokenization. Represents a Digital Wallet. */ + /** The entity that requested the tokenization. Represents a Digital Wallet or merchant. */ fun tokenRequestorName(): TokenRequestorName = tokenRequestorName.getRequired("token_requestor_name") /** The network's unique reference for the tokenization. */ fun tokenUniqueReference(): String = tokenUniqueReference.getRequired("token_unique_reference") + /** The channel through which the tokenization was made. */ + fun tokenizationChannel(): TokenizationChannel = + tokenizationChannel.getRequired("tokenization_channel") + /** Latest date and time when the tokenization was updated. UTC time zone. */ fun updatedAt(): OffsetDateTime = updatedAt.getRequired("updated_at") @@ -101,7 +106,7 @@ private constructor( /** Globally unique identifier for a Tokenization */ @JsonProperty("token") @ExcludeMissing fun _token() = token - /** The entity that is requested the tokenization. Represents a Digital Wallet. */ + /** The entity that requested the tokenization. Represents a Digital Wallet or merchant. */ @JsonProperty("token_requestor_name") @ExcludeMissing fun _tokenRequestorName() = tokenRequestorName @@ -111,6 +116,11 @@ private constructor( @ExcludeMissing fun _tokenUniqueReference() = tokenUniqueReference + /** The channel through which the tokenization was made. */ + @JsonProperty("tokenization_channel") + @ExcludeMissing + fun _tokenizationChannel() = tokenizationChannel + /** Latest date and time when the tokenization was updated. UTC time zone. */ @JsonProperty("updated_at") @ExcludeMissing fun _updatedAt() = updatedAt @@ -129,6 +139,7 @@ private constructor( token() tokenRequestorName() tokenUniqueReference() + tokenizationChannel() updatedAt() validated = true } @@ -151,6 +162,7 @@ private constructor( this.token == other.token && this.tokenRequestorName == other.tokenRequestorName && this.tokenUniqueReference == other.tokenUniqueReference && + this.tokenizationChannel == other.tokenizationChannel && this.updatedAt == other.updatedAt && this.additionalProperties == other.additionalProperties } @@ -168,6 +180,7 @@ private constructor( token, tokenRequestorName, tokenUniqueReference, + tokenizationChannel, updatedAt, additionalProperties, ) @@ -176,7 +189,7 @@ private constructor( } override fun toString() = - "Tokenization{accountToken=$accountToken, cardToken=$cardToken, createdAt=$createdAt, digitalCardArtToken=$digitalCardArtToken, events=$events, status=$status, token=$token, tokenRequestorName=$tokenRequestorName, tokenUniqueReference=$tokenUniqueReference, updatedAt=$updatedAt, additionalProperties=$additionalProperties}" + "Tokenization{accountToken=$accountToken, cardToken=$cardToken, createdAt=$createdAt, digitalCardArtToken=$digitalCardArtToken, events=$events, status=$status, token=$token, tokenRequestorName=$tokenRequestorName, tokenUniqueReference=$tokenUniqueReference, tokenizationChannel=$tokenizationChannel, updatedAt=$updatedAt, additionalProperties=$additionalProperties}" companion object { @@ -194,6 +207,7 @@ private constructor( private var token: JsonField = JsonMissing.of() private var tokenRequestorName: JsonField = JsonMissing.of() private var tokenUniqueReference: JsonField = JsonMissing.of() + private var tokenizationChannel: JsonField = JsonMissing.of() private var updatedAt: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -207,6 +221,7 @@ private constructor( this.token = tokenization.token this.tokenRequestorName = tokenization.tokenRequestorName this.tokenUniqueReference = tokenization.tokenUniqueReference + this.tokenizationChannel = tokenization.tokenizationChannel this.updatedAt = tokenization.updatedAt additionalProperties(tokenization.additionalProperties) } @@ -282,11 +297,11 @@ private constructor( @ExcludeMissing fun token(token: JsonField) = apply { this.token = token } - /** The entity that is requested the tokenization. Represents a Digital Wallet. */ + /** The entity that requested the tokenization. Represents a Digital Wallet or merchant. */ fun tokenRequestorName(tokenRequestorName: TokenRequestorName) = tokenRequestorName(JsonField.of(tokenRequestorName)) - /** The entity that is requested the tokenization. Represents a Digital Wallet. */ + /** The entity that requested the tokenization. Represents a Digital Wallet or merchant. */ @JsonProperty("token_requestor_name") @ExcludeMissing fun tokenRequestorName(tokenRequestorName: JsonField) = apply { @@ -304,6 +319,17 @@ private constructor( this.tokenUniqueReference = tokenUniqueReference } + /** The channel through which the tokenization was made. */ + fun tokenizationChannel(tokenizationChannel: TokenizationChannel) = + tokenizationChannel(JsonField.of(tokenizationChannel)) + + /** The channel through which the tokenization was made. */ + @JsonProperty("tokenization_channel") + @ExcludeMissing + fun tokenizationChannel(tokenizationChannel: JsonField) = apply { + this.tokenizationChannel = tokenizationChannel + } + /** Latest date and time when the tokenization was updated. UTC time zone. */ fun updatedAt(updatedAt: OffsetDateTime) = updatedAt(JsonField.of(updatedAt)) @@ -337,6 +363,7 @@ private constructor( token, tokenRequestorName, tokenUniqueReference, + tokenizationChannel, updatedAt, additionalProperties.toUnmodifiable(), ) @@ -457,12 +484,16 @@ private constructor( val APPLE_PAY = TokenRequestorName(JsonField.of("APPLE_PAY")) + val FACEBOOK = TokenRequestorName(JsonField.of("FACEBOOK")) + val FITBIT_PAY = TokenRequestorName(JsonField.of("FITBIT_PAY")) val GARMIN_PAY = TokenRequestorName(JsonField.of("GARMIN_PAY")) val MICROSOFT_PAY = TokenRequestorName(JsonField.of("MICROSOFT_PAY")) + val NETFLIX = TokenRequestorName(JsonField.of("NETFLIX")) + val SAMSUNG_PAY = TokenRequestorName(JsonField.of("SAMSUNG_PAY")) val UNKNOWN = TokenRequestorName(JsonField.of("UNKNOWN")) @@ -476,9 +507,11 @@ private constructor( AMAZON_ONE, ANDROID_PAY, APPLE_PAY, + FACEBOOK, FITBIT_PAY, GARMIN_PAY, MICROSOFT_PAY, + NETFLIX, SAMSUNG_PAY, UNKNOWN, VISA_CHECKOUT, @@ -488,9 +521,11 @@ private constructor( AMAZON_ONE, ANDROID_PAY, APPLE_PAY, + FACEBOOK, FITBIT_PAY, GARMIN_PAY, MICROSOFT_PAY, + NETFLIX, SAMSUNG_PAY, UNKNOWN, VISA_CHECKOUT, @@ -502,9 +537,11 @@ private constructor( AMAZON_ONE -> Value.AMAZON_ONE ANDROID_PAY -> Value.ANDROID_PAY APPLE_PAY -> Value.APPLE_PAY + FACEBOOK -> Value.FACEBOOK FITBIT_PAY -> Value.FITBIT_PAY GARMIN_PAY -> Value.GARMIN_PAY MICROSOFT_PAY -> Value.MICROSOFT_PAY + NETFLIX -> Value.NETFLIX SAMSUNG_PAY -> Value.SAMSUNG_PAY UNKNOWN -> Value.UNKNOWN VISA_CHECKOUT -> Value.VISA_CHECKOUT @@ -516,9 +553,11 @@ private constructor( AMAZON_ONE -> Known.AMAZON_ONE ANDROID_PAY -> Known.ANDROID_PAY APPLE_PAY -> Known.APPLE_PAY + FACEBOOK -> Known.FACEBOOK FITBIT_PAY -> Known.FITBIT_PAY GARMIN_PAY -> Known.GARMIN_PAY MICROSOFT_PAY -> Known.MICROSOFT_PAY + NETFLIX -> Known.NETFLIX SAMSUNG_PAY -> Known.SAMSUNG_PAY UNKNOWN -> Known.UNKNOWN VISA_CHECKOUT -> Known.VISA_CHECKOUT @@ -528,6 +567,63 @@ private constructor( fun asString(): String = _value().asStringOrThrow() } + class TokenizationChannel + @JsonCreator + private constructor( + private val value: JsonField, + ) : Enum { + + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is TokenizationChannel && this.value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + + companion object { + + val DIGITAL_WALLET = TokenizationChannel(JsonField.of("DIGITAL_WALLET")) + + val MERCHANT = TokenizationChannel(JsonField.of("MERCHANT")) + + fun of(value: String) = TokenizationChannel(JsonField.of(value)) + } + + enum class Known { + DIGITAL_WALLET, + MERCHANT, + } + + enum class Value { + DIGITAL_WALLET, + MERCHANT, + _UNKNOWN, + } + + fun value(): Value = + when (this) { + DIGITAL_WALLET -> Value.DIGITAL_WALLET + MERCHANT -> Value.MERCHANT + else -> Value._UNKNOWN + } + + fun known(): Known = + when (this) { + DIGITAL_WALLET -> Known.DIGITAL_WALLET + MERCHANT -> Known.MERCHANT + else -> throw LithicInvalidDataException("Unknown TokenizationChannel: $value") + } + + fun asString(): String = _value().asStringOrThrow() + } + @JsonDeserialize(builder = TokenizationEvent.Builder::class) @NoAutoDetect class TokenizationEvent diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/TokenizationListParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/TokenizationListParams.kt index 57ce4fd7..e29c0c65 100644 --- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/TokenizationListParams.kt +++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/TokenizationListParams.kt @@ -2,9 +2,13 @@ package com.lithic.api.models +import com.fasterxml.jackson.annotation.JsonCreator +import com.lithic.api.core.Enum +import com.lithic.api.core.JsonField import com.lithic.api.core.JsonValue import com.lithic.api.core.NoAutoDetect import com.lithic.api.core.toUnmodifiable +import com.lithic.api.errors.LithicInvalidDataException import com.lithic.api.models.* import java.time.LocalDate import java.util.Objects @@ -18,6 +22,7 @@ constructor( private val endingBefore: String?, private val pageSize: Long?, private val startingAfter: String?, + private val tokenizationChannel: TokenizationChannel?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, private val additionalBodyProperties: Map, @@ -37,6 +42,8 @@ constructor( fun startingAfter(): String? = startingAfter + fun tokenizationChannel(): TokenizationChannel? = tokenizationChannel + internal fun getQueryParams(): Map> { val params = mutableMapOf>() this.accountToken?.let { params.put("account_token", listOf(it.toString())) } @@ -46,6 +53,7 @@ constructor( this.endingBefore?.let { params.put("ending_before", listOf(it.toString())) } this.pageSize?.let { params.put("page_size", listOf(it.toString())) } this.startingAfter?.let { params.put("starting_after", listOf(it.toString())) } + this.tokenizationChannel?.let { params.put("tokenization_channel", listOf(it.toString())) } params.putAll(additionalQueryParams) return params.toUnmodifiable() } @@ -71,6 +79,7 @@ constructor( this.endingBefore == other.endingBefore && this.pageSize == other.pageSize && this.startingAfter == other.startingAfter && + this.tokenizationChannel == other.tokenizationChannel && this.additionalQueryParams == other.additionalQueryParams && this.additionalHeaders == other.additionalHeaders && this.additionalBodyProperties == other.additionalBodyProperties @@ -85,6 +94,7 @@ constructor( endingBefore, pageSize, startingAfter, + tokenizationChannel, additionalQueryParams, additionalHeaders, additionalBodyProperties, @@ -92,7 +102,7 @@ constructor( } override fun toString() = - "TokenizationListParams{accountToken=$accountToken, begin=$begin, cardToken=$cardToken, end=$end, endingBefore=$endingBefore, pageSize=$pageSize, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "TokenizationListParams{accountToken=$accountToken, begin=$begin, cardToken=$cardToken, end=$end, endingBefore=$endingBefore, pageSize=$pageSize, startingAfter=$startingAfter, tokenizationChannel=$tokenizationChannel, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" fun toBuilder() = Builder().from(this) @@ -111,6 +121,7 @@ constructor( private var endingBefore: String? = null private var pageSize: Long? = null private var startingAfter: String? = null + private var tokenizationChannel: TokenizationChannel? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() private var additionalBodyProperties: MutableMap = mutableMapOf() @@ -123,6 +134,7 @@ constructor( this.endingBefore = tokenizationListParams.endingBefore this.pageSize = tokenizationListParams.pageSize this.startingAfter = tokenizationListParams.startingAfter + this.tokenizationChannel = tokenizationListParams.tokenizationChannel additionalQueryParams(tokenizationListParams.additionalQueryParams) additionalHeaders(tokenizationListParams.additionalHeaders) additionalBodyProperties(tokenizationListParams.additionalBodyProperties) @@ -155,6 +167,14 @@ constructor( */ fun startingAfter(startingAfter: String) = apply { this.startingAfter = startingAfter } + /** + * Filter for tokenizations by tokenization channel. If this is not specified, only + * DIGITAL_WALLET tokenizations will be returned. + */ + fun tokenizationChannel(tokenizationChannel: TokenizationChannel) = apply { + this.tokenizationChannel = tokenizationChannel + } + fun additionalQueryParams(additionalQueryParams: Map>) = apply { this.additionalQueryParams.clear() putAllQueryParams(additionalQueryParams) @@ -218,9 +238,67 @@ constructor( endingBefore, pageSize, startingAfter, + tokenizationChannel, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalBodyProperties.toUnmodifiable(), ) } + + class TokenizationChannel + @JsonCreator + private constructor( + private val value: JsonField, + ) : Enum { + + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is TokenizationChannel && this.value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + + companion object { + + val DIGITAL_WALLET = TokenizationChannel(JsonField.of("DIGITAL_WALLET")) + + val MERCHANT = TokenizationChannel(JsonField.of("MERCHANT")) + + fun of(value: String) = TokenizationChannel(JsonField.of(value)) + } + + enum class Known { + DIGITAL_WALLET, + MERCHANT, + } + + enum class Value { + DIGITAL_WALLET, + MERCHANT, + _UNKNOWN, + } + + fun value(): Value = + when (this) { + DIGITAL_WALLET -> Value.DIGITAL_WALLET + MERCHANT -> Value.MERCHANT + else -> Value._UNKNOWN + } + + fun known(): Known = + when (this) { + DIGITAL_WALLET -> Known.DIGITAL_WALLET + MERCHANT -> Known.MERCHANT + else -> throw LithicInvalidDataException("Unknown TokenizationChannel: $value") + } + + fun asString(): String = _value().asStringOrThrow() + } } diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/TokenizationSimulateParams.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/TokenizationSimulateParams.kt index 4a8240c4..19a79b63 100644 --- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/TokenizationSimulateParams.kt +++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/TokenizationSimulateParams.kt @@ -25,6 +25,7 @@ constructor( private val tokenizationSource: TokenizationSource, private val accountScore: Long?, private val deviceScore: Long?, + private val entity: String?, private val walletRecommendedDecision: WalletRecommendedDecision?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, @@ -43,6 +44,8 @@ constructor( fun deviceScore(): Long? = deviceScore + fun entity(): String? = entity + fun walletRecommendedDecision(): WalletRecommendedDecision? = walletRecommendedDecision internal fun getBody(): TokenizationSimulateBody { @@ -53,6 +56,7 @@ constructor( tokenizationSource, accountScore, deviceScore, + entity, walletRecommendedDecision, additionalBodyProperties, ) @@ -72,6 +76,7 @@ constructor( private val tokenizationSource: TokenizationSource?, private val accountScore: Long?, private val deviceScore: Long?, + private val entity: String?, private val walletRecommendedDecision: WalletRecommendedDecision?, private val additionalProperties: Map, ) { @@ -103,6 +108,12 @@ constructor( */ @JsonProperty("device_score") fun deviceScore(): Long? = deviceScore + /** + * Optional field to specify the token requestor name for a merchant token simulation. + * Ignored when tokenization_source is not MERCHANT. + */ + @JsonProperty("entity") fun entity(): String? = entity + /** The decision that the Digital Wallet's recommend */ @JsonProperty("wallet_recommended_decision") fun walletRecommendedDecision(): WalletRecommendedDecision? = walletRecommendedDecision @@ -125,6 +136,7 @@ constructor( this.tokenizationSource == other.tokenizationSource && this.accountScore == other.accountScore && this.deviceScore == other.deviceScore && + this.entity == other.entity && this.walletRecommendedDecision == other.walletRecommendedDecision && this.additionalProperties == other.additionalProperties } @@ -139,6 +151,7 @@ constructor( tokenizationSource, accountScore, deviceScore, + entity, walletRecommendedDecision, additionalProperties, ) @@ -147,7 +160,7 @@ constructor( } override fun toString() = - "TokenizationSimulateBody{cvv=$cvv, expirationDate=$expirationDate, pan=$pan, tokenizationSource=$tokenizationSource, accountScore=$accountScore, deviceScore=$deviceScore, walletRecommendedDecision=$walletRecommendedDecision, additionalProperties=$additionalProperties}" + "TokenizationSimulateBody{cvv=$cvv, expirationDate=$expirationDate, pan=$pan, tokenizationSource=$tokenizationSource, accountScore=$accountScore, deviceScore=$deviceScore, entity=$entity, walletRecommendedDecision=$walletRecommendedDecision, additionalProperties=$additionalProperties}" companion object { @@ -162,6 +175,7 @@ constructor( private var tokenizationSource: TokenizationSource? = null private var accountScore: Long? = null private var deviceScore: Long? = null + private var entity: String? = null private var walletRecommendedDecision: WalletRecommendedDecision? = null private var additionalProperties: MutableMap = mutableMapOf() @@ -172,6 +186,7 @@ constructor( this.tokenizationSource = tokenizationSimulateBody.tokenizationSource this.accountScore = tokenizationSimulateBody.accountScore this.deviceScore = tokenizationSimulateBody.deviceScore + this.entity = tokenizationSimulateBody.entity this.walletRecommendedDecision = tokenizationSimulateBody.walletRecommendedDecision additionalProperties(tokenizationSimulateBody.additionalProperties) } @@ -208,6 +223,12 @@ constructor( @JsonProperty("device_score") fun deviceScore(deviceScore: Long) = apply { this.deviceScore = deviceScore } + /** + * Optional field to specify the token requestor name for a merchant token simulation. + * Ignored when tokenization_source is not MERCHANT. + */ + @JsonProperty("entity") fun entity(entity: String) = apply { this.entity = entity } + /** The decision that the Digital Wallet's recommend */ @JsonProperty("wallet_recommended_decision") fun walletRecommendedDecision(walletRecommendedDecision: WalletRecommendedDecision) = @@ -239,6 +260,7 @@ constructor( }, accountScore, deviceScore, + entity, walletRecommendedDecision, additionalProperties.toUnmodifiable(), ) @@ -263,6 +285,7 @@ constructor( this.tokenizationSource == other.tokenizationSource && this.accountScore == other.accountScore && this.deviceScore == other.deviceScore && + this.entity == other.entity && this.walletRecommendedDecision == other.walletRecommendedDecision && this.additionalQueryParams == other.additionalQueryParams && this.additionalHeaders == other.additionalHeaders && @@ -277,6 +300,7 @@ constructor( tokenizationSource, accountScore, deviceScore, + entity, walletRecommendedDecision, additionalQueryParams, additionalHeaders, @@ -285,7 +309,7 @@ constructor( } override fun toString() = - "TokenizationSimulateParams{cvv=$cvv, expirationDate=$expirationDate, pan=$pan, tokenizationSource=$tokenizationSource, accountScore=$accountScore, deviceScore=$deviceScore, walletRecommendedDecision=$walletRecommendedDecision, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "TokenizationSimulateParams{cvv=$cvv, expirationDate=$expirationDate, pan=$pan, tokenizationSource=$tokenizationSource, accountScore=$accountScore, deviceScore=$deviceScore, entity=$entity, walletRecommendedDecision=$walletRecommendedDecision, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" fun toBuilder() = Builder().from(this) @@ -303,6 +327,7 @@ constructor( private var tokenizationSource: TokenizationSource? = null private var accountScore: Long? = null private var deviceScore: Long? = null + private var entity: String? = null private var walletRecommendedDecision: WalletRecommendedDecision? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() @@ -315,6 +340,7 @@ constructor( this.tokenizationSource = tokenizationSimulateParams.tokenizationSource this.accountScore = tokenizationSimulateParams.accountScore this.deviceScore = tokenizationSimulateParams.deviceScore + this.entity = tokenizationSimulateParams.entity this.walletRecommendedDecision = tokenizationSimulateParams.walletRecommendedDecision additionalQueryParams(tokenizationSimulateParams.additionalQueryParams) additionalHeaders(tokenizationSimulateParams.additionalHeaders) @@ -347,6 +373,12 @@ constructor( */ fun deviceScore(deviceScore: Long) = apply { this.deviceScore = deviceScore } + /** + * Optional field to specify the token requestor name for a merchant token simulation. + * Ignored when tokenization_source is not MERCHANT. + */ + fun entity(entity: String) = apply { this.entity = entity } + /** The decision that the Digital Wallet's recommend */ fun walletRecommendedDecision(walletRecommendedDecision: WalletRecommendedDecision) = apply { @@ -417,6 +449,7 @@ constructor( }, accountScore, deviceScore, + entity, walletRecommendedDecision, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), @@ -452,6 +485,8 @@ constructor( val SAMSUNG_PAY = TokenizationSource(JsonField.of("SAMSUNG_PAY")) + val MERCHANT = TokenizationSource(JsonField.of("MERCHANT")) + fun of(value: String) = TokenizationSource(JsonField.of(value)) } @@ -459,12 +494,14 @@ constructor( APPLE_PAY, GOOGLE, SAMSUNG_PAY, + MERCHANT, } enum class Value { APPLE_PAY, GOOGLE, SAMSUNG_PAY, + MERCHANT, _UNKNOWN, } @@ -473,6 +510,7 @@ constructor( APPLE_PAY -> Value.APPLE_PAY GOOGLE -> Value.GOOGLE SAMSUNG_PAY -> Value.SAMSUNG_PAY + MERCHANT -> Value.MERCHANT else -> Value._UNKNOWN } @@ -481,6 +519,7 @@ constructor( APPLE_PAY -> Known.APPLE_PAY GOOGLE -> Known.GOOGLE SAMSUNG_PAY -> Known.SAMSUNG_PAY + MERCHANT -> Known.MERCHANT else -> throw LithicInvalidDataException("Unknown TokenizationSource: $value") } diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Transfer.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Transfer.kt index bdef52dc..d8007dfb 100644 --- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Transfer.kt +++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Transfer.kt @@ -545,43 +545,33 @@ private constructor( fun token(): String? = token.getNullable("token") /** - * Event types: - * - `ACH_ORIGINATION_INITIATED` - ACH origination received and pending approval/release - * from an ACH hold. - * - `ACH_ORIGINATION_REVIEWED` - ACH origination has completed the review process. - * - `ACH_ORIGINATION_CANCELLED` - ACH origination has been cancelled. - * - `ACH_ORIGINATION_PROCESSED` - ACH origination has been processed and sent to the fed. - * - `ACH_ORIGINATION_SETTLED` - ACH origination has settled. - * - `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to available - * balance. - * - `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving Depository Financial - * Institution. - * - `ACH_RECEIPT_PROCESSED` - ACH receipt pending release from an ACH holder. - * - `ACH_RETURN_INITIATED` - ACH initiated return for a ACH receipt. - * - `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. - * - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available balance. - * - `AUTHORIZATION` - Authorize a card transaction. - * - `AUTHORIZATION_ADVICE` - Advice on a card transaction. - * - `AUTHORIZATION_EXPIRY` - Card Authorization has expired and reversed by Lithic. - * - `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by the merchant. - * - `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 authorization) has occurred - * on a card. - * - `CLEARING` - Card Transaction is settled. - * - `CORRECTION_DEBIT` - Manual card transaction correction (Debit). - * - `CORRECTION_CREDIT` - Manual card transaction correction (Credit). - * - `CREDIT_AUTHORIZATION` - A refund or credit card authorization from a merchant. - * - `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was approved on your behalf - * by the network. - * - `FINANCIAL_AUTHORIZATION` - A request from a merchant to debit card funds without - * additional clearing. - * - `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or credit card - * funds without additional clearing. - * - `RETURN` - A card refund has been processed on the transaction. - * - `RETURN_REVERSAL` - A card refund has been reversed (e.g., when a merchant reverses an - * incorrect refund). - * - `TRANSFER` - Successful internal transfer of funds between financial accounts. - * - `TRANSFER_INSUFFICIENT_FUNDS` - Declined internl transfer of funds due to insufficient - * balance of the sender. + * Event types: _ `ACH_ORIGINATION_INITIATED` - ACH origination received and pending + * approval/release from an ACH hold. _ `ACH_ORIGINATION_REVIEWED` - ACH origination has + * completed the review process. _ `ACH_ORIGINATION_CANCELLED` - ACH origination has been + * cancelled. _ `ACH_ORIGINATION_PROCESSED` - ACH origination has been processed and sent to + * the fed. _ `ACH_ORIGINATION_SETTLED` - ACH origination has settled. _ + * `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to available balance. + * _ `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving Depository Financial + * Institution. _ `ACH_RECEIPT_PROCESSED` - ACH receipt pending release from an ACH holder. + * _ `ACH_RETURN_INITIATED` - ACH initiated return for a ACH receipt. _ + * `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. _ `ACH_RECEIPT_RELEASED` - ACH + * receipt released from pending to available balance. _ `AUTHORIZATION` - Authorize a card + * transaction. _ `AUTHORIZATION_ADVICE` - Advice on a card transaction. _ + * `AUTHORIZATION_EXPIRY` - Card Authorization has expired and reversed by Lithic. _ + * `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by the merchant. _ + * `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 authorization) has occurred on + * a card. _ `CLEARING` - Card Transaction is settled. _ `CORRECTION_DEBIT` - Manual card + * transaction correction (Debit). _ `CORRECTION_CREDIT` - Manual card transaction + * correction (Credit). _ `CREDIT_AUTHORIZATION` - A refund or credit card authorization + * from a merchant. _ `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was + * approved on your behalf by the network. _ `FINANCIAL_AUTHORIZATION` - A request from a + * merchant to debit card funds without additional clearing. _ + * `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or credit card + * funds without additional clearing. _ `RETURN` - A card refund has been processed on the + * transaction. _ `RETURN_REVERSAL` - A card refund has been reversed (e.g., when a merchant + * reverses an incorrect refund). _ `TRANSFER` - Successful internal transfer of funds + * between financial accounts. \* `TRANSFER_INSUFFICIENT_FUNDS` - Declined internal transfer + * of funds due to insufficient balance of the sender. */ fun type(): FinancialEventType? = type.getNullable("type") @@ -604,43 +594,33 @@ private constructor( @JsonProperty("token") @ExcludeMissing fun _token() = token /** - * Event types: - * - `ACH_ORIGINATION_INITIATED` - ACH origination received and pending approval/release - * from an ACH hold. - * - `ACH_ORIGINATION_REVIEWED` - ACH origination has completed the review process. - * - `ACH_ORIGINATION_CANCELLED` - ACH origination has been cancelled. - * - `ACH_ORIGINATION_PROCESSED` - ACH origination has been processed and sent to the fed. - * - `ACH_ORIGINATION_SETTLED` - ACH origination has settled. - * - `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to available - * balance. - * - `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving Depository Financial - * Institution. - * - `ACH_RECEIPT_PROCESSED` - ACH receipt pending release from an ACH holder. - * - `ACH_RETURN_INITIATED` - ACH initiated return for a ACH receipt. - * - `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. - * - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available balance. - * - `AUTHORIZATION` - Authorize a card transaction. - * - `AUTHORIZATION_ADVICE` - Advice on a card transaction. - * - `AUTHORIZATION_EXPIRY` - Card Authorization has expired and reversed by Lithic. - * - `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by the merchant. - * - `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 authorization) has occurred - * on a card. - * - `CLEARING` - Card Transaction is settled. - * - `CORRECTION_DEBIT` - Manual card transaction correction (Debit). - * - `CORRECTION_CREDIT` - Manual card transaction correction (Credit). - * - `CREDIT_AUTHORIZATION` - A refund or credit card authorization from a merchant. - * - `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was approved on your behalf - * by the network. - * - `FINANCIAL_AUTHORIZATION` - A request from a merchant to debit card funds without - * additional clearing. - * - `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or credit card - * funds without additional clearing. - * - `RETURN` - A card refund has been processed on the transaction. - * - `RETURN_REVERSAL` - A card refund has been reversed (e.g., when a merchant reverses an - * incorrect refund). - * - `TRANSFER` - Successful internal transfer of funds between financial accounts. - * - `TRANSFER_INSUFFICIENT_FUNDS` - Declined internl transfer of funds due to insufficient - * balance of the sender. + * Event types: _ `ACH_ORIGINATION_INITIATED` - ACH origination received and pending + * approval/release from an ACH hold. _ `ACH_ORIGINATION_REVIEWED` - ACH origination has + * completed the review process. _ `ACH_ORIGINATION_CANCELLED` - ACH origination has been + * cancelled. _ `ACH_ORIGINATION_PROCESSED` - ACH origination has been processed and sent to + * the fed. _ `ACH_ORIGINATION_SETTLED` - ACH origination has settled. _ + * `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to available balance. + * _ `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving Depository Financial + * Institution. _ `ACH_RECEIPT_PROCESSED` - ACH receipt pending release from an ACH holder. + * _ `ACH_RETURN_INITIATED` - ACH initiated return for a ACH receipt. _ + * `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. _ `ACH_RECEIPT_RELEASED` - ACH + * receipt released from pending to available balance. _ `AUTHORIZATION` - Authorize a card + * transaction. _ `AUTHORIZATION_ADVICE` - Advice on a card transaction. _ + * `AUTHORIZATION_EXPIRY` - Card Authorization has expired and reversed by Lithic. _ + * `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by the merchant. _ + * `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 authorization) has occurred on + * a card. _ `CLEARING` - Card Transaction is settled. _ `CORRECTION_DEBIT` - Manual card + * transaction correction (Debit). _ `CORRECTION_CREDIT` - Manual card transaction + * correction (Credit). _ `CREDIT_AUTHORIZATION` - A refund or credit card authorization + * from a merchant. _ `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was + * approved on your behalf by the network. _ `FINANCIAL_AUTHORIZATION` - A request from a + * merchant to debit card funds without additional clearing. _ + * `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or credit card + * funds without additional clearing. _ `RETURN` - A card refund has been processed on the + * transaction. _ `RETURN_REVERSAL` - A card refund has been reversed (e.g., when a merchant + * reverses an incorrect refund). _ `TRANSFER` - Successful internal transfer of funds + * between financial accounts. \* `TRANSFER_INSUFFICIENT_FUNDS` - Declined internal transfer + * of funds due to insufficient balance of the sender. */ @JsonProperty("type") @ExcludeMissing fun _type() = type @@ -761,86 +741,66 @@ private constructor( fun token(token: JsonField) = apply { this.token = token } /** - * Event types: - * - `ACH_ORIGINATION_INITIATED` - ACH origination received and pending approval/release - * from an ACH hold. - * - `ACH_ORIGINATION_REVIEWED` - ACH origination has completed the review process. - * - `ACH_ORIGINATION_CANCELLED` - ACH origination has been cancelled. - * - `ACH_ORIGINATION_PROCESSED` - ACH origination has been processed and sent to the - * fed. - * - `ACH_ORIGINATION_SETTLED` - ACH origination has settled. - * - `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to available - * balance. - * - `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving Depository - * Financial Institution. - * - `ACH_RECEIPT_PROCESSED` - ACH receipt pending release from an ACH holder. - * - `ACH_RETURN_INITIATED` - ACH initiated return for a ACH receipt. - * - `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. - * - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available balance. - * - `AUTHORIZATION` - Authorize a card transaction. - * - `AUTHORIZATION_ADVICE` - Advice on a card transaction. - * - `AUTHORIZATION_EXPIRY` - Card Authorization has expired and reversed by Lithic. - * - `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by the merchant. - * - `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 authorization) has - * occurred on a card. - * - `CLEARING` - Card Transaction is settled. - * - `CORRECTION_DEBIT` - Manual card transaction correction (Debit). - * - `CORRECTION_CREDIT` - Manual card transaction correction (Credit). - * - `CREDIT_AUTHORIZATION` - A refund or credit card authorization from a merchant. - * - `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was approved on your - * behalf by the network. - * - `FINANCIAL_AUTHORIZATION` - A request from a merchant to debit card funds without - * additional clearing. - * - `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or credit - * card funds without additional clearing. - * - `RETURN` - A card refund has been processed on the transaction. - * - `RETURN_REVERSAL` - A card refund has been reversed (e.g., when a merchant reverses - * an incorrect refund). - * - `TRANSFER` - Successful internal transfer of funds between financial accounts. - * - `TRANSFER_INSUFFICIENT_FUNDS` - Declined internl transfer of funds due to - * insufficient balance of the sender. + * Event types: _ `ACH_ORIGINATION_INITIATED` - ACH origination received and pending + * approval/release from an ACH hold. _ `ACH_ORIGINATION_REVIEWED` - ACH origination has + * completed the review process. _ `ACH_ORIGINATION_CANCELLED` - ACH origination has + * been cancelled. _ `ACH_ORIGINATION_PROCESSED` - ACH origination has been processed + * and sent to the fed. _ `ACH_ORIGINATION_SETTLED` - ACH origination has settled. _ + * `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to available + * balance. _ `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving + * Depository Financial Institution. _ `ACH_RECEIPT_PROCESSED` - ACH receipt pending + * release from an ACH holder. _ `ACH_RETURN_INITIATED` - ACH initiated return for a ACH + * receipt. _ `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. _ + * `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available balance. _ + * `AUTHORIZATION` - Authorize a card transaction. _ `AUTHORIZATION_ADVICE` - Advice on + * a card transaction. _ `AUTHORIZATION_EXPIRY` - Card Authorization has expired and + * reversed by Lithic. _ `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by + * the merchant. _ `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 + * authorization) has occurred on a card. _ `CLEARING` - Card Transaction is settled. _ + * `CORRECTION_DEBIT` - Manual card transaction correction (Debit). _ + * `CORRECTION_CREDIT` - Manual card transaction correction (Credit). _ + * `CREDIT_AUTHORIZATION` - A refund or credit card authorization from a merchant. _ + * `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was approved on your + * behalf by the network. _ `FINANCIAL_AUTHORIZATION` - A request from a merchant to + * debit card funds without additional clearing. _ `FINANCIAL_CREDIT_AUTHORIZATION` - A + * request from a merchant to refund or credit card funds without additional clearing. _ + * `RETURN` - A card refund has been processed on the transaction. _ `RETURN_REVERSAL` - + * A card refund has been reversed (e.g., when a merchant reverses an incorrect refund). + * _ `TRANSFER` - Successful internal transfer of funds between financial accounts. \* + * `TRANSFER_INSUFFICIENT_FUNDS` - Declined internal transfer of funds due to + * insufficient balance of the sender. */ fun type(type: FinancialEventType) = type(JsonField.of(type)) /** - * Event types: - * - `ACH_ORIGINATION_INITIATED` - ACH origination received and pending approval/release - * from an ACH hold. - * - `ACH_ORIGINATION_REVIEWED` - ACH origination has completed the review process. - * - `ACH_ORIGINATION_CANCELLED` - ACH origination has been cancelled. - * - `ACH_ORIGINATION_PROCESSED` - ACH origination has been processed and sent to the - * fed. - * - `ACH_ORIGINATION_SETTLED` - ACH origination has settled. - * - `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to available - * balance. - * - `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving Depository - * Financial Institution. - * - `ACH_RECEIPT_PROCESSED` - ACH receipt pending release from an ACH holder. - * - `ACH_RETURN_INITIATED` - ACH initiated return for a ACH receipt. - * - `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. - * - `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available balance. - * - `AUTHORIZATION` - Authorize a card transaction. - * - `AUTHORIZATION_ADVICE` - Advice on a card transaction. - * - `AUTHORIZATION_EXPIRY` - Card Authorization has expired and reversed by Lithic. - * - `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by the merchant. - * - `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 authorization) has - * occurred on a card. - * - `CLEARING` - Card Transaction is settled. - * - `CORRECTION_DEBIT` - Manual card transaction correction (Debit). - * - `CORRECTION_CREDIT` - Manual card transaction correction (Credit). - * - `CREDIT_AUTHORIZATION` - A refund or credit card authorization from a merchant. - * - `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was approved on your - * behalf by the network. - * - `FINANCIAL_AUTHORIZATION` - A request from a merchant to debit card funds without - * additional clearing. - * - `FINANCIAL_CREDIT_AUTHORIZATION` - A request from a merchant to refund or credit - * card funds without additional clearing. - * - `RETURN` - A card refund has been processed on the transaction. - * - `RETURN_REVERSAL` - A card refund has been reversed (e.g., when a merchant reverses - * an incorrect refund). - * - `TRANSFER` - Successful internal transfer of funds between financial accounts. - * - `TRANSFER_INSUFFICIENT_FUNDS` - Declined internl transfer of funds due to - * insufficient balance of the sender. + * Event types: _ `ACH_ORIGINATION_INITIATED` - ACH origination received and pending + * approval/release from an ACH hold. _ `ACH_ORIGINATION_REVIEWED` - ACH origination has + * completed the review process. _ `ACH_ORIGINATION_CANCELLED` - ACH origination has + * been cancelled. _ `ACH_ORIGINATION_PROCESSED` - ACH origination has been processed + * and sent to the fed. _ `ACH_ORIGINATION_SETTLED` - ACH origination has settled. _ + * `ACH_ORIGINATION_RELEASED` - ACH origination released from pending to available + * balance. _ `ACH_RETURN_PROCESSED` - ACH origination returned by the Receiving + * Depository Financial Institution. _ `ACH_RECEIPT_PROCESSED` - ACH receipt pending + * release from an ACH holder. _ `ACH_RETURN_INITIATED` - ACH initiated return for a ACH + * receipt. _ `ACH_RECEIPT_SETTLED` - ACH receipt funds have settled. _ + * `ACH_RECEIPT_RELEASED` - ACH receipt released from pending to available balance. _ + * `AUTHORIZATION` - Authorize a card transaction. _ `AUTHORIZATION_ADVICE` - Advice on + * a card transaction. _ `AUTHORIZATION_EXPIRY` - Card Authorization has expired and + * reversed by Lithic. _ `AUTHORIZATION_REVERSAL` - Card Authorization was reversed by + * the merchant. _ `BALANCE_INQUIRY` - A card balance inquiry (typically a $0 + * authorization) has occurred on a card. _ `CLEARING` - Card Transaction is settled. _ + * `CORRECTION_DEBIT` - Manual card transaction correction (Debit). _ + * `CORRECTION_CREDIT` - Manual card transaction correction (Credit). _ + * `CREDIT_AUTHORIZATION` - A refund or credit card authorization from a merchant. _ + * `CREDIT_AUTHORIZATION_ADVICE` - A credit card authorization was approved on your + * behalf by the network. _ `FINANCIAL_AUTHORIZATION` - A request from a merchant to + * debit card funds without additional clearing. _ `FINANCIAL_CREDIT_AUTHORIZATION` - A + * request from a merchant to refund or credit card funds without additional clearing. _ + * `RETURN` - A card refund has been processed on the transaction. _ `RETURN_REVERSAL` - + * A card refund has been reversed (e.g., when a merchant reverses an incorrect refund). + * _ `TRANSFER` - Successful internal transfer of funds between financial accounts. \* + * `TRANSFER_INSUFFICIENT_FUNDS` - Declined internal transfer of funds due to + * insufficient balance of the sender. */ @JsonProperty("type") @ExcludeMissing diff --git a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/FinancialAccountCreateParamsTest.kt b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/FinancialAccountCreateParamsTest.kt index 9a80596d..57c5162e 100644 --- a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/FinancialAccountCreateParamsTest.kt +++ b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/FinancialAccountCreateParamsTest.kt @@ -14,6 +14,7 @@ class FinancialAccountCreateParamsTest { .nickname("nickname") .type(FinancialAccountCreateParams.Type.OPERATING) .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .isForBenefitOf(true) .build() } @@ -24,12 +25,14 @@ class FinancialAccountCreateParamsTest { .nickname("nickname") .type(FinancialAccountCreateParams.Type.OPERATING) .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .isForBenefitOf(true) .build() val body = params.getBody() assertThat(body).isNotNull assertThat(body.nickname()).isEqualTo("nickname") assertThat(body.type()).isEqualTo(FinancialAccountCreateParams.Type.OPERATING) assertThat(body.accountToken()).isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + assertThat(body.isForBenefitOf()).isEqualTo(true) } @Test diff --git a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/FinancialAccountTest.kt b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/FinancialAccountTest.kt index df9791ff..91d8e57f 100644 --- a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/FinancialAccountTest.kt +++ b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/FinancialAccountTest.kt @@ -14,6 +14,7 @@ class FinancialAccountTest { FinancialAccount.builder() .token("3fa85f64-5717-4562-b3fc-2c963f66afa6") .created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + .isForBenefitOf(true) .type(FinancialAccount.Type.ISSUING) .updated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .accountNumber("account_number") @@ -25,6 +26,7 @@ class FinancialAccountTest { assertThat(financialAccount.token()).isEqualTo("3fa85f64-5717-4562-b3fc-2c963f66afa6") assertThat(financialAccount.created()) .isEqualTo(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) + assertThat(financialAccount.isForBenefitOf()).isEqualTo(true) assertThat(financialAccount.type()).isEqualTo(FinancialAccount.Type.ISSUING) assertThat(financialAccount.updated()) .isEqualTo(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) diff --git a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationListParamsTest.kt b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationListParamsTest.kt index e6b5e3e8..5c9e8eeb 100644 --- a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationListParamsTest.kt +++ b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationListParamsTest.kt @@ -19,6 +19,7 @@ class TokenizationListParamsTest { .endingBefore("ending_before") .pageSize(100L) .startingAfter("starting_after") + .tokenizationChannel(TokenizationListParams.TokenizationChannel.DIGITAL_WALLET) .build() } @@ -33,6 +34,7 @@ class TokenizationListParamsTest { .endingBefore("ending_before") .pageSize(100L) .startingAfter("starting_after") + .tokenizationChannel(TokenizationListParams.TokenizationChannel.DIGITAL_WALLET) .build() val expected = mutableMapOf>() expected.put("account_token", listOf("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")) @@ -42,6 +44,10 @@ class TokenizationListParamsTest { expected.put("ending_before", listOf("ending_before")) expected.put("page_size", listOf("100")) expected.put("starting_after", listOf("starting_after")) + expected.put( + "tokenization_channel", + listOf(TokenizationListParams.TokenizationChannel.DIGITAL_WALLET.toString()) + ) assertThat(params.getQueryParams()).isEqualTo(expected) } diff --git a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationRetrieveResponseTest.kt b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationRetrieveResponseTest.kt index 89913eeb..06abe7b1 100644 --- a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationRetrieveResponseTest.kt +++ b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationRetrieveResponseTest.kt @@ -21,6 +21,7 @@ class TokenizationRetrieveResponseTest { .status(Tokenization.Status.ACTIVE) .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) .tokenUniqueReference("token_unique_reference") + .tokenizationChannel(Tokenization.TokenizationChannel.DIGITAL_WALLET) .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .digitalCardArtToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .events( @@ -47,6 +48,7 @@ class TokenizationRetrieveResponseTest { .status(Tokenization.Status.ACTIVE) .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) .tokenUniqueReference("token_unique_reference") + .tokenizationChannel(Tokenization.TokenizationChannel.DIGITAL_WALLET) .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .digitalCardArtToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .events( diff --git a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationSimulateParamsTest.kt b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationSimulateParamsTest.kt index be8ef84f..ed1d5ee5 100644 --- a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationSimulateParamsTest.kt +++ b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationSimulateParamsTest.kt @@ -17,6 +17,7 @@ class TokenizationSimulateParamsTest { .tokenizationSource(TokenizationSimulateParams.TokenizationSource.APPLE_PAY) .accountScore(123L) .deviceScore(123L) + .entity("entity") .walletRecommendedDecision( TokenizationSimulateParams.WalletRecommendedDecision.APPROVED ) @@ -33,6 +34,7 @@ class TokenizationSimulateParamsTest { .tokenizationSource(TokenizationSimulateParams.TokenizationSource.APPLE_PAY) .accountScore(123L) .deviceScore(123L) + .entity("entity") .walletRecommendedDecision( TokenizationSimulateParams.WalletRecommendedDecision.APPROVED ) @@ -46,6 +48,7 @@ class TokenizationSimulateParamsTest { .isEqualTo(TokenizationSimulateParams.TokenizationSource.APPLE_PAY) assertThat(body.accountScore()).isEqualTo(123L) assertThat(body.deviceScore()).isEqualTo(123L) + assertThat(body.entity()).isEqualTo("entity") assertThat(body.walletRecommendedDecision()) .isEqualTo(TokenizationSimulateParams.WalletRecommendedDecision.APPROVED) } diff --git a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationSimulateResponseTest.kt b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationSimulateResponseTest.kt index 042c39e1..dfbc0f3a 100644 --- a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationSimulateResponseTest.kt +++ b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationSimulateResponseTest.kt @@ -22,6 +22,7 @@ class TokenizationSimulateResponseTest { .status(Tokenization.Status.ACTIVE) .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) .tokenUniqueReference("token_unique_reference") + .tokenizationChannel(Tokenization.TokenizationChannel.DIGITAL_WALLET) .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .digitalCardArtToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .events( @@ -49,6 +50,7 @@ class TokenizationSimulateResponseTest { .status(Tokenization.Status.ACTIVE) .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) .tokenUniqueReference("token_unique_reference") + .tokenizationChannel(Tokenization.TokenizationChannel.DIGITAL_WALLET) .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .digitalCardArtToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .events( diff --git a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationTest.kt b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationTest.kt index 14e8c749..fff7a1c1 100644 --- a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationTest.kt +++ b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationTest.kt @@ -19,6 +19,7 @@ class TokenizationTest { .status(Tokenization.Status.ACTIVE) .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) .tokenUniqueReference("token_unique_reference") + .tokenizationChannel(Tokenization.TokenizationChannel.DIGITAL_WALLET) .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .digitalCardArtToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .events( @@ -42,6 +43,8 @@ class TokenizationTest { assertThat(tokenization.tokenRequestorName()) .isEqualTo(Tokenization.TokenRequestorName.AMAZON_ONE) assertThat(tokenization.tokenUniqueReference()).isEqualTo("token_unique_reference") + assertThat(tokenization.tokenizationChannel()) + .isEqualTo(Tokenization.TokenizationChannel.DIGITAL_WALLET) assertThat(tokenization.updatedAt()) .isEqualTo(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) assertThat(tokenization.digitalCardArtToken()) diff --git a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationUpdateDigitalCardArtResponseTest.kt b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationUpdateDigitalCardArtResponseTest.kt index f157f6fa..534e193a 100644 --- a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationUpdateDigitalCardArtResponseTest.kt +++ b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/models/TokenizationUpdateDigitalCardArtResponseTest.kt @@ -21,6 +21,7 @@ class TokenizationUpdateDigitalCardArtResponseTest { .status(Tokenization.Status.ACTIVE) .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) .tokenUniqueReference("token_unique_reference") + .tokenizationChannel(Tokenization.TokenizationChannel.DIGITAL_WALLET) .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .digitalCardArtToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .events( @@ -47,6 +48,7 @@ class TokenizationUpdateDigitalCardArtResponseTest { .status(Tokenization.Status.ACTIVE) .tokenRequestorName(Tokenization.TokenRequestorName.AMAZON_ONE) .tokenUniqueReference("token_unique_reference") + .tokenizationChannel(Tokenization.TokenizationChannel.DIGITAL_WALLET) .updatedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z")) .digitalCardArtToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .events( diff --git a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/services/blocking/FinancialAccountServiceTest.kt b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/services/blocking/FinancialAccountServiceTest.kt index 7f0da562..bc1c99ba 100644 --- a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/services/blocking/FinancialAccountServiceTest.kt +++ b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/services/blocking/FinancialAccountServiceTest.kt @@ -26,6 +26,7 @@ class FinancialAccountServiceTest { .nickname("nickname") .type(FinancialAccountCreateParams.Type.OPERATING) .accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") + .isForBenefitOf(true) .build() ) println(financialAccount) diff --git a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/services/blocking/TokenizationServiceTest.kt b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/services/blocking/TokenizationServiceTest.kt index 7696c498..3aad0f89 100644 --- a/lithic-kotlin-core/src/test/kotlin/com/lithic/api/services/blocking/TokenizationServiceTest.kt +++ b/lithic-kotlin-core/src/test/kotlin/com/lithic/api/services/blocking/TokenizationServiceTest.kt @@ -124,6 +124,7 @@ class TokenizationServiceTest { .tokenizationSource(TokenizationSimulateParams.TokenizationSource.APPLE_PAY) .accountScore(123L) .deviceScore(123L) + .entity("entity") .walletRecommendedDecision( TokenizationSimulateParams.WalletRecommendedDecision.APPROVED )